summaryrefslogtreecommitdiff
path: root/python/src/sa
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-09-03 10:50:07 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-09-03 10:50:07 -0400
commit9d412216579967822088b6439889c08d5354dd09 (patch)
tree168faa0dfced815a08b541cff6c7103191b34ca5 /python/src/sa
parenta7686cbe3a587081f14b3c8c228f260fbcdffba5 (diff)
Support Python 2.6
Diffstat (limited to 'python/src/sa')
-rw-r--r--python/src/sa/_sa.c12044
-rw-r--r--python/src/sa/rulefactory.pxi6
2 files changed, 5125 insertions, 6925 deletions
diff --git a/python/src/sa/_sa.c b/python/src/sa/_sa.c
index 2dfd212b..9f9590b7 100644
--- a/python/src/sa/_sa.c
+++ b/python/src/sa/_sa.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.17.beta1 on Tue Aug 14 22:38:21 2012 */
+/* Generated by Cython 0.16 on Mon Sep 3 10:45:22 2012 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@@ -47,6 +47,12 @@
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyCFunction_Call PyObject_Call
+#else
+ #define __Pyx_PyCFunction_Call PyCFunction_Call
+#endif
+
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
@@ -54,11 +60,8 @@
#define PY_FORMAT_SIZE_T ""
#define PyInt_FromSsize_t(z) PyInt_FromLong(z)
#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), \
- (PyObject*)0))
- #define PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_Check(o))
+ #define PyNumber_Index(o) PyNumber_Int(o)
+ #define PyIndex_Check(o) PyNumber_Check(o)
#define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#define __PYX_BUILD_PY_SSIZE_T "i"
#else
@@ -127,20 +130,14 @@
#endif
-#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_GET_LENGTH)
#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_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
- #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_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]))
#endif
#if PY_MAJOR_VERSION >= 3
@@ -332,11 +329,7 @@ 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
-#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
-#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#ifdef __GNUC__
@@ -413,7 +406,6 @@ struct __pyx_obj_3_sa_StringMap;
struct __pyx_obj_3_sa_VEB;
struct __pyx_obj_3_sa_ExtendedTrieNode;
struct __pyx_obj_3_sa_TrieMap;
-struct __pyx_obj_3_sa_DefaultScorer;
struct __pyx_obj_3_sa_Phrase;
struct __pyx_obj_3_sa___pyx_scope_struct____iter__;
struct __pyx_obj_3_sa_TrieTable;
@@ -428,7 +420,7 @@ struct __pyx_t_3_sa__Trie_Node;
struct __pyx_t_3_sa_match_node;
struct __pyx_t_3_sa_Matching;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":9
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":9
* from libc.string cimport memset, strcpy, strlen
*
* cdef struct _node: # <<<<<<<<<<<<<<
@@ -442,7 +434,7 @@ struct __pyx_t_3_sa__node {
int val;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":30
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":30
* _init_lower_mask()
*
* cdef struct _BitSet: # <<<<<<<<<<<<<<
@@ -456,7 +448,7 @@ struct __pyx_t_3_sa__BitSet {
int size;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":168
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":168
* return result
*
* cdef struct _VEB: # <<<<<<<<<<<<<<
@@ -473,7 +465,7 @@ struct __pyx_t_3_sa__VEB {
void **bottom;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":10
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":10
* cdef struct _Trie_Node # forward decl
*
* cdef struct _Trie_Edge: # <<<<<<<<<<<<<<
@@ -487,7 +479,7 @@ struct __pyx_t_3_sa__Trie_Edge {
struct __pyx_t_3_sa__Trie_Edge *smaller;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":8
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":8
* from libc.string cimport memset, memcpy
*
* cdef struct _Trie_Node # forward decl # <<<<<<<<<<<<<<
@@ -500,7 +492,7 @@ struct __pyx_t_3_sa__Trie_Node {
int arr_len;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":50
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":50
*
* # linked list structure for storing matches in BaselineRuleFactory
* cdef struct match_node: # <<<<<<<<<<<<<<
@@ -512,7 +504,7 @@ struct __pyx_t_3_sa_match_node {
struct __pyx_t_3_sa_match_node *next;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":146
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":146
*
* # struct used to encapsulate a single matching
* cdef struct Matching: # <<<<<<<<<<<<<<
@@ -527,7 +519,7 @@ struct __pyx_t_3_sa_Matching {
int size;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":202
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":202
*
*
* cdef class HieroCachingRuleFactory: # <<<<<<<<<<<<<<
@@ -576,7 +568,7 @@ struct __pyx_obj_3_sa_HieroCachingRuleFactory {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":141
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":141
* return self.syms[i]
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -591,7 +583,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct_4___iter__ {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":36
+/* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":36
* logger.info("LCP array completed")
*
* def compute_stats(self, int max_n): # <<<<<<<<<<<<<<
@@ -622,7 +614,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":923
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":923
* return sorted(result);
*
* def input(self, fwords): # <<<<<<<<<<<<<<
@@ -692,15 +684,13 @@ struct __pyx_obj_3_sa___pyx_scope_struct_11_input {
PyObject *__pyx_v_xnode;
PyObject *__pyx_v_xroot;
Py_ssize_t __pyx_t_0;
- PyObject *__pyx_t_1;
- Py_ssize_t __pyx_t_2;
- int __pyx_t_3;
+ Py_ssize_t __pyx_t_1;
+ PyObject *__pyx_t_2;
+ PyObject *__pyx_t_3;
PyObject *__pyx_t_4;
- PyObject *__pyx_t_5;
- int __pyx_t_6;
- Py_ssize_t __pyx_t_7;
- Py_ssize_t __pyx_t_8;
- Py_ssize_t __pyx_t_9;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ Py_ssize_t __pyx_t_6;
+ PyObject *(*__pyx_t_7)(PyObject *);
};
@@ -721,7 +711,7 @@ struct __pyx_obj_3_sa_IntList {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":340
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":340
*
*
* cdef class VEBIterator: # <<<<<<<<<<<<<<
@@ -735,7 +725,7 @@ struct __pyx_obj_3_sa_VEBIterator {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":47
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":47
*
*
* cdef class BiLex: # <<<<<<<<<<<<<<
@@ -756,7 +746,7 @@ struct __pyx_obj_3_sa_BiLex {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":20
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":20
* cdef int EPSILON = sym_fromstring('*EPS*', True)
*
* cdef class TrieNode: # <<<<<<<<<<<<<<
@@ -769,7 +759,7 @@ struct __pyx_obj_3_sa_TrieNode {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":5
+/* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":5
* as k most frequent n-grams"""
*
* cdef class LCP: # <<<<<<<<<<<<<<
@@ -783,7 +773,7 @@ struct __pyx_obj_3_sa_LCP {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":9
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":9
* from libc.string cimport memset, strcpy, strlen
*
* cdef class DataArray: # <<<<<<<<<<<<<<
@@ -802,7 +792,7 @@ struct __pyx_obj_3_sa_DataArray {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":100
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":100
*
*
* cdef class BitSetIterator: # <<<<<<<<<<<<<<
@@ -816,7 +806,7 @@ struct __pyx_obj_3_sa_BitSetIterator {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":188
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":188
*
*
* cdef class Precomputation: # <<<<<<<<<<<<<<
@@ -837,7 +827,7 @@ struct __pyx_obj_3_sa_Precomputation {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":15
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":15
* self.values.append(value)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -853,7 +843,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct_8___iter__ {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":6
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":6
* from libc.stdio cimport FILE, fclose, fopen
*
* cdef class SuffixArray: # <<<<<<<<<<<<<<
@@ -869,7 +859,7 @@ struct __pyx_obj_3_sa_SuffixArray {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":7
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":7
* cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1
*
* cdef class Alphabet: # <<<<<<<<<<<<<<
@@ -905,7 +895,7 @@ struct __pyx_obj_3_sa_Rule {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":187
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":187
* 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())) # <<<<<<<<<<<<<<
@@ -922,7 +912,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":73
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":73
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
@@ -939,7 +929,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":58
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":58
* # in the suffix array; if discontiguous, it is the set of
* # actual locations (packed into an array)
* cdef class PhraseLocation: # <<<<<<<<<<<<<<
@@ -958,7 +948,7 @@ struct __pyx_obj_3_sa_PhraseLocation {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":71
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":71
* self.read_text_data(fp)
*
* def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<<
@@ -986,7 +976,7 @@ struct __pyx_obj_3_sa_FeatureVector {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":190
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":190
* return ' ||| '.join(fields)
*
* def alignments(self): # <<<<<<<<<<<<<<
@@ -1003,7 +993,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct_7_alignments {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":23
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":23
* return ' '.join('%s=%s' % feat for feat in self)
*
* cdef class Scorer: # <<<<<<<<<<<<<<
@@ -1017,7 +1007,7 @@ struct __pyx_obj_3_sa_Scorer {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":8
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":8
* # May need to revisit if things get really tight, though.
*
* cdef class Alignment: # <<<<<<<<<<<<<<
@@ -1032,7 +1022,7 @@ struct __pyx_obj_3_sa_Alignment {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":118
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":118
* # (entirely C-implemented) _BitSet struct.
* # Very slow; use only for debugging
* cdef class BitSet: # <<<<<<<<<<<<<<
@@ -1045,7 +1035,7 @@ struct __pyx_obj_3_sa_BitSet {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":80
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":80
*
*
* cdef class Sampler: # <<<<<<<<<<<<<<
@@ -1059,7 +1049,7 @@ struct __pyx_obj_3_sa_Sampler {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":20
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":20
* yield (FD.word(self.names[i]), self.values[i])
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -1072,7 +1062,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct_9___str__ {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":8
+/* "/home/vchahune/tools/cdec/python/src/sa/str_map.pxi":8
* char* stringmap_word(StrMap *vocab, int i)
*
* cdef class StringMap: # <<<<<<<<<<<<<<
@@ -1086,7 +1076,7 @@ struct __pyx_obj_3_sa_StringMap {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":354
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":354
*
*
* cdef class VEB: # <<<<<<<<<<<<<<
@@ -1100,7 +1090,7 @@ struct __pyx_obj_3_sa_VEB {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":26
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":26
* self.children = {}
*
* cdef class ExtendedTrieNode(TrieNode): # <<<<<<<<<<<<<<
@@ -1115,7 +1105,7 @@ struct __pyx_obj_3_sa_ExtendedTrieNode {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":109
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":109
* trie_node_to_map(edge.node, result, prefix, include_zeros)
*
* cdef class TrieMap: # <<<<<<<<<<<<<<
@@ -1130,20 +1120,6 @@ struct __pyx_obj_3_sa_TrieMap {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":49
- * NFEATURES = 7
- *
- * cdef class DefaultScorer(Scorer): # <<<<<<<<<<<<<<
- * cdef BiLex ttable
- * cdef int* fid
- */
-struct __pyx_obj_3_sa_DefaultScorer {
- struct __pyx_obj_3_sa_Scorer __pyx_base;
- struct __pyx_obj_3_sa_BiLex *ttable;
- int *fid;
-};
-
-
/* "_sa.pxd":29
* cdef FloatList values
*
@@ -1161,7 +1137,7 @@ struct __pyx_obj_3_sa_Phrase {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":81
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":81
* free(self.arr)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -1177,7 +1153,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct____iter__ {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":37
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":37
*
*
* cdef class TrieTable: # <<<<<<<<<<<<<<
@@ -1192,7 +1168,7 @@ struct __pyx_obj_3_sa_TrieTable {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":183
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":183
* return self.f.arity()
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -1205,7 +1181,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct_5___str__ {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":21
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":21
*
* def __str__(self):
* return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<<
@@ -1240,7 +1216,7 @@ struct __pyx_obj_3_sa_FloatList {
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":8
+/* "/home/vchahune/tools/cdec/python/src/sa/str_map.pxi":8
* char* stringmap_word(StrMap *vocab, int i)
*
* cdef class StringMap: # <<<<<<<<<<<<<<
@@ -1255,7 +1231,7 @@ struct __pyx_vtabstruct_3_sa_StringMap {
static struct __pyx_vtabstruct_3_sa_StringMap *__pyx_vtabptr_3_sa_StringMap;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":9
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":9
* from libc.string cimport memset, strcpy, strlen
*
* cdef class DataArray: # <<<<<<<<<<<<<<
@@ -1270,7 +1246,7 @@ struct __pyx_vtabstruct_3_sa_DataArray {
static struct __pyx_vtabstruct_3_sa_DataArray *__pyx_vtabptr_3_sa_DataArray;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":109
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":109
* trie_node_to_map(edge.node, result, prefix, include_zeros)
*
* cdef class TrieMap: # <<<<<<<<<<<<<<
@@ -1285,35 +1261,7 @@ struct __pyx_vtabstruct_3_sa_TrieMap {
static struct __pyx_vtabstruct_3_sa_TrieMap *__pyx_vtabptr_3_sa_TrieMap;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":23
- * return ' '.join('%s=%s' % feat for feat in self)
- *
- * cdef class Scorer: # <<<<<<<<<<<<<<
- * cdef models
- * def __init__(self, *models):
- */
-
-struct __pyx_vtabstruct_3_sa_Scorer {
- struct __pyx_obj_3_sa_FeatureVector *(*score)(struct __pyx_obj_3_sa_Scorer *, struct __pyx_obj_3_sa_Phrase *, struct __pyx_obj_3_sa_Phrase *, unsigned int, unsigned int, unsigned int);
-};
-static struct __pyx_vtabstruct_3_sa_Scorer *__pyx_vtabptr_3_sa_Scorer;
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":49
- * NFEATURES = 7
- *
- * cdef class DefaultScorer(Scorer): # <<<<<<<<<<<<<<
- * cdef BiLex ttable
- * cdef int* fid
- */
-
-struct __pyx_vtabstruct_3_sa_DefaultScorer {
- struct __pyx_vtabstruct_3_sa_Scorer __pyx_base;
-};
-static struct __pyx_vtabstruct_3_sa_DefaultScorer *__pyx_vtabptr_3_sa_DefaultScorer;
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":8
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":8
* # May need to revisit if things get really tight, though.
*
* cdef class Alignment: # <<<<<<<<<<<<<<
@@ -1329,7 +1277,7 @@ struct __pyx_vtabstruct_3_sa_Alignment {
static struct __pyx_vtabstruct_3_sa_Alignment *__pyx_vtabptr_3_sa_Alignment;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":47
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":47
*
*
* cdef class BiLex: # <<<<<<<<<<<<<<
@@ -1348,7 +1296,7 @@ struct __pyx_vtabstruct_3_sa_BiLex {
static struct __pyx_vtabstruct_3_sa_BiLex *__pyx_vtabptr_3_sa_BiLex;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":9
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":9
* from libc.string cimport memset, memcpy
*
* cdef class IntList: # <<<<<<<<<<<<<<
@@ -1368,7 +1316,7 @@ struct __pyx_vtabstruct_3_sa_IntList {
static struct __pyx_vtabstruct_3_sa_IntList *__pyx_vtabptr_3_sa_IntList;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":4
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":4
* from libc.string cimport strsep, strcpy, strlen
*
* cdef class Phrase: # <<<<<<<<<<<<<<
@@ -1383,7 +1331,7 @@ struct __pyx_vtabstruct_3_sa_Phrase {
static struct __pyx_vtabstruct_3_sa_Phrase *__pyx_vtabptr_3_sa_Phrase;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":58
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":58
* # in the suffix array; if discontiguous, it is the set of
* # actual locations (packed into an array)
* cdef class PhraseLocation: # <<<<<<<<<<<<<<
@@ -1397,7 +1345,7 @@ struct __pyx_vtabstruct_3_sa_PhraseLocation {
static struct __pyx_vtabstruct_3_sa_PhraseLocation *__pyx_vtabptr_3_sa_PhraseLocation;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":188
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":188
*
*
* cdef class Precomputation: # <<<<<<<<<<<<<<
@@ -1412,7 +1360,21 @@ struct __pyx_vtabstruct_3_sa_Precomputation {
static struct __pyx_vtabstruct_3_sa_Precomputation *__pyx_vtabptr_3_sa_Precomputation;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":9
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":23
+ * return ' '.join('%s=%s' % feat for feat in self)
+ *
+ * cdef class Scorer: # <<<<<<<<<<<<<<
+ * cdef models
+ * def __init__(self, *models):
+ */
+
+struct __pyx_vtabstruct_3_sa_Scorer {
+ struct __pyx_obj_3_sa_FeatureVector *(*score)(struct __pyx_obj_3_sa_Scorer *, struct __pyx_obj_3_sa_Phrase *, struct __pyx_obj_3_sa_Phrase *, unsigned int, unsigned int, unsigned int);
+};
+static struct __pyx_vtabstruct_3_sa_Scorer *__pyx_vtabptr_3_sa_Scorer;
+
+
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":9
* from libc.string cimport memset, strcpy, strlen
*
* cdef class FloatList: # <<<<<<<<<<<<<<
@@ -1428,7 +1390,7 @@ struct __pyx_vtabstruct_3_sa_FloatList {
static struct __pyx_vtabstruct_3_sa_FloatList *__pyx_vtabptr_3_sa_FloatList;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":354
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":354
*
*
* cdef class VEB: # <<<<<<<<<<<<<<
@@ -1444,7 +1406,7 @@ struct __pyx_vtabstruct_3_sa_VEB {
static struct __pyx_vtabstruct_3_sa_VEB *__pyx_vtabptr_3_sa_VEB;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":7
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":7
* cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1
*
* cdef class Alphabet: # <<<<<<<<<<<<<<
@@ -1467,7 +1429,7 @@ struct __pyx_vtabstruct_3_sa_Alphabet {
static struct __pyx_vtabstruct_3_sa_Alphabet *__pyx_vtabptr_3_sa_Alphabet;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":202
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":202
*
*
* cdef class HieroCachingRuleFactory: # <<<<<<<<<<<<<<
@@ -1495,7 +1457,7 @@ struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory {
static struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *__pyx_vtabptr_3_sa_HieroCachingRuleFactory;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":6
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":6
* from libc.stdio cimport FILE, fclose, fopen
*
* cdef class SuffixArray: # <<<<<<<<<<<<<<
@@ -1669,47 +1631,42 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j
__Pyx_GetItemInt_List_Fast(o, i) : \
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
- if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
- PyObject *r = PyList_GET_ITEM(o, i);
- Py_INCREF(r);
- return r;
- }
- else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
- PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
- Py_INCREF(r);
- return r;
+ if (likely(o != Py_None)) {
+ if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+ PyObject *r = PyList_GET_ITEM(o, i);
+ Py_INCREF(r);
+ return r;
+ }
+ else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
+ PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
+ Py_INCREF(r);
+ return r;
+ }
}
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-#else
- return PySequence_GetItem(o, i);
-#endif
}
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
__Pyx_GetItemInt_Tuple_Fast(o, i) : \
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
- if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
- PyObject *r = PyTuple_GET_ITEM(o, i);
- Py_INCREF(r);
- return r;
- }
- else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
- PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
- Py_INCREF(r);
- return r;
+ if (likely(o != Py_None)) {
+ if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, i);
+ Py_INCREF(r);
+ return r;
+ }
+ else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
+ PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
+ Py_INCREF(r);
+ return r;
+ }
}
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-#else
- return PySequence_GetItem(o, i);
-#endif
}
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
__Pyx_GetItemInt_Fast(o, i) : \
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
if (PyList_CheckExact(o)) {
Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
@@ -1725,22 +1682,13 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i)
Py_INCREF(r);
return r;
}
- } else { /* inlined PySequence_GetItem() */
+ }
+ else if (likely(i >= 0)) {
PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
if (likely(m && m->sq_item)) {
- if (unlikely(i < 0) && likely(m->sq_length)) {
- Py_ssize_t l = m->sq_length(o);
- if (unlikely(l < 0)) return NULL;
- i += l;
- }
return m->sq_item(o, i);
}
}
-#else
- if (PySequence_Check(o)) {
- return PySequence_GetItem(o, i);
- }
-#endif
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
@@ -1753,10 +1701,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
if (likely(PyList_CheckExact(L))) {
- if (unlikely(PyList_Append(L, x) < 0)) return NULL;
+ if (PyList_Append(L, x) < 0) return NULL;
Py_INCREF(Py_None);
return Py_None; /* this is just to have an accurate signature */
- } else {
+ }
+ else {
PyObject *r, *m;
m = __Pyx_GetAttrString(L, "append");
if (!m) return NULL;
@@ -1774,11 +1723,9 @@ static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */
static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
-
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/
@@ -1793,7 +1740,6 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyOb
return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) {
-#if CYTHON_COMPILING_IN_CPYTHON
if (PyList_CheckExact(o)) {
Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
@@ -1803,74 +1749,26 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje
Py_DECREF(old);
return 1;
}
- } else { /* inlined PySequence_SetItem() */
+ }
+ else if (likely(i >= 0)) {
PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
if (likely(m && m->sq_ass_item)) {
- if (unlikely(i < 0) && likely(m->sq_length)) {
- Py_ssize_t l = m->sq_length(o);
- if (unlikely(l < 0)) return -1;
- i += l;
- }
return m->sq_ass_item(o, i, v);
}
}
-#else
-#if CYTHON_COMPILING_IN_PYPY
- if (PySequence_Check(o) && !PyDict_Check(o)) {
-#else
- if (PySequence_Check(o)) {
-#endif
- return PySequence_SetItem(o, i, v);
- }
-#endif
return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}
static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
-#if CYTHON_COMPILING_IN_PYPY
-#define __Pyx_PyObject_AsDouble(obj) \
-(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
- likely(PyInt_CheckExact(obj)) ? \
- PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
-#else
#define __Pyx_PyObject_AsDouble(obj) \
((likely(PyFloat_CheckExact(obj))) ? \
PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
-#endif
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
const char *name, int exact); /*proto*/
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
- PyListObject* L = (PyListObject*) list;
- Py_ssize_t len = Py_SIZE(list);
- if (likely(L->allocated > len)) {
- Py_INCREF(x);
- PyList_SET_ITEM(list, len, x);
- Py_SIZE(list) = len+1;
- return 0;
- }
- return PyList_Append(list, x);
-}
-#else
-#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
-#endif
-
-static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
-
-static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/
-
-static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
- int is_tuple, int has_known_size, int decref_tuple);
-
-static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
- Py_ssize_t* p_orig_length, int* p_is_dict);
-static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
- PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
-
#if PY_VERSION_HEX < 0x02050000
#ifndef PyAnySet_CheckExact
#define PyAnySet_CheckExact(ob) \
@@ -1904,9 +1802,15 @@ static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
#endif /* PyAnySet_CheckExact (<= Py2.4) */
#endif /* < Py2.5 */
+static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void);
+
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
PyObject *value;
+ if (unlikely(d == Py_None)) {
+ __Pyx_RaiseNoneIndexingError();
+ return NULL;
+ }
value = PyDict_GetItemWithError(d, key);
if (unlikely(!value)) {
if (!PyErr_Occurred())
@@ -2040,7 +1944,6 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value,
#define __Pyx_Generator_USED
#include <structmember.h>
-#include <frameobject.h>
typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
typedef struct {
PyObject_HEAD
@@ -2053,17 +1956,10 @@ typedef struct {
PyObject *exc_traceback;
PyObject *gi_weakreflist;
PyObject *classobj;
- PyObject *yieldfrom;
} __pyx_GeneratorObject;
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
PyObject *closure);
static int __pyx_Generator_init(void);
-static int __Pyx_Generator_clear(PyObject* self);
-#if 1 || PY_VERSION_HEX < 0x030300B0
-static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
-#else
-#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
-#endif
static int __Pyx_check_binary_version(void);
@@ -2119,7 +2015,6 @@ static PyTypeObject *__pyx_ptype_3_sa_TrieMap = 0;
static PyTypeObject *__pyx_ptype_3_sa_Precomputation = 0;
static PyTypeObject *__pyx_ptype_3_sa_SuffixArray = 0;
static PyTypeObject *__pyx_ptype_3_sa_Scorer = 0;
-static PyTypeObject *__pyx_ptype_3_sa_DefaultScorer = 0;
static PyTypeObject *__pyx_ptype_3_sa_TrieNode = 0;
static PyTypeObject *__pyx_ptype_3_sa_ExtendedTrieNode = 0;
static PyTypeObject *__pyx_ptype_3_sa_TrieTable = 0;
@@ -2343,8 +2238,6 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_4__iter__(struct __pyx_obj_3_sa_F
static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str___genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str__(struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self); /* proto */
static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_self, PyObject *__pyx_v_models); /* proto */
-static void __pyx_pf_3_sa_13DefaultScorer___dealloc__(struct __pyx_obj_3_sa_DefaultScorer *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_13DefaultScorer_2__init__(struct __pyx_obj_3_sa_DefaultScorer *__pyx_v_self, struct __pyx_obj_3_sa_BiLex *__pyx_v_ttable); /* proto */
static int __pyx_pf_3_sa_8TrieNode___cinit__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3_sa_8TrieNode_8children___get__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self); /* proto */
static int __pyx_pf_3_sa_8TrieNode_8children_2__set__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
@@ -2381,6 +2274,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_ifrom, PyObject *__pyx_v_dist); /* proto */
static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_ifrom, PyObject *__pyx_v_ito); /* proto */
static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v__columns, PyObject *__pyx_v_curr_idx, PyObject *__pyx_v_min_dist); /* proto */
+static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_22input(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords); /* proto */
static char __pyx_k_1[] = ".gz";
@@ -2445,41 +2339,41 @@ static char __pyx_k__i[] = "i";
static char __pyx_k__j[] = "j";
static char __pyx_k__r[] = "r";
static char __pyx_k__w[] = "w";
-static char __pyx_k_102[] = "Sampling strategy: uniform, max sample size = %d";
-static char __pyx_k_103[] = "Sampling strategy: no sampling";
-static char __pyx_k_105[] = "require_aligned_terminal";
-static char __pyx_k_106[] = "require_aligned_chunks";
-static char __pyx_k_107[] = "[X]";
-static char __pyx_k_108[] = "Must specify an alignment object";
-static char __pyx_k_110[] = "Reading precomputed data from file %s... ";
-static char __pyx_k_111[] = "Precomputation done with max nonterminals %d, decoder uses %d";
-static char __pyx_k_112[] = "Precomputation done with max terminals %d, decoder uses %d";
-static char __pyx_k_113[] = "Precomputation done with max initial size %d, decoder uses %d";
-static char __pyx_k_114[] = "Precomputation done with min gap size %d, decoder uses %d";
-static char __pyx_k_115[] = "Converting %d hash keys on precomputed inverted index... ";
-static char __pyx_k_116[] = "Converting %d hash keys on precomputed collocations... ";
-static char __pyx_k_117[] = "Processing precomputations took %f seconds";
-static char __pyx_k_118[] = "{";
- static char __pyx_k_119[] = "(";
-static char __pyx_k_120[] = "}";
-static char __pyx_k_121[] = "get_precomputed_collocation";
-static char __pyx_k_122[] = "double binary";
-static char __pyx_k_123[] = "Keyword trie error";
-static char __pyx_k_125[] = "get_all_nodes_isteps_away";
-static char __pyx_k_126[] = "Total time for rule lookup, extraction, and scoring = %f seconds";
-static char __pyx_k_127[] = " Extract time = %f seconds";
-static char __pyx_k_128[] = "No aligned terminals";
-static char __pyx_k_129[] = "Unaligned chunk";
-static char __pyx_k_130[] = "Gaps are not tight phrases";
-static char __pyx_k_131[] = "Inside edges of preceding subphrase are not tight";
-static char __pyx_k_132[] = "Inside edges of following subphrase are not tight";
-static char __pyx_k_133[] = "Subphrase [%d, %d] failed integrity check";
-static char __pyx_k_134[] = "Didn't extract anything from [%d, %d] -> [%d, %d]";
-static char __pyx_k_135[] = "Unable to extract basic phrase";
-static char __pyx_k_138[] = "/Users/vchahun/Sandbox/cdec/python/src/sa/_sa.pyx";
-static char __pyx_k_139[] = "cdec.sa";
-static char __pyx_k_143[] = "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi";
-static char __pyx_k_144[] = "*EPS*";
+static char __pyx_k_101[] = "Sampling strategy: uniform, max sample size = %d";
+static char __pyx_k_102[] = "Sampling strategy: no sampling";
+static char __pyx_k_104[] = "require_aligned_terminal";
+static char __pyx_k_105[] = "require_aligned_chunks";
+static char __pyx_k_106[] = "[X]";
+static char __pyx_k_107[] = "Must specify an alignment object";
+static char __pyx_k_109[] = "Reading precomputed data from file %s... ";
+static char __pyx_k_110[] = "Precomputation done with max nonterminals %d, decoder uses %d";
+static char __pyx_k_111[] = "Precomputation done with max terminals %d, decoder uses %d";
+static char __pyx_k_112[] = "Precomputation done with max initial size %d, decoder uses %d";
+static char __pyx_k_113[] = "Precomputation done with min gap size %d, decoder uses %d";
+static char __pyx_k_114[] = "Converting %d hash keys on precomputed inverted index... ";
+static char __pyx_k_115[] = "Converting %d hash keys on precomputed collocations... ";
+static char __pyx_k_116[] = "Processing precomputations took %f seconds";
+static char __pyx_k_117[] = "{";
+ static char __pyx_k_118[] = "(";
+static char __pyx_k_119[] = "}";
+static char __pyx_k_120[] = "get_precomputed_collocation";
+static char __pyx_k_121[] = "double binary";
+static char __pyx_k_122[] = "Keyword trie error";
+static char __pyx_k_124[] = "get_all_nodes_isteps_away";
+static char __pyx_k_125[] = "Total time for rule lookup, extraction, and scoring = %f seconds";
+static char __pyx_k_126[] = " Extract time = %f seconds";
+static char __pyx_k_127[] = "No aligned terminals";
+static char __pyx_k_128[] = "Unaligned chunk";
+static char __pyx_k_129[] = "Gaps are not tight phrases";
+static char __pyx_k_130[] = "Inside edges of preceding subphrase are not tight";
+static char __pyx_k_131[] = "Inside edges of following subphrase are not tight";
+static char __pyx_k_132[] = "Subphrase [%d, %d] failed integrity check";
+static char __pyx_k_133[] = "Didn't extract anything from [%d, %d] -> [%d, %d]";
+static char __pyx_k_134[] = "Unable to extract basic phrase";
+static char __pyx_k_137[] = "/home/vchahune/tools/cdec/python/src/sa/_sa.pyx";
+static char __pyx_k_138[] = "cdec.sa";
+static char __pyx_k_142[] = "/home/vchahune/tools/cdec/python/src/sa/sym.pxi";
+static char __pyx_k_143[] = "*EPS*";
static char __pyx_k__gc[] = "gc";
static char __pyx_k__sa[] = "sa";
static char __pyx_k___sa[] = "_sa";
@@ -2546,10 +2440,7 @@ static char __pyx_k__scores[] = "scores";
static char __pyx_k__sorted[] = "sorted";
static char __pyx_k__source[] = "source";
static char __pyx_k__string[] = "string";
-static char __pyx_k__ttable[] = "ttable";
static char __pyx_k__unlink[] = "unlink";
-static char __pyx_k__CountEF[] = "CountEF";
-static char __pyx_k__Counter[] = "Counter";
static char __pyx_k__advance[] = "advance";
static char __pyx_k__arr_low[] = "arr_low";
static char __pyx_k__collect[] = "collect";
@@ -2562,7 +2453,6 @@ static char __pyx_k__sa_high[] = "sa_high";
static char __pyx_k__sampler[] = "sampler";
static char __pyx_k__spanlen[] = "spanlen";
static char __pyx_k__GzipFile[] = "GzipFile";
-static char __pyx_k__MAXSCORE[] = "MAXSCORE";
static char __pyx_k____exit__[] = "__exit__";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____name__[] = "__name__";
@@ -2587,7 +2477,6 @@ static char __pyx_k__shortest[] = "shortest";
static char __pyx_k__terminal[] = "terminal";
static char __pyx_k__Exception[] = "Exception";
static char __pyx_k__INCREMENT[] = "INCREMENT";
-static char __pyx_k__NFEATURES[] = "NFEATURES";
static char __pyx_k__TypeError[] = "TypeError";
static char __pyx_k____enter__[] = "__enter__";
static char __pyx_k__alignment[] = "alignment";
@@ -2596,7 +2485,6 @@ static char __pyx_k__from_data[] = "from_data";
static char __pyx_k__from_text[] = "from_text";
static char __pyx_k__getLogger[] = "getLogger";
static char __pyx_k__getSentId[] = "getSentId";
-static char __pyx_k__get_score[] = "get_score";
static char __pyx_k__getrusage[] = "getrusage";
static char __pyx_k__increment[] = "increment";
static char __pyx_k__iteritems[] = "iteritems";
@@ -2626,21 +2514,15 @@ static char __pyx_k__read_bitext[] = "read_bitext";
static char __pyx_k__sample_size[] = "sample_size";
static char __pyx_k__suffix_link[] = "suffix_link";
static char __pyx_k__use_sent_id[] = "use_sent_id";
-static char __pyx_k__IsSingletonF[] = "IsSingletonF";
-static char __pyx_k__SampleCountF[] = "SampleCountF";
static char __pyx_k___doquicksort[] = "_doquicksort";
static char __pyx_k__gzip_or_text[] = "gzip_or_text";
static char __pyx_k__min_gap_size[] = "min_gap_size";
-static char __pyx_k__IsSingletonFE[] = "IsSingletonFE";
-static char __pyx_k__MaxLexEgivenF[] = "MaxLexEgivenF";
-static char __pyx_k__MaxLexFgivenE[] = "MaxLexFgivenE";
static char __pyx_k__StopIteration[] = "StopIteration";
static char __pyx_k__alphabet_size[] = "alphabet_size";
static char __pyx_k__tight_phrases[] = "tight_phrases";
static char __pyx_k__pattern2phrase[] = "pattern2phrase";
static char __pyx_k__read_text_data[] = "read_text_data";
static char __pyx_k__sym_fromstring[] = "sym_fromstring";
-static char __pyx_k__EgivenFCoherent[] = "EgivenFCoherent";
static char __pyx_k__by_slack_factor[] = "by_slack_factor";
static char __pyx_k__get_next_states[] = "get_next_states";
static char __pyx_k__num_subpatterns[] = "num_subpatterns";
@@ -2659,11 +2541,12 @@ static char __pyx_k__max_target_length[] = "max_target_length";
static char __pyx_k__train_min_gap_size[] = "train_min_gap_size";
static char __pyx_k__pattern2phrase_plus[] = "pattern2phrase_plus";
static PyObject *__pyx_kp_s_1;
+static PyObject *__pyx_kp_s_101;
static PyObject *__pyx_kp_s_102;
-static PyObject *__pyx_kp_s_103;
+static PyObject *__pyx_n_s_104;
static PyObject *__pyx_n_s_105;
-static PyObject *__pyx_n_s_106;
-static PyObject *__pyx_kp_s_108;
+static PyObject *__pyx_kp_s_107;
+static PyObject *__pyx_kp_s_109;
static PyObject *__pyx_kp_s_110;
static PyObject *__pyx_kp_s_111;
static PyObject *__pyx_kp_s_112;
@@ -2674,11 +2557,11 @@ static PyObject *__pyx_kp_s_116;
static PyObject *__pyx_kp_s_117;
static PyObject *__pyx_kp_s_118;
static PyObject *__pyx_kp_s_119;
-static PyObject *__pyx_kp_s_120;
-static PyObject *__pyx_n_s_121;
+static PyObject *__pyx_n_s_120;
+static PyObject *__pyx_kp_s_121;
static PyObject *__pyx_kp_s_122;
-static PyObject *__pyx_kp_s_123;
-static PyObject *__pyx_n_s_125;
+static PyObject *__pyx_n_s_124;
+static PyObject *__pyx_kp_s_125;
static PyObject *__pyx_kp_s_126;
static PyObject *__pyx_kp_s_127;
static PyObject *__pyx_kp_s_128;
@@ -2689,12 +2572,11 @@ static PyObject *__pyx_kp_s_131;
static PyObject *__pyx_kp_s_132;
static PyObject *__pyx_kp_s_133;
static PyObject *__pyx_kp_s_134;
-static PyObject *__pyx_kp_s_135;
+static PyObject *__pyx_kp_s_137;
static PyObject *__pyx_kp_s_138;
-static PyObject *__pyx_kp_s_139;
static PyObject *__pyx_kp_s_14;
+static PyObject *__pyx_kp_s_142;
static PyObject *__pyx_kp_s_143;
-static PyObject *__pyx_kp_s_144;
static PyObject *__pyx_kp_s_18;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_s_21;
@@ -2747,25 +2629,15 @@ static PyObject *__pyx_kp_s_95;
static PyObject *__pyx_kp_s_99;
static PyObject *__pyx_kp_s__0;
static PyObject *__pyx_kp_s__1;
-static PyObject *__pyx_n_s__CountEF;
-static PyObject *__pyx_n_s__Counter;
static PyObject *__pyx_n_s__END_OF_FILE;
static PyObject *__pyx_n_s__END_OF_LINE;
-static PyObject *__pyx_n_s__EgivenFCoherent;
static PyObject *__pyx_n_s__Exception;
static PyObject *__pyx_n_s__GzipFile;
static PyObject *__pyx_n_s__INCREMENT;
static PyObject *__pyx_n_s__INITIAL_CAPACITY;
static PyObject *__pyx_n_s__IndexError;
-static PyObject *__pyx_n_s__IsSingletonF;
-static PyObject *__pyx_n_s__IsSingletonFE;
-static PyObject *__pyx_n_s__MAXSCORE;
-static PyObject *__pyx_n_s__MaxLexEgivenF;
-static PyObject *__pyx_n_s__MaxLexFgivenE;
-static PyObject *__pyx_n_s__NFEATURES;
static PyObject *__pyx_n_s__NULL;
static PyObject *__pyx_n_s__RUSAGE_SELF;
-static PyObject *__pyx_n_s__SampleCountF;
static PyObject *__pyx_n_s__StopIteration;
static PyObject *__pyx_n_s__TypeError;
static PyObject *__pyx_n_s____enter__;
@@ -2822,7 +2694,6 @@ static PyObject *__pyx_n_s__get_e_id;
static PyObject *__pyx_n_s__get_f_id;
static PyObject *__pyx_n_s__get_id;
static PyObject *__pyx_n_s__get_next_states;
-static PyObject *__pyx_n_s__get_score;
static PyObject *__pyx_n_s__get_word;
static PyObject *__pyx_n_s__getchunk;
static PyObject *__pyx_n_s__getrusage;
@@ -2915,7 +2786,6 @@ static PyObject *__pyx_n_s__terminal;
static PyObject *__pyx_n_s__tight_phrases;
static PyObject *__pyx_n_s__toMap;
static PyObject *__pyx_n_s__train_min_gap_size;
-static PyObject *__pyx_n_s__ttable;
static PyObject *__pyx_n_s__unlink;
static PyObject *__pyx_n_s__use_baeza_yates;
static PyObject *__pyx_n_s__use_collocations;
@@ -2933,19 +2803,15 @@ static PyObject *__pyx_n_s__zip;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
-static PyObject *__pyx_int_3;
-static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
-static PyObject *__pyx_int_6;
static PyObject *__pyx_int_7;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_20;
-static PyObject *__pyx_int_neg_99;
static PyObject *__pyx_int_1000;
static PyObject *__pyx_int_65536;
static PyObject *__pyx_k_41;
-static PyObject *__pyx_k_101;
+static PyObject *__pyx_k_100;
static PyObject *__pyx_k_tuple_10;
static PyObject *__pyx_k_tuple_11;
static PyObject *__pyx_k_tuple_12;
@@ -2991,15 +2857,14 @@ static PyObject *__pyx_k_tuple_93;
static PyObject *__pyx_k_tuple_96;
static PyObject *__pyx_k_tuple_97;
static PyObject *__pyx_k_tuple_98;
-static PyObject *__pyx_k_tuple_100;
-static PyObject *__pyx_k_tuple_104;
-static PyObject *__pyx_k_tuple_109;
-static PyObject *__pyx_k_tuple_124;
-static PyObject *__pyx_k_tuple_136;
+static PyObject *__pyx_k_tuple_103;
+static PyObject *__pyx_k_tuple_108;
+static PyObject *__pyx_k_tuple_123;
+static PyObject *__pyx_k_tuple_135;
+static PyObject *__pyx_k_tuple_139;
static PyObject *__pyx_k_tuple_140;
-static PyObject *__pyx_k_tuple_141;
-static PyObject *__pyx_k_codeobj_137;
-static PyObject *__pyx_k_codeobj_142;
+static PyObject *__pyx_k_codeobj_136;
+static PyObject *__pyx_k_codeobj_141;
/* "_sa.pyx":5
* import gzip
@@ -3112,6 +2977,7 @@ static PyObject *__pyx_pw_3_sa_1gzip_or_text(PyObject *__pyx_self, PyObject *__p
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("gzip_or_text (wrapper)", 0);
+ __pyx_self = __pyx_self;
assert(__pyx_arg_filename); {
__pyx_v_filename = PyBytes_AsString(__pyx_arg_filename); if (unlikely((!__pyx_v_filename) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -3234,11 +3100,11 @@ static int __pyx_pw_3_sa_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject
int __pyx_v_size;
int __pyx_v_increment;
int __pyx_v_initial_len;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,&__pyx_n_s__increment,&__pyx_n_s__initial_len,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,&__pyx_n_s__increment,&__pyx_n_s__initial_len,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -3271,6 +3137,18 @@ static int __pyx_pw_3_sa_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
+ if (values[0]) {
+ } else {
+ __pyx_v_size = ((int)0);
+ }
+ if (values[1]) {
+ } else {
+ __pyx_v_increment = ((int)1);
+ }
+ if (values[2]) {
+ } else {
+ __pyx_v_initial_len = ((int)0);
+ }
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
@@ -3309,7 +3187,7 @@ static int __pyx_pw_3_sa_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":11
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":11
* cdef class FloatList:
*
* def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<<
@@ -3323,7 +3201,7 @@ static int __pyx_pf_3_sa_9FloatList___cinit__(struct __pyx_obj_3_sa_FloatList *_
int __pyx_t_1;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":12
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":12
*
* def __cinit__(self, int size=0, int increment=1, int initial_len=0):
* if initial_len > size: # <<<<<<<<<<<<<<
@@ -3333,7 +3211,7 @@ static int __pyx_pf_3_sa_9FloatList___cinit__(struct __pyx_obj_3_sa_FloatList *_
__pyx_t_1 = (__pyx_v_initial_len > __pyx_v_size);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":13
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -3345,7 +3223,7 @@ static int __pyx_pf_3_sa_9FloatList___cinit__(struct __pyx_obj_3_sa_FloatList *_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":14
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":14
* if initial_len > size:
* size = initial_len
* self.size = size # <<<<<<<<<<<<<<
@@ -3354,7 +3232,7 @@ static int __pyx_pf_3_sa_9FloatList___cinit__(struct __pyx_obj_3_sa_FloatList *_
*/
__pyx_v_self->size = __pyx_v_size;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":15
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":15
* size = initial_len
* self.size = size
* self.increment = increment # <<<<<<<<<<<<<<
@@ -3363,7 +3241,7 @@ static int __pyx_pf_3_sa_9FloatList___cinit__(struct __pyx_obj_3_sa_FloatList *_
*/
__pyx_v_self->increment = __pyx_v_increment;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":16
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":16
* self.size = size
* self.increment = increment
* self.len = initial_len # <<<<<<<<<<<<<<
@@ -3372,7 +3250,7 @@ static int __pyx_pf_3_sa_9FloatList___cinit__(struct __pyx_obj_3_sa_FloatList *_
*/
__pyx_v_self->len = __pyx_v_initial_len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":17
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":17
* self.increment = increment
* self.len = initial_len
* self.arr = <float*> malloc(size*sizeof(float)) # <<<<<<<<<<<<<<
@@ -3381,7 +3259,7 @@ static int __pyx_pf_3_sa_9FloatList___cinit__(struct __pyx_obj_3_sa_FloatList *_
*/
__pyx_v_self->arr = ((float *)malloc((__pyx_v_size * (sizeof(float)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":18
* self.len = initial_len
* self.arr = <float*> malloc(size*sizeof(float))
* memset(self.arr, 0, initial_len*sizeof(float)) # <<<<<<<<<<<<<<
@@ -3404,7 +3282,7 @@ static void __pyx_pw_3_sa_9FloatList_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":20
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":20
* memset(self.arr, 0, initial_len*sizeof(float))
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -3416,7 +3294,7 @@ static void __pyx_pf_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_3_sa_FloatLis
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":21
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":21
*
* def __dealloc__(self):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -3439,7 +3317,7 @@ static PyObject *__pyx_pw_3_sa_9FloatList_5__getitem__(PyObject *__pyx_v_self, P
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":23
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":23
* free(self.arr)
*
* def __getitem__(self, i): # <<<<<<<<<<<<<<
@@ -3462,7 +3340,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_Flo
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":24
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":24
*
* def __getitem__(self, i):
* j = i # <<<<<<<<<<<<<<
@@ -3472,7 +3350,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_Flo
__Pyx_INCREF(__pyx_v_i);
__pyx_v_j = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":25
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":25
* def __getitem__(self, i):
* j = i
* if i<0: # <<<<<<<<<<<<<<
@@ -3485,7 +3363,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_Flo
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":26
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":26
* j = i
* if i<0:
* j = self.len + i # <<<<<<<<<<<<<<
@@ -3504,7 +3382,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_Flo
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":27
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":27
* if i<0:
* j = self.len + i
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -3529,7 +3407,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_Flo
}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":28
+ /* "/home/vchahune/tools/cdec/python/src/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)) # <<<<<<<<<<<<<<
@@ -3564,7 +3442,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_Flo
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":29
+ /* "/home/vchahune/tools/cdec/python/src/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] # <<<<<<<<<<<<<<
@@ -3593,7 +3471,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_Flo
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":31
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":31
* return self.arr[j]
*
* cdef void set(self, int i, float v): # <<<<<<<<<<<<<<
@@ -3615,7 +3493,7 @@ static void __pyx_f_3_sa_9FloatList_set(struct __pyx_obj_3_sa_FloatList *__pyx_v
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":32
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":32
*
* cdef void set(self, int i, float v):
* j = i # <<<<<<<<<<<<<<
@@ -3624,7 +3502,7 @@ static void __pyx_f_3_sa_9FloatList_set(struct __pyx_obj_3_sa_FloatList *__pyx_v
*/
__pyx_v_j = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":33
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":33
* cdef void set(self, int i, float v):
* j = i
* if i<0: # <<<<<<<<<<<<<<
@@ -3634,7 +3512,7 @@ static void __pyx_f_3_sa_9FloatList_set(struct __pyx_obj_3_sa_FloatList *__pyx_v
__pyx_t_1 = (__pyx_v_i < 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":34
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":34
* j = i
* if i<0:
* j = self.len + i # <<<<<<<<<<<<<<
@@ -3646,7 +3524,7 @@ static void __pyx_f_3_sa_9FloatList_set(struct __pyx_obj_3_sa_FloatList *__pyx_v
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":35
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":35
* if i<0:
* j = self.len + i
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -3662,7 +3540,7 @@ static void __pyx_f_3_sa_9FloatList_set(struct __pyx_obj_3_sa_FloatList *__pyx_v
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":36
+ /* "/home/vchahune/tools/cdec/python/src/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)) # <<<<<<<<<<<<<<
@@ -3699,7 +3577,7 @@ static void __pyx_f_3_sa_9FloatList_set(struct __pyx_obj_3_sa_FloatList *__pyx_v
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":37
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -3729,7 +3607,7 @@ static int __pyx_pw_3_sa_9FloatList_7__setitem__(PyObject *__pyx_v_self, PyObjec
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":39
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":39
* self.arr[j] = v
*
* def __setitem__(self, i, val): # <<<<<<<<<<<<<<
@@ -3747,7 +3625,7 @@ static int __pyx_pf_3_sa_9FloatList_6__setitem__(struct __pyx_obj_3_sa_FloatList
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setitem__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":40
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":40
*
* def __setitem__(self, i, val):
* self.set(i, val) # <<<<<<<<<<<<<<
@@ -3779,7 +3657,7 @@ static Py_ssize_t __pyx_pw_3_sa_9FloatList_9__len__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":42
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":42
* self.set(i, val)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -3792,7 +3670,7 @@ static Py_ssize_t __pyx_pf_3_sa_9FloatList_8__len__(struct __pyx_obj_3_sa_FloatL
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":43
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":43
*
* def __len__(self):
* return self.len # <<<<<<<<<<<<<<
@@ -3829,7 +3707,7 @@ static PyObject *__pyx_pw_3_sa_9FloatList_11append(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":45
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":45
* return self.len
*
* def append(self, float val): # <<<<<<<<<<<<<<
@@ -3843,7 +3721,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_10append(struct __pyx_obj_3_sa_FloatLi
int __pyx_t_1;
__Pyx_RefNannySetupContext("append", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":46
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":46
*
* def append(self, float val):
* if self.len == self.size: # <<<<<<<<<<<<<<
@@ -3853,7 +3731,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_10append(struct __pyx_obj_3_sa_FloatLi
__pyx_t_1 = (__pyx_v_self->len == __pyx_v_self->size);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":47
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":47
* def append(self, float val):
* if self.len == self.size:
* self.size = self.size + self.increment # <<<<<<<<<<<<<<
@@ -3862,7 +3740,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_10append(struct __pyx_obj_3_sa_FloatLi
*/
__pyx_v_self->size = (__pyx_v_self->size + __pyx_v_self->increment);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":48
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":48
* if self.len == self.size:
* self.size = self.size + self.increment
* self.arr = <float*> realloc(self.arr, self.size*sizeof(float)) # <<<<<<<<<<<<<<
@@ -3874,7 +3752,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_10append(struct __pyx_obj_3_sa_FloatLi
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":49
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":49
* self.size = self.size + self.increment
* self.arr = <float*> realloc(self.arr, self.size*sizeof(float))
* self.arr[self.len] = val # <<<<<<<<<<<<<<
@@ -3883,7 +3761,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_10append(struct __pyx_obj_3_sa_FloatLi
*/
(__pyx_v_self->arr[__pyx_v_self->len]) = __pyx_v_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":50
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":50
* self.arr = <float*> realloc(self.arr, self.size*sizeof(float))
* self.arr[self.len] = val
* self.len = self.len + 1 # <<<<<<<<<<<<<<
@@ -3898,7 +3776,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_10append(struct __pyx_obj_3_sa_FloatLi
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":52
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":52
* self.len = self.len + 1
*
* cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -3910,7 +3788,7 @@ static void __pyx_f_3_sa_9FloatList_write_handle(struct __pyx_obj_3_sa_FloatList
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":53
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":53
*
* cdef void write_handle(self, FILE* f):
* fwrite(&(self.len), sizeof(float), 1, f) # <<<<<<<<<<<<<<
@@ -3919,7 +3797,7 @@ static void __pyx_f_3_sa_9FloatList_write_handle(struct __pyx_obj_3_sa_FloatList
*/
fwrite((&__pyx_v_self->len), (sizeof(float)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -3952,7 +3830,7 @@ static PyObject *__pyx_pw_3_sa_9FloatList_13write(PyObject *__pyx_v_self, PyObje
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":56
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":56
* fwrite(self.arr, sizeof(float), self.len, f)
*
* def write(self, char* filename): # <<<<<<<<<<<<<<
@@ -3966,7 +3844,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_12write(struct __pyx_obj_3_sa_FloatLis
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":58
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":58
* def write(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -3975,7 +3853,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_12write(struct __pyx_obj_3_sa_FloatLis
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__w);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":59
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":59
* cdef FILE* f
* f = fopen(filename, "w")
* self.write_handle(f) # <<<<<<<<<<<<<<
@@ -3984,7 +3862,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_12write(struct __pyx_obj_3_sa_FloatLis
*/
((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":60
* f = fopen(filename, "w")
* self.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -3999,7 +3877,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_12write(struct __pyx_obj_3_sa_FloatLis
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":62
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":62
* fclose(f)
*
* cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -4011,7 +3889,7 @@ static void __pyx_f_3_sa_9FloatList_read_handle(struct __pyx_obj_3_sa_FloatList
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":63
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":63
*
* cdef void read_handle(self, FILE* f):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -4020,7 +3898,7 @@ static void __pyx_f_3_sa_9FloatList_read_handle(struct __pyx_obj_3_sa_FloatList
*/
free(__pyx_v_self->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":64
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":64
* cdef void read_handle(self, FILE* f):
* free(self.arr)
* fread(&(self.len), sizeof(float), 1, f) # <<<<<<<<<<<<<<
@@ -4029,7 +3907,7 @@ static void __pyx_f_3_sa_9FloatList_read_handle(struct __pyx_obj_3_sa_FloatList
*/
fread((&__pyx_v_self->len), (sizeof(float)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":65
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":65
* free(self.arr)
* fread(&(self.len), sizeof(float), 1, f)
* self.arr = <float*> malloc(self.len * sizeof(float)) # <<<<<<<<<<<<<<
@@ -4038,7 +3916,7 @@ static void __pyx_f_3_sa_9FloatList_read_handle(struct __pyx_obj_3_sa_FloatList
*/
__pyx_v_self->arr = ((float *)malloc((__pyx_v_self->len * (sizeof(float)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":66
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":66
* fread(&(self.len), sizeof(float), 1, f)
* self.arr = <float*> malloc(self.len * sizeof(float))
* self.size = self.len # <<<<<<<<<<<<<<
@@ -4047,7 +3925,7 @@ static void __pyx_f_3_sa_9FloatList_read_handle(struct __pyx_obj_3_sa_FloatList
*/
__pyx_v_self->size = __pyx_v_self->len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":67
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":67
* self.arr = <float*> malloc(self.len * sizeof(float))
* self.size = self.len
* fread(self.arr, sizeof(float), self.len, f) # <<<<<<<<<<<<<<
@@ -4080,7 +3958,7 @@ static PyObject *__pyx_pw_3_sa_9FloatList_15read(PyObject *__pyx_v_self, PyObjec
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":69
+/* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":69
* fread(self.arr, sizeof(float), self.len, f)
*
* def read(self, char* filename): # <<<<<<<<<<<<<<
@@ -4094,7 +3972,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_14read(struct __pyx_obj_3_sa_FloatList
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":71
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":71
* def read(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -4103,7 +3981,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_14read(struct __pyx_obj_3_sa_FloatList
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__r);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":72
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":72
* cdef FILE* f
* f = fopen(filename, "r")
* self.read_handle(f) # <<<<<<<<<<<<<<
@@ -4111,7 +3989,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_14read(struct __pyx_obj_3_sa_FloatList
*/
((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":73
+ /* "/home/vchahune/tools/cdec/python/src/sa/float_list.pxi":73
* f = fopen(filename, "r")
* self.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -4130,11 +4008,11 @@ static int __pyx_pw_3_sa_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *_
int __pyx_v_size;
int __pyx_v_increment;
int __pyx_v_initial_len;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,&__pyx_n_s__increment,&__pyx_n_s__initial_len,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,&__pyx_n_s__increment,&__pyx_n_s__initial_len,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -4167,6 +4045,18 @@ static int __pyx_pw_3_sa_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *_
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
+ if (values[0]) {
+ } else {
+ __pyx_v_size = ((int)0);
+ }
+ if (values[1]) {
+ } else {
+ __pyx_v_increment = ((int)1);
+ }
+ if (values[2]) {
+ } else {
+ __pyx_v_initial_len = ((int)0);
+ }
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
@@ -4205,7 +4095,7 @@ static int __pyx_pw_3_sa_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":11
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":11
* cdef class IntList:
*
* def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<<
@@ -4219,7 +4109,7 @@ static int __pyx_pf_3_sa_7IntList___cinit__(struct __pyx_obj_3_sa_IntList *__pyx
int __pyx_t_1;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":12
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":12
*
* def __cinit__(self, int size=0, int increment=1, int initial_len=0):
* if initial_len > size: # <<<<<<<<<<<<<<
@@ -4229,7 +4119,7 @@ static int __pyx_pf_3_sa_7IntList___cinit__(struct __pyx_obj_3_sa_IntList *__pyx
__pyx_t_1 = (__pyx_v_initial_len > __pyx_v_size);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":13
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -4241,7 +4131,7 @@ static int __pyx_pf_3_sa_7IntList___cinit__(struct __pyx_obj_3_sa_IntList *__pyx
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":14
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":14
* if initial_len > size:
* size = initial_len
* self.size = size # <<<<<<<<<<<<<<
@@ -4250,7 +4140,7 @@ static int __pyx_pf_3_sa_7IntList___cinit__(struct __pyx_obj_3_sa_IntList *__pyx
*/
__pyx_v_self->size = __pyx_v_size;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":15
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":15
* size = initial_len
* self.size = size
* self.increment = increment # <<<<<<<<<<<<<<
@@ -4259,7 +4149,7 @@ static int __pyx_pf_3_sa_7IntList___cinit__(struct __pyx_obj_3_sa_IntList *__pyx
*/
__pyx_v_self->increment = __pyx_v_increment;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":16
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":16
* self.size = size
* self.increment = increment
* self.len = initial_len # <<<<<<<<<<<<<<
@@ -4268,7 +4158,7 @@ static int __pyx_pf_3_sa_7IntList___cinit__(struct __pyx_obj_3_sa_IntList *__pyx
*/
__pyx_v_self->len = __pyx_v_initial_len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":17
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":17
* self.increment = increment
* self.len = initial_len
* self.arr = <int*> malloc(size*sizeof(int)) # <<<<<<<<<<<<<<
@@ -4277,7 +4167,7 @@ static int __pyx_pf_3_sa_7IntList___cinit__(struct __pyx_obj_3_sa_IntList *__pyx
*/
__pyx_v_self->arr = ((int *)malloc((__pyx_v_size * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":18
* self.len = initial_len
* self.arr = <int*> malloc(size*sizeof(int))
* memset(self.arr, 0, initial_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -4302,7 +4192,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_3__str__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":20
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":20
* memset(self.arr, 0, initial_len*sizeof(int))
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -4325,7 +4215,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":22
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":22
* def __str__(self):
* cdef unsigned i
* ret = "IntList[" # <<<<<<<<<<<<<<
@@ -4335,7 +4225,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
__Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
__pyx_v_ret = ((PyObject *)__pyx_kp_s_3);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":23
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":23
* cdef unsigned i
* ret = "IntList["
* for idx in range(self.size): # <<<<<<<<<<<<<<
@@ -4346,7 +4236,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_idx = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":24
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":24
* ret = "IntList["
* for idx in range(self.size):
* if idx>0: # <<<<<<<<<<<<<<
@@ -4356,7 +4246,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
__pyx_t_3 = (__pyx_v_idx > 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":25
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":25
* for idx in range(self.size):
* if idx>0:
* ret += "," # <<<<<<<<<<<<<<
@@ -4372,7 +4262,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":26
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":26
* if idx>0:
* ret += ","
* ret += str(self.arr[idx]) # <<<<<<<<<<<<<<
@@ -4397,7 +4287,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
__pyx_t_5 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":27
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":27
* ret += ","
* ret += str(self.arr[idx])
* ret += "]" # <<<<<<<<<<<<<<
@@ -4410,7 +4300,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
__pyx_v_ret = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":28
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":28
* ret += str(self.arr[idx])
* ret += "]"
* ret += "len=" # <<<<<<<<<<<<<<
@@ -4423,7 +4313,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
__pyx_v_ret = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":29
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":29
* ret += "]"
* ret += "len="
* ret += self.len # <<<<<<<<<<<<<<
@@ -4439,7 +4329,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
__pyx_v_ret = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":30
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":30
* ret += "len="
* ret += self.len
* return ret # <<<<<<<<<<<<<<
@@ -4476,7 +4366,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_5index(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":32
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":32
* return ret
*
* def index(self, val): # <<<<<<<<<<<<<<
@@ -4498,7 +4388,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_4index(struct __pyx_obj_3_sa_IntList *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("index", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":34
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":34
* def index(self, val):
* cdef unsigned i
* for i in range(self.len): # <<<<<<<<<<<<<<
@@ -4509,7 +4399,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_4index(struct __pyx_obj_3_sa_IntList *__
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":35
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":35
* cdef unsigned i
* for i in range(self.len):
* if self.arr[i] == val: # <<<<<<<<<<<<<<
@@ -4525,7 +4415,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_4index(struct __pyx_obj_3_sa_IntList *__
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":36
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":36
* for i in range(self.len):
* if self.arr[i] == val:
* return i # <<<<<<<<<<<<<<
@@ -4543,7 +4433,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_4index(struct __pyx_obj_3_sa_IntList *__
__pyx_L5:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":37
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":37
* if self.arr[i] == val:
* return i
* return IndexError # <<<<<<<<<<<<<<
@@ -4573,11 +4463,11 @@ static PyObject *__pyx_pw_3_sa_7IntList_7partition(PyObject *__pyx_v_self, PyObj
static PyObject *__pyx_pw_3_sa_7IntList_7partition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_start = 0;
PyObject *__pyx_v_end = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__end,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("partition (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__end,0};
PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -4591,10 +4481,12 @@ static PyObject *__pyx_pw_3_sa_7IntList_7partition(PyObject *__pyx_v_self, PyObj
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("partition", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -4624,7 +4516,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_7partition(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":39
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":39
* return IndexError
*
* def partition(self,start,end): # <<<<<<<<<<<<<<
@@ -4650,7 +4542,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("partition", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":40
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":40
*
* def partition(self,start,end):
* pivot = self.arr[end] # <<<<<<<<<<<<<<
@@ -4663,7 +4555,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_v_pivot = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":41
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":41
* def partition(self,start,end):
* pivot = self.arr[end]
* bottom = start-1 # <<<<<<<<<<<<<<
@@ -4675,7 +4567,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_v_bottom = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":42
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":42
* pivot = self.arr[end]
* bottom = start-1
* top = end # <<<<<<<<<<<<<<
@@ -4685,7 +4577,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__Pyx_INCREF(__pyx_v_end);
__pyx_v_top = __pyx_v_end;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":43
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":43
* bottom = start-1
* top = end
* done = 0 # <<<<<<<<<<<<<<
@@ -4694,7 +4586,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
*/
__pyx_v_done = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":44
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":44
* top = end
* done = 0
* while not done: # <<<<<<<<<<<<<<
@@ -4705,7 +4597,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_t_3 = (!__pyx_v_done);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":45
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":45
* done = 0
* while not done:
* while not done: # <<<<<<<<<<<<<<
@@ -4716,7 +4608,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_t_3 = (!__pyx_v_done);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":46
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":46
* while not done:
* while not done:
* bottom += 1 # <<<<<<<<<<<<<<
@@ -4729,7 +4621,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_v_bottom = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":47
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":47
* while not done:
* bottom += 1
* if bottom == top: # <<<<<<<<<<<<<<
@@ -4742,7 +4634,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":48
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":48
* bottom += 1
* if bottom == top:
* done = 1 # <<<<<<<<<<<<<<
@@ -4751,7 +4643,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
*/
__pyx_v_done = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":49
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":49
* if bottom == top:
* done = 1
* break # <<<<<<<<<<<<<<
@@ -4763,7 +4655,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":50
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":50
* done = 1
* break
* if self.arr[bottom] > pivot: # <<<<<<<<<<<<<<
@@ -4780,7 +4672,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":51
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":51
* break
* if self.arr[bottom] > pivot:
* self.arr[top] = self.arr[bottom] # <<<<<<<<<<<<<<
@@ -4791,7 +4683,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__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]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":52
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":52
* if self.arr[bottom] > pivot:
* self.arr[top] = self.arr[bottom]
* break # <<<<<<<<<<<<<<
@@ -4805,7 +4697,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
}
__pyx_L6_break:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":53
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":53
* self.arr[top] = self.arr[bottom]
* break
* while not done: # <<<<<<<<<<<<<<
@@ -4816,7 +4708,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_t_3 = (!__pyx_v_done);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":54
* break
* while not done:
* top -= 1 # <<<<<<<<<<<<<<
@@ -4829,7 +4721,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_v_top = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":55
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":55
* while not done:
* top -= 1
* if top == bottom: # <<<<<<<<<<<<<<
@@ -4842,7 +4734,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":56
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":56
* top -= 1
* if top == bottom:
* done = 1 # <<<<<<<<<<<<<<
@@ -4851,7 +4743,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
*/
__pyx_v_done = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":57
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":57
* if top == bottom:
* done = 1
* break # <<<<<<<<<<<<<<
@@ -4863,7 +4755,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":58
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":58
* done = 1
* break
* if self.arr[top] < pivot: # <<<<<<<<<<<<<<
@@ -4880,7 +4772,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":59
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":59
* break
* if self.arr[top] < pivot:
* self.arr[bottom] = self.arr[top] # <<<<<<<<<<<<<<
@@ -4891,7 +4783,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__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]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":60
* if self.arr[top] < pivot:
* self.arr[bottom] = self.arr[top]
* break # <<<<<<<<<<<<<<
@@ -4906,7 +4798,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_L10_break:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":61
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":61
* self.arr[bottom] = self.arr[top]
* break
* self.arr[top] = pivot # <<<<<<<<<<<<<<
@@ -4917,7 +4809,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":62
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":62
* break
* self.arr[top] = pivot
* return top # <<<<<<<<<<<<<<
@@ -4950,11 +4842,11 @@ static PyObject *__pyx_pw_3_sa_7IntList_9_doquicksort(PyObject *__pyx_v_self, Py
static PyObject *__pyx_pw_3_sa_7IntList_9_doquicksort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_start = 0;
PyObject *__pyx_v_end = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__end,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_doquicksort (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__end,0};
PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -4968,10 +4860,12 @@ static PyObject *__pyx_pw_3_sa_7IntList_9_doquicksort(PyObject *__pyx_v_self, Py
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__end);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_doquicksort", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -5001,7 +4895,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_9_doquicksort(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":64
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":64
* return top
*
* def _doquicksort(self,start,end): # <<<<<<<<<<<<<<
@@ -5022,7 +4916,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_8_doquicksort(struct __pyx_obj_3_sa_IntL
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_doquicksort", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":65
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":65
*
* def _doquicksort(self,start,end):
* if start < end: # <<<<<<<<<<<<<<
@@ -5035,7 +4929,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_8_doquicksort(struct __pyx_obj_3_sa_IntL
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":66
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":66
* def _doquicksort(self,start,end):
* if start < end:
* split = self.partition(start,end) # <<<<<<<<<<<<<<
@@ -5059,7 +4953,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_8_doquicksort(struct __pyx_obj_3_sa_IntL
__pyx_v_split = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":67
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":67
* if start < end:
* split = self.partition(start,end)
* self._doquicksort(start,split-1) # <<<<<<<<<<<<<<
@@ -5084,7 +4978,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_8_doquicksort(struct __pyx_obj_3_sa_IntL
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":68
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":68
* split = self.partition(start,end)
* self._doquicksort(start,split-1)
* self._doquicksort(split+1,end) # <<<<<<<<<<<<<<
@@ -5112,7 +5006,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_8_doquicksort(struct __pyx_obj_3_sa_IntL
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":70
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":70
* self._doquicksort(split+1,end)
* else:
* return # <<<<<<<<<<<<<<
@@ -5151,7 +5045,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_11sort(PyObject *__pyx_v_self, CYTHON_UN
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":72
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":72
* return
*
* def sort(self): # <<<<<<<<<<<<<<
@@ -5170,7 +5064,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_10sort(struct __pyx_obj_3_sa_IntList *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("sort", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":73
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":73
*
* def sort(self):
* self._doquicksort(0,self.len-1) # <<<<<<<<<<<<<<
@@ -5220,7 +5114,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_13reset(PyObject *__pyx_v_self, CYTHON_U
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":75
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":75
* self._doquicksort(0,self.len-1)
*
* def reset(self): # <<<<<<<<<<<<<<
@@ -5233,7 +5127,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_12reset(struct __pyx_obj_3_sa_IntList *_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reset", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":76
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":76
*
* def reset(self):
* self.len = 0 # <<<<<<<<<<<<<<
@@ -5257,7 +5151,7 @@ static void __pyx_pw_3_sa_7IntList_15__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":78
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":78
* self.len = 0
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -5269,7 +5163,7 @@ static void __pyx_pf_3_sa_7IntList_14__dealloc__(struct __pyx_obj_3_sa_IntList *
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":79
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":79
*
* def __dealloc__(self):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -5293,7 +5187,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_17__iter__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":81
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":81
* free(self.arr)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -5356,7 +5250,7 @@ static PyObject *__pyx_gb_3_sa_7IntList_18generator(__pyx_GeneratorObject *__pyx
__pyx_L3_first_run:;
if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":83
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":83
* def __iter__(self):
* cdef int i
* for i in range(self.len): # <<<<<<<<<<<<<<
@@ -5367,7 +5261,7 @@ static PyObject *__pyx_gb_3_sa_7IntList_18generator(__pyx_GeneratorObject *__pyx
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_cur_scope->__pyx_v_i = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":84
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":84
* cdef int i
* for i in range(self.len):
* yield self.arr[i] # <<<<<<<<<<<<<<
@@ -5398,7 +5292,6 @@ static PyObject *__pyx_gb_3_sa_7IntList_18generator(__pyx_GeneratorObject *__pyx
__pyx_L0:;
__Pyx_XDECREF(__pyx_r);
__pyx_generator->resume_label = -1;
- __Pyx_Generator_clear((PyObject*)__pyx_generator);
__Pyx_RefNannyFinishContext();
return NULL;
}
@@ -5414,7 +5307,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_20__getitem__(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":86
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":86
* yield self.arr[i]
*
* def __getitem__(self, index): # <<<<<<<<<<<<<<
@@ -5444,7 +5337,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":88
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":88
* def __getitem__(self, index):
* cdef int i, j, k
* if isinstance(index, int): # <<<<<<<<<<<<<<
@@ -5457,7 +5350,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":89
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":89
* cdef int i, j, k
* if isinstance(index, int):
* j = index # <<<<<<<<<<<<<<
@@ -5467,7 +5360,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_3 = __Pyx_PyInt_AsInt(__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":90
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":90
* if isinstance(index, int):
* j = index
* if j < 0: # <<<<<<<<<<<<<<
@@ -5477,7 +5370,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_2 = (__pyx_v_j < 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":91
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":91
* j = index
* if j < 0:
* j = self.len + j # <<<<<<<<<<<<<<
@@ -5489,7 +5382,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":92
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":92
* if j < 0:
* j = self.len + j
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -5505,7 +5398,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":93
+ /* "/home/vchahune/tools/cdec/python/src/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)) # <<<<<<<<<<<<<<
@@ -5540,7 +5433,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":94
+ /* "/home/vchahune/tools/cdec/python/src/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] # <<<<<<<<<<<<<<
@@ -5556,7 +5449,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":95
+ /* "/home/vchahune/tools/cdec/python/src/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): # <<<<<<<<<<<<<<
@@ -5569,7 +5462,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":96
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":96
* return self.arr[j]
* elif isinstance(index, slice):
* i = index.start # <<<<<<<<<<<<<<
@@ -5582,7 +5475,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_i = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":97
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":97
* elif isinstance(index, slice):
* i = index.start
* j = index.stop # <<<<<<<<<<<<<<
@@ -5595,7 +5488,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_j = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":98
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":98
* i = index.start
* j = index.stop
* if i < 0: # <<<<<<<<<<<<<<
@@ -5605,7 +5498,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_5 = (__pyx_v_i < 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":99
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":99
* j = index.stop
* if i < 0:
* i = self.len + i # <<<<<<<<<<<<<<
@@ -5617,7 +5510,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":100
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":100
* if i < 0:
* i = self.len + i
* if j < 0: # <<<<<<<<<<<<<<
@@ -5627,7 +5520,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_5 = (__pyx_v_j < 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":101
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":101
* i = self.len + i
* if j < 0:
* j = self.len + j # <<<<<<<<<<<<<<
@@ -5639,7 +5532,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":102
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -5667,7 +5560,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":103
+ /* "/home/vchahune/tools/cdec/python/src/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)) # <<<<<<<<<<<<<<
@@ -5709,7 +5602,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":104
+ /* "/home/vchahune/tools/cdec/python/src/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 = () # <<<<<<<<<<<<<<
@@ -5719,7 +5612,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
__pyx_v_result = __pyx_empty_tuple;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":105
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -5729,7 +5622,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_3 = __pyx_v_j;
for (__pyx_v_k = __pyx_v_i; __pyx_v_k < __pyx_t_3; __pyx_v_k++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":106
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":106
* result = ()
* for k from i <= k < j:
* result = result + (self.arr[k],) # <<<<<<<<<<<<<<
@@ -5751,7 +5644,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_9 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":107
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":107
* for k from i <= k < j:
* result = result + (self.arr[k],)
* return result # <<<<<<<<<<<<<<
@@ -5766,7 +5659,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":109
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":109
* return result
* else:
* raise TypeError("Illegal key type %s for IntList" % type(index)) # <<<<<<<<<<<<<<
@@ -5805,7 +5698,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":111
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":111
* raise TypeError("Illegal key type %s for IntList" % type(index))
*
* cdef void set(self, int i, int val): # <<<<<<<<<<<<<<
@@ -5827,7 +5720,7 @@ static void __pyx_f_3_sa_7IntList_set(struct __pyx_obj_3_sa_IntList *__pyx_v_sel
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":112
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":112
*
* cdef void set(self, int i, int val):
* j = i # <<<<<<<<<<<<<<
@@ -5836,7 +5729,7 @@ static void __pyx_f_3_sa_7IntList_set(struct __pyx_obj_3_sa_IntList *__pyx_v_sel
*/
__pyx_v_j = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":113
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":113
* cdef void set(self, int i, int val):
* j = i
* if i<0: # <<<<<<<<<<<<<<
@@ -5846,7 +5739,7 @@ static void __pyx_f_3_sa_7IntList_set(struct __pyx_obj_3_sa_IntList *__pyx_v_sel
__pyx_t_1 = (__pyx_v_i < 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":114
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":114
* j = i
* if i<0:
* j = self.len + i # <<<<<<<<<<<<<<
@@ -5858,7 +5751,7 @@ static void __pyx_f_3_sa_7IntList_set(struct __pyx_obj_3_sa_IntList *__pyx_v_sel
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":115
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":115
* if i<0:
* j = self.len + i
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -5874,7 +5767,7 @@ static void __pyx_f_3_sa_7IntList_set(struct __pyx_obj_3_sa_IntList *__pyx_v_sel
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":116
+ /* "/home/vchahune/tools/cdec/python/src/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)) # <<<<<<<<<<<<<<
@@ -5911,7 +5804,7 @@ static void __pyx_f_3_sa_7IntList_set(struct __pyx_obj_3_sa_IntList *__pyx_v_sel
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":117
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -5941,7 +5834,7 @@ static int __pyx_pw_3_sa_7IntList_22__setitem__(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":119
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":119
* self.arr[j] = val
*
* def __setitem__(self, i, val): # <<<<<<<<<<<<<<
@@ -5959,7 +5852,7 @@ static int __pyx_pf_3_sa_7IntList_21__setitem__(struct __pyx_obj_3_sa_IntList *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setitem__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":120
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":120
*
* def __setitem__(self, i, val):
* self.set(i, val) # <<<<<<<<<<<<<<
@@ -5991,7 +5884,7 @@ static Py_ssize_t __pyx_pw_3_sa_7IntList_24__len__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":122
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":122
* self.set(i, val)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -6004,7 +5897,7 @@ static Py_ssize_t __pyx_pf_3_sa_7IntList_23__len__(struct __pyx_obj_3_sa_IntList
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":123
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":123
*
* def __len__(self):
* return self.len # <<<<<<<<<<<<<<
@@ -6031,7 +5924,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_26getSize(PyObject *__pyx_v_self, CYTHON
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":125
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":125
* return self.len
*
* def getSize(self): # <<<<<<<<<<<<<<
@@ -6048,7 +5941,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_25getSize(struct __pyx_obj_3_sa_IntList
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("getSize", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":126
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":126
*
* def getSize(self):
* return self.size # <<<<<<<<<<<<<<
@@ -6095,7 +5988,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_28append(PyObject *__pyx_v_self, PyObjec
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":128
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":128
* return self.size
*
* def append(self, int val): # <<<<<<<<<<<<<<
@@ -6108,7 +6001,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_27append(struct __pyx_obj_3_sa_IntList *
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("append", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":129
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":129
*
* def append(self, int val):
* self._append(val) # <<<<<<<<<<<<<<
@@ -6123,7 +6016,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_27append(struct __pyx_obj_3_sa_IntList *
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":131
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":131
* self._append(val)
*
* cdef void _append(self, int val): # <<<<<<<<<<<<<<
@@ -6136,7 +6029,7 @@ static void __pyx_f_3_sa_7IntList__append(struct __pyx_obj_3_sa_IntList *__pyx_v
int __pyx_t_1;
__Pyx_RefNannySetupContext("_append", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":132
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":132
*
* cdef void _append(self, int val):
* if self.len == self.size: # <<<<<<<<<<<<<<
@@ -6146,7 +6039,7 @@ static void __pyx_f_3_sa_7IntList__append(struct __pyx_obj_3_sa_IntList *__pyx_v
__pyx_t_1 = (__pyx_v_self->len == __pyx_v_self->size);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":133
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":133
* cdef void _append(self, int val):
* if self.len == self.size:
* self.size = self.size + self.increment # <<<<<<<<<<<<<<
@@ -6155,7 +6048,7 @@ static void __pyx_f_3_sa_7IntList__append(struct __pyx_obj_3_sa_IntList *__pyx_v
*/
__pyx_v_self->size = (__pyx_v_self->size + __pyx_v_self->increment);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":134
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":134
* if self.len == self.size:
* self.size = self.size + self.increment
* self.arr = <int*> realloc(self.arr, self.size*sizeof(int)) # <<<<<<<<<<<<<<
@@ -6167,7 +6060,7 @@ static void __pyx_f_3_sa_7IntList__append(struct __pyx_obj_3_sa_IntList *__pyx_v
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":135
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":135
* self.size = self.size + self.increment
* self.arr = <int*> realloc(self.arr, self.size*sizeof(int))
* self.arr[self.len] = val # <<<<<<<<<<<<<<
@@ -6176,7 +6069,7 @@ static void __pyx_f_3_sa_7IntList__append(struct __pyx_obj_3_sa_IntList *__pyx_v
*/
(__pyx_v_self->arr[__pyx_v_self->len]) = __pyx_v_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":136
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":136
* self.arr = <int*> realloc(self.arr, self.size*sizeof(int))
* self.arr[self.len] = val
* self.len = self.len + 1 # <<<<<<<<<<<<<<
@@ -6199,7 +6092,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_30extend(PyObject *__pyx_v_self, PyObjec
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":138
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":138
* self.len = self.len + 1
*
* def extend(self, other): # <<<<<<<<<<<<<<
@@ -6216,7 +6109,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_29extend(struct __pyx_obj_3_sa_IntList *
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("extend", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":139
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":139
*
* def extend(self, other):
* self._extend(other) # <<<<<<<<<<<<<<
@@ -6241,7 +6134,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_29extend(struct __pyx_obj_3_sa_IntList *
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":141
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":141
* self._extend(other)
*
* cdef void _extend(self, IntList other): # <<<<<<<<<<<<<<
@@ -6253,7 +6146,7 @@ static void __pyx_f_3_sa_7IntList__extend(struct __pyx_obj_3_sa_IntList *__pyx_v
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_extend", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":142
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":142
*
* cdef void _extend(self, IntList other):
* self._extend_arr(other.arr, other.len) # <<<<<<<<<<<<<<
@@ -6265,7 +6158,7 @@ static void __pyx_f_3_sa_7IntList__extend(struct __pyx_obj_3_sa_IntList *__pyx_v
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":144
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":144
* self._extend_arr(other.arr, other.len)
*
* cdef void _extend_arr(self, int* other, int other_len): # <<<<<<<<<<<<<<
@@ -6278,7 +6171,7 @@ static void __pyx_f_3_sa_7IntList__extend_arr(struct __pyx_obj_3_sa_IntList *__p
int __pyx_t_1;
__Pyx_RefNannySetupContext("_extend_arr", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":145
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":145
*
* cdef void _extend_arr(self, int* other, int other_len):
* if self.size < self.len + other_len: # <<<<<<<<<<<<<<
@@ -6288,7 +6181,7 @@ static void __pyx_f_3_sa_7IntList__extend_arr(struct __pyx_obj_3_sa_IntList *__p
__pyx_t_1 = (__pyx_v_self->size < (__pyx_v_self->len + __pyx_v_other_len));
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":146
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -6297,7 +6190,7 @@ static void __pyx_f_3_sa_7IntList__extend_arr(struct __pyx_obj_3_sa_IntList *__p
*/
__pyx_v_self->size = (__pyx_v_self->len + __pyx_v_other_len);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":147
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":147
* if self.size < self.len + other_len:
* self.size = self.len + other_len
* self.arr = <int*> realloc(self.arr, self.size*sizeof(int)) # <<<<<<<<<<<<<<
@@ -6309,7 +6202,7 @@ static void __pyx_f_3_sa_7IntList__extend_arr(struct __pyx_obj_3_sa_IntList *__p
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":148
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":148
* self.size = self.len + other_len
* self.arr = <int*> realloc(self.arr, self.size*sizeof(int))
* memcpy(self.arr+self.len, other, other_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -6318,7 +6211,7 @@ static void __pyx_f_3_sa_7IntList__extend_arr(struct __pyx_obj_3_sa_IntList *__p
*/
memcpy((__pyx_v_self->arr + __pyx_v_self->len), __pyx_v_other, (__pyx_v_other_len * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":149
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":149
* self.arr = <int*> realloc(self.arr, self.size*sizeof(int))
* memcpy(self.arr+self.len, other, other_len*sizeof(int))
* self.len = self.len + other_len # <<<<<<<<<<<<<<
@@ -6330,7 +6223,7 @@ static void __pyx_f_3_sa_7IntList__extend_arr(struct __pyx_obj_3_sa_IntList *__p
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":151
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":151
* self.len = self.len + other_len
*
* cdef void _clear(self): # <<<<<<<<<<<<<<
@@ -6342,7 +6235,7 @@ static void __pyx_f_3_sa_7IntList__clear(struct __pyx_obj_3_sa_IntList *__pyx_v_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_clear", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":152
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":152
*
* cdef void _clear(self):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -6351,7 +6244,7 @@ static void __pyx_f_3_sa_7IntList__clear(struct __pyx_obj_3_sa_IntList *__pyx_v_
*/
free(__pyx_v_self->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":153
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":153
* cdef void _clear(self):
* free(self.arr)
* self.len = 0 # <<<<<<<<<<<<<<
@@ -6360,7 +6253,7 @@ static void __pyx_f_3_sa_7IntList__clear(struct __pyx_obj_3_sa_IntList *__pyx_v_
*/
__pyx_v_self->len = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":154
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":154
* free(self.arr)
* self.len = 0
* self.size = 0 # <<<<<<<<<<<<<<
@@ -6369,7 +6262,7 @@ static void __pyx_f_3_sa_7IntList__clear(struct __pyx_obj_3_sa_IntList *__pyx_v_
*/
__pyx_v_self->size = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":155
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":155
* self.len = 0
* self.size = 0
* self.arr = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -6381,7 +6274,7 @@ static void __pyx_f_3_sa_7IntList__clear(struct __pyx_obj_3_sa_IntList *__pyx_v_
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":157
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":157
* self.arr = <int*> malloc(0)
*
* cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -6393,7 +6286,7 @@ static void __pyx_f_3_sa_7IntList_write_handle(struct __pyx_obj_3_sa_IntList *__
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":158
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":158
*
* cdef void write_handle(self, FILE* f):
* fwrite(&(self.len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -6402,7 +6295,7 @@ static void __pyx_f_3_sa_7IntList_write_handle(struct __pyx_obj_3_sa_IntList *__
*/
fwrite((&__pyx_v_self->len), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":159
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -6435,7 +6328,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_32write(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":161
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":161
* fwrite(self.arr, sizeof(int), self.len, f)
*
* def write(self, char* filename): # <<<<<<<<<<<<<<
@@ -6449,7 +6342,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_31write(struct __pyx_obj_3_sa_IntList *_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":163
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":163
* def write(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -6458,7 +6351,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_31write(struct __pyx_obj_3_sa_IntList *_
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__w);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":164
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":164
* cdef FILE* f
* f = fopen(filename, "w")
* self.write_handle(f) # <<<<<<<<<<<<<<
@@ -6467,7 +6360,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_31write(struct __pyx_obj_3_sa_IntList *_
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":165
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":165
* f = fopen(filename, "w")
* self.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -6482,7 +6375,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_31write(struct __pyx_obj_3_sa_IntList *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":167
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":167
* fclose(f)
*
* cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -6494,7 +6387,7 @@ static void __pyx_f_3_sa_7IntList_read_handle(struct __pyx_obj_3_sa_IntList *__p
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":168
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":168
*
* cdef void read_handle(self, FILE* f):
* (self.arr) # <<<<<<<<<<<<<<
@@ -6503,7 +6396,7 @@ static void __pyx_f_3_sa_7IntList_read_handle(struct __pyx_obj_3_sa_IntList *__p
*/
__pyx_v_self->arr;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":169
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":169
* cdef void read_handle(self, FILE* f):
* (self.arr)
* fread(&(self.len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -6512,7 +6405,7 @@ static void __pyx_f_3_sa_7IntList_read_handle(struct __pyx_obj_3_sa_IntList *__p
*/
fread((&__pyx_v_self->len), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":170
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":170
* (self.arr)
* fread(&(self.len), sizeof(int), 1, f)
* self.arr = <int*> malloc(self.len * sizeof(int)) # <<<<<<<<<<<<<<
@@ -6521,7 +6414,7 @@ static void __pyx_f_3_sa_7IntList_read_handle(struct __pyx_obj_3_sa_IntList *__p
*/
__pyx_v_self->arr = ((int *)malloc((__pyx_v_self->len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":171
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":171
* fread(&(self.len), sizeof(int), 1, f)
* self.arr = <int*> malloc(self.len * sizeof(int))
* self.size = self.len # <<<<<<<<<<<<<<
@@ -6530,7 +6423,7 @@ static void __pyx_f_3_sa_7IntList_read_handle(struct __pyx_obj_3_sa_IntList *__p
*/
__pyx_v_self->size = __pyx_v_self->len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":172
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":172
* self.arr = <int*> malloc(self.len * sizeof(int))
* self.size = self.len
* fread(self.arr, sizeof(int), self.len, f) # <<<<<<<<<<<<<<
@@ -6563,7 +6456,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_34read(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":174
+/* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":174
* fread(self.arr, sizeof(int), self.len, f)
*
* def read(self, char* filename): # <<<<<<<<<<<<<<
@@ -6577,7 +6470,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_33read(struct __pyx_obj_3_sa_IntList *__
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":176
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":176
* def read(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -6586,7 +6479,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_33read(struct __pyx_obj_3_sa_IntList *__
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__r);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":177
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":177
* cdef FILE* f
* f = fopen(filename, "r")
* self.read_handle(f) # <<<<<<<<<<<<<<
@@ -6594,7 +6487,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_33read(struct __pyx_obj_3_sa_IntList *__
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":178
+ /* "/home/vchahune/tools/cdec/python/src/sa/int_list.pxi":178
* f = fopen(filename, "r")
* self.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -6621,7 +6514,7 @@ static int __pyx_pw_3_sa_9StringMap_1__cinit__(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":13
+/* "/home/vchahune/tools/cdec/python/src/sa/str_map.pxi":13
* cdef int index(self, char *s)
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -6634,7 +6527,7 @@ static int __pyx_pf_3_sa_9StringMap___cinit__(struct __pyx_obj_3_sa_StringMap *_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":14
+ /* "/home/vchahune/tools/cdec/python/src/sa/str_map.pxi":14
*
* def __cinit__(self):
* self.vocab = stringmap_new() # <<<<<<<<<<<<<<
@@ -6657,7 +6550,7 @@ static void __pyx_pw_3_sa_9StringMap_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":16
+/* "/home/vchahune/tools/cdec/python/src/sa/str_map.pxi":16
* self.vocab = stringmap_new()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -6669,7 +6562,7 @@ static void __pyx_pf_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_3_sa_StringMa
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":17
+ /* "/home/vchahune/tools/cdec/python/src/sa/str_map.pxi":17
*
* def __dealloc__(self):
* stringmap_delete(self.vocab) # <<<<<<<<<<<<<<
@@ -6681,7 +6574,7 @@ static void __pyx_pf_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_3_sa_StringMa
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":19
+/* "/home/vchahune/tools/cdec/python/src/sa/str_map.pxi":19
* stringmap_delete(self.vocab)
*
* cdef char *word(self, int i): # <<<<<<<<<<<<<<
@@ -6694,7 +6587,7 @@ static char *__pyx_f_3_sa_9StringMap_word(struct __pyx_obj_3_sa_StringMap *__pyx
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("word", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":20
+ /* "/home/vchahune/tools/cdec/python/src/sa/str_map.pxi":20
*
* cdef char *word(self, int i):
* return stringmap_word(self.vocab, i) # <<<<<<<<<<<<<<
@@ -6710,7 +6603,7 @@ static char *__pyx_f_3_sa_9StringMap_word(struct __pyx_obj_3_sa_StringMap *__pyx
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":22
+/* "/home/vchahune/tools/cdec/python/src/sa/str_map.pxi":22
* return stringmap_word(self.vocab, i)
*
* cdef int index(self, char *s): # <<<<<<<<<<<<<<
@@ -6722,7 +6615,7 @@ static int __pyx_f_3_sa_9StringMap_index(struct __pyx_obj_3_sa_StringMap *__pyx_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("index", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":23
+ /* "/home/vchahune/tools/cdec/python/src/sa/str_map.pxi":23
*
* cdef int index(self, char *s):
* return stringmap_index(self.vocab, s) # <<<<<<<<<<<<<<
@@ -6743,14 +6636,14 @@ static int __pyx_pw_3_sa_9DataArray_1__cinit__(PyObject *__pyx_v_self, PyObject
PyObject *__pyx_v_from_text = 0;
PyObject *__pyx_v_side = 0;
int __pyx_v_use_sent_id;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__from_binary,&__pyx_n_s__from_text,&__pyx_n_s__side,&__pyx_n_s__use_sent_id,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__from_binary,&__pyx_n_s__from_text,&__pyx_n_s__side,&__pyx_n_s__use_sent_id,0};
PyObject* values[4] = {0,0,0,0};
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":17
+ /* "/home/vchahune/tools/cdec/python/src/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): # <<<<<<<<<<<<<<
@@ -6797,6 +6690,10 @@ static int __pyx_pw_3_sa_9DataArray_1__cinit__(PyObject *__pyx_v_self, PyObject
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
+ if (values[3]) {
+ } else {
+ __pyx_v_use_sent_id = ((int)0);
+ }
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
@@ -6842,7 +6739,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/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} # <<<<<<<<<<<<<<
@@ -6859,7 +6756,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
__pyx_v_self->word2id = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":19
+ /* "/home/vchahune/tools/cdec/python/src/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"] # <<<<<<<<<<<<<<
@@ -6880,7 +6777,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
__pyx_v_self->id2word = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":20
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -6895,7 +6792,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
__pyx_v_self->data = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":21
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":21
* self.id2word = ["END_OF_FILE", "END_OF_LINE"]
* self.data = IntList(1000,1000)
* self.sent_id = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -6910,7 +6807,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
__pyx_v_self->sent_id = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":22
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":22
* self.data = IntList(1000,1000)
* self.sent_id = IntList(1000,1000)
* self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -6925,7 +6822,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
__pyx_v_self->sent_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":23
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":23
* self.sent_id = IntList(1000,1000)
* self.sent_index = IntList(1000,1000)
* self.use_sent_id = use_sent_id # <<<<<<<<<<<<<<
@@ -6934,7 +6831,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
*/
__pyx_v_self->use_sent_id = __pyx_v_use_sent_id;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":24
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":24
* self.sent_index = IntList(1000,1000)
* self.use_sent_id = use_sent_id
* if from_binary: # <<<<<<<<<<<<<<
@@ -6944,7 +6841,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
__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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":25
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":25
* self.use_sent_id = use_sent_id
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -6966,7 +6863,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":26
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":26
* if from_binary:
* self.read_binary(from_binary)
* elif from_text: # <<<<<<<<<<<<<<
@@ -6976,7 +6873,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
__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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":27
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":27
* self.read_binary(from_binary)
* elif from_text:
* if side: # <<<<<<<<<<<<<<
@@ -6986,7 +6883,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
__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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":28
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":28
* elif from_text:
* if side:
* self.read_bitext(from_text, (0 if side == 'source' else 1)) # <<<<<<<<<<<<<<
@@ -7020,7 +6917,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":30
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":30
* self.read_bitext(from_text, (0 if side == 'source' else 1))
* else:
* self.read_text(from_text) # <<<<<<<<<<<<<<
@@ -7069,7 +6966,7 @@ static Py_ssize_t __pyx_pw_3_sa_9DataArray_3__len__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":32
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":32
* self.read_text(from_text)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -7087,7 +6984,7 @@ static Py_ssize_t __pyx_pf_3_sa_9DataArray_2__len__(struct __pyx_obj_3_sa_DataAr
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":33
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":33
*
* def __len__(self):
* return len(self.data) # <<<<<<<<<<<<<<
@@ -7123,7 +7020,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_5getSentId(PyObject *__pyx_v_self, PyO
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":35
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":35
* return len(self.data)
*
* def getSentId(self, i): # <<<<<<<<<<<<<<
@@ -7141,7 +7038,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_4getSentId(struct __pyx_obj_3_sa_DataA
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("getSentId", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":36
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":36
*
* def getSentId(self, i):
* return self.sent_id.arr[i] # <<<<<<<<<<<<<<
@@ -7179,7 +7076,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_7getSent(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":38
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":38
* return self.sent_id.arr[i]
*
* def getSent(self, i): # <<<<<<<<<<<<<<
@@ -7204,7 +7101,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6getSent(struct __pyx_obj_3_sa_DataArr
__Pyx_RefNannySetupContext("getSent", 0);
__Pyx_INCREF(__pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":40
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":40
* def getSent(self, i):
* cdef int j, start, stop
* sent = [] # <<<<<<<<<<<<<<
@@ -7216,7 +7113,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6getSent(struct __pyx_obj_3_sa_DataArr
__pyx_v_sent = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":41
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":41
* cdef int j, start, stop
* sent = []
* start = self.sent_index.arr[i] # <<<<<<<<<<<<<<
@@ -7226,7 +7123,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6getSent(struct __pyx_obj_3_sa_DataArr
__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]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":42
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":42
* sent = []
* start = self.sent_index.arr[i]
* stop = self.sent_index.arr[i+1] # <<<<<<<<<<<<<<
@@ -7239,7 +7136,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6getSent(struct __pyx_obj_3_sa_DataArr
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_stop = (__pyx_v_self->sent_index->arr[__pyx_t_2]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":43
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":43
* start = self.sent_index.arr[i]
* stop = self.sent_index.arr[i+1]
* for i from start <= i < stop: # <<<<<<<<<<<<<<
@@ -7254,7 +7151,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6getSent(struct __pyx_obj_3_sa_DataArr
__pyx_v_i = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":44
+ /* "/home/vchahune/tools/cdec/python/src/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]]) # <<<<<<<<<<<<<<
@@ -7269,7 +7166,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6getSent(struct __pyx_obj_3_sa_DataArr
__pyx_t_4 = __Pyx_PyInt_AsInt(__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;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":43
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":43
* start = self.sent_index.arr[i]
* stop = self.sent_index.arr[i+1]
* for i from start <= i < stop: # <<<<<<<<<<<<<<
@@ -7282,7 +7179,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6getSent(struct __pyx_obj_3_sa_DataArr
__pyx_v_i = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":45
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":45
* for i from start <= i < stop:
* sent.append(self.id2word[self.data.arr[i]])
* return sent # <<<<<<<<<<<<<<
@@ -7319,7 +7216,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_9getSentPos(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":47
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":47
* return sent
*
* def getSentPos(self, loc): # <<<<<<<<<<<<<<
@@ -7338,7 +7235,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_8getSentPos(struct __pyx_obj_3_sa_Data
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("getSentPos", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":48
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":48
*
* def getSentPos(self, loc):
* return loc - self.sent_index.arr[self.sent_id.arr[loc]] # <<<<<<<<<<<<<<
@@ -7380,7 +7277,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_11get_id(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":50
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":50
* return loc - self.sent_index.arr[self.sent_id.arr[loc]]
*
* def get_id(self, word): # <<<<<<<<<<<<<<
@@ -7400,7 +7297,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_10get_id(struct __pyx_obj_3_sa_DataArr
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_id", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":51
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":51
*
* def get_id(self, word):
* if not word in self.word2id: # <<<<<<<<<<<<<<
@@ -7411,7 +7308,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_10get_id(struct __pyx_obj_3_sa_DataArr
__pyx_t_2 = (!__pyx_t_1);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":52
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":52
* def get_id(self, word):
* if not word in self.word2id:
* self.word2id[word] = len(self.id2word) # <<<<<<<<<<<<<<
@@ -7427,7 +7324,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_10get_id(struct __pyx_obj_3_sa_DataArr
if (PyObject_SetItem(__pyx_v_self->word2id, __pyx_v_word, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":53
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":53
* if not word in self.word2id:
* self.word2id[word] = len(self.id2word)
* self.id2word.append(word) # <<<<<<<<<<<<<<
@@ -7441,7 +7338,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_10get_id(struct __pyx_obj_3_sa_DataArr
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":54
* self.word2id[word] = len(self.id2word)
* self.id2word.append(word)
* return self.word2id[word] # <<<<<<<<<<<<<<
@@ -7478,7 +7375,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_13get_word(PyObject *__pyx_v_self, PyO
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":56
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":56
* return self.word2id[word]
*
* def get_word(self, id): # <<<<<<<<<<<<<<
@@ -7495,7 +7392,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_12get_word(struct __pyx_obj_3_sa_DataA
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_word", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":57
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":57
*
* def get_word(self, id):
* return self.id2word[id] # <<<<<<<<<<<<<<
@@ -7542,7 +7439,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_15write_text(PyObject *__pyx_v_self, P
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":59
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":59
* return self.id2word[id]
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -7574,7 +7471,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_text", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":60
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -7614,7 +7511,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
__pyx_v_f = __pyx_t_4;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":61
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":61
* def write_text(self, char* filename):
* with open(filename, "w") as f:
* for w_id in self.data: # <<<<<<<<<<<<<<
@@ -7632,18 +7529,10 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
for (;;) {
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_4)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_4)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_1 = __pyx_t_9(__pyx_t_4);
if (unlikely(!__pyx_t_1)) {
@@ -7659,7 +7548,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
__pyx_v_w_id = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":62
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":62
* with open(filename, "w") as f:
* for w_id in self.data:
* if w_id > 1: # <<<<<<<<<<<<<<
@@ -7672,7 +7561,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":63
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":63
* for w_id in self.data:
* if w_id > 1:
* f.write("%s " % self.get_word(w_id)) # <<<<<<<<<<<<<<
@@ -7709,7 +7598,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
}
__pyx_L18:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":64
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":64
* if w_id > 1:
* f.write("%s " % self.get_word(w_id))
* if w_id == 1: # <<<<<<<<<<<<<<
@@ -7722,7 +7611,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":65
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":65
* f.write("%s " % self.get_word(w_id))
* if w_id == 1:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -7752,7 +7641,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":60
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -7871,7 +7760,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_17read_text(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":67
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":67
* f.write("\n")
*
* def read_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -7899,7 +7788,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_16read_text(struct __pyx_obj_3_sa_Data
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_text", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":68
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":68
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -7939,7 +7828,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_16read_text(struct __pyx_obj_3_sa_Data
__pyx_v_fp = __pyx_t_1;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":69
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":69
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp:
* self.read_text_data(fp) # <<<<<<<<<<<<<<
@@ -7968,7 +7857,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_16read_text(struct __pyx_obj_3_sa_Data
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":68
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":68
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -8069,11 +7958,11 @@ static PyObject *__pyx_pw_3_sa_9DataArray_19read_bitext(PyObject *__pyx_v_self,
static PyObject *__pyx_pw_3_sa_9DataArray_19read_bitext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
char *__pyx_v_filename;
int __pyx_v_side;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__side,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_bitext (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__side,0};
PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -8087,10 +7976,12 @@ static PyObject *__pyx_pw_3_sa_9DataArray_19read_bitext(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__filename)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__side)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__side);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("read_bitext", 1, 2, 2, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -8121,7 +8012,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_19read_bitext(PyObject *__pyx_v_self,
}
static PyObject *__pyx_gb_3_sa_9DataArray_11read_bitext_2generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":73
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":73
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
@@ -8197,18 +8088,10 @@ static PyObject *__pyx_gb_3_sa_9DataArray_11read_bitext_2generator6(__pyx_Genera
for (;;) {
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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 73; __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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
@@ -8263,12 +8146,11 @@ static PyObject *__pyx_gb_3_sa_9DataArray_11read_bitext_2generator6(__pyx_Genera
__pyx_L0:;
__Pyx_XDECREF(__pyx_r);
__pyx_generator->resume_label = -1;
- __Pyx_Generator_clear((PyObject*)__pyx_generator);
__Pyx_RefNannyFinishContext();
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":71
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":71
* self.read_text_data(fp)
*
* def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<<
@@ -8304,7 +8186,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_18read_bitext(struct __pyx_obj_3_sa_Da
__Pyx_GOTREF(__pyx_cur_scope);
__pyx_cur_scope->__pyx_v_side = __pyx_v_side;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":72
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":72
*
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -8345,7 +8227,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_18read_bitext(struct __pyx_obj_3_sa_Da
__pyx_cur_scope->__pyx_v_fp = __pyx_t_1;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":73
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":73
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
@@ -8357,7 +8239,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_18read_bitext(struct __pyx_obj_3_sa_Da
__pyx_v_data = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":74
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":74
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp)
* self.read_text_data(data) # <<<<<<<<<<<<<<
@@ -8386,7 +8268,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_18read_bitext(struct __pyx_obj_3_sa_Da
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":72
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":72
*
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -8494,7 +8376,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_21read_text_data(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":76
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":76
* self.read_text_data(data)
*
* def read_text_data(self, data): # <<<<<<<<<<<<<<
@@ -8524,7 +8406,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_text_data", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":77
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":77
*
* def read_text_data(self, data):
* cdef int word_count = 0 # <<<<<<<<<<<<<<
@@ -8533,7 +8415,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
*/
__pyx_v_word_count = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":78
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":78
* def read_text_data(self, data):
* cdef int word_count = 0
* for line_num, line in enumerate(data): # <<<<<<<<<<<<<<
@@ -8553,18 +8435,10 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
for (;;) {
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_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __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_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
if (unlikely(!__pyx_t_5)) {
@@ -8588,7 +8462,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
__pyx_t_1 = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":79
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":79
* cdef int word_count = 0
* for line_num, line in enumerate(data):
* self.sent_index.append(word_count) # <<<<<<<<<<<<<<
@@ -8602,7 +8476,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":80
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":80
* for line_num, line in enumerate(data):
* self.sent_index.append(word_count)
* for word in line.split(): # <<<<<<<<<<<<<<
@@ -8626,18 +8500,10 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
for (;;) {
if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_6)) {
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_6)) {
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_5 = __pyx_t_8(__pyx_t_6);
if (unlikely(!__pyx_t_5)) {
@@ -8653,7 +8519,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
__pyx_v_word = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":81
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":81
* self.sent_index.append(word_count)
* for word in line.split():
* self.data.append(self.get_id(word)) # <<<<<<<<<<<<<<
@@ -8676,7 +8542,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":82
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":82
* for word in line.split():
* self.data.append(self.get_id(word))
* if self.use_sent_id: # <<<<<<<<<<<<<<
@@ -8685,7 +8551,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
*/
if (__pyx_v_self->use_sent_id) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":83
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":83
* self.data.append(self.get_id(word))
* if self.use_sent_id:
* self.sent_id.append(line_num) # <<<<<<<<<<<<<<
@@ -8699,7 +8565,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":84
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":84
* if self.use_sent_id:
* self.sent_id.append(line_num)
* word_count = word_count + 1 # <<<<<<<<<<<<<<
@@ -8710,7 +8576,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":85
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":85
* self.sent_id.append(line_num)
* word_count = word_count + 1
* self.data.append(1) # <<<<<<<<<<<<<<
@@ -8721,7 +8587,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":86
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":86
* word_count = word_count + 1
* self.data.append(1)
* if self.use_sent_id: # <<<<<<<<<<<<<<
@@ -8730,7 +8596,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
*/
if (__pyx_v_self->use_sent_id) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":87
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":87
* self.data.append(1)
* if self.use_sent_id:
* self.sent_id.append(line_num) # <<<<<<<<<<<<<<
@@ -8744,7 +8610,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":88
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":88
* if self.use_sent_id:
* self.sent_id.append(line_num)
* word_count = word_count + 1 # <<<<<<<<<<<<<<
@@ -8756,7 +8622,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":89
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":89
* self.sent_id.append(line_num)
* word_count = word_count + 1
* self.data.append(0) # <<<<<<<<<<<<<<
@@ -8767,7 +8633,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":90
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":90
* word_count = word_count + 1
* self.data.append(0)
* self.sent_index.append(word_count) # <<<<<<<<<<<<<<
@@ -8822,7 +8688,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_23read_binary(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":93
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":93
*
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -8836,7 +8702,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_22read_binary(struct __pyx_obj_3_sa_Da
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":95
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":95
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -8845,7 +8711,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_22read_binary(struct __pyx_obj_3_sa_Da
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__r);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":96
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":96
* cdef FILE* f
* f = fopen(filename, "r")
* self.read_handle(f) # <<<<<<<<<<<<<<
@@ -8854,7 +8720,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_22read_binary(struct __pyx_obj_3_sa_Da
*/
((struct __pyx_vtabstruct_3_sa_DataArray *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":97
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":97
* f = fopen(filename, "r")
* self.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -8869,7 +8735,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_22read_binary(struct __pyx_obj_3_sa_Da
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":99
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":99
* fclose(f)
*
* cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -8894,7 +8760,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":104
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":104
* cdef char* c_word
* cdef bytes py_word
* self.data.read_handle(f) # <<<<<<<<<<<<<<
@@ -8903,7 +8769,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->data->__pyx_vtab)->read_handle(__pyx_v_self->data, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":105
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":105
* cdef bytes py_word
* self.data.read_handle(f)
* self.sent_index.read_handle(f) # <<<<<<<<<<<<<<
@@ -8912,7 +8778,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->read_handle(__pyx_v_self->sent_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":106
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":106
* self.data.read_handle(f)
* self.sent_index.read_handle(f)
* self.sent_id.read_handle(f) # <<<<<<<<<<<<<<
@@ -8921,7 +8787,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_id->__pyx_vtab)->read_handle(__pyx_v_self->sent_id, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":107
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":107
* self.sent_index.read_handle(f)
* self.sent_id.read_handle(f)
* fread(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -8930,7 +8796,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
*/
fread((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":108
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":108
* self.sent_id.read_handle(f)
* fread(&(num_words), sizeof(int), 1, f)
* for i in range(num_words): # <<<<<<<<<<<<<<
@@ -8941,7 +8807,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":109
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":109
* fread(&(num_words), sizeof(int), 1, f)
* for i in range(num_words):
* fread(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -8950,7 +8816,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
*/
fread((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":110
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":110
* for i in range(num_words):
* fread(&(word_len), sizeof(int), 1, f)
* c_word = <char*> malloc (word_len * sizeof(char)) # <<<<<<<<<<<<<<
@@ -8959,7 +8825,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
*/
__pyx_v_c_word = ((char *)malloc((__pyx_v_word_len * (sizeof(char)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":111
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":111
* fread(&(word_len), sizeof(int), 1, f)
* c_word = <char*> malloc (word_len * sizeof(char))
* fread(c_word, sizeof(char), word_len, f) # <<<<<<<<<<<<<<
@@ -8968,7 +8834,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
*/
fread(__pyx_v_c_word, (sizeof(char)), __pyx_v_word_len, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":112
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":112
* c_word = <char*> malloc (word_len * sizeof(char))
* fread(c_word, sizeof(char), word_len, f)
* py_word = c_word # <<<<<<<<<<<<<<
@@ -8981,7 +8847,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
__pyx_v_py_word = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":113
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":113
* fread(c_word, sizeof(char), word_len, f)
* py_word = c_word
* free(c_word) # <<<<<<<<<<<<<<
@@ -8990,7 +8856,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
*/
free(__pyx_v_c_word);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":114
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":114
* py_word = c_word
* free(c_word)
* self.word2id[py_word] = len(self.id2word) # <<<<<<<<<<<<<<
@@ -9006,7 +8872,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
if (PyObject_SetItem(__pyx_v_self->word2id, ((PyObject *)__pyx_v_py_word), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":115
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":115
* free(c_word)
* self.word2id[py_word] = len(self.id2word)
* self.id2word.append(py_word) # <<<<<<<<<<<<<<
@@ -9018,7 +8884,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":116
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":116
* self.word2id[py_word] = len(self.id2word)
* self.id2word.append(py_word)
* if len(self.sent_id) == 0: # <<<<<<<<<<<<<<
@@ -9032,7 +8898,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
__pyx_t_5 = (__pyx_t_4 == 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":117
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":117
* self.id2word.append(py_word)
* if len(self.sent_id) == 0:
* self.use_sent_id = False # <<<<<<<<<<<<<<
@@ -9044,7 +8910,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":119
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":119
* self.use_sent_id = False
* else:
* self.use_sent_id = True # <<<<<<<<<<<<<<
@@ -9064,7 +8930,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":121
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":121
* self.use_sent_id = True
*
* cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -9088,7 +8954,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":125
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":125
* cdef int num_words
* cdef char* c_word
* self.data.write_handle(f) # <<<<<<<<<<<<<<
@@ -9097,7 +8963,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->data->__pyx_vtab)->write_handle(__pyx_v_self->data, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":126
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":126
* cdef char* c_word
* self.data.write_handle(f)
* self.sent_index.write_handle(f) # <<<<<<<<<<<<<<
@@ -9106,7 +8972,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->write_handle(__pyx_v_self->sent_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":127
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":127
* self.data.write_handle(f)
* self.sent_index.write_handle(f)
* self.sent_id.write_handle(f) # <<<<<<<<<<<<<<
@@ -9115,7 +8981,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_id->__pyx_vtab)->write_handle(__pyx_v_self->sent_id, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":128
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":128
* self.sent_index.write_handle(f)
* self.sent_id.write_handle(f)
* num_words = len(self.id2word) - 2 # <<<<<<<<<<<<<<
@@ -9128,7 +8994,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_num_words = (__pyx_t_2 - 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":129
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":129
* self.sent_id.write_handle(f)
* num_words = len(self.id2word) - 2
* fwrite(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -9137,7 +9003,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
*/
fwrite((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":130
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":130
* num_words = len(self.id2word) - 2
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in self.id2word[2:]: # <<<<<<<<<<<<<<
@@ -9158,18 +9024,10 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_1 = __pyx_t_4(__pyx_t_3);
if (unlikely(!__pyx_t_1)) {
@@ -9185,7 +9043,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
__pyx_v_word = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":131
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":131
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in self.id2word[2:]:
* c_word = word # <<<<<<<<<<<<<<
@@ -9195,7 +9053,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
__pyx_t_5 = PyBytes_AsString(__pyx_v_word); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_c_word = __pyx_t_5;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":132
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":132
* for word in self.id2word[2:]:
* c_word = word
* word_len = strlen(c_word) + 1 # <<<<<<<<<<<<<<
@@ -9204,7 +9062,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
*/
__pyx_v_word_len = (strlen(__pyx_v_c_word) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":133
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":133
* c_word = word
* word_len = strlen(c_word) + 1
* fwrite(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -9213,7 +9071,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
*/
fwrite((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":134
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":134
* word_len = strlen(c_word) + 1
* fwrite(&(word_len), sizeof(int), 1, f)
* fwrite(c_word, sizeof(char), word_len, f) # <<<<<<<<<<<<<<
@@ -9255,7 +9113,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_25write_binary(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":136
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":136
* fwrite(c_word, sizeof(char), word_len, f)
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -9269,7 +9127,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_24write_binary(struct __pyx_obj_3_sa_D
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":138
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":138
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -9278,7 +9136,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_24write_binary(struct __pyx_obj_3_sa_D
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__w);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":139
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":139
* cdef FILE* f
* f = fopen(filename, "w")
* self.write_handle(f) # <<<<<<<<<<<<<<
@@ -9287,7 +9145,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_24write_binary(struct __pyx_obj_3_sa_D
*/
((struct __pyx_vtabstruct_3_sa_DataArray *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":140
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":140
* f = fopen(filename, "w")
* self.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -9313,7 +9171,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_27write_enhanced_handle(PyObject *__py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":142
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":142
* fclose(f)
*
* def write_enhanced_handle(self, f): # <<<<<<<<<<<<<<
@@ -9337,7 +9195,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_enhanced_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":143
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":143
*
* def write_enhanced_handle(self, f):
* for i in self.data: # <<<<<<<<<<<<<<
@@ -9355,18 +9213,10 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
for (;;) {
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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 143; __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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
@@ -9382,7 +9232,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
__pyx_v_i = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":144
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":144
* def write_enhanced_handle(self, f):
* for i in self.data:
* f.write("%d " %i) # <<<<<<<<<<<<<<
@@ -9406,7 +9256,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":145
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":145
* for i in self.data:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -9420,7 +9270,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":146
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":146
* f.write("%d " %i)
* f.write("\n")
* for i in self.sent_index: # <<<<<<<<<<<<<<
@@ -9438,18 +9288,10 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
for (;;) {
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_5)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_5)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_1 = __pyx_t_3(__pyx_t_5);
if (unlikely(!__pyx_t_1)) {
@@ -9465,7 +9307,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
__pyx_v_i = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":147
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":147
* f.write("\n")
* for i in self.sent_index:
* f.write("%d " %i) # <<<<<<<<<<<<<<
@@ -9489,7 +9331,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":148
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":148
* for i in self.sent_index:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -9503,7 +9345,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":149
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":149
* f.write("%d " %i)
* f.write("\n")
* for i in self.sent_id: # <<<<<<<<<<<<<<
@@ -9521,18 +9363,10 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
for (;;) {
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_6)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_6)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_5 = __pyx_t_3(__pyx_t_6);
if (unlikely(!__pyx_t_5)) {
@@ -9548,7 +9382,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
__pyx_v_i = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":150
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":150
* f.write("\n")
* for i in self.sent_id:
* f.write("%d " %i) # <<<<<<<<<<<<<<
@@ -9572,7 +9406,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":151
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":151
* for i in self.sent_id:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -9586,7 +9420,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":152
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":152
* f.write("%d " %i)
* f.write("\n")
* for word in self.id2word: # <<<<<<<<<<<<<<
@@ -9604,18 +9438,10 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
for (;;) {
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_4)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++;
- #else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_4)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++;
- #else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_6 = __pyx_t_3(__pyx_t_4);
if (unlikely(!__pyx_t_6)) {
@@ -9631,7 +9457,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
__pyx_v_word = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":153
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":153
* f.write("\n")
* for word in self.id2word:
* f.write("%s %d " % (word, self.word2id[word])) # <<<<<<<<<<<<<<
@@ -9666,7 +9492,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":154
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":154
* for word in self.id2word:
* f.write("%s %d " % (word, self.word2id[word]))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -9718,7 +9544,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_29write_enhanced(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":156
+/* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":156
* f.write("\n")
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -9746,7 +9572,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_28write_enhanced(struct __pyx_obj_3_sa
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_enhanced", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":157
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":157
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -9785,7 +9611,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_28write_enhanced(struct __pyx_obj_3_sa
__pyx_v_f = __pyx_t_4;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":158
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":158
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* self.write_enhanced_handle(self, f) # <<<<<<<<<<<<<<
@@ -9815,7 +9641,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_28write_enhanced(struct __pyx_obj_3_sa
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":157
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":157
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -9910,7 +9736,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_28write_enhanced(struct __pyx_obj_3_sa
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":12
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":12
* cdef IntList sent_index
*
* cdef int link(self, int i, int j): # <<<<<<<<<<<<<<
@@ -9923,7 +9749,7 @@ static int __pyx_f_3_sa_9Alignment_link(CYTHON_UNUSED struct __pyx_obj_3_sa_Alig
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("link", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":14
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":14
* cdef int link(self, int i, int j):
* """Integerizes an alignment link pair"""
* return i*65536 + j # <<<<<<<<<<<<<<
@@ -9951,7 +9777,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_1unlink(PyObject *__pyx_v_self, PyObje
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":16
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":16
* return i*65536 + j
*
* def unlink(self, link): # <<<<<<<<<<<<<<
@@ -9970,7 +9796,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_obj_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("unlink", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":18
* def unlink(self, link):
* """De-integerizes an alignment link pair"""
* return (link/65536, link%65536) # <<<<<<<<<<<<<<
@@ -10008,7 +9834,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_obj_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":20
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":20
* return (link/65536, link%65536)
*
* cdef _unlink(self, int link, int* f, int* e): # <<<<<<<<<<<<<<
@@ -10021,7 +9847,7 @@ static PyObject *__pyx_f_3_sa_9Alignment__unlink(CYTHON_UNUSED struct __pyx_obj_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_unlink", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":21
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":21
*
* cdef _unlink(self, int link, int* f, int* e):
* f[0] = link/65536 # <<<<<<<<<<<<<<
@@ -10030,7 +9856,7 @@ static PyObject *__pyx_f_3_sa_9Alignment__unlink(CYTHON_UNUSED struct __pyx_obj_
*/
(__pyx_v_f[0]) = __Pyx_div_long(__pyx_v_link, 65536);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":22
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":22
* cdef _unlink(self, int link, int* f, int* e):
* f[0] = link/65536
* e[0] = link%65536 # <<<<<<<<<<<<<<
@@ -10066,7 +9892,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_3get_sent_links(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":24
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":24
* e[0] = link%65536
*
* def get_sent_links(self, int sent_id): # <<<<<<<<<<<<<<
@@ -10086,7 +9912,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_3_sa_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_sent_links", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":28
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":28
* cdef int* arr
* cdef int arr_len
* sent_links = IntList() # <<<<<<<<<<<<<<
@@ -10098,7 +9924,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_3_sa_
__pyx_v_sent_links = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":29
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":29
* cdef int arr_len
* sent_links = IntList()
* arr = self._get_sent_links(sent_id, &arr_len) # <<<<<<<<<<<<<<
@@ -10107,7 +9933,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_3_sa_
*/
__pyx_v_arr = ((struct __pyx_vtabstruct_3_sa_Alignment *)__pyx_v_self->__pyx_vtab)->_get_sent_links(__pyx_v_self, __pyx_v_sent_id, (&__pyx_v_arr_len));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":30
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":30
* sent_links = IntList()
* arr = self._get_sent_links(sent_id, &arr_len)
* sent_links._extend_arr(arr, arr_len*2) # <<<<<<<<<<<<<<
@@ -10116,7 +9942,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_3_sa_
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_sent_links->__pyx_vtab)->_extend_arr(__pyx_v_sent_links, __pyx_v_arr, (__pyx_v_arr_len * 2));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":31
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":31
* arr = self._get_sent_links(sent_id, &arr_len)
* sent_links._extend_arr(arr, arr_len*2)
* free(arr) # <<<<<<<<<<<<<<
@@ -10125,7 +9951,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_3_sa_
*/
free(__pyx_v_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":32
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":32
* sent_links._extend_arr(arr, arr_len*2)
* free(arr)
* return sent_links # <<<<<<<<<<<<<<
@@ -10150,7 +9976,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_3_sa_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":34
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":34
* return sent_links
*
* cdef int* _get_sent_links(self, int sent_id, int* num_links): # <<<<<<<<<<<<<<
@@ -10172,7 +9998,7 @@ static int *__pyx_f_3_sa_9Alignment__get_sent_links(struct __pyx_obj_3_sa_Alignm
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_get_sent_links", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":37
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":37
* cdef int* sent_links
* cdef int i, start, end
* start = self.sent_index.arr[sent_id] # <<<<<<<<<<<<<<
@@ -10181,7 +10007,7 @@ static int *__pyx_f_3_sa_9Alignment__get_sent_links(struct __pyx_obj_3_sa_Alignm
*/
__pyx_v_start = (__pyx_v_self->sent_index->arr[__pyx_v_sent_id]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":38
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":38
* cdef int i, start, end
* start = self.sent_index.arr[sent_id]
* end = self.sent_index.arr[sent_id+1] # <<<<<<<<<<<<<<
@@ -10190,7 +10016,7 @@ static int *__pyx_f_3_sa_9Alignment__get_sent_links(struct __pyx_obj_3_sa_Alignm
*/
__pyx_v_end = (__pyx_v_self->sent_index->arr[(__pyx_v_sent_id + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":39
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":39
* start = self.sent_index.arr[sent_id]
* end = self.sent_index.arr[sent_id+1]
* num_links[0] = end - start # <<<<<<<<<<<<<<
@@ -10199,7 +10025,7 @@ static int *__pyx_f_3_sa_9Alignment__get_sent_links(struct __pyx_obj_3_sa_Alignm
*/
(__pyx_v_num_links[0]) = (__pyx_v_end - __pyx_v_start);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":40
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":40
* end = self.sent_index.arr[sent_id+1]
* num_links[0] = end - start
* sent_links = <int*> malloc(2*num_links[0]*sizeof(int)) # <<<<<<<<<<<<<<
@@ -10208,7 +10034,7 @@ static int *__pyx_f_3_sa_9Alignment__get_sent_links(struct __pyx_obj_3_sa_Alignm
*/
__pyx_v_sent_links = ((int *)malloc(((2 * (__pyx_v_num_links[0])) * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":41
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":41
* num_links[0] = end - start
* sent_links = <int*> malloc(2*num_links[0]*sizeof(int))
* for i from 0 <= i < num_links[0]: # <<<<<<<<<<<<<<
@@ -10218,7 +10044,7 @@ static int *__pyx_f_3_sa_9Alignment__get_sent_links(struct __pyx_obj_3_sa_Alignm
__pyx_t_1 = (__pyx_v_num_links[0]);
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":42
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":42
* sent_links = <int*> 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) # <<<<<<<<<<<<<<
@@ -10230,7 +10056,7 @@ static int *__pyx_f_3_sa_9Alignment__get_sent_links(struct __pyx_obj_3_sa_Alignm
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":43
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":43
* 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 # <<<<<<<<<<<<<<
@@ -10256,14 +10082,14 @@ static int __pyx_pw_3_sa_9Alignment_5__cinit__(PyObject *__pyx_v_self, PyObject
static int __pyx_pw_3_sa_9Alignment_5__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_from_binary = 0;
PyObject *__pyx_v_from_text = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__from_binary,&__pyx_n_s__from_text,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__from_binary,&__pyx_n_s__from_text,0};
PyObject* values[2] = {0,0};
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":45
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":45
* return sent_links
*
* def __cinit__(self, from_binary=None, from_text=None): # <<<<<<<<<<<<<<
@@ -10333,7 +10159,7 @@ static int __pyx_pf_3_sa_9Alignment_4__cinit__(struct __pyx_obj_3_sa_Alignment *
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":46
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":46
*
* def __cinit__(self, from_binary=None, from_text=None):
* self.links = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -10348,7 +10174,7 @@ static int __pyx_pf_3_sa_9Alignment_4__cinit__(struct __pyx_obj_3_sa_Alignment *
__pyx_v_self->links = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":47
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":47
* def __cinit__(self, from_binary=None, from_text=None):
* self.links = IntList(1000,1000)
* self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -10363,7 +10189,7 @@ static int __pyx_pf_3_sa_9Alignment_4__cinit__(struct __pyx_obj_3_sa_Alignment *
__pyx_v_self->sent_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":48
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":48
* self.links = IntList(1000,1000)
* self.sent_index = IntList(1000,1000)
* if from_binary: # <<<<<<<<<<<<<<
@@ -10373,7 +10199,7 @@ static int __pyx_pf_3_sa_9Alignment_4__cinit__(struct __pyx_obj_3_sa_Alignment *
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":49
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":49
* self.sent_index = IntList(1000,1000)
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -10395,7 +10221,7 @@ static int __pyx_pf_3_sa_9Alignment_4__cinit__(struct __pyx_obj_3_sa_Alignment *
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":50
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":50
* if from_binary:
* self.read_binary(from_binary)
* elif from_text: # <<<<<<<<<<<<<<
@@ -10405,7 +10231,7 @@ static int __pyx_pf_3_sa_9Alignment_4__cinit__(struct __pyx_obj_3_sa_Alignment *
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_text); 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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":51
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":51
* self.read_binary(from_binary)
* elif from_text:
* self.read_text(from_text) # <<<<<<<<<<<<<<
@@ -10462,7 +10288,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_7read_text(PyObject *__pyx_v_self, PyO
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":53
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":53
* self.read_text(from_text)
*
* def read_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -10504,7 +10330,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_text", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":54
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -10544,7 +10370,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
__pyx_v_f = __pyx_t_1;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":55
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":55
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f:
* for line in f: # <<<<<<<<<<<<<<
@@ -10562,18 +10388,10 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
for (;;) {
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_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L7_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_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_2 = __pyx_t_9(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
@@ -10589,7 +10407,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
__pyx_v_line = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":56
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":56
* with gzip_or_text(filename) as f:
* for line in f:
* self.sent_index.append(len(self.links)) # <<<<<<<<<<<<<<
@@ -10607,7 +10425,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":57
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":57
* for line in f:
* self.sent_index.append(len(self.links))
* pairs = line.split() # <<<<<<<<<<<<<<
@@ -10623,7 +10441,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
__pyx_v_pairs = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":58
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":58
* self.sent_index.append(len(self.links))
* pairs = line.split()
* for pair in pairs: # <<<<<<<<<<<<<<
@@ -10641,18 +10459,10 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
for (;;) {
if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++;
- #else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++;
- #else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_3 = __pyx_t_11(__pyx_t_2);
if (unlikely(!__pyx_t_3)) {
@@ -10668,7 +10478,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
__pyx_v_pair = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":59
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":59
* pairs = line.split()
* for pair in pairs:
* (i, j) = map(int, pair.split('-')) # <<<<<<<<<<<<<<
@@ -10693,33 +10503,27 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) {
PyObject* sequence = __pyx_t_12;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ }
__pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_13 = PyTuple_GET_ITEM(sequence, 1);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ }
__pyx_t_3 = PyList_GET_ITEM(sequence, 0);
__pyx_t_13 = PyList_GET_ITEM(sequence, 1);
}
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_13);
- #else
- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- #endif
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- } else
- {
+ } else {
Py_ssize_t index = -1;
__pyx_t_14 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_14);
@@ -10730,13 +10534,12 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L20_unpacking_failed;
__Pyx_GOTREF(__pyx_t_13);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_15 = NULL;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
goto __pyx_L21_unpacking_done;
__pyx_L20_unpacking_failed:;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __pyx_t_15 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__pyx_L21_unpacking_done:;
}
@@ -10747,7 +10550,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
__pyx_v_j = __pyx_t_13;
__pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":60
* for pair in pairs:
* (i, j) = map(int, pair.split('-'))
* self.links.append(self.link(i, j)) # <<<<<<<<<<<<<<
@@ -10767,7 +10570,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":61
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":61
* (i, j) = map(int, pair.split('-'))
* self.links.append(self.link(i, j))
* self.sent_index.append(len(self.links)) # <<<<<<<<<<<<<<
@@ -10797,7 +10600,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":54
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -10921,7 +10724,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_9read_binary(PyObject *__pyx_v_self, P
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":63
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":63
* self.sent_index.append(len(self.links))
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -10935,7 +10738,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_8read_binary(struct __pyx_obj_3_sa_Ali
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":65
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":65
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -10944,7 +10747,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_8read_binary(struct __pyx_obj_3_sa_Ali
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__r);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":66
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":66
* cdef FILE* f
* f = fopen(filename, "r")
* self.links.read_handle(f) # <<<<<<<<<<<<<<
@@ -10953,7 +10756,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_8read_binary(struct __pyx_obj_3_sa_Ali
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->links->__pyx_vtab)->read_handle(__pyx_v_self->links, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":67
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":67
* f = fopen(filename, "r")
* self.links.read_handle(f)
* self.sent_index.read_handle(f) # <<<<<<<<<<<<<<
@@ -10962,7 +10765,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_8read_binary(struct __pyx_obj_3_sa_Ali
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->read_handle(__pyx_v_self->sent_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":68
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":68
* self.links.read_handle(f)
* self.sent_index.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -10998,7 +10801,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_11write_text(PyObject *__pyx_v_self, P
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":70
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":70
* fclose(f)
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -11033,7 +10836,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_text", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":71
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":71
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -11073,7 +10876,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
__pyx_v_f = __pyx_t_4;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":72
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":72
* def write_text(self, char* filename):
* with open(filename, "w") as f:
* sent_num = 0 # <<<<<<<<<<<<<<
@@ -11083,7 +10886,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
__Pyx_INCREF(__pyx_int_0);
__pyx_v_sent_num = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":73
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":73
* with open(filename, "w") as f:
* sent_num = 0
* for i, link in enumerate(self.links): # <<<<<<<<<<<<<<
@@ -11103,18 +10906,10 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
for (;;) {
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_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L7_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_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_2 = __pyx_t_9(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
@@ -11138,7 +10933,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
__pyx_t_4 = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":74
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":74
* sent_num = 0
* for i, link in enumerate(self.links):
* while i >= self.sent_index[sent_num]: # <<<<<<<<<<<<<<
@@ -11155,7 +10950,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (!__pyx_t_11) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":75
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":75
* for i, link in enumerate(self.links):
* while i >= self.sent_index[sent_num]:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -11169,7 +10964,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":76
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":76
* while i >= self.sent_index[sent_num]:
* f.write("\n")
* sent_num = sent_num + 1 # <<<<<<<<<<<<<<
@@ -11183,7 +10978,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
__pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":77
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":77
* f.write("\n")
* sent_num = sent_num + 1
* f.write("%d-%d " % self.unlink(link)) # <<<<<<<<<<<<<<
@@ -11220,7 +11015,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":78
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":78
* sent_num = sent_num + 1
* f.write("%d-%d " % self.unlink(link))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -11246,7 +11041,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":71
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":71
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -11368,7 +11163,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_13write_binary(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":80
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":80
* f.write("\n")
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -11382,7 +11177,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_12write_binary(struct __pyx_obj_3_sa_A
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":82
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":82
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -11391,7 +11186,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_12write_binary(struct __pyx_obj_3_sa_A
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__w);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":83
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":83
* cdef FILE* f
* f = fopen(filename, "w")
* self.links.write_handle(f) # <<<<<<<<<<<<<<
@@ -11400,7 +11195,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_12write_binary(struct __pyx_obj_3_sa_A
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->links->__pyx_vtab)->write_handle(__pyx_v_self->links, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":84
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":84
* f = fopen(filename, "w")
* self.links.write_handle(f)
* self.sent_index.write_handle(f) # <<<<<<<<<<<<<<
@@ -11409,7 +11204,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_12write_binary(struct __pyx_obj_3_sa_A
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->write_handle(__pyx_v_self->sent_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":85
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":85
* self.links.write_handle(f)
* self.sent_index.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -11445,7 +11240,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_15write_enhanced(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":87
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":87
* fclose(f)
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -11478,7 +11273,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_enhanced", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":88
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":88
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -11518,7 +11313,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
__pyx_v_f = __pyx_t_4;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":89
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":89
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* sent_num = 1 # <<<<<<<<<<<<<<
@@ -11527,7 +11322,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
*/
__pyx_v_sent_num = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":90
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":90
* with open(filename, "w") as f:
* sent_num = 1
* for link in self.links: # <<<<<<<<<<<<<<
@@ -11545,18 +11340,10 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
for (;;) {
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_4)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_4)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_1 = __pyx_t_9(__pyx_t_4);
if (unlikely(!__pyx_t_1)) {
@@ -11572,7 +11359,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
__pyx_v_link = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":91
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":91
* sent_num = 1
* for link in self.links:
* f.write("%d " % link) # <<<<<<<<<<<<<<
@@ -11596,7 +11383,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":92
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":92
* for link in self.links:
* f.write("%d " % link)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -11610,7 +11397,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":93
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":93
* f.write("%d " % link)
* f.write("\n")
* for i in self.sent_index: # <<<<<<<<<<<<<<
@@ -11628,18 +11415,10 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
for (;;) {
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_9(__pyx_t_2);
if (unlikely(!__pyx_t_4)) {
@@ -11655,7 +11434,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
__pyx_v_i = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":94
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":94
* f.write("\n")
* for i in self.sent_index:
* f.write("%d " % i) # <<<<<<<<<<<<<<
@@ -11679,7 +11458,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":95
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":95
* for i in self.sent_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -11703,7 +11482,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":88
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":88
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -11813,7 +11592,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_17alignment(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":97
+/* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":97
* f.write("\n")
*
* def alignment(self, i): # <<<<<<<<<<<<<<
@@ -11839,7 +11618,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alig
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("alignment", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":100
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":100
* """Return all (e,f) pairs for sentence i"""
* cdef int j, start, end
* result = [] # <<<<<<<<<<<<<<
@@ -11851,7 +11630,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alig
__pyx_v_result = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":101
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":101
* cdef int j, start, end
* result = []
* start = self.sent_index.arr[i] # <<<<<<<<<<<<<<
@@ -11861,7 +11640,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alig
__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 = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_start = (__pyx_v_self->sent_index->arr[__pyx_t_2]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":102
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":102
* result = []
* start = self.sent_index.arr[i]
* end = self.sent_index.arr[i+1] # <<<<<<<<<<<<<<
@@ -11874,7 +11653,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alig
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_end = (__pyx_v_self->sent_index->arr[__pyx_t_2]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":103
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":103
* start = self.sent_index.arr[i]
* end = self.sent_index.arr[i+1]
* for j from start <= j < end: # <<<<<<<<<<<<<<
@@ -11884,7 +11663,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alig
__pyx_t_3 = __pyx_v_end;
for (__pyx_v_j = __pyx_v_start; __pyx_v_j < __pyx_t_3; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":104
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":104
* end = self.sent_index.arr[i+1]
* for j from start <= j < end:
* result.append(self.unlink(self.links.arr[j])) # <<<<<<<<<<<<<<
@@ -11907,7 +11686,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alig
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":105
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":105
* for j from start <= j < end:
* result.append(self.unlink(self.links.arr[j]))
* return result # <<<<<<<<<<<<<<
@@ -11932,7 +11711,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alig
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":15
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":15
* int val
*
* cdef _node* new_node(int key): # <<<<<<<<<<<<<<
@@ -11946,7 +11725,7 @@ static struct __pyx_t_3_sa__node *__pyx_f_3_sa_new_node(int __pyx_v_key) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("new_node", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":17
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":17
* cdef _node* new_node(int key):
* cdef _node* n
* n = <_node*> malloc(sizeof(_node)) # <<<<<<<<<<<<<<
@@ -11955,7 +11734,7 @@ static struct __pyx_t_3_sa__node *__pyx_f_3_sa_new_node(int __pyx_v_key) {
*/
__pyx_v_n = ((struct __pyx_t_3_sa__node *)malloc((sizeof(struct __pyx_t_3_sa__node))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":18
* cdef _node* n
* n = <_node*> malloc(sizeof(_node))
* n.smaller = NULL # <<<<<<<<<<<<<<
@@ -11964,7 +11743,7 @@ static struct __pyx_t_3_sa__node *__pyx_f_3_sa_new_node(int __pyx_v_key) {
*/
__pyx_v_n->smaller = NULL;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":19
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":19
* n = <_node*> malloc(sizeof(_node))
* n.smaller = NULL
* n.bigger = NULL # <<<<<<<<<<<<<<
@@ -11973,7 +11752,7 @@ static struct __pyx_t_3_sa__node *__pyx_f_3_sa_new_node(int __pyx_v_key) {
*/
__pyx_v_n->bigger = NULL;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":20
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":20
* n.smaller = NULL
* n.bigger = NULL
* n.key = key # <<<<<<<<<<<<<<
@@ -11982,7 +11761,7 @@ static struct __pyx_t_3_sa__node *__pyx_f_3_sa_new_node(int __pyx_v_key) {
*/
__pyx_v_n->key = __pyx_v_key;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":21
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":21
* n.bigger = NULL
* n.key = key
* n.val = 0 # <<<<<<<<<<<<<<
@@ -11991,7 +11770,7 @@ static struct __pyx_t_3_sa__node *__pyx_f_3_sa_new_node(int __pyx_v_key) {
*/
__pyx_v_n->val = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":22
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":22
* n.key = key
* n.val = 0
* return n # <<<<<<<<<<<<<<
@@ -12007,7 +11786,7 @@ static struct __pyx_t_3_sa__node *__pyx_f_3_sa_new_node(int __pyx_v_key) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":25
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":25
*
*
* cdef del_node(_node* n): # <<<<<<<<<<<<<<
@@ -12025,7 +11804,7 @@ static PyObject *__pyx_f_3_sa_del_node(struct __pyx_t_3_sa__node *__pyx_v_n) {
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("del_node", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":26
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":26
*
* cdef del_node(_node* n):
* if n.smaller != NULL: # <<<<<<<<<<<<<<
@@ -12035,7 +11814,7 @@ static PyObject *__pyx_f_3_sa_del_node(struct __pyx_t_3_sa__node *__pyx_v_n) {
__pyx_t_1 = (__pyx_v_n->smaller != NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":27
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":27
* cdef del_node(_node* n):
* if n.smaller != NULL:
* del_node(n.smaller) # <<<<<<<<<<<<<<
@@ -12049,7 +11828,7 @@ static PyObject *__pyx_f_3_sa_del_node(struct __pyx_t_3_sa__node *__pyx_v_n) {
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":28
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":28
* if n.smaller != NULL:
* del_node(n.smaller)
* if n.bigger != NULL: # <<<<<<<<<<<<<<
@@ -12059,7 +11838,7 @@ static PyObject *__pyx_f_3_sa_del_node(struct __pyx_t_3_sa__node *__pyx_v_n) {
__pyx_t_1 = (__pyx_v_n->bigger != NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":29
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":29
* del_node(n.smaller)
* if n.bigger != NULL:
* del_node(n.bigger) # <<<<<<<<<<<<<<
@@ -12073,7 +11852,7 @@ static PyObject *__pyx_f_3_sa_del_node(struct __pyx_t_3_sa__node *__pyx_v_n) {
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":30
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":30
* if n.bigger != NULL:
* del_node(n.bigger)
* free(n) # <<<<<<<<<<<<<<
@@ -12094,7 +11873,7 @@ static PyObject *__pyx_f_3_sa_del_node(struct __pyx_t_3_sa__node *__pyx_v_n) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":32
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":32
* free(n)
*
* cdef int* get_val(_node* n, int key): # <<<<<<<<<<<<<<
@@ -12108,7 +11887,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_val", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":33
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":33
*
* cdef int* get_val(_node* n, int key):
* if key == n.key: # <<<<<<<<<<<<<<
@@ -12118,7 +11897,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
__pyx_t_1 = (__pyx_v_key == __pyx_v_n->key);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":34
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":34
* cdef int* get_val(_node* n, int key):
* if key == n.key:
* return &n.val # <<<<<<<<<<<<<<
@@ -12130,7 +11909,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":35
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":35
* if key == n.key:
* return &n.val
* elif key < n.key: # <<<<<<<<<<<<<<
@@ -12140,7 +11919,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
__pyx_t_1 = (__pyx_v_key < __pyx_v_n->key);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":36
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":36
* return &n.val
* elif key < n.key:
* if n.smaller == NULL: # <<<<<<<<<<<<<<
@@ -12150,7 +11929,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
__pyx_t_1 = (__pyx_v_n->smaller == NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":37
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":37
* elif key < n.key:
* if n.smaller == NULL:
* n.smaller = new_node(key) # <<<<<<<<<<<<<<
@@ -12159,7 +11938,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
*/
__pyx_v_n->smaller = __pyx_f_3_sa_new_node(__pyx_v_key);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":38
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":38
* if n.smaller == NULL:
* n.smaller = new_node(key)
* return &(n.smaller.val) # <<<<<<<<<<<<<<
@@ -12172,7 +11951,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":39
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":39
* n.smaller = new_node(key)
* return &(n.smaller.val)
* return get_val(n.smaller, key) # <<<<<<<<<<<<<<
@@ -12185,7 +11964,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":41
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":41
* return get_val(n.smaller, key)
* else:
* if n.bigger == NULL: # <<<<<<<<<<<<<<
@@ -12195,7 +11974,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
__pyx_t_1 = (__pyx_v_n->bigger == NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":42
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":42
* else:
* if n.bigger == NULL:
* n.bigger = new_node(key) # <<<<<<<<<<<<<<
@@ -12204,7 +11983,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
*/
__pyx_v_n->bigger = __pyx_f_3_sa_new_node(__pyx_v_key);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":43
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":43
* if n.bigger == NULL:
* n.bigger = new_node(key)
* return &(n.bigger.val) # <<<<<<<<<<<<<<
@@ -12217,7 +11996,7 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":44
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":44
* n.bigger = new_node(key)
* return &(n.bigger.val)
* return get_val(n.bigger, key) # <<<<<<<<<<<<<<
@@ -12244,14 +12023,14 @@ static int __pyx_pw_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__p
PyObject *__pyx_v_earray = 0;
PyObject *__pyx_v_fsarray = 0;
PyObject *__pyx_v_alignment = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__from_text,&__pyx_n_s__from_data,&__pyx_n_s__from_binary,&__pyx_n_s__earray,&__pyx_n_s__fsarray,&__pyx_n_s__alignment,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__from_text,&__pyx_n_s__from_data,&__pyx_n_s__from_binary,&__pyx_n_s__earray,&__pyx_n_s__fsarray,&__pyx_n_s__alignment,0};
PyObject* values[6] = {0,0,0,0,0,0};
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":54
* cdef id2eword, id2fword, eword2id, fword2id
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<<
@@ -12262,7 +12041,7 @@ static int __pyx_pw_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__p
values[1] = __pyx_k_41;
values[2] = ((PyObject *)Py_None);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":55
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":55
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None,
* earray=None, fsarray=None, alignment=None): # <<<<<<<<<<<<<<
@@ -12353,7 +12132,7 @@ static int __pyx_pw_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__p
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":54
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":54
* cdef id2eword, id2fword, eword2id, fword2id
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<<
@@ -12374,7 +12153,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":56
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":56
* def __cinit__(self, from_text=None, from_data=False, from_binary=None,
* earray=None, fsarray=None, alignment=None):
* self.id2eword = [] # <<<<<<<<<<<<<<
@@ -12389,7 +12168,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__pyx_v_self->id2eword = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":57
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":57
* earray=None, fsarray=None, alignment=None):
* self.id2eword = []
* self.id2fword = [] # <<<<<<<<<<<<<<
@@ -12404,7 +12183,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__pyx_v_self->id2fword = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":58
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":58
* self.id2eword = []
* self.id2fword = []
* self.eword2id = {} # <<<<<<<<<<<<<<
@@ -12419,7 +12198,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__pyx_v_self->eword2id = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":59
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":59
* self.id2fword = []
* self.eword2id = {}
* self.fword2id = {} # <<<<<<<<<<<<<<
@@ -12434,7 +12213,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__pyx_v_self->fword2id = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":60
* self.eword2id = {}
* self.fword2id = {}
* self.e_index = IntList() # <<<<<<<<<<<<<<
@@ -12449,7 +12228,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__pyx_v_self->e_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":61
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":61
* self.fword2id = {}
* self.e_index = IntList()
* self.f_index = IntList() # <<<<<<<<<<<<<<
@@ -12464,7 +12243,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__pyx_v_self->f_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":62
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":62
* self.e_index = IntList()
* self.f_index = IntList()
* self.col1 = FloatList() # <<<<<<<<<<<<<<
@@ -12479,7 +12258,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__pyx_v_self->col1 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":63
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":63
* self.f_index = IntList()
* self.col1 = FloatList()
* self.col2 = FloatList() # <<<<<<<<<<<<<<
@@ -12494,7 +12273,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__pyx_v_self->col2 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":64
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":64
* self.col1 = FloatList()
* self.col2 = FloatList()
* if from_binary: # <<<<<<<<<<<<<<
@@ -12504,7 +12283,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":65
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":65
* self.col2 = FloatList()
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -12526,7 +12305,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":66
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":66
* if from_binary:
* self.read_binary(from_binary)
* elif from_data: # <<<<<<<<<<<<<<
@@ -12536,7 +12315,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":67
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":67
* self.read_binary(from_binary)
* elif from_data:
* self.compute_from_data(fsarray, earray, alignment) # <<<<<<<<<<<<<<
@@ -12562,7 +12341,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":69
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":69
* self.compute_from_data(fsarray, earray, alignment)
* else:
* self.read_text(from_text) # <<<<<<<<<<<<<<
@@ -12598,7 +12377,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":72
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":72
*
*
* cdef compute_from_data(self, SuffixArray fsa, DataArray eda, Alignment aa): # <<<<<<<<<<<<<<
@@ -12652,7 +12431,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("compute_from_data", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":80
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":80
* cdef int null_word
*
* null_word = 0 # <<<<<<<<<<<<<<
@@ -12661,7 +12440,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_null_word = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":81
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":81
*
* null_word = 0
* for word in fsa.darray.id2word: # I miss list comprehensions # <<<<<<<<<<<<<<
@@ -12679,18 +12458,10 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
for (;;) {
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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
@@ -12707,7 +12478,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_v_word = ((PyObject*)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":82
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":82
* null_word = 0
* for word in fsa.darray.id2word: # I miss list comprehensions
* self.id2fword.append(word) # <<<<<<<<<<<<<<
@@ -12720,7 +12491,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":83
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":83
* for word in fsa.darray.id2word: # I miss list comprehensions
* self.id2fword.append(word)
* self.id2fword[null_word] = "NULL" # <<<<<<<<<<<<<<
@@ -12729,7 +12500,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
if (__Pyx_SetItemInt(__pyx_v_self->id2fword, __pyx_v_null_word, ((PyObject *)__pyx_n_s__NULL), sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":84
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":84
* self.id2fword.append(word)
* self.id2fword[null_word] = "NULL"
* for id, word in enumerate(self.id2fword): # <<<<<<<<<<<<<<
@@ -12749,18 +12520,10 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
for (;;) {
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_4)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_4)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_5 = __pyx_t_3(__pyx_t_4);
if (unlikely(!__pyx_t_5)) {
@@ -12785,7 +12548,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_1 = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":85
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":85
* self.id2fword[null_word] = "NULL"
* for id, word in enumerate(self.id2fword):
* self.fword2id[word] = id # <<<<<<<<<<<<<<
@@ -12797,7 +12560,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":87
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":87
* self.fword2id[word] = id
*
* for word in eda.id2word: # <<<<<<<<<<<<<<
@@ -12815,18 +12578,10 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
for (;;) {
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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 87; __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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
@@ -12843,7 +12598,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_v_word = ((PyObject*)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":88
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":88
*
* for word in eda.id2word:
* self.id2eword.append(word) # <<<<<<<<<<<<<<
@@ -12856,7 +12611,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":89
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":89
* for word in eda.id2word:
* self.id2eword.append(word)
* self.id2eword[null_word] = "NULL" # <<<<<<<<<<<<<<
@@ -12865,7 +12620,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
if (__Pyx_SetItemInt(__pyx_v_self->id2eword, __pyx_v_null_word, ((PyObject *)__pyx_n_s__NULL), sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":90
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":90
* self.id2eword.append(word)
* self.id2eword[null_word] = "NULL"
* for id, word in enumerate(self.id2eword): # <<<<<<<<<<<<<<
@@ -12885,18 +12640,10 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
for (;;) {
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_4)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_4)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_5 = __pyx_t_3(__pyx_t_4);
if (unlikely(!__pyx_t_5)) {
@@ -12921,7 +12668,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_1 = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":91
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":91
* self.id2eword[null_word] = "NULL"
* for id, word in enumerate(self.id2eword):
* self.eword2id[word] = id # <<<<<<<<<<<<<<
@@ -12933,7 +12680,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":93
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":93
* self.eword2id[word] = id
*
* num_pairs = 0 # <<<<<<<<<<<<<<
@@ -12942,7 +12689,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_num_pairs = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":95
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":95
* num_pairs = 0
*
* V_E = len(eda.id2word) # <<<<<<<<<<<<<<
@@ -12955,7 +12702,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_V_E = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":96
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":96
*
* V_E = len(eda.id2word)
* V_F = len(fsa.darray.id2word) # <<<<<<<<<<<<<<
@@ -12968,7 +12715,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_V_F = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":97
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":97
* V_E = len(eda.id2word)
* V_F = len(fsa.darray.id2word)
* fmargin = <int*> malloc(V_F*sizeof(int)) # <<<<<<<<<<<<<<
@@ -12977,7 +12724,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_fmargin = ((int *)malloc((__pyx_v_V_F * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":98
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":98
* V_F = len(fsa.darray.id2word)
* fmargin = <int*> malloc(V_F*sizeof(int))
* emargin = <int*> malloc(V_E*sizeof(int)) # <<<<<<<<<<<<<<
@@ -12986,7 +12733,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_emargin = ((int *)malloc((__pyx_v_V_E * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":99
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":99
* fmargin = <int*> malloc(V_F*sizeof(int))
* emargin = <int*> malloc(V_E*sizeof(int))
* memset(fmargin, 0, V_F*sizeof(int)) # <<<<<<<<<<<<<<
@@ -12995,7 +12742,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
memset(__pyx_v_fmargin, 0, (__pyx_v_V_F * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":100
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":100
* emargin = <int*> malloc(V_E*sizeof(int))
* memset(fmargin, 0, V_F*sizeof(int))
* memset(emargin, 0, V_E*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13004,7 +12751,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
memset(__pyx_v_emargin, 0, (__pyx_v_V_E * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":102
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":102
* memset(emargin, 0, V_E*sizeof(int))
*
* dict = <_node**> malloc(V_F*sizeof(_node*)) # <<<<<<<<<<<<<<
@@ -13013,7 +12760,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_dict = ((struct __pyx_t_3_sa__node **)malloc((__pyx_v_V_F * (sizeof(struct __pyx_t_3_sa__node *)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":103
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":103
*
* dict = <_node**> malloc(V_F*sizeof(_node*))
* memset(dict, 0, V_F*sizeof(_node*)) # <<<<<<<<<<<<<<
@@ -13022,7 +12769,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
memset(__pyx_v_dict, 0, (__pyx_v_V_F * (sizeof(struct __pyx_t_3_sa__node *))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":105
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":105
* memset(dict, 0, V_F*sizeof(_node*))
*
* num_sents = len(fsa.darray.sent_index) # <<<<<<<<<<<<<<
@@ -13038,7 +12785,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_v_num_sents = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":106
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":106
*
* num_sents = len(fsa.darray.sent_index)
* for sent_id from 0 <= sent_id < num_sents-1: # <<<<<<<<<<<<<<
@@ -13051,7 +12798,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (__pyx_v_sent_id = 0; __pyx_v_sent_id < __pyx_t_6; __pyx_v_sent_id++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":108
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":108
* for sent_id from 0 <= sent_id < num_sents-1:
*
* fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id] # <<<<<<<<<<<<<<
@@ -13060,7 +12807,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_fsent = (__pyx_v_fsa->darray->data->arr + (__pyx_v_fsa->darray->sent_index->arr[__pyx_v_sent_id]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":109
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -13069,7 +12816,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":110
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":110
* 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 = <int*> malloc(I*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13078,7 +12825,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_faligned = ((int *)malloc((__pyx_v_I * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":111
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":111
* I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1
* faligned = <int*> malloc(I*sizeof(int))
* memset(faligned, 0, I*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13087,7 +12834,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
memset(__pyx_v_faligned, 0, (__pyx_v_I * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":113
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":113
* memset(faligned, 0, I*sizeof(int))
*
* esent = eda.data.arr + eda.sent_index.arr[sent_id] # <<<<<<<<<<<<<<
@@ -13096,7 +12843,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_esent = (__pyx_v_eda->data->arr + (__pyx_v_eda->sent_index->arr[__pyx_v_sent_id]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":114
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -13105,7 +12852,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":115
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":115
* 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 = <int*> malloc(J*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13114,7 +12861,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_ealigned = ((int *)malloc((__pyx_v_J * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":116
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":116
* J = eda.sent_index.arr[sent_id+1] - eda.sent_index.arr[sent_id] - 1
* ealigned = <int*> malloc(J*sizeof(int))
* memset(ealigned, 0, J*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13123,7 +12870,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
memset(__pyx_v_ealigned, 0, (__pyx_v_J * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":118
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":118
* memset(ealigned, 0, J*sizeof(int))
*
* links = aa._get_sent_links(sent_id, &num_links) # <<<<<<<<<<<<<<
@@ -13132,7 +12879,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_links = ((struct __pyx_vtabstruct_3_sa_Alignment *)__pyx_v_aa->__pyx_vtab)->_get_sent_links(__pyx_v_aa, __pyx_v_sent_id, (&__pyx_v_num_links));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":120
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":120
* links = aa._get_sent_links(sent_id, &num_links)
*
* for l from 0 <= l < num_links: # <<<<<<<<<<<<<<
@@ -13142,7 +12889,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_7 = __pyx_v_num_links;
for (__pyx_v_l = 0; __pyx_v_l < __pyx_t_7; __pyx_v_l++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":121
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":121
*
* for l from 0 <= l < num_links:
* i = links[l*2] # <<<<<<<<<<<<<<
@@ -13151,7 +12898,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_i = (__pyx_v_links[(__pyx_v_l * 2)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":122
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":122
* for l from 0 <= l < num_links:
* i = links[l*2]
* j = links[l*2+1] # <<<<<<<<<<<<<<
@@ -13160,7 +12907,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_j = (__pyx_v_links[((__pyx_v_l * 2) + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":123
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":123
* i = links[l*2]
* j = links[l*2+1]
* if i >= I or j >= J: # <<<<<<<<<<<<<<
@@ -13176,7 +12923,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":124
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":124
* 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)) # <<<<<<<<<<<<<<
@@ -13228,7 +12975,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":125
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":125
* 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] # <<<<<<<<<<<<<<
@@ -13237,7 +12984,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_f_i = (__pyx_v_fsent[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":126
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":126
* 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] # <<<<<<<<<<<<<<
@@ -13246,7 +12993,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_e_j = (__pyx_v_esent[__pyx_v_j]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":127
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":127
* f_i = fsent[i]
* e_j = esent[j]
* fmargin[f_i] = fmargin[f_i]+1 # <<<<<<<<<<<<<<
@@ -13255,7 +13002,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_fmargin[__pyx_v_f_i]) = ((__pyx_v_fmargin[__pyx_v_f_i]) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":128
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":128
* e_j = esent[j]
* fmargin[f_i] = fmargin[f_i]+1
* emargin[e_j] = emargin[e_j]+1 # <<<<<<<<<<<<<<
@@ -13264,7 +13011,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_emargin[__pyx_v_e_j]) = ((__pyx_v_emargin[__pyx_v_e_j]) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":129
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":129
* fmargin[f_i] = fmargin[f_i]+1
* emargin[e_j] = emargin[e_j]+1
* if dict[f_i] == NULL: # <<<<<<<<<<<<<<
@@ -13274,7 +13021,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_10 = ((__pyx_v_dict[__pyx_v_f_i]) == NULL);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":130
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":130
* emargin[e_j] = emargin[e_j]+1
* if dict[f_i] == NULL:
* dict[f_i] = new_node(e_j) # <<<<<<<<<<<<<<
@@ -13283,7 +13030,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_dict[__pyx_v_f_i]) = __pyx_f_3_sa_new_node(__pyx_v_e_j);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":131
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":131
* if dict[f_i] == NULL:
* dict[f_i] = new_node(e_j)
* dict[f_i].val = 1 # <<<<<<<<<<<<<<
@@ -13292,7 +13039,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_dict[__pyx_v_f_i])->val = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":132
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":132
* dict[f_i] = new_node(e_j)
* dict[f_i].val = 1
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -13304,7 +13051,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":134
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":134
* num_pairs = num_pairs + 1
* else:
* count = get_val(dict[f_i], e_j) # <<<<<<<<<<<<<<
@@ -13313,7 +13060,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_count = __pyx_f_3_sa_get_val((__pyx_v_dict[__pyx_v_f_i]), __pyx_v_e_j);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":135
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":135
* else:
* count = get_val(dict[f_i], e_j)
* if count[0] == 0: # <<<<<<<<<<<<<<
@@ -13323,7 +13070,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_10 = ((__pyx_v_count[0]) == 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":136
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":136
* count = get_val(dict[f_i], e_j)
* if count[0] == 0:
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -13335,7 +13082,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":137
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":137
* if count[0] == 0:
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1 # <<<<<<<<<<<<<<
@@ -13346,7 +13093,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
__pyx_L16:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":139
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":139
* count[0] = count[0] + 1
* # add count
* faligned[i] = 1 # <<<<<<<<<<<<<<
@@ -13355,7 +13102,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_faligned[__pyx_v_i]) = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":140
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":140
* # add count
* faligned[i] = 1
* ealigned[j] = 1 # <<<<<<<<<<<<<<
@@ -13365,7 +13112,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
(__pyx_v_ealigned[__pyx_v_j]) = 1;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":141
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":141
* faligned[i] = 1
* ealigned[j] = 1
* for i from 0 <= i < I: # <<<<<<<<<<<<<<
@@ -13375,7 +13122,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_7 = __pyx_v_I;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":142
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":142
* ealigned[j] = 1
* for i from 0 <= i < I:
* if faligned[i] == 0: # <<<<<<<<<<<<<<
@@ -13385,7 +13132,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_10 = ((__pyx_v_faligned[__pyx_v_i]) == 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":143
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":143
* for i from 0 <= i < I:
* if faligned[i] == 0:
* f_i = fsent[i] # <<<<<<<<<<<<<<
@@ -13394,7 +13141,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_f_i = (__pyx_v_fsent[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":144
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":144
* if faligned[i] == 0:
* f_i = fsent[i]
* fmargin[f_i] = fmargin[f_i] + 1 # <<<<<<<<<<<<<<
@@ -13403,7 +13150,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_fmargin[__pyx_v_f_i]) = ((__pyx_v_fmargin[__pyx_v_f_i]) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":145
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":145
* f_i = fsent[i]
* fmargin[f_i] = fmargin[f_i] + 1
* emargin[null_word] = emargin[null_word] + 1 # <<<<<<<<<<<<<<
@@ -13412,7 +13159,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_emargin[__pyx_v_null_word]) = ((__pyx_v_emargin[__pyx_v_null_word]) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":146
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":146
* fmargin[f_i] = fmargin[f_i] + 1
* emargin[null_word] = emargin[null_word] + 1
* if dict[f_i] == NULL: # <<<<<<<<<<<<<<
@@ -13422,7 +13169,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_10 = ((__pyx_v_dict[__pyx_v_f_i]) == NULL);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":147
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":147
* emargin[null_word] = emargin[null_word] + 1
* if dict[f_i] == NULL:
* dict[f_i] = new_node(null_word) # <<<<<<<<<<<<<<
@@ -13431,7 +13178,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_dict[__pyx_v_f_i]) = __pyx_f_3_sa_new_node(__pyx_v_null_word);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":148
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":148
* if dict[f_i] == NULL:
* dict[f_i] = new_node(null_word)
* dict[f_i].val = 1 # <<<<<<<<<<<<<<
@@ -13440,7 +13187,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_dict[__pyx_v_f_i])->val = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":149
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":149
* dict[f_i] = new_node(null_word)
* dict[f_i].val = 1
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -13452,7 +13199,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":151
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":151
* num_pairs = num_pairs + 1
* else:
* count = get_val(dict[f_i], null_word) # <<<<<<<<<<<<<<
@@ -13461,7 +13208,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_count = __pyx_f_3_sa_get_val((__pyx_v_dict[__pyx_v_f_i]), __pyx_v_null_word);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":152
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":152
* else:
* count = get_val(dict[f_i], null_word)
* if count[0] == 0: # <<<<<<<<<<<<<<
@@ -13471,7 +13218,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_10 = ((__pyx_v_count[0]) == 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":153
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":153
* count = get_val(dict[f_i], null_word)
* if count[0] == 0:
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -13483,7 +13230,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
__pyx_L22:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":154
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":154
* if count[0] == 0:
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1 # <<<<<<<<<<<<<<
@@ -13498,7 +13245,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_L20:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":155
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":155
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1
* for j from 0 <= j < J: # <<<<<<<<<<<<<<
@@ -13508,7 +13255,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_7 = __pyx_v_J;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":156
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":156
* count[0] = count[0] + 1
* for j from 0 <= j < J:
* if ealigned[j] == 0: # <<<<<<<<<<<<<<
@@ -13518,7 +13265,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_10 = ((__pyx_v_ealigned[__pyx_v_j]) == 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":157
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":157
* for j from 0 <= j < J:
* if ealigned[j] == 0:
* e_j = esent[j] # <<<<<<<<<<<<<<
@@ -13527,7 +13274,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_e_j = (__pyx_v_esent[__pyx_v_j]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":158
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":158
* if ealigned[j] == 0:
* e_j = esent[j]
* fmargin[null_word] = fmargin[null_word] + 1 # <<<<<<<<<<<<<<
@@ -13536,7 +13283,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_fmargin[__pyx_v_null_word]) = ((__pyx_v_fmargin[__pyx_v_null_word]) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":159
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":159
* e_j = esent[j]
* fmargin[null_word] = fmargin[null_word] + 1
* emargin[e_j] = emargin[e_j] + 1 # <<<<<<<<<<<<<<
@@ -13545,7 +13292,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_emargin[__pyx_v_e_j]) = ((__pyx_v_emargin[__pyx_v_e_j]) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":160
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":160
* fmargin[null_word] = fmargin[null_word] + 1
* emargin[e_j] = emargin[e_j] + 1
* if dict[null_word] == NULL: # <<<<<<<<<<<<<<
@@ -13555,7 +13302,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_10 = ((__pyx_v_dict[__pyx_v_null_word]) == NULL);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":161
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":161
* emargin[e_j] = emargin[e_j] + 1
* if dict[null_word] == NULL:
* dict[null_word] = new_node(e_j) # <<<<<<<<<<<<<<
@@ -13564,7 +13311,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_dict[__pyx_v_null_word]) = __pyx_f_3_sa_new_node(__pyx_v_e_j);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":162
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":162
* if dict[null_word] == NULL:
* dict[null_word] = new_node(e_j)
* dict[null_word].val = 1 # <<<<<<<<<<<<<<
@@ -13573,7 +13320,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
(__pyx_v_dict[__pyx_v_null_word])->val = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":163
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":163
* dict[null_word] = new_node(e_j)
* dict[null_word].val = 1
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -13585,7 +13332,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":165
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":165
* num_pairs = num_pairs + 1
* else:
* count = get_val(dict[null_word], e_j) # <<<<<<<<<<<<<<
@@ -13594,7 +13341,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_count = __pyx_f_3_sa_get_val((__pyx_v_dict[__pyx_v_null_word]), __pyx_v_e_j);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":166
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":166
* else:
* count = get_val(dict[null_word], e_j)
* if count[0] == 0: # <<<<<<<<<<<<<<
@@ -13604,7 +13351,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_10 = ((__pyx_v_count[0]) == 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":167
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":167
* count = get_val(dict[null_word], e_j)
* if count[0] == 0:
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -13616,7 +13363,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
}
__pyx_L27:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":168
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":168
* if count[0] == 0:
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1 # <<<<<<<<<<<<<<
@@ -13631,7 +13378,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_L25:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":169
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":169
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1
* free(links) # <<<<<<<<<<<<<<
@@ -13640,7 +13387,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
free(__pyx_v_links);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":170
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":170
* count[0] = count[0] + 1
* free(links)
* free(faligned) # <<<<<<<<<<<<<<
@@ -13649,7 +13396,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
free(__pyx_v_faligned);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":171
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":171
* free(links)
* free(faligned)
* free(ealigned) # <<<<<<<<<<<<<<
@@ -13659,7 +13406,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
free(__pyx_v_ealigned);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":172
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":172
* free(faligned)
* free(ealigned)
* self.f_index = IntList(initial_len=V_F) # <<<<<<<<<<<<<<
@@ -13681,7 +13428,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_v_self->f_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_13);
__pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":173
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":173
* free(ealigned)
* self.f_index = IntList(initial_len=V_F)
* self.e_index = IntList(initial_len=num_pairs) # <<<<<<<<<<<<<<
@@ -13703,7 +13450,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_v_self->e_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":174
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":174
* self.f_index = IntList(initial_len=V_F)
* self.e_index = IntList(initial_len=num_pairs)
* self.col1 = FloatList(initial_len=num_pairs) # <<<<<<<<<<<<<<
@@ -13725,7 +13472,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_v_self->col1 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_13);
__pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":175
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":175
* self.e_index = IntList(initial_len=num_pairs)
* self.col1 = FloatList(initial_len=num_pairs)
* self.col2 = FloatList(initial_len=num_pairs) # <<<<<<<<<<<<<<
@@ -13747,7 +13494,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_v_self->col2 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":177
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":177
* self.col2 = FloatList(initial_len=num_pairs)
*
* num_pairs = 0 # <<<<<<<<<<<<<<
@@ -13756,7 +13503,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
__pyx_v_num_pairs = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":178
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":178
*
* num_pairs = 0
* for i from 0 <= i < V_F: # <<<<<<<<<<<<<<
@@ -13766,7 +13513,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_6 = __pyx_v_V_F;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":180
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":180
* for i from 0 <= i < V_F:
* #self.f_index[i] = num_pairs
* self.f_index.set(i, num_pairs) # <<<<<<<<<<<<<<
@@ -13775,7 +13522,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->set(__pyx_v_self->f_index, __pyx_v_i, __pyx_v_num_pairs);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":181
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":181
* #self.f_index[i] = num_pairs
* self.f_index.set(i, num_pairs)
* if dict[i] != NULL: # <<<<<<<<<<<<<<
@@ -13785,7 +13532,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_t_10 = ((__pyx_v_dict[__pyx_v_i]) != NULL);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":182
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":182
* self.f_index.set(i, num_pairs)
* if dict[i] != NULL:
* self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin) # <<<<<<<<<<<<<<
@@ -13796,7 +13543,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":183
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":183
* if dict[i] != NULL:
* self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin)
* del_node(dict[i]) # <<<<<<<<<<<<<<
@@ -13811,7 +13558,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_L30:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":184
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":184
* self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin)
* del_node(dict[i])
* free(fmargin) # <<<<<<<<<<<<<<
@@ -13820,7 +13567,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
free(__pyx_v_fmargin);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":185
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":185
* del_node(dict[i])
* free(fmargin)
* free(emargin) # <<<<<<<<<<<<<<
@@ -13829,7 +13576,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
free(__pyx_v_emargin);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":186
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":186
* free(fmargin)
* free(emargin)
* free(dict) # <<<<<<<<<<<<<<
@@ -13838,7 +13585,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
*/
free(__pyx_v_dict);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":187
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":187
* free(emargin)
* free(dict)
* return # <<<<<<<<<<<<<<
@@ -13869,7 +13616,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":190
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":190
*
*
* cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin): # <<<<<<<<<<<<<<
@@ -13888,7 +13635,7 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_add_node", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":192
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":192
* cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin):
* cdef int loc
* if n.smaller != NULL: # <<<<<<<<<<<<<<
@@ -13898,7 +13645,7 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
__pyx_t_1 = (__pyx_v_n->smaller != NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":193
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":193
* cdef int loc
* if n.smaller != NULL:
* self._add_node(n.smaller, num_pairs, fmargin, emargin) # <<<<<<<<<<<<<<
@@ -13912,7 +13659,7 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":194
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":194
* if n.smaller != NULL:
* self._add_node(n.smaller, num_pairs, fmargin, emargin)
* loc = num_pairs[0] # <<<<<<<<<<<<<<
@@ -13921,7 +13668,7 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
*/
__pyx_v_loc = (__pyx_v_num_pairs[0]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":195
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":195
* self._add_node(n.smaller, num_pairs, fmargin, emargin)
* loc = num_pairs[0]
* self.e_index.set(loc, n.key) # <<<<<<<<<<<<<<
@@ -13930,7 +13677,7 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->set(__pyx_v_self->e_index, __pyx_v_loc, __pyx_v_n->key);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":196
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":196
* loc = num_pairs[0]
* self.e_index.set(loc, n.key)
* self.col1.set(loc, float(n.val)/fmargin) # <<<<<<<<<<<<<<
@@ -13943,7 +13690,7 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
}
((struct __pyx_vtabstruct_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));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":197
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":197
* 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])) # <<<<<<<<<<<<<<
@@ -13956,7 +13703,7 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
}
((struct __pyx_vtabstruct_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]))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":198
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":198
* self.col1.set(loc, float(n.val)/fmargin)
* self.col2.set(loc, float(n.val)/float(emargin[n.key]))
* num_pairs[0] = loc + 1 # <<<<<<<<<<<<<<
@@ -13965,7 +13712,7 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
*/
(__pyx_v_num_pairs[0]) = (__pyx_v_loc + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":199
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":199
* self.col2.set(loc, float(n.val)/float(emargin[n.key]))
* num_pairs[0] = loc + 1
* if n.bigger != NULL: # <<<<<<<<<<<<<<
@@ -13975,7 +13722,7 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
__pyx_t_1 = (__pyx_v_n->bigger != NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":200
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":200
* num_pairs[0] = loc + 1
* if n.bigger != NULL:
* self._add_node(n.bigger, num_pairs, fmargin, emargin) # <<<<<<<<<<<<<<
@@ -14022,7 +13769,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_3write_binary(PyObject *__pyx_v_self, PyOb
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":203
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":203
*
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -14041,7 +13788,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":205
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":205
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -14050,7 +13797,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__w);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":206
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":206
* cdef FILE* f
* f = fopen(filename, "w")
* self.f_index.write_handle(f) # <<<<<<<<<<<<<<
@@ -14059,7 +13806,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->write_handle(__pyx_v_self->f_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":207
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":207
* f = fopen(filename, "w")
* self.f_index.write_handle(f)
* self.e_index.write_handle(f) # <<<<<<<<<<<<<<
@@ -14068,7 +13815,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->write_handle(__pyx_v_self->e_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":208
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":208
* self.f_index.write_handle(f)
* self.e_index.write_handle(f)
* self.col1.write_handle(f) # <<<<<<<<<<<<<<
@@ -14077,7 +13824,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
*/
((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->write_handle(__pyx_v_self->col1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":209
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":209
* self.e_index.write_handle(f)
* self.col1.write_handle(f)
* self.col2.write_handle(f) # <<<<<<<<<<<<<<
@@ -14086,7 +13833,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
*/
((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->write_handle(__pyx_v_self->col2, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":210
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":210
* self.col1.write_handle(f)
* self.col2.write_handle(f)
* self.write_wordlist(self.id2fword, f) # <<<<<<<<<<<<<<
@@ -14100,7 +13847,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":211
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":211
* self.col2.write_handle(f)
* self.write_wordlist(self.id2fword, f)
* self.write_wordlist(self.id2eword, f) # <<<<<<<<<<<<<<
@@ -14114,7 +13861,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":212
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":212
* self.write_wordlist(self.id2fword, f)
* self.write_wordlist(self.id2eword, f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -14136,7 +13883,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":215
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":215
*
*
* cdef write_wordlist(self, wordlist, FILE* f): # <<<<<<<<<<<<<<
@@ -14161,7 +13908,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_wordlist", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":220
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":220
* cdef char* c_word
*
* num_words = len(wordlist) # <<<<<<<<<<<<<<
@@ -14171,7 +13918,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
__pyx_t_1 = PyObject_Length(__pyx_v_wordlist); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_num_words = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":221
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":221
*
* num_words = len(wordlist)
* fwrite(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -14180,7 +13927,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
*/
fwrite((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":222
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":222
* num_words = len(wordlist)
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in wordlist: # <<<<<<<<<<<<<<
@@ -14198,18 +13945,10 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
for (;;) {
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_2);
if (unlikely(!__pyx_t_4)) {
@@ -14225,7 +13964,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
__pyx_v_word = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":223
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":223
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in wordlist:
* c_word = word # <<<<<<<<<<<<<<
@@ -14235,7 +13974,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
__pyx_t_5 = PyBytes_AsString(__pyx_v_word); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_c_word = __pyx_t_5;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":224
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":224
* for word in wordlist:
* c_word = word
* word_len = strlen(c_word) + 1 # <<<<<<<<<<<<<<
@@ -14244,7 +13983,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
*/
__pyx_v_word_len = (strlen(__pyx_v_c_word) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":225
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":225
* c_word = word
* word_len = strlen(c_word) + 1
* fwrite(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -14253,7 +13992,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
*/
fwrite((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":226
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":226
* word_len = strlen(c_word) + 1
* fwrite(&(word_len), sizeof(int), 1, f)
* fwrite(c_word, sizeof(char), word_len, f) # <<<<<<<<<<<<<<
@@ -14278,7 +14017,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":229
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":229
*
*
* cdef read_wordlist(self, word2id, id2word, FILE* f): # <<<<<<<<<<<<<<
@@ -14302,7 +14041,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_wordlist", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":235
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":235
* cdef bytes py_word
*
* fread(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -14311,7 +14050,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
*/
fread((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":236
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":236
*
* fread(&(num_words), sizeof(int), 1, f)
* for i from 0 <= i < num_words: # <<<<<<<<<<<<<<
@@ -14321,7 +14060,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
__pyx_t_1 = __pyx_v_num_words;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":237
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":237
* fread(&(num_words), sizeof(int), 1, f)
* for i from 0 <= i < num_words:
* fread(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -14330,7 +14069,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
*/
fread((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":238
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":238
* for i from 0 <= i < num_words:
* fread(&(word_len), sizeof(int), 1, f)
* c_word = <char*> malloc (word_len * sizeof(char)) # <<<<<<<<<<<<<<
@@ -14339,7 +14078,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
*/
__pyx_v_c_word = ((char *)malloc((__pyx_v_word_len * (sizeof(char)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":239
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":239
* fread(&(word_len), sizeof(int), 1, f)
* c_word = <char*> malloc (word_len * sizeof(char))
* fread(c_word, sizeof(char), word_len, f) # <<<<<<<<<<<<<<
@@ -14348,7 +14087,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
*/
fread(__pyx_v_c_word, (sizeof(char)), __pyx_v_word_len, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":240
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":240
* c_word = <char*> malloc (word_len * sizeof(char))
* fread(c_word, sizeof(char), word_len, f)
* py_word = c_word # <<<<<<<<<<<<<<
@@ -14361,7 +14100,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
__pyx_v_py_word = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":241
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":241
* fread(c_word, sizeof(char), word_len, f)
* py_word = c_word
* free(c_word) # <<<<<<<<<<<<<<
@@ -14370,7 +14109,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
*/
free(__pyx_v_c_word);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":242
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":242
* py_word = c_word
* free(c_word)
* word2id[py_word] = len(id2word) # <<<<<<<<<<<<<<
@@ -14383,7 +14122,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
if (PyObject_SetItem(__pyx_v_word2id, ((PyObject *)__pyx_v_py_word), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":243
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":243
* free(c_word)
* word2id[py_word] = len(id2word)
* id2word.append(py_word) # <<<<<<<<<<<<<<
@@ -14429,7 +14168,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_5read_binary(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":245
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":245
* id2word.append(py_word)
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -14449,7 +14188,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":247
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":247
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -14458,7 +14197,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__r);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":248
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":248
* cdef FILE* f
* f = fopen(filename, "r")
* self.f_index.read_handle(f) # <<<<<<<<<<<<<<
@@ -14467,7 +14206,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->read_handle(__pyx_v_self->f_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":249
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":249
* f = fopen(filename, "r")
* self.f_index.read_handle(f)
* self.e_index.read_handle(f) # <<<<<<<<<<<<<<
@@ -14476,7 +14215,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->read_handle(__pyx_v_self->e_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":250
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":250
* self.f_index.read_handle(f)
* self.e_index.read_handle(f)
* self.col1.read_handle(f) # <<<<<<<<<<<<<<
@@ -14485,7 +14224,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
*/
((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->read_handle(__pyx_v_self->col1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":251
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":251
* self.e_index.read_handle(f)
* self.col1.read_handle(f)
* self.col2.read_handle(f) # <<<<<<<<<<<<<<
@@ -14494,7 +14233,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
*/
((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->read_handle(__pyx_v_self->col2, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":252
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":252
* self.col1.read_handle(f)
* self.col2.read_handle(f)
* self.read_wordlist(self.fword2id, self.id2fword, f) # <<<<<<<<<<<<<<
@@ -14511,7 +14250,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":253
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":253
* self.col2.read_handle(f)
* self.read_wordlist(self.fword2id, self.id2fword, f)
* self.read_wordlist(self.eword2id, self.id2eword, f) # <<<<<<<<<<<<<<
@@ -14528,7 +14267,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":254
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":254
* self.read_wordlist(self.fword2id, self.id2fword, f)
* self.read_wordlist(self.eword2id, self.id2eword, f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -14562,7 +14301,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_7get_e_id(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":257
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":257
*
*
* def get_e_id(self, eword): # <<<<<<<<<<<<<<
@@ -14582,7 +14321,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_e_id", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":258
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":258
*
* def get_e_id(self, eword):
* if eword not in self.eword2id: # <<<<<<<<<<<<<<
@@ -14592,7 +14331,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
__pyx_t_1 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_v_self->eword2id, __pyx_v_eword))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":259
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":259
* def get_e_id(self, eword):
* if eword not in self.eword2id:
* e_id = len(self.id2eword) # <<<<<<<<<<<<<<
@@ -14608,7 +14347,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
__pyx_v_e_id = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":260
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":260
* if eword not in self.eword2id:
* e_id = len(self.id2eword)
* self.id2eword.append(eword) # <<<<<<<<<<<<<<
@@ -14619,7 +14358,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":261
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":261
* e_id = len(self.id2eword)
* self.id2eword.append(eword)
* self.eword2id[eword] = e_id # <<<<<<<<<<<<<<
@@ -14631,7 +14370,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":262
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":262
* self.id2eword.append(eword)
* self.eword2id[eword] = e_id
* return self.eword2id[eword] # <<<<<<<<<<<<<<
@@ -14669,7 +14408,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_9get_f_id(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":265
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":265
*
*
* def get_f_id(self, fword): # <<<<<<<<<<<<<<
@@ -14689,7 +14428,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_f_id", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":266
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":266
*
* def get_f_id(self, fword):
* if fword not in self.fword2id: # <<<<<<<<<<<<<<
@@ -14699,7 +14438,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
__pyx_t_1 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_v_self->fword2id, __pyx_v_fword))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":267
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":267
* def get_f_id(self, fword):
* if fword not in self.fword2id:
* f_id = len(self.id2fword) # <<<<<<<<<<<<<<
@@ -14715,7 +14454,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
__pyx_v_f_id = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":268
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":268
* if fword not in self.fword2id:
* f_id = len(self.id2fword)
* self.id2fword.append(fword) # <<<<<<<<<<<<<<
@@ -14726,7 +14465,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":269
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":269
* f_id = len(self.id2fword)
* self.id2fword.append(fword)
* self.fword2id[fword] = f_id # <<<<<<<<<<<<<<
@@ -14738,7 +14477,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":270
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":270
* self.id2fword.append(fword)
* self.fword2id[fword] = f_id
* return self.fword2id[fword] # <<<<<<<<<<<<<<
@@ -14786,7 +14525,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_11read_text(PyObject *__pyx_v_self, PyObje
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":273
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":273
*
*
* def read_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -14841,7 +14580,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_text", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":277
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":277
* cdef IntList fcount
*
* fcount = IntList() # <<<<<<<<<<<<<<
@@ -14853,7 +14592,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_fcount = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":278
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":278
*
* fcount = IntList()
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -14893,7 +14632,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_f = __pyx_t_1;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":280
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":280
* with gzip_or_text(filename) as f:
* # first loop merely establishes size of array objects
* for line in f: # <<<<<<<<<<<<<<
@@ -14911,18 +14650,10 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
for (;;) {
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_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L7_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_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_2 = __pyx_t_9(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
@@ -14938,7 +14669,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_line = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":281
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":281
* # first loop merely establishes size of array objects
* for line in f:
* (fword, eword, score1, score2) = line.split() # <<<<<<<<<<<<<<
@@ -14952,23 +14683,22 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
PyObject* sequence = __pyx_t_3;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 4)) {
- if (size > 4) __Pyx_RaiseTooManyValuesError(4);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[5]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 4)) {
+ if (PyTuple_GET_SIZE(sequence) > 4) __Pyx_RaiseTooManyValuesError(4);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[5]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ }
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_10 = PyTuple_GET_ITEM(sequence, 1);
__pyx_t_11 = PyTuple_GET_ITEM(sequence, 2);
__pyx_t_12 = PyTuple_GET_ITEM(sequence, 3);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 4)) {
+ if (PyList_GET_SIZE(sequence) > 4) __Pyx_RaiseTooManyValuesError(4);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[5]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ }
__pyx_t_2 = PyList_GET_ITEM(sequence, 0);
__pyx_t_10 = PyList_GET_ITEM(sequence, 1);
__pyx_t_11 = PyList_GET_ITEM(sequence, 2);
@@ -14978,36 +14708,28 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(__pyx_t_12);
- #else
- Py_ssize_t i;
- PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_10,&__pyx_t_11,&__pyx_t_12};
- for (i=0; i < 4; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- *(temps[i]) = item;
- }
- #endif
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- } else
- {
+ } else {
Py_ssize_t index = -1;
- PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_10,&__pyx_t_11,&__pyx_t_12};
__pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext;
- for (index=0; index < 4; index++) {
- PyObject* item = __pyx_t_14(__pyx_t_13); if (unlikely(!item)) goto __pyx_L18_unpacking_failed;
- __Pyx_GOTREF(item);
- *(temps[index]) = item;
- }
+ index = 0; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L18_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 1; __pyx_t_10 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_10)) goto __pyx_L18_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_10);
+ index = 2; __pyx_t_11 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_11)) goto __pyx_L18_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_11);
+ index = 3; __pyx_t_12 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L18_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_12);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_14 = NULL;
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
goto __pyx_L19_unpacking_done;
__pyx_L18_unpacking_failed:;
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __pyx_t_14 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[5]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__pyx_L19_unpacking_done:;
}
@@ -15024,7 +14746,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_score2 = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":282
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":282
* for line in f:
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword) # <<<<<<<<<<<<<<
@@ -15046,7 +14768,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_f_id = __pyx_t_11;
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":283
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":283
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword)
* e_id = self.get_e_id(eword) # <<<<<<<<<<<<<<
@@ -15068,7 +14790,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_e_id = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":284
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":284
* f_id = self.get_f_id(fword)
* e_id = self.get_e_id(eword)
* while f_id >= len(fcount): # <<<<<<<<<<<<<<
@@ -15086,7 +14808,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
if (!__pyx_t_16) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":285
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":285
* e_id = self.get_e_id(eword)
* while f_id >= len(fcount):
* fcount.append(0) # <<<<<<<<<<<<<<
@@ -15098,7 +14820,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":286
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":286
* while f_id >= len(fcount):
* fcount.append(0)
* fcount.arr[f_id] = fcount.arr[f_id] + 1 # <<<<<<<<<<<<<<
@@ -15111,7 +14833,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":289
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":289
*
* # Allocate space for dictionary in arrays
* N = 0 # <<<<<<<<<<<<<<
@@ -15121,7 +14843,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_INCREF(__pyx_int_0);
__pyx_v_N = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":290
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":290
* # Allocate space for dictionary in arrays
* N = 0
* n_f = len(fcount) # <<<<<<<<<<<<<<
@@ -15134,7 +14856,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_n_f = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":291
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":291
* N = 0
* n_f = len(fcount)
* self.f_index = IntList(initial_len=n_f+1) # <<<<<<<<<<<<<<
@@ -15156,7 +14878,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_self->f_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":292
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":292
* n_f = len(fcount)
* self.f_index = IntList(initial_len=n_f+1)
* for i from 0 <= i < n_f: # <<<<<<<<<<<<<<
@@ -15171,7 +14893,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_i = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":293
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":293
* self.f_index = IntList(initial_len=n_f+1)
* for i from 0 <= i < n_f:
* self.f_index.arr[i] = N # <<<<<<<<<<<<<<
@@ -15182,7 +14904,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__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 = 293; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
(__pyx_v_self->f_index->arr[__pyx_t_8]) = __pyx_t_20;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":294
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":294
* for i from 0 <= i < n_f:
* self.f_index.arr[i] = N
* N = N + fcount.arr[i] # <<<<<<<<<<<<<<
@@ -15199,7 +14921,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_N = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":295
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":295
* self.f_index.arr[i] = N
* N = N + fcount.arr[i]
* fcount.arr[i] = 0 # <<<<<<<<<<<<<<
@@ -15211,7 +14933,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_19 = __Pyx_PyInt_AsLong(__pyx_v_i); if (unlikely((__pyx_t_19 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":292
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":292
* n_f = len(fcount)
* self.f_index = IntList(initial_len=n_f+1)
* for i from 0 <= i < n_f: # <<<<<<<<<<<<<<
@@ -15224,7 +14946,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_i = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":296
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":296
* N = N + fcount.arr[i]
* fcount.arr[i] = 0
* self.f_index.arr[n_f] = N # <<<<<<<<<<<<<<
@@ -15235,7 +14957,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__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 = 296; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
(__pyx_v_self->f_index->arr[__pyx_t_8]) = __pyx_t_20;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":297
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":297
* fcount.arr[i] = 0
* self.f_index.arr[n_f] = N
* self.e_index = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -15254,7 +14976,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_self->e_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":298
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":298
* self.f_index.arr[n_f] = N
* self.e_index = IntList(initial_len=N)
* self.col1 = FloatList(initial_len=N) # <<<<<<<<<<<<<<
@@ -15273,7 +14995,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_self->col1 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":299
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":299
* self.e_index = IntList(initial_len=N)
* self.col1 = FloatList(initial_len=N)
* self.col2 = FloatList(initial_len=N) # <<<<<<<<<<<<<<
@@ -15292,7 +15014,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_self->col2 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":302
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":302
*
* # Re-read file, placing words into buckets
* f.seek(0) # <<<<<<<<<<<<<<
@@ -15306,7 +15028,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":303
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":303
* # Re-read file, placing words into buckets
* f.seek(0)
* for line in f: # <<<<<<<<<<<<<<
@@ -15324,18 +15046,10 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
for (;;) {
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_12 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_12); __pyx_t_8++;
- #else
- __pyx_t_12 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L7_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_12 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_12); __pyx_t_8++;
- #else
- __pyx_t_12 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_12 = __pyx_t_9(__pyx_t_1);
if (unlikely(!__pyx_t_12)) {
@@ -15351,7 +15065,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_line = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":304
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":304
* f.seek(0)
* for line in f:
* (fword, eword, score1, score2) = line.split() # <<<<<<<<<<<<<<
@@ -15365,23 +15079,22 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
PyObject* sequence = __pyx_t_3;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 4)) {
- if (size > 4) __Pyx_RaiseTooManyValuesError(4);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[5]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 4)) {
+ if (PyTuple_GET_SIZE(sequence) > 4) __Pyx_RaiseTooManyValuesError(4);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[5]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ }
__pyx_t_12 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_11 = PyTuple_GET_ITEM(sequence, 1);
__pyx_t_10 = PyTuple_GET_ITEM(sequence, 2);
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 3);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 4)) {
+ if (PyList_GET_SIZE(sequence) > 4) __Pyx_RaiseTooManyValuesError(4);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[5]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ }
__pyx_t_12 = PyList_GET_ITEM(sequence, 0);
__pyx_t_11 = PyList_GET_ITEM(sequence, 1);
__pyx_t_10 = PyList_GET_ITEM(sequence, 2);
@@ -15391,36 +15104,28 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(__pyx_t_2);
- #else
- Py_ssize_t i;
- PyObject** temps[4] = {&__pyx_t_12,&__pyx_t_11,&__pyx_t_10,&__pyx_t_2};
- for (i=0; i < 4; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- *(temps[i]) = item;
- }
- #endif
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- } else
- {
+ } else {
Py_ssize_t index = -1;
- PyObject** temps[4] = {&__pyx_t_12,&__pyx_t_11,&__pyx_t_10,&__pyx_t_2};
__pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext;
- for (index=0; index < 4; index++) {
- PyObject* item = __pyx_t_14(__pyx_t_13); if (unlikely(!item)) goto __pyx_L26_unpacking_failed;
- __Pyx_GOTREF(item);
- *(temps[index]) = item;
- }
+ index = 0; __pyx_t_12 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L26_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_12);
+ index = 1; __pyx_t_11 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_11)) goto __pyx_L26_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_11);
+ index = 2; __pyx_t_10 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_10)) goto __pyx_L26_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_10);
+ index = 3; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L26_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_14 = NULL;
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
goto __pyx_L27_unpacking_done;
__pyx_L26_unpacking_failed:;
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __pyx_t_14 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[5]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__pyx_L27_unpacking_done:;
}
@@ -15437,7 +15142,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_score2 = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":305
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":305
* for line in f:
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword) # <<<<<<<<<<<<<<
@@ -15459,7 +15164,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_f_id = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":306
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":306
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword)
* e_id = self.get_e_id(eword) # <<<<<<<<<<<<<<
@@ -15481,7 +15186,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_e_id = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":307
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":307
* 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] # <<<<<<<<<<<<<<
@@ -15496,7 +15201,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_index = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":308
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":308
* 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 # <<<<<<<<<<<<<<
@@ -15507,7 +15212,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__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 = 308; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
(__pyx_v_fcount->arr[__pyx_t_15]) = ((__pyx_v_fcount->arr[__pyx_t_17]) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":309
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":309
* 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) # <<<<<<<<<<<<<<
@@ -15527,7 +15232,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
(__pyx_v_self->e_index->arr[__pyx_t_17]) = __pyx_t_20;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":310
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":310
* fcount.arr[f_id] = fcount.arr[f_id] + 1
* self.e_index.arr[index] = int(e_id)
* self.col1[index] = float(score1) # <<<<<<<<<<<<<<
@@ -15540,7 +15245,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
if (PyObject_SetItem(((PyObject *)__pyx_v_self->col1), __pyx_v_index, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":311
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":311
* self.e_index.arr[index] = int(e_id)
* self.col1[index] = float(score1)
* self.col2[index] = float(score2) # <<<<<<<<<<<<<<
@@ -15568,7 +15273,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":278
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":278
*
* fcount = IntList()
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -15648,7 +15353,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_L31:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":314
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":314
*
* # Sort buckets by eword
* for b from 0 <= b < n_f: # <<<<<<<<<<<<<<
@@ -15664,7 +15369,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_b = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":315
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":315
* # Sort buckets by eword
* for b from 0 <= b < n_f:
* i = self.f_index.arr[b] # <<<<<<<<<<<<<<
@@ -15678,7 +15383,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_i = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":316
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":316
* for b from 0 <= b < n_f:
* i = self.f_index.arr[b]
* j = self.f_index.arr[b+1] # <<<<<<<<<<<<<<
@@ -15695,7 +15400,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_j = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":317
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":317
* i = self.f_index.arr[b]
* j = self.f_index.arr[b+1]
* self.qsort(i,j, "") # <<<<<<<<<<<<<<
@@ -15713,7 +15418,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_18 = __Pyx_PyInt_AsLong(__pyx_v_b); if (unlikely((__pyx_t_18 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":314
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":314
*
* # Sort buckets by eword
* for b from 0 <= b < n_f: # <<<<<<<<<<<<<<
@@ -15759,7 +15464,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":320
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":320
*
*
* cdef swap(self, int i, int j): # <<<<<<<<<<<<<<
@@ -15775,7 +15480,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
int __pyx_t_1;
__Pyx_RefNannySetupContext("swap", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":324
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":324
* cdef float ftmp
*
* if i == j: # <<<<<<<<<<<<<<
@@ -15785,7 +15490,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__pyx_t_1 = (__pyx_v_i == __pyx_v_j);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":325
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":325
*
* if i == j:
* return # <<<<<<<<<<<<<<
@@ -15799,7 +15504,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":327
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":327
* return
*
* itmp = self.e_index.arr[i] # <<<<<<<<<<<<<<
@@ -15808,7 +15513,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
*/
__pyx_v_itmp = (__pyx_v_self->e_index->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":328
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":328
*
* itmp = self.e_index.arr[i]
* self.e_index.arr[i] = self.e_index.arr[j] # <<<<<<<<<<<<<<
@@ -15817,7 +15522,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
*/
(__pyx_v_self->e_index->arr[__pyx_v_i]) = (__pyx_v_self->e_index->arr[__pyx_v_j]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":329
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":329
* itmp = self.e_index.arr[i]
* self.e_index.arr[i] = self.e_index.arr[j]
* self.e_index.arr[j] = itmp # <<<<<<<<<<<<<<
@@ -15826,7 +15531,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
*/
(__pyx_v_self->e_index->arr[__pyx_v_j]) = __pyx_v_itmp;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":331
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":331
* self.e_index.arr[j] = itmp
*
* ftmp = self.col1.arr[i] # <<<<<<<<<<<<<<
@@ -15835,7 +15540,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
*/
__pyx_v_ftmp = (__pyx_v_self->col1->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":332
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":332
*
* ftmp = self.col1.arr[i]
* self.col1.arr[i] = self.col1.arr[j] # <<<<<<<<<<<<<<
@@ -15844,7 +15549,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
*/
(__pyx_v_self->col1->arr[__pyx_v_i]) = (__pyx_v_self->col1->arr[__pyx_v_j]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":333
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":333
* ftmp = self.col1.arr[i]
* self.col1.arr[i] = self.col1.arr[j]
* self.col1.arr[j] = ftmp # <<<<<<<<<<<<<<
@@ -15853,7 +15558,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
*/
(__pyx_v_self->col1->arr[__pyx_v_j]) = __pyx_v_ftmp;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":335
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":335
* self.col1.arr[j] = ftmp
*
* ftmp = self.col2.arr[i] # <<<<<<<<<<<<<<
@@ -15862,7 +15567,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
*/
__pyx_v_ftmp = (__pyx_v_self->col2->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":336
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":336
*
* ftmp = self.col2.arr[i]
* self.col2.arr[i] = self.col2.arr[j] # <<<<<<<<<<<<<<
@@ -15871,7 +15576,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
*/
(__pyx_v_self->col2->arr[__pyx_v_i]) = (__pyx_v_self->col2->arr[__pyx_v_j]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":337
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":337
* ftmp = self.col2.arr[i]
* self.col2.arr[i] = self.col2.arr[j]
* self.col2.arr[j] = ftmp # <<<<<<<<<<<<<<
@@ -15887,7 +15592,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":340
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":340
*
*
* cdef qsort(self, int i, int j, pad): # <<<<<<<<<<<<<<
@@ -15910,7 +15615,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("qsort", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":343
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":343
* cdef int pval, p
*
* if i > j: # <<<<<<<<<<<<<<
@@ -15920,7 +15625,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__pyx_t_1 = (__pyx_v_i > __pyx_v_j);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":344
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":344
*
* if i > j:
* raise Exception("Sort error in CLex") # <<<<<<<<<<<<<<
@@ -15936,7 +15641,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":345
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":345
* if i > j:
* raise Exception("Sort error in CLex")
* if i == j: #empty interval # <<<<<<<<<<<<<<
@@ -15946,7 +15651,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__pyx_t_1 = (__pyx_v_i == __pyx_v_j);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":346
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":346
* raise Exception("Sort error in CLex")
* if i == j: #empty interval
* return # <<<<<<<<<<<<<<
@@ -15960,7 +15665,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":347
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":347
* if i == j: #empty interval
* return
* if i == j-1: # singleton interval # <<<<<<<<<<<<<<
@@ -15970,7 +15675,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__pyx_t_1 = (__pyx_v_i == (__pyx_v_j - 1));
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":348
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":348
* return
* if i == j-1: # singleton interval
* return # <<<<<<<<<<<<<<
@@ -15984,7 +15689,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":350
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":350
* return
*
* p = (i+j)/2 # <<<<<<<<<<<<<<
@@ -15993,7 +15698,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
*/
__pyx_v_p = __Pyx_div_long((__pyx_v_i + __pyx_v_j), 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":351
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":351
*
* p = (i+j)/2
* pval = self.e_index.arr[p] # <<<<<<<<<<<<<<
@@ -16002,7 +15707,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
*/
__pyx_v_pval = (__pyx_v_self->e_index->arr[__pyx_v_p]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":352
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":352
* p = (i+j)/2
* pval = self.e_index.arr[p]
* self.swap(i, p) # <<<<<<<<<<<<<<
@@ -16013,7 +15718,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":353
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":353
* pval = self.e_index.arr[p]
* self.swap(i, p)
* p = i # <<<<<<<<<<<<<<
@@ -16022,7 +15727,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
*/
__pyx_v_p = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":354
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":354
* self.swap(i, p)
* p = i
* for k from i+1 <= k < j: # <<<<<<<<<<<<<<
@@ -16032,7 +15737,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__pyx_t_3 = __pyx_v_j;
for (__pyx_v_k = (__pyx_v_i + 1); __pyx_v_k < __pyx_t_3; __pyx_v_k++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":355
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":355
* p = i
* for k from i+1 <= k < j:
* if pval >= self.e_index.arr[k]: # <<<<<<<<<<<<<<
@@ -16042,7 +15747,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__pyx_t_1 = (__pyx_v_pval >= (__pyx_v_self->e_index->arr[__pyx_v_k]));
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":356
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":356
* for k from i+1 <= k < j:
* if pval >= self.e_index.arr[k]:
* self.swap(p+1, k) # <<<<<<<<<<<<<<
@@ -16053,7 +15758,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":357
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":357
* if pval >= self.e_index.arr[k]:
* self.swap(p+1, k)
* self.swap(p, p+1) # <<<<<<<<<<<<<<
@@ -16064,7 +15769,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":358
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":358
* self.swap(p+1, k)
* self.swap(p, p+1)
* p = p + 1 # <<<<<<<<<<<<<<
@@ -16077,7 +15782,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__pyx_L8:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":359
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":359
* self.swap(p, p+1)
* p = p + 1
* self.qsort(i,p, pad+" ") # <<<<<<<<<<<<<<
@@ -16091,7 +15796,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":360
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":360
* p = p + 1
* self.qsort(i,p, pad+" ")
* self.qsort(p+1,j, pad+" ") # <<<<<<<<<<<<<<
@@ -16139,7 +15844,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_13write_enhanced(PyObject *__pyx_v_self, P
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":363
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":363
*
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -16176,7 +15881,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_enhanced", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":364
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":364
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -16216,7 +15921,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__pyx_v_f = __pyx_t_4;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":365
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":365
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* for i in self.f_index: # <<<<<<<<<<<<<<
@@ -16234,18 +15939,10 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
for (;;) {
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_4)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_4)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_1 = __pyx_t_9(__pyx_t_4);
if (unlikely(!__pyx_t_1)) {
@@ -16261,7 +15958,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__pyx_v_i = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":366
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":366
* with open(filename, "w") as f:
* for i in self.f_index:
* f.write("%d " % i) # <<<<<<<<<<<<<<
@@ -16285,7 +15982,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":367
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":367
* for i in self.f_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -16299,7 +15996,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":368
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":368
* f.write("%d " % i)
* f.write("\n")
* for i, s1, s2 in zip(self.e_index, self.col1, self.col2): # <<<<<<<<<<<<<<
@@ -16332,18 +16029,10 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
for (;;) {
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_9(__pyx_t_2);
if (unlikely(!__pyx_t_4)) {
@@ -16357,22 +16046,21 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
}
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
PyObject* sequence = __pyx_t_4;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 3)) {
- if (size > 3) __Pyx_RaiseTooManyValuesError(3);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) {
+ if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ }
__pyx_t_10 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
__pyx_t_11 = PyTuple_GET_ITEM(sequence, 2);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 3)) {
+ if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ }
__pyx_t_10 = PyList_GET_ITEM(sequence, 0);
__pyx_t_1 = PyList_GET_ITEM(sequence, 1);
__pyx_t_11 = PyList_GET_ITEM(sequence, 2);
@@ -16380,14 +16068,8 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_11);
- #else
- __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_11 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- #endif
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- } else
- {
+ } else {
Py_ssize_t index = -1;
__pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_12);
@@ -16400,13 +16082,12 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
index = 2; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L20_unpacking_failed;
__Pyx_GOTREF(__pyx_t_11);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_13 = NULL;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
goto __pyx_L21_unpacking_done;
__pyx_L20_unpacking_failed:;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_13 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[5]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__pyx_L21_unpacking_done:;
}
@@ -16420,7 +16101,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__pyx_v_s2 = __pyx_t_11;
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":369
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":369
* f.write("\n")
* for i, s1, s2 in zip(self.e_index, self.col1, self.col2):
* f.write("%d %f %f " % (i, s1, s2)) # <<<<<<<<<<<<<<
@@ -16456,7 +16137,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":370
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":370
* for i, s1, s2 in zip(self.e_index, self.col1, self.col2):
* f.write("%d %f %f " % (i, s1, s2))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -16470,7 +16151,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":371
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":371
* f.write("%d %f %f " % (i, s1, s2))
* f.write("\n")
* for i, w in enumerate(self.id2fword): # <<<<<<<<<<<<<<
@@ -16490,18 +16171,10 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
for (;;) {
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_11 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_11); __pyx_t_8++;
- #else
- __pyx_t_11 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_11); __pyx_t_8++;
- #else
- __pyx_t_11 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_11 = __pyx_t_9(__pyx_t_2);
if (unlikely(!__pyx_t_11)) {
@@ -16525,7 +16198,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__pyx_t_1 = __pyx_t_11;
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":372
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":372
* f.write("\n")
* for i, w in enumerate(self.id2fword):
* f.write("%d %s " % (i, w)) # <<<<<<<<<<<<<<
@@ -16559,7 +16232,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":373
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":373
* for i, w in enumerate(self.id2fword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -16573,7 +16246,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":374
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":374
* f.write("%d %s " % (i, w))
* f.write("\n")
* for i, w in enumerate(self.id2eword): # <<<<<<<<<<<<<<
@@ -16593,18 +16266,10 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
for (;;) {
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_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++;
- #else
- __pyx_t_10 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L7_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_10 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++;
- #else
- __pyx_t_10 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_10 = __pyx_t_9(__pyx_t_1);
if (unlikely(!__pyx_t_10)) {
@@ -16628,7 +16293,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__pyx_t_2 = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":375
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":375
* f.write("\n")
* for i, w in enumerate(self.id2eword):
* f.write("%d %s " % (i, w)) # <<<<<<<<<<<<<<
@@ -16662,7 +16327,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":376
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":376
* for i, w in enumerate(self.id2eword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -16688,7 +16353,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":364
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":364
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -16796,11 +16461,11 @@ static PyObject *__pyx_pw_3_sa_5BiLex_15get_score(PyObject *__pyx_v_self, PyObje
PyObject *__pyx_v_fword = 0;
PyObject *__pyx_v_eword = 0;
PyObject *__pyx_v_col = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fword,&__pyx_n_s__eword,&__pyx_n_s__col,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_score (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fword,&__pyx_n_s__eword,&__pyx_n_s__col,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -16815,15 +16480,18 @@ static PyObject *__pyx_pw_3_sa_5BiLex_15get_score(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__fword)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fword);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__eword)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__eword);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("get_score", 1, 3, 3, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__col)) != 0)) kw_args--;
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__col);
+ if (likely(values[2])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("get_score", 1, 3, 3, 2); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -16855,7 +16523,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_15get_score(PyObject *__pyx_v_self, PyObje
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":379
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":379
*
*
* def get_score(self, fword, eword, col): # <<<<<<<<<<<<<<
@@ -16881,7 +16549,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_score", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":382
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":382
* cdef e_id, f_id, low, high, midpoint, val
*
* if eword not in self.eword2id: # <<<<<<<<<<<<<<
@@ -16891,7 +16559,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_1 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_v_self->eword2id, __pyx_v_eword))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":383
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":383
*
* if eword not in self.eword2id:
* return None # <<<<<<<<<<<<<<
@@ -16906,7 +16574,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":384
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":384
* if eword not in self.eword2id:
* return None
* if fword not in self.fword2id: # <<<<<<<<<<<<<<
@@ -16916,7 +16584,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_1 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_v_self->fword2id, __pyx_v_fword))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":385
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":385
* return None
* if fword not in self.fword2id:
* return None # <<<<<<<<<<<<<<
@@ -16931,7 +16599,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":386
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":386
* if fword not in self.fword2id:
* return None
* f_id = self.fword2id[fword] # <<<<<<<<<<<<<<
@@ -16943,7 +16611,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_f_id = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":387
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":387
* return None
* f_id = self.fword2id[fword]
* e_id = self.eword2id[eword] # <<<<<<<<<<<<<<
@@ -16955,7 +16623,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_e_id = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":388
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":388
* f_id = self.fword2id[fword]
* e_id = self.eword2id[eword]
* low = self.f_index.arr[f_id] # <<<<<<<<<<<<<<
@@ -16968,7 +16636,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_low = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":389
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":389
* e_id = self.eword2id[eword]
* low = self.f_index.arr[f_id]
* high = self.f_index.arr[f_id+1] # <<<<<<<<<<<<<<
@@ -16984,7 +16652,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_high = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":390
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":390
* low = self.f_index.arr[f_id]
* high = self.f_index.arr[f_id+1]
* while high - low > 0: # <<<<<<<<<<<<<<
@@ -17001,7 +16669,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_1) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":391
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":391
* high = self.f_index.arr[f_id+1]
* while high - low > 0:
* midpoint = (low+high)/2 # <<<<<<<<<<<<<<
@@ -17017,7 +16685,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_midpoint = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":392
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":392
* while high - low > 0:
* midpoint = (low+high)/2
* val = self.e_index.arr[midpoint] # <<<<<<<<<<<<<<
@@ -17031,7 +16699,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_val = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":393
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":393
* midpoint = (low+high)/2
* val = self.e_index.arr[midpoint]
* if val == e_id: # <<<<<<<<<<<<<<
@@ -17044,7 +16712,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":394
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":394
* val = self.e_index.arr[midpoint]
* if val == e_id:
* if col == 0: # <<<<<<<<<<<<<<
@@ -17057,7 +16725,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":395
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":395
* if val == e_id:
* if col == 0:
* return self.col1.arr[midpoint] # <<<<<<<<<<<<<<
@@ -17075,7 +16743,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":396
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":396
* if col == 0:
* return self.col1.arr[midpoint]
* if col == 1: # <<<<<<<<<<<<<<
@@ -17088,7 +16756,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":397
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":397
* return self.col1.arr[midpoint]
* if col == 1:
* return self.col2.arr[midpoint] # <<<<<<<<<<<<<<
@@ -17109,7 +16777,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":398
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":398
* if col == 1:
* return self.col2.arr[midpoint]
* if val > e_id: # <<<<<<<<<<<<<<
@@ -17122,7 +16790,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":399
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":399
* return self.col2.arr[midpoint]
* if val > e_id:
* high = midpoint # <<<<<<<<<<<<<<
@@ -17136,7 +16804,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
}
__pyx_L10:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":400
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":400
* if val > e_id:
* high = midpoint
* if val < e_id: # <<<<<<<<<<<<<<
@@ -17149,7 +16817,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":401
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":401
* high = midpoint
* if val < e_id:
* low = midpoint + 1 # <<<<<<<<<<<<<<
@@ -17166,7 +16834,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_L11:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":402
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":402
* if val < e_id:
* low = midpoint + 1
* return None # <<<<<<<<<<<<<<
@@ -17219,7 +16887,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_17write_text(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":405
+/* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":405
*
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -17256,7 +16924,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_text", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":409
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":409
* cdef i, N, e_id, f_id
*
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -17296,7 +16964,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__pyx_v_f = __pyx_t_4;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":410
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":410
*
* with open(filename, "w") as f:
* N = len(self.e_index) # <<<<<<<<<<<<<<
@@ -17312,7 +16980,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__pyx_v_N = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":411
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":411
* with open(filename, "w") as f:
* N = len(self.e_index)
* f_id = 0 # <<<<<<<<<<<<<<
@@ -17322,7 +16990,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__Pyx_INCREF(__pyx_int_0);
__pyx_v_f_id = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":412
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":412
* N = len(self.e_index)
* f_id = 0
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -17337,7 +17005,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__pyx_v_i = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":413
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":413
* f_id = 0
* for i from 0 <= i < N:
* while self.f_index.arr[f_id+1] == i: # <<<<<<<<<<<<<<
@@ -17358,7 +17026,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_11) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":414
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":414
* for i from 0 <= i < N:
* while self.f_index.arr[f_id+1] == i:
* f_id = f_id + 1 # <<<<<<<<<<<<<<
@@ -17372,7 +17040,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":415
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":415
* while self.f_index.arr[f_id+1] == i:
* f_id = f_id + 1
* e_id = self.e_index.arr[i] # <<<<<<<<<<<<<<
@@ -17386,7 +17054,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__pyx_v_e_id = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":416
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":416
* f_id = f_id + 1
* e_id = self.e_index.arr[i]
* score1 = self.col1.arr[i] # <<<<<<<<<<<<<<
@@ -17400,7 +17068,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__pyx_v_score1 = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":417
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":417
* e_id = self.e_index.arr[i]
* score1 = self.col1.arr[i]
* score2 = self.col2.arr[i] # <<<<<<<<<<<<<<
@@ -17413,7 +17081,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__pyx_v_score2 = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":418
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":418
* 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)) # <<<<<<<<<<<<<<
@@ -17454,7 +17122,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__pyx_t_10 = __Pyx_PyInt_AsLong(__pyx_v_i); if (unlikely((__pyx_t_10 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":412
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":412
* N = len(self.e_index)
* f_id = 0
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -17477,7 +17145,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":409
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":409
* cdef i, N, e_id, f_id
*
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -17579,7 +17247,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":21
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":21
* cdef int LOWER_MASK[32]
*
* cdef void _init_lower_mask(): # <<<<<<<<<<<<<<
@@ -17595,7 +17263,7 @@ static void __pyx_f_3_sa__init_lower_mask(void) {
unsigned int __pyx_t_2;
__Pyx_RefNannySetupContext("_init_lower_mask", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":23
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":23
* cdef void _init_lower_mask():
* cdef unsigned i
* cdef int mask = 0 # <<<<<<<<<<<<<<
@@ -17604,7 +17272,7 @@ static void __pyx_f_3_sa__init_lower_mask(void) {
*/
__pyx_v_mask = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":24
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":24
* cdef unsigned i
* cdef int mask = 0
* for i in range(MIN_BOTTOM_SIZE): # <<<<<<<<<<<<<<
@@ -17615,7 +17283,7 @@ static void __pyx_f_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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":25
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":25
* cdef int mask = 0
* for i in range(MIN_BOTTOM_SIZE):
* mask = (mask << 1) + 1 # <<<<<<<<<<<<<<
@@ -17624,7 +17292,7 @@ static void __pyx_f_3_sa__init_lower_mask(void) {
*/
__pyx_v_mask = ((__pyx_v_mask << 1) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":26
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":26
* for i in range(MIN_BOTTOM_SIZE):
* mask = (mask << 1) + 1
* LOWER_MASK[i] = mask # <<<<<<<<<<<<<<
@@ -17637,7 +17305,7 @@ static void __pyx_f_3_sa__init_lower_mask(void) {
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":37
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":37
*
*
* cdef _BitSet* new_BitSet(): # <<<<<<<<<<<<<<
@@ -17651,7 +17319,7 @@ static struct __pyx_t_3_sa__BitSet *__pyx_f_3_sa_new_BitSet(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("new_BitSet", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":40
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":40
* cdef _BitSet* b
*
* b = <_BitSet*> malloc(sizeof(_BitSet)) # <<<<<<<<<<<<<<
@@ -17660,7 +17328,7 @@ static struct __pyx_t_3_sa__BitSet *__pyx_f_3_sa_new_BitSet(void) {
*/
__pyx_v_b = ((struct __pyx_t_3_sa__BitSet *)malloc((sizeof(struct __pyx_t_3_sa__BitSet))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":41
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":41
*
* b = <_BitSet*> malloc(sizeof(_BitSet))
* b.bitset = 0 # <<<<<<<<<<<<<<
@@ -17669,7 +17337,7 @@ static struct __pyx_t_3_sa__BitSet *__pyx_f_3_sa_new_BitSet(void) {
*/
__pyx_v_b->bitset = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":42
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":42
* b = <_BitSet*> malloc(sizeof(_BitSet))
* b.bitset = 0
* b.min_val = -1 # <<<<<<<<<<<<<<
@@ -17678,7 +17346,7 @@ static struct __pyx_t_3_sa__BitSet *__pyx_f_3_sa_new_BitSet(void) {
*/
__pyx_v_b->min_val = -1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":43
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":43
* b.bitset = 0
* b.min_val = -1
* b.max_val = -1 # <<<<<<<<<<<<<<
@@ -17687,7 +17355,7 @@ static struct __pyx_t_3_sa__BitSet *__pyx_f_3_sa_new_BitSet(void) {
*/
__pyx_v_b->max_val = -1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":44
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":44
* b.min_val = -1
* b.max_val = -1
* b.size = 0 # <<<<<<<<<<<<<<
@@ -17696,7 +17364,7 @@ static struct __pyx_t_3_sa__BitSet *__pyx_f_3_sa_new_BitSet(void) {
*/
__pyx_v_b->size = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":45
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":45
* b.max_val = -1
* b.size = 0
* return b # <<<<<<<<<<<<<<
@@ -17712,7 +17380,7 @@ static struct __pyx_t_3_sa__BitSet *__pyx_f_3_sa_new_BitSet(void) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":48
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":48
*
*
* cdef int bitset_findsucc(_BitSet* b, int i): # <<<<<<<<<<<<<<
@@ -17733,7 +17401,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
int __pyx_t_3;
__Pyx_RefNannySetupContext("bitset_findsucc", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":52
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":52
* cdef int low, high, mid
*
* if b.max_val == -1 or i >= b.max_val: # <<<<<<<<<<<<<<
@@ -17749,7 +17417,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":53
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":53
*
* if b.max_val == -1 or i >= b.max_val:
* return -1 # <<<<<<<<<<<<<<
@@ -17762,7 +17430,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":54
* if b.max_val == -1 or i >= b.max_val:
* return -1
* if i < b.min_val: # <<<<<<<<<<<<<<
@@ -17772,7 +17440,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
__pyx_t_3 = (__pyx_v_i < __pyx_v_b->min_val);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":55
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":55
* return -1
* if i < b.min_val:
* return b.min_val # <<<<<<<<<<<<<<
@@ -17785,7 +17453,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":57
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":57
* return b.min_val
*
* bitset = b.bitset & ~LOWER_MASK[i] # <<<<<<<<<<<<<<
@@ -17794,7 +17462,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
*/
__pyx_v_bitset = (__pyx_v_b->bitset & (~(__pyx_v_3_sa_LOWER_MASK[__pyx_v_i])));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":58
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":58
*
* bitset = b.bitset & ~LOWER_MASK[i]
* low = i+1 # <<<<<<<<<<<<<<
@@ -17803,7 +17471,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
*/
__pyx_v_low = (__pyx_v_i + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":59
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":59
* bitset = b.bitset & ~LOWER_MASK[i]
* low = i+1
* high = b.max_val+1 # <<<<<<<<<<<<<<
@@ -17812,7 +17480,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
*/
__pyx_v_high = (__pyx_v_b->max_val + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":60
* low = i+1
* high = b.max_val+1
* while low < high-1: # <<<<<<<<<<<<<<
@@ -17823,7 +17491,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
__pyx_t_3 = (__pyx_v_low < (__pyx_v_high - 1));
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":61
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":61
* high = b.max_val+1
* while low < high-1:
* mid = (high + low)/2 # <<<<<<<<<<<<<<
@@ -17832,7 +17500,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
*/
__pyx_v_mid = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":62
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":62
* while low < high-1:
* mid = (high + low)/2
* mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1]) # <<<<<<<<<<<<<<
@@ -17841,7 +17509,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
*/
__pyx_v_mask = (~((__pyx_v_3_sa_LOWER_MASK[(__pyx_v_high - 1)]) ^ (__pyx_v_3_sa_LOWER_MASK[(__pyx_v_mid - 1)])));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":63
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":63
* mid = (high + low)/2
* mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1])
* if bitset & mask == 0: # <<<<<<<<<<<<<<
@@ -17851,7 +17519,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
__pyx_t_3 = ((__pyx_v_bitset & __pyx_v_mask) == 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":64
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":64
* mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1])
* if bitset & mask == 0:
* low = mid # <<<<<<<<<<<<<<
@@ -17863,7 +17531,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":66
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":66
* low = mid
* else:
* bitset = bitset & mask # <<<<<<<<<<<<<<
@@ -17872,7 +17540,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
*/
__pyx_v_bitset = (__pyx_v_bitset & __pyx_v_mask);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":67
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":67
* else:
* bitset = bitset & mask
* high = mid # <<<<<<<<<<<<<<
@@ -17884,7 +17552,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
__pyx_L7:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":68
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":68
* bitset = bitset & mask
* high = mid
* return low # <<<<<<<<<<<<<<
@@ -17900,7 +17568,7 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":71
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":71
*
*
* cdef int bitset_insert(_BitSet* b, int i): # <<<<<<<<<<<<<<
@@ -17915,7 +17583,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
int __pyx_t_1;
__Pyx_RefNannySetupContext("bitset_insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":74
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":74
* cdef int val
*
* val = 1 << i # <<<<<<<<<<<<<<
@@ -17924,7 +17592,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
*/
__pyx_v_val = (1 << __pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":75
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":75
*
* val = 1 << i
* if b.bitset & val == 0: # <<<<<<<<<<<<<<
@@ -17934,7 +17602,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
__pyx_t_1 = ((__pyx_v_b->bitset & __pyx_v_val) == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":76
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":76
* val = 1 << i
* if b.bitset & val == 0:
* b.bitset = b.bitset | val # <<<<<<<<<<<<<<
@@ -17943,7 +17611,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
*/
__pyx_v_b->bitset = (__pyx_v_b->bitset | __pyx_v_val);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":77
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":77
* if b.bitset & val == 0:
* b.bitset = b.bitset | val
* if b.size == 0: # <<<<<<<<<<<<<<
@@ -17953,7 +17621,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
__pyx_t_1 = (__pyx_v_b->size == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":78
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":78
* b.bitset = b.bitset | val
* if b.size == 0:
* b.min_val = i # <<<<<<<<<<<<<<
@@ -17962,7 +17630,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
*/
__pyx_v_b->min_val = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":79
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":79
* if b.size == 0:
* b.min_val = i
* b.max_val = i # <<<<<<<<<<<<<<
@@ -17974,7 +17642,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":81
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":81
* b.max_val = i
* else:
* if i < b.min_val: # <<<<<<<<<<<<<<
@@ -17984,7 +17652,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
__pyx_t_1 = (__pyx_v_i < __pyx_v_b->min_val);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":82
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":82
* else:
* if i < b.min_val:
* b.min_val = i # <<<<<<<<<<<<<<
@@ -17996,7 +17664,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":83
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":83
* if i < b.min_val:
* b.min_val = i
* if i > b.max_val: # <<<<<<<<<<<<<<
@@ -18006,7 +17674,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
__pyx_t_1 = (__pyx_v_i > __pyx_v_b->max_val);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":84
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":84
* b.min_val = i
* if i > b.max_val:
* b.max_val = i # <<<<<<<<<<<<<<
@@ -18020,7 +17688,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":85
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":85
* if i > b.max_val:
* b.max_val = i
* b.size = b.size + 1 # <<<<<<<<<<<<<<
@@ -18029,7 +17697,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
*/
__pyx_v_b->size = (__pyx_v_b->size + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":86
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":86
* b.max_val = i
* b.size = b.size + 1
* return 1 # <<<<<<<<<<<<<<
@@ -18042,7 +17710,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":87
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":87
* b.size = b.size + 1
* return 1
* return 0 # <<<<<<<<<<<<<<
@@ -18058,7 +17726,7 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":90
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":90
*
*
* cdef int bitset_contains(_BitSet* b, int i): # <<<<<<<<<<<<<<
@@ -18073,7 +17741,7 @@ static int __pyx_f_3_sa_bitset_contains(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
int __pyx_t_1;
__Pyx_RefNannySetupContext("bitset_contains", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":93
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":93
* cdef int val
*
* val = 1 << i # <<<<<<<<<<<<<<
@@ -18082,7 +17750,7 @@ static int __pyx_f_3_sa_bitset_contains(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
*/
__pyx_v_val = (1 << __pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":94
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":94
*
* val = 1 << i
* if b.bitset & val == 0: # <<<<<<<<<<<<<<
@@ -18092,7 +17760,7 @@ static int __pyx_f_3_sa_bitset_contains(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
__pyx_t_1 = ((__pyx_v_b->bitset & __pyx_v_val) == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":95
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":95
* val = 1 << i
* if b.bitset & val == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -18105,7 +17773,7 @@ static int __pyx_f_3_sa_bitset_contains(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":97
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":97
* return 0
* else:
* return 1 # <<<<<<<<<<<<<<
@@ -18134,7 +17802,7 @@ static PyObject *__pyx_pw_3_sa_14BitSetIterator_1__next__(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":104
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":104
* cdef int next_val
*
* def __next__(self): # <<<<<<<<<<<<<<
@@ -18153,7 +17821,7 @@ static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_B
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__next__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":107
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":107
* cdef int ret_val
*
* if self.next_val == -1: # <<<<<<<<<<<<<<
@@ -18163,7 +17831,7 @@ static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_B
__pyx_t_1 = (__pyx_v_self->next_val == -1);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":108
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":108
*
* if self.next_val == -1:
* raise StopIteration() # <<<<<<<<<<<<<<
@@ -18179,7 +17847,7 @@ static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_B
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":109
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":109
* if self.next_val == -1:
* raise StopIteration()
* ret_val = self.next_val # <<<<<<<<<<<<<<
@@ -18188,7 +17856,7 @@ static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_B
*/
__pyx_v_ret_val = __pyx_v_self->next_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":110
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":110
* raise StopIteration()
* ret_val = self.next_val
* self.next_val = bitset_findsucc(self.b, ret_val) # <<<<<<<<<<<<<<
@@ -18197,7 +17865,7 @@ static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_B
*/
__pyx_v_self->next_val = __pyx_f_3_sa_bitset_findsucc(__pyx_v_self->b, __pyx_v_ret_val);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":111
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":111
* ret_val = self.next_val
* self.next_val = bitset_findsucc(self.b, ret_val)
* return ret_val # <<<<<<<<<<<<<<
@@ -18237,7 +17905,7 @@ static int __pyx_pw_3_sa_6BitSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":122
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":122
* cdef _BitSet* b
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -18250,7 +17918,7 @@ static int __pyx_pf_3_sa_6BitSet___cinit__(struct __pyx_obj_3_sa_BitSet *__pyx_v
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":123
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":123
*
* def __cinit__(self):
* self.b = new_BitSet() # <<<<<<<<<<<<<<
@@ -18273,7 +17941,7 @@ static void __pyx_pw_3_sa_6BitSet_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":125
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":125
* self.b = new_BitSet()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -18285,7 +17953,7 @@ static void __pyx_pf_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_3_sa_BitSet *__p
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":126
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":126
*
* def __dealloc__(self):
* free(self.b) # <<<<<<<<<<<<<<
@@ -18308,7 +17976,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_5__iter__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":128
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":128
* free(self.b)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -18326,7 +17994,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_4__iter__(struct __pyx_obj_3_sa_BitSet *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":130
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":130
* def __iter__(self):
* cdef BitSetIterator it
* it = BitSetIterator() # <<<<<<<<<<<<<<
@@ -18338,7 +18006,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_4__iter__(struct __pyx_obj_3_sa_BitSet *_
__pyx_v_it = ((struct __pyx_obj_3_sa_BitSetIterator *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":131
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":131
* cdef BitSetIterator it
* it = BitSetIterator()
* it.b = self.b # <<<<<<<<<<<<<<
@@ -18347,7 +18015,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_4__iter__(struct __pyx_obj_3_sa_BitSet *_
*/
__pyx_v_it->b = __pyx_v_self->b;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":132
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":132
* it = BitSetIterator()
* it.b = self.b
* it.next_val = self.b.min_val # <<<<<<<<<<<<<<
@@ -18356,7 +18024,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_4__iter__(struct __pyx_obj_3_sa_BitSet *_
*/
__pyx_v_it->next_val = __pyx_v_self->b->min_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":133
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":133
* it.b = self.b
* it.next_val = self.b.min_val
* return it # <<<<<<<<<<<<<<
@@ -18392,7 +18060,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_7insert(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":135
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":135
* return it
*
* def insert(self, i): # <<<<<<<<<<<<<<
@@ -18410,7 +18078,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_6insert(struct __pyx_obj_3_sa_BitSet *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":136
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":136
*
* def insert(self, i):
* return bitset_insert(self.b, i) # <<<<<<<<<<<<<<
@@ -18448,7 +18116,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_9findsucc(PyObject *__pyx_v_self, PyObjec
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":138
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":138
* return bitset_insert(self.b, i)
*
* def findsucc(self, i): # <<<<<<<<<<<<<<
@@ -18466,7 +18134,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_8findsucc(struct __pyx_obj_3_sa_BitSet *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("findsucc", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":139
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":139
*
* def findsucc(self, i):
* return bitset_findsucc(self.b, i) # <<<<<<<<<<<<<<
@@ -18504,7 +18172,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_11__str__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":141
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":141
* return bitset_findsucc(self.b, i)
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -18523,7 +18191,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_10__str__(struct __pyx_obj_3_sa_BitSet *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":142
+ /* "/home/vchahune/tools/cdec/python/src/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)+")" # <<<<<<<<<<<<<<
@@ -18616,7 +18284,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_13min(PyObject *__pyx_v_self, CYTHON_UNUS
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":144
+/* "/home/vchahune/tools/cdec/python/src/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): # <<<<<<<<<<<<<<
@@ -18633,7 +18301,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_12min(struct __pyx_obj_3_sa_BitSet *__pyx
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("min", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":145
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":145
*
* def min(self):
* return self.b.min_val # <<<<<<<<<<<<<<
@@ -18670,7 +18338,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_15max(PyObject *__pyx_v_self, CYTHON_UNUS
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":147
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":147
* return self.b.min_val
*
* def max(self): # <<<<<<<<<<<<<<
@@ -18687,7 +18355,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_14max(struct __pyx_obj_3_sa_BitSet *__pyx
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("max", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":148
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":148
*
* def max(self):
* return self.b.max_val # <<<<<<<<<<<<<<
@@ -18724,7 +18392,7 @@ static Py_ssize_t __pyx_pw_3_sa_6BitSet_17__len__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":150
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":150
* return self.b.max_val
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -18737,7 +18405,7 @@ static Py_ssize_t __pyx_pf_3_sa_6BitSet_16__len__(struct __pyx_obj_3_sa_BitSet *
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":151
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":151
*
* def __len__(self):
* return self.b.size # <<<<<<<<<<<<<<
@@ -18764,7 +18432,7 @@ static int __pyx_pw_3_sa_6BitSet_19__contains__(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":153
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":153
* return self.b.size
*
* def __contains__(self, i): # <<<<<<<<<<<<<<
@@ -18783,7 +18451,7 @@ static int __pyx_pf_3_sa_6BitSet_18__contains__(struct __pyx_obj_3_sa_BitSet *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__contains__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":154
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":154
*
* def __contains__(self, i):
* return bool(bitset_contains(self.b, i)) # <<<<<<<<<<<<<<
@@ -18809,7 +18477,7 @@ static int __pyx_pf_3_sa_6BitSet_18__contains__(struct __pyx_obj_3_sa_BitSet *__
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":157
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":157
*
*
* cdef str dec2bin(long i): # <<<<<<<<<<<<<<
@@ -18831,7 +18499,7 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("dec2bin", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":158
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":158
*
* cdef str dec2bin(long i):
* cdef str result = "" # <<<<<<<<<<<<<<
@@ -18841,7 +18509,7 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
__Pyx_INCREF(((PyObject *)__pyx_kp_s_45));
__pyx_v_result = __pyx_kp_s_45;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":160
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":160
* cdef str result = ""
* cdef unsigned d
* for d in range(MIN_BOTTOM_SIZE): # <<<<<<<<<<<<<<
@@ -18852,7 +18520,7 @@ static PyObject *__pyx_f_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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":161
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":161
* cdef unsigned d
* for d in range(MIN_BOTTOM_SIZE):
* if i & LOWER_MASK[0] == 0: # <<<<<<<<<<<<<<
@@ -18862,7 +18530,7 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
__pyx_t_3 = ((__pyx_v_i & (__pyx_v_3_sa_LOWER_MASK[0])) == 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":162
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":162
* for d in range(MIN_BOTTOM_SIZE):
* if i & LOWER_MASK[0] == 0:
* result = "0"+result # <<<<<<<<<<<<<<
@@ -18878,7 +18546,7 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":164
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":164
* result = "0"+result
* else:
* result = "1"+result # <<<<<<<<<<<<<<
@@ -18893,7 +18561,7 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":165
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":165
* else:
* result = "1"+result
* i = i >> 1 # <<<<<<<<<<<<<<
@@ -18903,7 +18571,7 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
__pyx_v_i = (__pyx_v_i >> 1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":166
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":166
* result = "1"+result
* i = i >> 1
* return result # <<<<<<<<<<<<<<
@@ -18928,7 +18596,7 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":177
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":177
* void** bottom
*
* cdef _VEB* new_VEB(int n): # <<<<<<<<<<<<<<
@@ -18949,7 +18617,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("new_VEB", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":181
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":181
* cdef int num_bits, num_top_bits, i
*
* veb = <_VEB*> malloc(sizeof(_VEB)) # <<<<<<<<<<<<<<
@@ -18958,7 +18626,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
*/
__pyx_v_veb = ((struct __pyx_t_3_sa__VEB *)malloc((sizeof(struct __pyx_t_3_sa__VEB))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":183
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":183
* veb = <_VEB*> malloc(sizeof(_VEB))
*
* num_bits = int(ceil(log(n) / log(2))) # <<<<<<<<<<<<<<
@@ -18973,7 +18641,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
}
__pyx_v_num_bits = ((int)ceil((__pyx_t_1 / __pyx_t_2)));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":184
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":184
*
* num_bits = int(ceil(log(n) / log(2)))
* veb.num_bottom_bits = num_bits/2 # <<<<<<<<<<<<<<
@@ -18982,7 +18650,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
*/
__pyx_v_veb->num_bottom_bits = __Pyx_div_long(__pyx_v_num_bits, 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":185
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -18992,7 +18660,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
__pyx_t_3 = (__pyx_v_veb->num_bottom_bits < __pyx_v_3_sa_MIN_BOTTOM_BITS);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":186
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -19004,7 +18672,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":187
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -19013,7 +18681,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
*/
__pyx_v_veb->top_universe_size = ((__pyx_v_n >> __pyx_v_veb->num_bottom_bits) + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":189
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":189
* veb.top_universe_size = (n >> veb.num_bottom_bits) + 1
*
* veb.bottom = <void**> malloc(veb.top_universe_size * sizeof(void*)) # <<<<<<<<<<<<<<
@@ -19022,7 +18690,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
*/
__pyx_v_veb->bottom = ((void **)malloc((__pyx_v_veb->top_universe_size * (sizeof(void *)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":190
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":190
*
* veb.bottom = <void**> malloc(veb.top_universe_size * sizeof(void*))
* memset(veb.bottom, 0, veb.top_universe_size * sizeof(void*)) # <<<<<<<<<<<<<<
@@ -19031,7 +18699,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
*/
memset(__pyx_v_veb->bottom, 0, (__pyx_v_veb->top_universe_size * (sizeof(void *))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":192
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":192
* memset(veb.bottom, 0, veb.top_universe_size * sizeof(void*))
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
@@ -19041,7 +18709,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
__pyx_t_3 = (__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":193
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":193
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* veb.top = new_VEB(veb.top_universe_size) # <<<<<<<<<<<<<<
@@ -19053,7 +18721,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":195
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":195
* veb.top = new_VEB(veb.top_universe_size)
* else:
* veb.top = new_BitSet() # <<<<<<<<<<<<<<
@@ -19064,7 +18732,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":197
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":197
* veb.top = new_BitSet()
*
* veb.max_val = -1 # <<<<<<<<<<<<<<
@@ -19073,7 +18741,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
*/
__pyx_v_veb->max_val = -1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":198
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":198
*
* veb.max_val = -1
* veb.min_val = -1 # <<<<<<<<<<<<<<
@@ -19082,7 +18750,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
*/
__pyx_v_veb->min_val = -1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":199
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":199
* veb.max_val = -1
* veb.min_val = -1
* veb.size = 0 # <<<<<<<<<<<<<<
@@ -19091,7 +18759,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
*/
__pyx_v_veb->size = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":200
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":200
* veb.min_val = -1
* veb.size = 0
* return veb # <<<<<<<<<<<<<<
@@ -19111,7 +18779,7 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":203
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":203
*
*
* cdef int VEB_insert(_VEB* veb, int i): # <<<<<<<<<<<<<<
@@ -19132,7 +18800,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
int __pyx_t_3;
__Pyx_RefNannySetupContext("VEB_insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":208
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":208
* cdef int a, b, tmp
*
* if veb.size == 0: # <<<<<<<<<<<<<<
@@ -19142,7 +18810,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
__pyx_t_1 = (__pyx_v_veb->size == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":209
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":209
*
* if veb.size == 0:
* veb.min_val = i # <<<<<<<<<<<<<<
@@ -19151,7 +18819,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*/
__pyx_v_veb->min_val = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":210
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":210
* if veb.size == 0:
* veb.min_val = i
* veb.max_val = i # <<<<<<<<<<<<<<
@@ -19162,7 +18830,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":211
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":211
* veb.min_val = i
* veb.max_val = i
* elif i == veb.min_val or i == veb.max_val: # <<<<<<<<<<<<<<
@@ -19178,7 +18846,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":212
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":212
* veb.max_val = i
* elif i == veb.min_val or i == veb.max_val:
* return 0 # <<<<<<<<<<<<<<
@@ -19191,7 +18859,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":214
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":214
* return 0
* else:
* if i < veb.min_val: # <<<<<<<<<<<<<<
@@ -19201,7 +18869,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
__pyx_t_3 = (__pyx_v_i < __pyx_v_veb->min_val);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":215
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":215
* else:
* if i < veb.min_val:
* tmp = i # <<<<<<<<<<<<<<
@@ -19210,7 +18878,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*/
__pyx_v_tmp = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":216
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":216
* if i < veb.min_val:
* tmp = i
* i = veb.min_val # <<<<<<<<<<<<<<
@@ -19219,7 +18887,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*/
__pyx_v_i = __pyx_v_veb->min_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":217
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":217
* tmp = i
* i = veb.min_val
* veb.min_val = tmp # <<<<<<<<<<<<<<
@@ -19231,7 +18899,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":218
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":218
* i = veb.min_val
* veb.min_val = tmp
* a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<<
@@ -19240,7 +18908,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*/
__pyx_v_a = (__pyx_v_i >> __pyx_v_veb->num_bottom_bits);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":219
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":219
* veb.min_val = tmp
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<<
@@ -19249,7 +18917,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*/
__pyx_v_b = (__pyx_v_i & (__pyx_v_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":220
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":220
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* if veb.bottom[a] == NULL: # <<<<<<<<<<<<<<
@@ -19259,7 +18927,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
__pyx_t_3 = ((__pyx_v_veb->bottom[__pyx_v_a]) == NULL);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":221
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -19269,7 +18937,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
__pyx_t_3 = (__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":222
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":222
* if veb.bottom[a] == NULL:
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top # <<<<<<<<<<<<<<
@@ -19278,7 +18946,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*/
__pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)__pyx_v_veb->top);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":223
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":223
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top
* VEB_insert(subv, a) # <<<<<<<<<<<<<<
@@ -19290,7 +18958,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":225
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":225
* VEB_insert(subv, a)
* else:
* subb = <_BitSet*> veb.top # <<<<<<<<<<<<<<
@@ -19299,7 +18967,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*/
__pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)__pyx_v_veb->top);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":226
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":226
* else:
* subb = <_BitSet*> veb.top
* bitset_insert(subb, a) # <<<<<<<<<<<<<<
@@ -19310,7 +18978,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":227
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":227
* subb = <_BitSet*> veb.top
* bitset_insert(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -19320,7 +18988,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
__pyx_t_3 = (__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":228
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -19332,7 +19000,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":230
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":230
* veb.bottom[a] = new_VEB(1 << veb.num_bottom_bits)
* else:
* veb.bottom[a] = new_BitSet() # <<<<<<<<<<<<<<
@@ -19346,7 +19014,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":231
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":231
* else:
* veb.bottom[a] = new_BitSet()
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -19356,7 +19024,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
__pyx_t_3 = (__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":232
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":232
* veb.bottom[a] = new_BitSet()
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<<
@@ -19365,7 +19033,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*/
__pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":233
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":233
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a]
* if VEB_insert(subv, b) == 0: # <<<<<<<<<<<<<<
@@ -19375,7 +19043,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
__pyx_t_3 = (__pyx_f_3_sa_VEB_insert(__pyx_v_subv, __pyx_v_b) == 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":234
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":234
* subv = <_VEB*> veb.bottom[a]
* if VEB_insert(subv, b) == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -19391,7 +19059,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":236
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":236
* return 0
* else:
* subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<<
@@ -19400,7 +19068,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*/
__pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":237
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":237
* else:
* subb = <_BitSet*> veb.bottom[a]
* if bitset_insert(subb, b) == 0: # <<<<<<<<<<<<<<
@@ -19410,7 +19078,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
__pyx_t_3 = (__pyx_f_3_sa_bitset_insert(__pyx_v_subb, __pyx_v_b) == 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":238
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":238
* subb = <_BitSet*> veb.bottom[a]
* if bitset_insert(subb, b) == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -19425,7 +19093,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":240
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":240
* return 0
*
* if i > veb.max_val: # <<<<<<<<<<<<<<
@@ -19435,7 +19103,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
__pyx_t_3 = (__pyx_v_i > __pyx_v_veb->max_val);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":241
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":241
*
* if i > veb.max_val:
* veb.max_val = i # <<<<<<<<<<<<<<
@@ -19449,7 +19117,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":242
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":242
* if i > veb.max_val:
* veb.max_val = i
* veb.size = veb.size + 1 # <<<<<<<<<<<<<<
@@ -19458,7 +19126,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*/
__pyx_v_veb->size = (__pyx_v_veb->size + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":243
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":243
* veb.max_val = i
* veb.size = veb.size + 1
* return 1 # <<<<<<<<<<<<<<
@@ -19474,7 +19142,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":246
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":246
*
*
* cdef del_VEB(_VEB* veb): # <<<<<<<<<<<<<<
@@ -19493,7 +19161,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("del_VEB", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":249
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":249
* cdef int i
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
@@ -19503,7 +19171,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
__pyx_t_1 = (__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":250
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":250
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* i = (<_VEB*> veb.top).min_val # <<<<<<<<<<<<<<
@@ -19515,7 +19183,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":252
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":252
* i = (<_VEB*> veb.top).min_val
* else:
* i = (<_BitSet*> veb.top).min_val # <<<<<<<<<<<<<<
@@ -19526,7 +19194,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":254
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":254
* i = (<_BitSet*> veb.top).min_val
*
* while i != -1: # <<<<<<<<<<<<<<
@@ -19537,7 +19205,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
__pyx_t_1 = (__pyx_v_i != -1);
if (!__pyx_t_1) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":255
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":255
*
* while i != -1:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -19547,7 +19215,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
__pyx_t_1 = (__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":256
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":256
* while i != -1:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* del_VEB(<_VEB*> veb.bottom[i]) # <<<<<<<<<<<<<<
@@ -19561,7 +19229,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":258
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":258
* del_VEB(<_VEB*> veb.bottom[i])
* else:
* free(<_BitSet*> veb.bottom[i]) # <<<<<<<<<<<<<<
@@ -19572,7 +19240,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":260
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":260
* free(<_BitSet*> veb.bottom[i])
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
@@ -19582,7 +19250,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
__pyx_t_1 = (__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":261
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":261
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* i = VEB_findsucc(<_VEB*> veb.top, i) # <<<<<<<<<<<<<<
@@ -19594,7 +19262,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":263
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":263
* i = VEB_findsucc(<_VEB*> veb.top, i)
* else:
* i = bitset_findsucc(<_BitSet*> veb.top, i) # <<<<<<<<<<<<<<
@@ -19606,7 +19274,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
__pyx_L7:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":265
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":265
* i = bitset_findsucc(<_BitSet*> veb.top, i)
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
@@ -19616,7 +19284,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
__pyx_t_1 = (__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":266
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":266
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* del_VEB(<_VEB*> veb.top) # <<<<<<<<<<<<<<
@@ -19630,7 +19298,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":268
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":268
* del_VEB(<_VEB*> veb.top)
* else:
* free(<_BitSet*> veb.top) # <<<<<<<<<<<<<<
@@ -19641,7 +19309,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":269
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":269
* else:
* free(<_BitSet*> veb.top)
* free(veb.bottom) # <<<<<<<<<<<<<<
@@ -19650,7 +19318,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
*/
free(__pyx_v_veb->bottom);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":270
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":270
* free(<_BitSet*> veb.top)
* free(veb.bottom)
* free(veb) # <<<<<<<<<<<<<<
@@ -19671,7 +19339,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":273
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":273
*
*
* cdef int VEB_findsucc(_VEB* veb, int i): # <<<<<<<<<<<<<<
@@ -19694,7 +19362,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
int __pyx_t_3;
__Pyx_RefNannySetupContext("VEB_findsucc", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":278
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":278
* cdef int a, b, j, c, found
*
* if veb.max_val == -1 or i>=veb.max_val: # <<<<<<<<<<<<<<
@@ -19710,7 +19378,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":279
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":279
*
* if veb.max_val == -1 or i>=veb.max_val:
* return -1 # <<<<<<<<<<<<<<
@@ -19723,7 +19391,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":280
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":280
* if veb.max_val == -1 or i>=veb.max_val:
* return -1
* if i < veb.min_val: # <<<<<<<<<<<<<<
@@ -19733,7 +19401,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_3 = (__pyx_v_i < __pyx_v_veb->min_val);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":281
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":281
* return -1
* if i < veb.min_val:
* return veb.min_val # <<<<<<<<<<<<<<
@@ -19746,7 +19414,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":283
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":283
* return veb.min_val
*
* a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<<
@@ -19755,7 +19423,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_a = (__pyx_v_i >> __pyx_v_veb->num_bottom_bits);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":284
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":284
*
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<<
@@ -19764,7 +19432,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_b = (__pyx_v_i & (__pyx_v_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":285
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":285
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* found = 0 # <<<<<<<<<<<<<<
@@ -19773,7 +19441,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_found = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":286
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":286
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* found = 0
* if veb.bottom[a] != NULL: # <<<<<<<<<<<<<<
@@ -19783,7 +19451,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_3 = ((__pyx_v_veb->bottom[__pyx_v_a]) != NULL);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":287
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":287
* found = 0
* if veb.bottom[a] != NULL:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -19793,7 +19461,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_3 = (__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":288
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":288
* if veb.bottom[a] != NULL:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<<
@@ -19802,7 +19470,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":289
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":289
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a]
* if subv.max_val > b: # <<<<<<<<<<<<<<
@@ -19812,7 +19480,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_3 = (__pyx_v_subv->max_val > __pyx_v_b);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":290
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":290
* subv = <_VEB*> veb.bottom[a]
* if subv.max_val > b:
* j = (a << veb.num_bottom_bits) + VEB_findsucc(subv, b) # <<<<<<<<<<<<<<
@@ -19821,7 +19489,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_j = ((__pyx_v_a << __pyx_v_veb->num_bottom_bits) + __pyx_f_3_sa_VEB_findsucc(__pyx_v_subv, __pyx_v_b));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":291
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":291
* if subv.max_val > b:
* j = (a << veb.num_bottom_bits) + VEB_findsucc(subv, b)
* found = 1 # <<<<<<<<<<<<<<
@@ -19836,7 +19504,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":293
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":293
* found = 1
* else:
* subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<<
@@ -19845,7 +19513,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":294
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":294
* else:
* subb = <_BitSet*> veb.bottom[a]
* if subb.max_val > b: # <<<<<<<<<<<<<<
@@ -19855,7 +19523,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_3 = (__pyx_v_subb->max_val > __pyx_v_b);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":295
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":295
* subb = <_BitSet*> veb.bottom[a]
* if subb.max_val > b:
* j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b) # <<<<<<<<<<<<<<
@@ -19864,7 +19532,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_j = ((__pyx_v_a << __pyx_v_veb->num_bottom_bits) + __pyx_f_3_sa_bitset_findsucc(__pyx_v_subb, __pyx_v_b));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":296
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":296
* if subb.max_val > b:
* j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b)
* found = 1 # <<<<<<<<<<<<<<
@@ -19881,7 +19549,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":297
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":297
* j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b)
* found = 1
* if found==0: # <<<<<<<<<<<<<<
@@ -19891,7 +19559,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_3 = (__pyx_v_found == 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":298
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":298
* found = 1
* if found==0:
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
@@ -19901,7 +19569,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_3 = (__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":299
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":299
* if found==0:
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top # <<<<<<<<<<<<<<
@@ -19910,7 +19578,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)__pyx_v_veb->top);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":300
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":300
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top
* c = VEB_findsucc(subv, a) # <<<<<<<<<<<<<<
@@ -19922,7 +19590,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":302
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":302
* c = VEB_findsucc(subv, a)
* else:
* subb = <_BitSet*> veb.top # <<<<<<<<<<<<<<
@@ -19931,7 +19599,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)__pyx_v_veb->top);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":303
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":303
* else:
* subb = <_BitSet*> veb.top
* c = bitset_findsucc(subb, a) # <<<<<<<<<<<<<<
@@ -19942,7 +19610,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
__pyx_L10:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":304
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":304
* subb = <_BitSet*> veb.top
* c = bitset_findsucc(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -19952,7 +19620,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_3 = (__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":305
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":305
* c = bitset_findsucc(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[c] # <<<<<<<<<<<<<<
@@ -19961,7 +19629,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_c]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":306
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -19973,7 +19641,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":308
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":308
* j = (c << veb.num_bottom_bits) + subv.min_val
* else:
* subb = <_BitSet*> veb.bottom[c] # <<<<<<<<<<<<<<
@@ -19982,7 +19650,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_c]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":309
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":309
* else:
* subb = <_BitSet*> veb.bottom[c]
* j = (c << veb.num_bottom_bits) + subb.min_val # <<<<<<<<<<<<<<
@@ -19996,7 +19664,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":310
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":310
* subb = <_BitSet*> veb.bottom[c]
* j = (c << veb.num_bottom_bits) + subb.min_val
* return j # <<<<<<<<<<<<<<
@@ -20012,7 +19680,7 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":313
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":313
*
*
* cdef int VEB_contains(_VEB* veb, int i): # <<<<<<<<<<<<<<
@@ -20033,7 +19701,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
int __pyx_t_4;
__Pyx_RefNannySetupContext("VEB_contains", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":318
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":318
* cdef int a, b
*
* if veb.size == 0 or i < veb.min_val or i > veb.max_val: # <<<<<<<<<<<<<<
@@ -20055,7 +19723,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":319
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":319
*
* if veb.size == 0 or i < veb.min_val or i > veb.max_val:
* return 0 # <<<<<<<<<<<<<<
@@ -20068,7 +19736,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":321
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":321
* return 0
*
* if veb.min_val == i: # <<<<<<<<<<<<<<
@@ -20078,7 +19746,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_2 = (__pyx_v_veb->min_val == __pyx_v_i);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":322
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":322
*
* if veb.min_val == i:
* return 1 # <<<<<<<<<<<<<<
@@ -20091,7 +19759,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":324
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":324
* return 1
* else:
* if veb.size == 1: # <<<<<<<<<<<<<<
@@ -20101,7 +19769,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_2 = (__pyx_v_veb->size == 1);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":325
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":325
* else:
* if veb.size == 1:
* return 0 # <<<<<<<<<<<<<<
@@ -20116,7 +19784,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":327
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":327
* return 0
*
* a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<<
@@ -20125,7 +19793,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_a = (__pyx_v_i >> __pyx_v_veb->num_bottom_bits);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":328
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":328
*
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<<
@@ -20134,7 +19802,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_b = (__pyx_v_i & (__pyx_v_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":329
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":329
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* if veb.bottom[a] == NULL: # <<<<<<<<<<<<<<
@@ -20144,7 +19812,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_2 = ((__pyx_v_veb->bottom[__pyx_v_a]) == NULL);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":330
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":330
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* if veb.bottom[a] == NULL:
* return 0 # <<<<<<<<<<<<<<
@@ -20157,7 +19825,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":332
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":332
* return 0
* else:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -20167,7 +19835,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
__pyx_t_2 = (__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":333
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":333
* else:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<<
@@ -20176,7 +19844,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":334
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":334
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a]
* return VEB_contains(subv, b) # <<<<<<<<<<<<<<
@@ -20189,7 +19857,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":336
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":336
* return VEB_contains(subv, b)
* else:
* subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<<
@@ -20198,7 +19866,7 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
*/
__pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":337
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":337
* else:
* subb = <_BitSet*> veb.bottom[a]
* return bitset_contains(subb, b) # <<<<<<<<<<<<<<
@@ -20229,7 +19897,7 @@ static PyObject *__pyx_pw_3_sa_11VEBIterator_1__next__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":344
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":344
* cdef int next_val
*
* def __next__(self): # <<<<<<<<<<<<<<
@@ -20248,7 +19916,7 @@ static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBI
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__next__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":347
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":347
* cdef int ret_val
*
* if self.next_val == -1: # <<<<<<<<<<<<<<
@@ -20258,7 +19926,7 @@ static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBI
__pyx_t_1 = (__pyx_v_self->next_val == -1);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":348
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":348
*
* if self.next_val == -1:
* raise StopIteration() # <<<<<<<<<<<<<<
@@ -20274,7 +19942,7 @@ static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBI
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":349
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":349
* if self.next_val == -1:
* raise StopIteration()
* ret_val = self.next_val # <<<<<<<<<<<<<<
@@ -20283,7 +19951,7 @@ static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBI
*/
__pyx_v_ret_val = __pyx_v_self->next_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":350
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":350
* raise StopIteration()
* ret_val = self.next_val
* self.next_val = VEB_findsucc(self.v, ret_val) # <<<<<<<<<<<<<<
@@ -20292,7 +19960,7 @@ static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBI
*/
__pyx_v_self->next_val = __pyx_f_3_sa_VEB_findsucc(__pyx_v_self->v, __pyx_v_ret_val);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":351
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":351
* ret_val = self.next_val
* self.next_val = VEB_findsucc(self.v, ret_val)
* return ret_val # <<<<<<<<<<<<<<
@@ -20322,11 +19990,11 @@ static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBI
static int __pyx_pw_3_sa_3VEB_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3_sa_3VEB_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_size;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
PyObject* values[1] = {0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -20339,7 +20007,8 @@ static int __pyx_pw_3_sa_3VEB_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
@@ -20365,7 +20034,7 @@ static int __pyx_pw_3_sa_3VEB_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":360
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":360
* cdef int _first(self)
*
* def __cinit__(self, int size): # <<<<<<<<<<<<<<
@@ -20378,7 +20047,7 @@ static int __pyx_pf_3_sa_3VEB___cinit__(struct __pyx_obj_3_sa_VEB *__pyx_v_self,
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":361
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":361
*
* def __cinit__(self, int size):
* self.veb = new_VEB(size) # <<<<<<<<<<<<<<
@@ -20401,7 +20070,7 @@ static void __pyx_pw_3_sa_3VEB_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":363
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":363
* self.veb = new_VEB(size)
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -20417,7 +20086,7 @@ static void __pyx_pf_3_sa_3VEB_2__dealloc__(struct __pyx_obj_3_sa_VEB *__pyx_v_s
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":364
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":364
*
* def __dealloc__(self):
* del_VEB(self.veb) # <<<<<<<<<<<<<<
@@ -20447,7 +20116,7 @@ static PyObject *__pyx_pw_3_sa_3VEB_5__iter__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":366
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":366
* del_VEB(self.veb)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -20465,7 +20134,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_4__iter__(struct __pyx_obj_3_sa_VEB *__pyx_v
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":368
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":368
* def __iter__(self):
* cdef VEBIterator it
* it = VEBIterator() # <<<<<<<<<<<<<<
@@ -20477,7 +20146,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_4__iter__(struct __pyx_obj_3_sa_VEB *__pyx_v
__pyx_v_it = ((struct __pyx_obj_3_sa_VEBIterator *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":369
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":369
* cdef VEBIterator it
* it = VEBIterator()
* it.v = self.veb # <<<<<<<<<<<<<<
@@ -20486,7 +20155,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_4__iter__(struct __pyx_obj_3_sa_VEB *__pyx_v
*/
__pyx_v_it->v = __pyx_v_self->veb;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":370
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":370
* it = VEBIterator()
* it.v = self.veb
* it.next_val = self.veb.min_val # <<<<<<<<<<<<<<
@@ -20495,7 +20164,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_4__iter__(struct __pyx_obj_3_sa_VEB *__pyx_v
*/
__pyx_v_it->next_val = __pyx_v_self->veb->min_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":371
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":371
* it.v = self.veb
* it.next_val = self.veb.min_val
* return it # <<<<<<<<<<<<<<
@@ -20531,7 +20200,7 @@ static PyObject *__pyx_pw_3_sa_3VEB_7insert(PyObject *__pyx_v_self, PyObject *__
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":373
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":373
* return it
*
* def insert(self, i): # <<<<<<<<<<<<<<
@@ -20549,7 +20218,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_6insert(struct __pyx_obj_3_sa_VEB *__pyx_v_s
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":374
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":374
*
* def insert(self, i):
* return VEB_insert(self.veb, i) # <<<<<<<<<<<<<<
@@ -20576,7 +20245,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_6insert(struct __pyx_obj_3_sa_VEB *__pyx_v_s
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":376
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":376
* return VEB_insert(self.veb, i)
*
* cdef int _insert(self, int i): # <<<<<<<<<<<<<<
@@ -20589,7 +20258,7 @@ static int __pyx_f_3_sa_3VEB__insert(struct __pyx_obj_3_sa_VEB *__pyx_v_self, in
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":377
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":377
*
* cdef int _insert(self, int i):
* return VEB_insert(self.veb, i) # <<<<<<<<<<<<<<
@@ -20616,7 +20285,7 @@ static PyObject *__pyx_pw_3_sa_3VEB_9findsucc(PyObject *__pyx_v_self, PyObject *
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":379
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":379
* return VEB_insert(self.veb, i)
*
* def findsucc(self, i): # <<<<<<<<<<<<<<
@@ -20634,7 +20303,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_8findsucc(struct __pyx_obj_3_sa_VEB *__pyx_v
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("findsucc", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":380
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":380
*
* def findsucc(self, i):
* return VEB_findsucc(self.veb, i) # <<<<<<<<<<<<<<
@@ -20661,7 +20330,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_8findsucc(struct __pyx_obj_3_sa_VEB *__pyx_v
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":382
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":382
* return VEB_findsucc(self.veb, i)
*
* cdef int _first(self): # <<<<<<<<<<<<<<
@@ -20674,7 +20343,7 @@ static int __pyx_f_3_sa_3VEB__first(struct __pyx_obj_3_sa_VEB *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_first", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":383
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":383
*
* cdef int _first(self):
* return self.veb.min_val # <<<<<<<<<<<<<<
@@ -20690,7 +20359,7 @@ static int __pyx_f_3_sa_3VEB__first(struct __pyx_obj_3_sa_VEB *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":385
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":385
* return self.veb.min_val
*
* cdef int _findsucc(self, int i): # <<<<<<<<<<<<<<
@@ -20703,7 +20372,7 @@ static int __pyx_f_3_sa_3VEB__findsucc(struct __pyx_obj_3_sa_VEB *__pyx_v_self,
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_findsucc", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":386
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":386
*
* cdef int _findsucc(self, int i):
* return VEB_findsucc(self.veb, i) # <<<<<<<<<<<<<<
@@ -20730,7 +20399,7 @@ static Py_ssize_t __pyx_pw_3_sa_3VEB_11__len__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":388
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":388
* return VEB_findsucc(self.veb, i)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -20743,7 +20412,7 @@ static Py_ssize_t __pyx_pf_3_sa_3VEB_10__len__(struct __pyx_obj_3_sa_VEB *__pyx_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":389
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":389
*
* def __len__(self):
* return self.veb.size # <<<<<<<<<<<<<<
@@ -20770,7 +20439,7 @@ static int __pyx_pw_3_sa_3VEB_13__contains__(PyObject *__pyx_v_self, PyObject *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":391
+/* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":391
* return self.veb.size
*
* def __contains__(self, i): # <<<<<<<<<<<<<<
@@ -20786,7 +20455,7 @@ static int __pyx_pf_3_sa_3VEB_12__contains__(struct __pyx_obj_3_sa_VEB *__pyx_v_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__contains__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":392
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":392
*
* def __contains__(self, i):
* return VEB_contains(self.veb, i) # <<<<<<<<<<<<<<
@@ -20809,11 +20478,11 @@ static int __pyx_pf_3_sa_3VEB_12__contains__(struct __pyx_obj_3_sa_VEB *__pyx_v_
static int __pyx_pw_3_sa_3LCP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3_sa_3LCP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
struct __pyx_obj_3_sa_SuffixArray *__pyx_v_sa = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sa,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sa,0};
PyObject* values[1] = {0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -20826,7 +20495,8 @@ static int __pyx_pw_3_sa_3LCP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sa)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sa);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
@@ -20857,7 +20527,7 @@ static int __pyx_pw_3_sa_3LCP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":9
+/* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":9
* cdef IntList lcp
*
* def __cinit__(self, SuffixArray sa): # <<<<<<<<<<<<<<
@@ -20886,7 +20556,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":13
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":13
* cdef IntList rank
*
* logger.info("Constructing LCP array") # <<<<<<<<<<<<<<
@@ -20903,7 +20573,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":14
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":14
*
* logger.info("Constructing LCP array")
* self.sa = sa # <<<<<<<<<<<<<<
@@ -20916,7 +20586,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__Pyx_DECREF(((PyObject *)__pyx_v_self->sa));
__pyx_v_self->sa = __pyx_v_sa;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":15
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":15
* logger.info("Constructing LCP array")
* self.sa = sa
* n = self.sa.sa.len # <<<<<<<<<<<<<<
@@ -20925,7 +20595,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
*/
__pyx_v_n = __pyx_v_self->sa->sa->len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":16
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":16
* self.sa = sa
* n = self.sa.sa.len
* self.lcp = IntList(initial_len=n) # <<<<<<<<<<<<<<
@@ -20947,7 +20617,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__pyx_v_self->lcp = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":18
* self.lcp = IntList(initial_len=n)
*
* rank = IntList(initial_len=n) # <<<<<<<<<<<<<<
@@ -20966,7 +20636,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__pyx_v_rank = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":19
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":19
*
* rank = IntList(initial_len=n)
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -20976,7 +20646,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__pyx_t_3 = __pyx_v_n;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":20
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":20
* rank = IntList(initial_len=n)
* for i from 0 <= i < n:
* rank.arr[sa.sa.arr[i]] = i # <<<<<<<<<<<<<<
@@ -20986,7 +20656,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
(__pyx_v_rank->arr[(__pyx_v_sa->sa->arr[__pyx_v_i])]) = __pyx_v_i;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":22
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":22
* rank.arr[sa.sa.arr[i]] = i
*
* h = 0 # <<<<<<<<<<<<<<
@@ -20995,7 +20665,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
*/
__pyx_v_h = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":23
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":23
*
* h = 0
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -21005,7 +20675,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__pyx_t_3 = __pyx_v_n;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":24
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":24
* h = 0
* for i from 0 <= i < n:
* k = rank.arr[i] # <<<<<<<<<<<<<<
@@ -21014,7 +20684,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
*/
__pyx_v_k = (__pyx_v_rank->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":25
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":25
* for i from 0 <= i < n:
* k = rank.arr[i]
* if k == 0: # <<<<<<<<<<<<<<
@@ -21024,7 +20694,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__pyx_t_4 = (__pyx_v_k == 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":26
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":26
* k = rank.arr[i]
* if k == 0:
* self.lcp.arr[k] = -1 # <<<<<<<<<<<<<<
@@ -21036,7 +20706,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":28
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":28
* self.lcp.arr[k] = -1
* else:
* j = sa.sa.arr[k-1] # <<<<<<<<<<<<<<
@@ -21045,7 +20715,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
*/
__pyx_v_j = (__pyx_v_sa->sa->arr[(__pyx_v_k - 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":29
+ /* "/home/vchahune/tools/cdec/python/src/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]: # <<<<<<<<<<<<<<
@@ -21068,7 +20738,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
}
if (!__pyx_t_5) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":30
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -21078,7 +20748,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__pyx_v_h = (__pyx_v_h + 1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":31
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -21089,7 +20759,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":32
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":32
* h = h+1
* self.lcp.arr[k] = h
* if h > 0: # <<<<<<<<<<<<<<
@@ -21099,7 +20769,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__pyx_t_5 = (__pyx_v_h > 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":33
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":33
* self.lcp.arr[k] = h
* if h > 0:
* h = h-1 # <<<<<<<<<<<<<<
@@ -21112,7 +20782,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__pyx_L10:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":34
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":34
* if h > 0:
* h = h-1
* logger.info("LCP array completed") # <<<<<<<<<<<<<<
@@ -21165,7 +20835,7 @@ static PyObject *__pyx_pw_3_sa_3LCP_3compute_stats(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":36
+/* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":36
* logger.info("LCP array completed")
*
* def compute_stats(self, int max_n): # <<<<<<<<<<<<<<
@@ -21236,7 +20906,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_L3_first_run:;
if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":48
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":48
* cdef VEB veb
*
* N = self.sa.sa.len # <<<<<<<<<<<<<<
@@ -21245,7 +20915,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_N = __pyx_cur_scope->__pyx_v_self->sa->sa->len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":50
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":50
* N = self.sa.sa.len
*
* ngram_starts = [] # <<<<<<<<<<<<<<
@@ -21258,7 +20928,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_cur_scope->__pyx_v_ngram_starts = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":51
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":51
*
* ngram_starts = []
* for n from 0 <= n < max_n: # <<<<<<<<<<<<<<
@@ -21268,7 +20938,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_2 = __pyx_cur_scope->__pyx_v_max_n;
for (__pyx_cur_scope->__pyx_v_n = 0; __pyx_cur_scope->__pyx_v_n < __pyx_t_2; __pyx_cur_scope->__pyx_v_n++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":52
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":52
* ngram_starts = []
* for n from 0 <= n < max_n:
* ngram_starts.append(IntList(initial_len=N)) # <<<<<<<<<<<<<<
@@ -21288,7 +20958,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":54
* ngram_starts.append(IntList(initial_len=N))
*
* run_start = IntList(initial_len=max_n) # <<<<<<<<<<<<<<
@@ -21308,7 +20978,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_cur_scope->__pyx_v_run_start = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":55
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":55
*
* run_start = IntList(initial_len=max_n)
* veb = VEB(N) # <<<<<<<<<<<<<<
@@ -21329,7 +20999,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_cur_scope->__pyx_v_veb = ((struct __pyx_obj_3_sa_VEB *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":57
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":57
* veb = VEB(N)
*
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -21339,7 +21009,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_2 = __pyx_cur_scope->__pyx_v_N;
for (__pyx_cur_scope->__pyx_v_i = 0; __pyx_cur_scope->__pyx_v_i < __pyx_t_2; __pyx_cur_scope->__pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":58
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":58
*
* for i from 0 <= i < N:
* h = self.lcp.arr[i] # <<<<<<<<<<<<<<
@@ -21348,7 +21018,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_h = (__pyx_cur_scope->__pyx_v_self->lcp->arr[__pyx_cur_scope->__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":59
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":59
* for i from 0 <= i < N:
* h = self.lcp.arr[i]
* if h < 0: # <<<<<<<<<<<<<<
@@ -21358,7 +21028,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_5 = (__pyx_cur_scope->__pyx_v_h < 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":60
* h = self.lcp.arr[i]
* if h < 0:
* h = 0 # <<<<<<<<<<<<<<
@@ -21370,7 +21040,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":61
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":61
* if h < 0:
* h = 0
* for n from h <= n < max_n: # <<<<<<<<<<<<<<
@@ -21380,7 +21050,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__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++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":62
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":62
* h = 0
* for n from h <= n < max_n:
* rs = run_start.arr[n] # <<<<<<<<<<<<<<
@@ -21389,7 +21059,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_rs = (__pyx_cur_scope->__pyx_v_run_start->arr[__pyx_cur_scope->__pyx_v_n]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":63
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":63
* for n from h <= n < max_n:
* rs = run_start.arr[n]
* run_start.arr[n] = i # <<<<<<<<<<<<<<
@@ -21398,7 +21068,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
(__pyx_cur_scope->__pyx_v_run_start->arr[__pyx_cur_scope->__pyx_v_n]) = __pyx_cur_scope->__pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":64
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":64
* rs = run_start.arr[n]
* run_start.arr[n] = i
* freq = i - rs # <<<<<<<<<<<<<<
@@ -21407,7 +21077,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_freq = (__pyx_cur_scope->__pyx_v_i - __pyx_cur_scope->__pyx_v_rs);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":65
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":65
* run_start.arr[n] = i
* freq = i - rs
* if freq > 1000: # arbitrary, but see note below # <<<<<<<<<<<<<<
@@ -21417,7 +21087,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_5 = (__pyx_cur_scope->__pyx_v_freq > 1000);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":66
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":66
* freq = i - rs
* if freq > 1000: # arbitrary, but see note below
* veb._insert(freq) # <<<<<<<<<<<<<<
@@ -21426,7 +21096,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
((struct __pyx_vtabstruct_3_sa_VEB *)__pyx_cur_scope->__pyx_v_veb->__pyx_vtab)->_insert(__pyx_cur_scope->__pyx_v_veb, __pyx_cur_scope->__pyx_v_freq);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":67
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":67
* if freq > 1000: # arbitrary, but see note below
* veb._insert(freq)
* ngram_start = ngram_starts[n] # <<<<<<<<<<<<<<
@@ -21442,7 +21112,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_cur_scope->__pyx_v_ngram_start = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":68
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":68
* veb._insert(freq)
* ngram_start = ngram_starts[n]
* while ngram_start.arr[freq] > 0: # <<<<<<<<<<<<<<
@@ -21453,7 +21123,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_5 = ((__pyx_cur_scope->__pyx_v_ngram_start->arr[__pyx_cur_scope->__pyx_v_freq]) > 0);
if (!__pyx_t_5) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":69
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -21463,7 +21133,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_cur_scope->__pyx_v_freq = (__pyx_cur_scope->__pyx_v_freq + 1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":70
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -21477,7 +21147,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":71
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -21486,7 +21156,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_i = __pyx_cur_scope->__pyx_v_veb->veb->min_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":72
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":72
* ngram_start.arr[freq] = rs
* i = veb.veb.min_val
* while i != -1: # <<<<<<<<<<<<<<
@@ -21497,7 +21167,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_5 = (__pyx_cur_scope->__pyx_v_i != -1);
if (!__pyx_t_5) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":73
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":73
* i = veb.veb.min_val
* while i != -1:
* ii = veb._findsucc(i) # <<<<<<<<<<<<<<
@@ -21506,7 +21176,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_ii = ((struct __pyx_vtabstruct_3_sa_VEB *)__pyx_cur_scope->__pyx_v_veb->__pyx_vtab)->_findsucc(__pyx_cur_scope->__pyx_v_veb, __pyx_cur_scope->__pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":74
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":74
* while i != -1:
* ii = veb._findsucc(i)
* for n from 0 <= n < max_n: # <<<<<<<<<<<<<<
@@ -21516,7 +21186,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_2 = __pyx_cur_scope->__pyx_v_max_n;
for (__pyx_cur_scope->__pyx_v_n = 0; __pyx_cur_scope->__pyx_v_n < __pyx_t_2; __pyx_cur_scope->__pyx_v_n++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":75
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":75
* ii = veb._findsucc(i)
* for n from 0 <= n < max_n:
* ngram_start = ngram_starts[n] # <<<<<<<<<<<<<<
@@ -21532,7 +21202,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_cur_scope->__pyx_v_ngram_start = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":76
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":76
* for n from 0 <= n < max_n:
* ngram_start = ngram_starts[n]
* iii = i # <<<<<<<<<<<<<<
@@ -21541,7 +21211,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_iii = __pyx_cur_scope->__pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":77
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":77
* ngram_start = ngram_starts[n]
* iii = i
* rs = ngram_start.arr[iii] # <<<<<<<<<<<<<<
@@ -21550,7 +21220,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_rs = (__pyx_cur_scope->__pyx_v_ngram_start->arr[__pyx_cur_scope->__pyx_v_iii]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":78
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":78
* iii = i
* rs = ngram_start.arr[iii]
* while (ii==-1 or iii < ii) and rs != 0: # <<<<<<<<<<<<<<
@@ -21573,7 +21243,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
}
if (!__pyx_t_7) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":79
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":79
* rs = ngram_start.arr[iii]
* while (ii==-1 or iii < ii) and rs != 0:
* j = self.sa.sa.arr[rs] # <<<<<<<<<<<<<<
@@ -21582,7 +21252,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_j = (__pyx_cur_scope->__pyx_v_self->sa->sa->arr[__pyx_cur_scope->__pyx_v_rs]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":80
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":80
* while (ii==-1 or iii < ii) and rs != 0:
* j = self.sa.sa.arr[rs]
* valid = 1 # <<<<<<<<<<<<<<
@@ -21591,7 +21261,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_valid = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":81
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":81
* j = self.sa.sa.arr[rs]
* valid = 1
* for k from 0 <= k < n+1: # <<<<<<<<<<<<<<
@@ -21601,7 +21271,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__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++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":82
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":82
* valid = 1
* for k from 0 <= k < n+1:
* if self.sa.darray.data.arr[j+k] < 2: # <<<<<<<<<<<<<<
@@ -21611,7 +21281,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__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);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":83
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":83
* for k from 0 <= k < n+1:
* if self.sa.darray.data.arr[j+k] < 2:
* valid = 0 # <<<<<<<<<<<<<<
@@ -21624,7 +21294,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_L22:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":84
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":84
* if self.sa.darray.data.arr[j+k] < 2:
* valid = 0
* if valid: # <<<<<<<<<<<<<<
@@ -21633,7 +21303,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
if (__pyx_cur_scope->__pyx_v_valid) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":85
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":85
* valid = 0
* if valid:
* ngram = tuple([self.sa.darray.data.arr[j+k] for k in range(n+1)]) # <<<<<<<<<<<<<<
@@ -21647,7 +21317,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_cur_scope->__pyx_v_k = __pyx_t_6;
__pyx_t_3 = PyInt_FromLong((__pyx_cur_scope->__pyx_v_self->sa->darray->data->arr[(__pyx_cur_scope->__pyx_v_j + __pyx_cur_scope->__pyx_v_k)])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
__pyx_t_3 = ((PyObject *)PyList_AsTuple(__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -21659,7 +21329,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_cur_scope->__pyx_v_ngram = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":86
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -21696,7 +21366,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
}
__pyx_L23:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":87
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -21705,7 +21375,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_cur_scope->__pyx_v_iii = (__pyx_cur_scope->__pyx_v_iii + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":88
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":88
* yield i, n+1, ngram
* iii = iii + 1
* rs = ngram_start.arr[iii] # <<<<<<<<<<<<<<
@@ -21715,7 +21385,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":89
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":89
* iii = iii + 1
* rs = ngram_start.arr[iii]
* i = ii # <<<<<<<<<<<<<<
@@ -21732,7 +21402,6 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_L0:;
__Pyx_XDECREF(__pyx_r);
__pyx_generator->resume_label = -1;
- __Pyx_Generator_clear((PyObject*)__pyx_generator);
__Pyx_RefNannyFinishContext();
return NULL;
}
@@ -21751,7 +21420,7 @@ static int __pyx_pw_3_sa_8Alphabet_1__cinit__(PyObject *__pyx_v_self, PyObject *
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":12
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":12
* cdef dict id2sym
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -21768,7 +21437,7 @@ static int __pyx_pf_3_sa_8Alphabet___cinit__(struct __pyx_obj_3_sa_Alphabet *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":13
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":13
*
* def __cinit__(self):
* self.terminals = StringMap() # <<<<<<<<<<<<<<
@@ -21783,7 +21452,7 @@ static int __pyx_pf_3_sa_8Alphabet___cinit__(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_v_self->terminals = ((struct __pyx_obj_3_sa_StringMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":14
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":14
* def __cinit__(self):
* self.terminals = StringMap()
* self.nonterminals = StringMap() # <<<<<<<<<<<<<<
@@ -21798,7 +21467,7 @@ static int __pyx_pf_3_sa_8Alphabet___cinit__(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_v_self->nonterminals = ((struct __pyx_obj_3_sa_StringMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":15
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":15
* self.terminals = StringMap()
* self.nonterminals = StringMap()
* self.id2sym = {} # <<<<<<<<<<<<<<
@@ -21813,7 +21482,7 @@ static int __pyx_pf_3_sa_8Alphabet___cinit__(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_v_self->id2sym = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":16
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":16
* self.nonterminals = StringMap()
* self.id2sym = {}
* self.first_nonterminal = -1 # <<<<<<<<<<<<<<
@@ -21842,7 +21511,7 @@ static void __pyx_pw_3_sa_8Alphabet_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":18
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":18
* self.first_nonterminal = -1
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -21857,7 +21526,7 @@ static void __pyx_pf_3_sa_8Alphabet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":21
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":21
* pass
*
* cdef int isvar(self, int sym): # <<<<<<<<<<<<<<
@@ -21870,7 +21539,7 @@ static int __pyx_f_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj_3_sa_Alph
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("isvar", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":22
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":22
*
* cdef int isvar(self, int sym):
* return sym < 0 # <<<<<<<<<<<<<<
@@ -21886,7 +21555,7 @@ static int __pyx_f_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj_3_sa_Alph
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":24
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":24
* return sym < 0
*
* cdef int isword(self, int sym): # <<<<<<<<<<<<<<
@@ -21899,7 +21568,7 @@ static int __pyx_f_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_obj_3_sa_Alp
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("isword", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":25
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":25
*
* cdef int isword(self, int sym):
* return sym >= 0 # <<<<<<<<<<<<<<
@@ -21915,7 +21584,7 @@ static int __pyx_f_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_obj_3_sa_Alp
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":27
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":27
* return sym >= 0
*
* cdef int getindex(self, int sym): # <<<<<<<<<<<<<<
@@ -21928,7 +21597,7 @@ static int __pyx_f_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_obj_3_sa_A
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getindex", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":28
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":28
*
* cdef int getindex(self, int sym):
* return -sym & INDEX_MASK # <<<<<<<<<<<<<<
@@ -21944,7 +21613,7 @@ static int __pyx_f_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_obj_3_sa_A
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":30
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":30
* return -sym & INDEX_MASK
*
* cdef int setindex(self, int sym, int ind): # <<<<<<<<<<<<<<
@@ -21957,7 +21626,7 @@ static int __pyx_f_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_obj_3_sa_A
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("setindex", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":31
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":31
*
* cdef int setindex(self, int sym, int ind):
* return -(-sym & ~INDEX_MASK | ind) # <<<<<<<<<<<<<<
@@ -21973,7 +21642,7 @@ static int __pyx_f_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_obj_3_sa_A
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":33
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":33
* return -(-sym & ~INDEX_MASK | ind)
*
* cdef int clearindex(self, int sym): # <<<<<<<<<<<<<<
@@ -21986,7 +21655,7 @@ static int __pyx_f_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __pyx_obj_3_sa
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("clearindex", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":34
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":34
*
* cdef int clearindex(self, int sym):
* return -(-sym& ~INDEX_MASK) # <<<<<<<<<<<<<<
@@ -22002,7 +21671,7 @@ static int __pyx_f_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __pyx_obj_3_sa
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":36
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":36
* return -(-sym& ~INDEX_MASK)
*
* cdef int match(self, int sym1, int sym2): # <<<<<<<<<<<<<<
@@ -22015,7 +21684,7 @@ static int __pyx_f_3_sa_8Alphabet_match(struct __pyx_obj_3_sa_Alphabet *__pyx_v_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("match", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":37
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":37
*
* cdef int match(self, int sym1, int sym2):
* return self.clearindex(sym1) == self.clearindex(sym2); # <<<<<<<<<<<<<<
@@ -22031,7 +21700,7 @@ static int __pyx_f_3_sa_8Alphabet_match(struct __pyx_obj_3_sa_Alphabet *__pyx_v_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":39
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":39
* return self.clearindex(sym1) == self.clearindex(sym2);
*
* cdef char* tocat(self, int sym): # <<<<<<<<<<<<<<
@@ -22044,7 +21713,7 @@ static char *__pyx_f_3_sa_8Alphabet_tocat(struct __pyx_obj_3_sa_Alphabet *__pyx_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("tocat", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":40
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":40
*
* cdef char* tocat(self, int sym):
* return self.nonterminals.word((-sym >> INDEX_SHIFT)-1) # <<<<<<<<<<<<<<
@@ -22060,7 +21729,7 @@ static char *__pyx_f_3_sa_8Alphabet_tocat(struct __pyx_obj_3_sa_Alphabet *__pyx_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":42
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":42
* return self.nonterminals.word((-sym >> INDEX_SHIFT)-1)
*
* cdef int fromcat(self, char *s): # <<<<<<<<<<<<<<
@@ -22075,7 +21744,7 @@ static int __pyx_f_3_sa_8Alphabet_fromcat(struct __pyx_obj_3_sa_Alphabet *__pyx_
int __pyx_t_1;
__Pyx_RefNannySetupContext("fromcat", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":44
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":44
* cdef int fromcat(self, char *s):
* cdef int i
* i = self.nonterminals.index(s) # <<<<<<<<<<<<<<
@@ -22084,7 +21753,7 @@ static int __pyx_f_3_sa_8Alphabet_fromcat(struct __pyx_obj_3_sa_Alphabet *__pyx_
*/
__pyx_v_i = ((struct __pyx_vtabstruct_3_sa_StringMap *)__pyx_v_self->nonterminals->__pyx_vtab)->index(__pyx_v_self->nonterminals, __pyx_v_s);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":45
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":45
* cdef int i
* i = self.nonterminals.index(s)
* if self.first_nonterminal == -1: # <<<<<<<<<<<<<<
@@ -22094,7 +21763,7 @@ static int __pyx_f_3_sa_8Alphabet_fromcat(struct __pyx_obj_3_sa_Alphabet *__pyx_
__pyx_t_1 = (__pyx_v_self->first_nonterminal == -1);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":46
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":46
* i = self.nonterminals.index(s)
* if self.first_nonterminal == -1:
* self.first_nonterminal = i # <<<<<<<<<<<<<<
@@ -22106,7 +21775,7 @@ static int __pyx_f_3_sa_8Alphabet_fromcat(struct __pyx_obj_3_sa_Alphabet *__pyx_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":47
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":47
* if self.first_nonterminal == -1:
* self.first_nonterminal = i
* if i > self.last_nonterminal: # <<<<<<<<<<<<<<
@@ -22116,7 +21785,7 @@ static int __pyx_f_3_sa_8Alphabet_fromcat(struct __pyx_obj_3_sa_Alphabet *__pyx_
__pyx_t_1 = (__pyx_v_i > __pyx_v_self->last_nonterminal);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":48
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":48
* self.first_nonterminal = i
* if i > self.last_nonterminal:
* self.last_nonterminal = i # <<<<<<<<<<<<<<
@@ -22128,7 +21797,7 @@ static int __pyx_f_3_sa_8Alphabet_fromcat(struct __pyx_obj_3_sa_Alphabet *__pyx_
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":49
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":49
* if i > self.last_nonterminal:
* self.last_nonterminal = i
* return -(i+1 << INDEX_SHIFT) # <<<<<<<<<<<<<<
@@ -22144,7 +21813,7 @@ static int __pyx_f_3_sa_8Alphabet_fromcat(struct __pyx_obj_3_sa_Alphabet *__pyx_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":51
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":51
* return -(i+1 << INDEX_SHIFT)
*
* cdef char* tostring(self, int sym): # <<<<<<<<<<<<<<
@@ -22167,7 +21836,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("tostring", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":53
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":53
* cdef char* tostring(self, int sym):
* cdef int ind
* if self.isvar(sym): # <<<<<<<<<<<<<<
@@ -22177,7 +21846,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_t_1 = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->isvar(__pyx_v_self, __pyx_v_sym);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":54
* cdef int ind
* if self.isvar(sym):
* if sym in self.id2sym: # <<<<<<<<<<<<<<
@@ -22187,24 +21856,19 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_t_2 = PyInt_FromLong(__pyx_v_sym); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
if (unlikely(((PyObject *)__pyx_v_self->id2sym) == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_3 = ((PyDict_Contains(((PyObject *)__pyx_v_self->id2sym), __pyx_t_2))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":55
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":55
* if self.isvar(sym):
* if sym in self.id2sym:
* return self.id2sym[sym] # <<<<<<<<<<<<<<
* ind = self.getindex(sym)
* if ind > 0:
*/
- if (unlikely(((PyObject *)__pyx_v_self->id2sym) == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
__pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->id2sym), __pyx_v_sym, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = PyBytes_AsString(__pyx_t_2); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -22215,7 +21879,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":56
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":56
* if sym in self.id2sym:
* return self.id2sym[sym]
* ind = self.getindex(sym) # <<<<<<<<<<<<<<
@@ -22224,7 +21888,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
*/
__pyx_v_ind = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->getindex(__pyx_v_self, __pyx_v_sym);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":57
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":57
* return self.id2sym[sym]
* ind = self.getindex(sym)
* if ind > 0: # <<<<<<<<<<<<<<
@@ -22234,7 +21898,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_t_3 = (__pyx_v_ind > 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":58
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":58
* ind = self.getindex(sym)
* if ind > 0:
* self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind) # <<<<<<<<<<<<<<
@@ -22256,17 +21920,13 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_64), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- if (unlikely(((PyObject *)__pyx_v_self->id2sym) == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
if (__Pyx_SetItemInt(((PyObject *)__pyx_v_self->id2sym), __pyx_v_sym, ((PyObject *)__pyx_t_5), sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
goto __pyx_L5;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":60
* self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind)
* else:
* self.id2sym[sym] = "[%s]" % self.tocat(sym) # <<<<<<<<<<<<<<
@@ -22278,26 +21938,18 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_65), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- if (unlikely(((PyObject *)__pyx_v_self->id2sym) == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
if (__Pyx_SetItemInt(((PyObject *)__pyx_v_self->id2sym), __pyx_v_sym, ((PyObject *)__pyx_t_6), sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":61
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":61
* else:
* self.id2sym[sym] = "[%s]" % self.tocat(sym)
* return self.id2sym[sym] # <<<<<<<<<<<<<<
* else:
* return self.terminals.word(sym)
*/
- if (unlikely(((PyObject *)__pyx_v_self->id2sym) == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
__pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->id2sym), __pyx_v_sym, sizeof(int), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_4 = PyBytes_AsString(__pyx_t_6); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -22308,7 +21960,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":63
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":63
* return self.id2sym[sym]
* else:
* return self.terminals.word(sym) # <<<<<<<<<<<<<<
@@ -22333,7 +21985,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":65
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":65
* return self.terminals.word(sym)
*
* cdef int fromstring(self, char *s, bint terminal): # <<<<<<<<<<<<<<
@@ -22361,7 +22013,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("fromstring", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":69
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":69
* cdef char *comma
* cdef int n
* n = strlen(s) # <<<<<<<<<<<<<<
@@ -22370,7 +22022,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
*/
__pyx_v_n = strlen(__pyx_v_s);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":71
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":71
* n = strlen(s)
* cdef char *sep
* sep = strstr(s,"_SEP_") # <<<<<<<<<<<<<<
@@ -22379,7 +22031,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
*/
__pyx_v_sep = strstr(__pyx_v_s, __pyx_k___SEP_);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":72
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -22407,7 +22059,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":73
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -22416,7 +22068,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
*/
if (__pyx_v_terminal) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":74
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":74
* if n >= 3 and s[0] == c'[' and s[n-1] == c']' and sep == NULL:
* if terminal:
* s1 = "\\"+s # <<<<<<<<<<<<<<
@@ -22431,7 +22083,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_v_s1 = __pyx_t_7;
__pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":75
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":75
* if terminal:
* s1 = "\\"+s
* return self.terminals.index(s1) # <<<<<<<<<<<<<<
@@ -22445,7 +22097,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":76
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":76
* s1 = "\\"+s
* return self.terminals.index(s1)
* s[n-1] = c'\0' # <<<<<<<<<<<<<<
@@ -22454,7 +22106,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
*/
(__pyx_v_s[(__pyx_v_n - 1)]) = '\x00';
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":77
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":77
* return self.terminals.index(s1)
* s[n-1] = c'\0'
* s = s + 1 # <<<<<<<<<<<<<<
@@ -22463,7 +22115,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
*/
__pyx_v_s = (__pyx_v_s + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":78
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":78
* s[n-1] = c'\0'
* s = s + 1
* comma = strrchr(s, c',') # <<<<<<<<<<<<<<
@@ -22472,7 +22124,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
*/
__pyx_v_comma = strrchr(__pyx_v_s, ',');
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":79
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":79
* s = s + 1
* comma = strrchr(s, c',')
* if comma != NULL: # <<<<<<<<<<<<<<
@@ -22482,7 +22134,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_t_2 = (__pyx_v_comma != NULL);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":80
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":80
* comma = strrchr(s, c',')
* if comma != NULL:
* comma[0] = c'\0' # <<<<<<<<<<<<<<
@@ -22491,7 +22143,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
*/
(__pyx_v_comma[0]) = '\x00';
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":81
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":81
* if comma != NULL:
* comma[0] = c'\0'
* return self.setindex(self.fromcat(s), strtol(comma+1, NULL, 10)) # <<<<<<<<<<<<<<
@@ -22504,7 +22156,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":83
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":83
* return self.setindex(self.fromcat(s), strtol(comma+1, NULL, 10))
* else:
* return self.fromcat(s) # <<<<<<<<<<<<<<
@@ -22519,7 +22171,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":85
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":85
* return self.fromcat(s)
* else:
* return self.terminals.index(s) # <<<<<<<<<<<<<<
@@ -22555,7 +22207,7 @@ static PyObject *__pyx_pw_3_sa_8Alphabet_9terminals_1__get__(PyObject *__pyx_v_s
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":8
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":8
*
* cdef class Alphabet:
* cdef readonly StringMap terminals, nonterminals # <<<<<<<<<<<<<<
@@ -22606,7 +22258,7 @@ static PyObject *__pyx_pf_3_sa_8Alphabet_12nonterminals___get__(struct __pyx_obj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":89
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":89
* cdef Alphabet ALPHABET = Alphabet()
*
* cdef char* sym_tostring(int sym): # <<<<<<<<<<<<<<
@@ -22619,7 +22271,7 @@ static char *__pyx_f_3_sa_sym_tostring(int __pyx_v_sym) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_tostring", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":90
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":90
*
* cdef char* sym_tostring(int sym):
* return ALPHABET.tostring(sym) # <<<<<<<<<<<<<<
@@ -22635,7 +22287,7 @@ static char *__pyx_f_3_sa_sym_tostring(int __pyx_v_sym) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":92
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":92
* return ALPHABET.tostring(sym)
*
* cdef char* sym_tocat(int sym): # <<<<<<<<<<<<<<
@@ -22648,7 +22300,7 @@ static char *__pyx_f_3_sa_sym_tocat(int __pyx_v_sym) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_tocat", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":93
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":93
*
* cdef char* sym_tocat(int sym):
* return ALPHABET.tocat(sym) # <<<<<<<<<<<<<<
@@ -22664,7 +22316,7 @@ static char *__pyx_f_3_sa_sym_tocat(int __pyx_v_sym) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":95
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":95
* return ALPHABET.tocat(sym)
*
* cdef int sym_isvar(int sym): # <<<<<<<<<<<<<<
@@ -22677,7 +22329,7 @@ static int __pyx_f_3_sa_sym_isvar(int __pyx_v_sym) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_isvar", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":96
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":96
*
* cdef int sym_isvar(int sym):
* return ALPHABET.isvar(sym) # <<<<<<<<<<<<<<
@@ -22693,7 +22345,7 @@ static int __pyx_f_3_sa_sym_isvar(int __pyx_v_sym) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":98
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":98
* return ALPHABET.isvar(sym)
*
* cdef int sym_getindex(int sym): # <<<<<<<<<<<<<<
@@ -22706,7 +22358,7 @@ static int __pyx_f_3_sa_sym_getindex(int __pyx_v_sym) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_getindex", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":99
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":99
*
* cdef int sym_getindex(int sym):
* return ALPHABET.getindex(sym) # <<<<<<<<<<<<<<
@@ -22722,7 +22374,7 @@ static int __pyx_f_3_sa_sym_getindex(int __pyx_v_sym) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":101
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":101
* return ALPHABET.getindex(sym)
*
* cdef int sym_setindex(int sym, int id): # <<<<<<<<<<<<<<
@@ -22735,7 +22387,7 @@ static int __pyx_f_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_setindex", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":102
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":102
*
* cdef int sym_setindex(int sym, int id):
* return ALPHABET.setindex(sym, id) # <<<<<<<<<<<<<<
@@ -22757,11 +22409,12 @@ static PyMethodDef __pyx_mdef_3_sa_3sym_fromstring = {__Pyx_NAMESTR("sym_fromstr
static PyObject *__pyx_pw_3_sa_3sym_fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
char *__pyx_v_string;
int __pyx_v_terminal;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__string,&__pyx_n_s__terminal,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_fromstring (wrapper)", 0);
+ __pyx_self = __pyx_self;
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__string,&__pyx_n_s__terminal,0};
PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -22775,10 +22428,12 @@ static PyObject *__pyx_pw_3_sa_3sym_fromstring(PyObject *__pyx_self, PyObject *_
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__string)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__string);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__terminal)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__terminal);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("sym_fromstring", 1, 2, 2, 1); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -22808,7 +22463,7 @@ static PyObject *__pyx_pw_3_sa_3sym_fromstring(PyObject *__pyx_self, PyObject *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":104
+/* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":104
* return ALPHABET.setindex(sym, id)
*
* def sym_fromstring(char* string, bint terminal): # <<<<<<<<<<<<<<
@@ -22824,7 +22479,7 @@ static PyObject *__pyx_pf_3_sa_2sym_fromstring(CYTHON_UNUSED PyObject *__pyx_sel
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("sym_fromstring", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":105
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":105
*
* def sym_fromstring(char* string, bint terminal):
* return ALPHABET.fromstring(string, terminal) # <<<<<<<<<<<<<<
@@ -22852,11 +22507,11 @@ static PyObject *__pyx_pf_3_sa_2sym_fromstring(CYTHON_UNUSED PyObject *__pyx_sel
static int __pyx_pw_3_sa_6Phrase_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3_sa_6Phrase_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_words = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__words,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__words,0};
PyObject* values[1] = {0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -22869,7 +22524,8 @@ static int __pyx_pw_3_sa_6Phrase_1__cinit__(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__words)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__words);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
@@ -22895,7 +22551,7 @@ static int __pyx_pw_3_sa_6Phrase_1__cinit__(PyObject *__pyx_v_self, PyObject *__
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":6
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":6
* cdef class Phrase:
*
* def __cinit__(self, words): # <<<<<<<<<<<<<<
@@ -22919,7 +22575,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":8
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":8
* def __cinit__(self, words):
* cdef int i, j, n, n_vars
* n_vars = 0 # <<<<<<<<<<<<<<
@@ -22928,7 +22584,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
*/
__pyx_v_n_vars = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":9
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":9
* cdef int i, j, n, n_vars
* n_vars = 0
* n = len(words) # <<<<<<<<<<<<<<
@@ -22938,7 +22594,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":10
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":10
* n_vars = 0
* n = len(words)
* self.syms = <int *>malloc(n*sizeof(int)) # <<<<<<<<<<<<<<
@@ -22947,7 +22603,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
*/
__pyx_v_self->syms = ((int *)malloc((__pyx_v_n * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":11
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":11
* n = len(words)
* self.syms = <int *>malloc(n*sizeof(int))
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -22957,7 +22613,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_t_2 = __pyx_v_n;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":12
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":12
* self.syms = <int *>malloc(n*sizeof(int))
* for i from 0 <= i < n:
* self.syms[i] = words[i] # <<<<<<<<<<<<<<
@@ -22970,7 +22626,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
(__pyx_v_self->syms[__pyx_v_i]) = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":13
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":13
* for i from 0 <= i < n:
* self.syms[i] = words[i]
* if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<<
@@ -22980,7 +22636,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_t_4 = __pyx_f_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i]));
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":14
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":14
* self.syms[i] = words[i]
* if sym_isvar(self.syms[i]):
* n_vars += 1 # <<<<<<<<<<<<<<
@@ -22993,7 +22649,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_L5:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":15
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":15
* if sym_isvar(self.syms[i]):
* n_vars += 1
* self.n = n # <<<<<<<<<<<<<<
@@ -23002,7 +22658,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
*/
__pyx_v_self->n = __pyx_v_n;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":16
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":16
* n_vars += 1
* self.n = n
* self.n_vars = n_vars # <<<<<<<<<<<<<<
@@ -23011,7 +22667,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
*/
__pyx_v_self->n_vars = __pyx_v_n_vars;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":17
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":17
* self.n = n
* self.n_vars = n_vars
* self.varpos = <int *>malloc(n_vars*sizeof(int)) # <<<<<<<<<<<<<<
@@ -23020,7 +22676,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
*/
__pyx_v_self->varpos = ((int *)malloc((__pyx_v_n_vars * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":18
* self.n_vars = n_vars
* self.varpos = <int *>malloc(n_vars*sizeof(int))
* j = 0 # <<<<<<<<<<<<<<
@@ -23029,7 +22685,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
*/
__pyx_v_j = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":19
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":19
* self.varpos = <int *>malloc(n_vars*sizeof(int))
* j = 0
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -23039,7 +22695,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_t_2 = __pyx_v_n;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":20
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":20
* j = 0
* for i from 0 <= i < n:
* if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<<
@@ -23049,7 +22705,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_t_4 = __pyx_f_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i]));
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":21
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":21
* for i from 0 <= i < n:
* if sym_isvar(self.syms[i]):
* self.varpos[j] = i # <<<<<<<<<<<<<<
@@ -23058,7 +22714,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
*/
(__pyx_v_self->varpos[__pyx_v_j]) = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":22
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":22
* if sym_isvar(self.syms[i]):
* self.varpos[j] = i
* j = j + 1 # <<<<<<<<<<<<<<
@@ -23091,7 +22747,7 @@ static void __pyx_pw_3_sa_6Phrase_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":24
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":24
* j = j + 1
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -23103,7 +22759,7 @@ static void __pyx_pf_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_3_sa_Phrase *__p
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":25
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":25
*
* def __dealloc__(self):
* free(self.syms) # <<<<<<<<<<<<<<
@@ -23112,7 +22768,7 @@ static void __pyx_pf_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_3_sa_Phrase *__p
*/
free(__pyx_v_self->syms);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":26
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":26
* def __dealloc__(self):
* free(self.syms)
* free(self.varpos) # <<<<<<<<<<<<<<
@@ -23135,7 +22791,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_5__str__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":28
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":28
* free(self.varpos)
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -23159,7 +22815,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_4__str__(struct __pyx_obj_3_sa_Phrase *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":29
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":29
*
* def __str__(self):
* strs = [] # <<<<<<<<<<<<<<
@@ -23171,7 +22827,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_4__str__(struct __pyx_obj_3_sa_Phrase *__
__pyx_v_strs = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":31
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":31
* strs = []
* cdef int i, s
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -23181,7 +22837,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_4__str__(struct __pyx_obj_3_sa_Phrase *__
__pyx_t_2 = __pyx_v_self->n;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":32
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":32
* cdef int i, s
* for i from 0 <= i < self.n:
* s = self.syms[i] # <<<<<<<<<<<<<<
@@ -23190,7 +22846,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_4__str__(struct __pyx_obj_3_sa_Phrase *__
*/
__pyx_v_s = (__pyx_v_self->syms[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":33
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":33
* for i from 0 <= i < self.n:
* s = self.syms[i]
* strs.append(sym_tostring(s)) # <<<<<<<<<<<<<<
@@ -23203,7 +22859,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_4__str__(struct __pyx_obj_3_sa_Phrase *__
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":34
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":34
* s = self.syms[i]
* strs.append(sym_tostring(s))
* return ' '.join(strs) # <<<<<<<<<<<<<<
@@ -23253,7 +22909,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_7handle(PyObject *__pyx_v_self, CYTHON_UN
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":36
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":36
* return ' '.join(strs)
*
* def handle(self): # <<<<<<<<<<<<<<
@@ -23277,7 +22933,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":39
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":39
* """return a hashable representation that normalizes the ordering
* of the nonterminal indices"""
* norm = [] # <<<<<<<<<<<<<<
@@ -23289,7 +22945,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
__pyx_v_norm = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":41
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":41
* norm = []
* cdef int i, j, s
* i = 1 # <<<<<<<<<<<<<<
@@ -23298,7 +22954,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":42
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":42
* cdef int i, j, s
* i = 1
* j = 0 # <<<<<<<<<<<<<<
@@ -23307,7 +22963,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
*/
__pyx_v_j = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":43
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":43
* i = 1
* j = 0
* for j from 0 <= j < self.n: # <<<<<<<<<<<<<<
@@ -23317,7 +22973,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
__pyx_t_2 = __pyx_v_self->n;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":44
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":44
* j = 0
* for j from 0 <= j < self.n:
* s = self.syms[j] # <<<<<<<<<<<<<<
@@ -23326,7 +22982,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
*/
__pyx_v_s = (__pyx_v_self->syms[__pyx_v_j]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":45
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":45
* for j from 0 <= j < self.n:
* s = self.syms[j]
* if sym_isvar(s): # <<<<<<<<<<<<<<
@@ -23336,7 +22992,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
__pyx_t_3 = __pyx_f_3_sa_sym_isvar(__pyx_v_s);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":46
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":46
* s = self.syms[j]
* if sym_isvar(s):
* s = sym_setindex(s,i) # <<<<<<<<<<<<<<
@@ -23345,7 +23001,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
*/
__pyx_v_s = __pyx_f_3_sa_sym_setindex(__pyx_v_s, __pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":47
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":47
* if sym_isvar(s):
* s = sym_setindex(s,i)
* i = i + 1 # <<<<<<<<<<<<<<
@@ -23357,7 +23013,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":48
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":48
* s = sym_setindex(s,i)
* i = i + 1
* norm.append(s) # <<<<<<<<<<<<<<
@@ -23370,7 +23026,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":49
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":49
* i = i + 1
* norm.append(s)
* return tuple(norm) # <<<<<<<<<<<<<<
@@ -23408,7 +23064,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_9strhandle(PyObject *__pyx_v_self, CYTHON
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":51
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":51
* return tuple(norm)
*
* def strhandle(self): # <<<<<<<<<<<<<<
@@ -23435,7 +23091,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("strhandle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":52
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":52
*
* def strhandle(self):
* strs = [] # <<<<<<<<<<<<<<
@@ -23447,7 +23103,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
__pyx_v_strs = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":53
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":53
* def strhandle(self):
* strs = []
* norm = [] # <<<<<<<<<<<<<<
@@ -23459,7 +23115,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
__pyx_v_norm = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":55
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":55
* norm = []
* cdef int i, j, s
* i = 1 # <<<<<<<<<<<<<<
@@ -23468,7 +23124,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":56
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":56
* cdef int i, j, s
* i = 1
* j = 0 # <<<<<<<<<<<<<<
@@ -23477,7 +23133,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
*/
__pyx_v_j = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":57
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":57
* i = 1
* j = 0
* for j from 0 <= j < self.n: # <<<<<<<<<<<<<<
@@ -23487,7 +23143,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
__pyx_t_2 = __pyx_v_self->n;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":58
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":58
* j = 0
* for j from 0 <= j < self.n:
* s = self.syms[j] # <<<<<<<<<<<<<<
@@ -23496,7 +23152,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
*/
__pyx_v_s = (__pyx_v_self->syms[__pyx_v_j]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":59
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":59
* for j from 0 <= j < self.n:
* s = self.syms[j]
* if sym_isvar(s): # <<<<<<<<<<<<<<
@@ -23506,7 +23162,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
__pyx_t_3 = __pyx_f_3_sa_sym_isvar(__pyx_v_s);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":60
* s = self.syms[j]
* if sym_isvar(s):
* s = sym_setindex(s,i) # <<<<<<<<<<<<<<
@@ -23515,7 +23171,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
*/
__pyx_v_s = __pyx_f_3_sa_sym_setindex(__pyx_v_s, __pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":61
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":61
* if sym_isvar(s):
* s = sym_setindex(s,i)
* i = i + 1 # <<<<<<<<<<<<<<
@@ -23527,7 +23183,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":62
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":62
* s = sym_setindex(s,i)
* i = i + 1
* norm.append(sym_tostring(s)) # <<<<<<<<<<<<<<
@@ -23540,7 +23196,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":63
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":63
* i = i + 1
* norm.append(sym_tostring(s))
* return ' '.join(norm) # <<<<<<<<<<<<<<
@@ -23590,7 +23246,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_11arity(PyObject *__pyx_v_self, CYTHON_UN
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":65
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":65
* return ' '.join(norm)
*
* def arity(self): # <<<<<<<<<<<<<<
@@ -23607,7 +23263,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_10arity(struct __pyx_obj_3_sa_Phrase *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("arity", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":66
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":66
*
* def arity(self):
* return self.n_vars # <<<<<<<<<<<<<<
@@ -23644,7 +23300,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_13getvarpos(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":68
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":68
* return self.n_vars
*
* def getvarpos(self, i): # <<<<<<<<<<<<<<
@@ -23664,7 +23320,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_12getvarpos(struct __pyx_obj_3_sa_Phrase
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("getvarpos", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":69
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":69
*
* def getvarpos(self, i):
* if 0 <= i < self.n_vars: # <<<<<<<<<<<<<<
@@ -23685,7 +23341,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_12getvarpos(struct __pyx_obj_3_sa_Phrase
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":70
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":70
* def getvarpos(self, i):
* if 0 <= i < self.n_vars:
* return self.varpos[i] # <<<<<<<<<<<<<<
@@ -23703,7 +23359,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_12getvarpos(struct __pyx_obj_3_sa_Phrase
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":72
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":72
* return self.varpos[i]
* else:
* raise IndexError # <<<<<<<<<<<<<<
@@ -23739,7 +23395,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_15getvar(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":74
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":74
* raise IndexError
*
* def getvar(self, i): # <<<<<<<<<<<<<<
@@ -23759,7 +23415,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_14getvar(struct __pyx_obj_3_sa_Phrase *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("getvar", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":75
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":75
*
* def getvar(self, i):
* if 0 <= i < self.n_vars: # <<<<<<<<<<<<<<
@@ -23780,7 +23436,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_14getvar(struct __pyx_obj_3_sa_Phrase *__
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":76
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":76
* def getvar(self, i):
* if 0 <= i < self.n_vars:
* return self.syms[self.varpos[i]] # <<<<<<<<<<<<<<
@@ -23798,7 +23454,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_14getvar(struct __pyx_obj_3_sa_Phrase *__
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":78
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":78
* return self.syms[self.varpos[i]]
* else:
* raise IndexError # <<<<<<<<<<<<<<
@@ -23823,7 +23479,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_14getvar(struct __pyx_obj_3_sa_Phrase *__
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":80
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":80
* raise IndexError
*
* cdef int chunkpos(self, int k): # <<<<<<<<<<<<<<
@@ -23837,7 +23493,7 @@ int __pyx_f_3_sa_6Phrase_chunkpos(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
int __pyx_t_1;
__Pyx_RefNannySetupContext("chunkpos", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":81
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":81
*
* cdef int chunkpos(self, int k):
* if k == 0: # <<<<<<<<<<<<<<
@@ -23847,7 +23503,7 @@ int __pyx_f_3_sa_6Phrase_chunkpos(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
__pyx_t_1 = (__pyx_v_k == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":82
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":82
* cdef int chunkpos(self, int k):
* if k == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -23860,7 +23516,7 @@ int __pyx_f_3_sa_6Phrase_chunkpos(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":84
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":84
* return 0
* else:
* return self.varpos[k-1]+1 # <<<<<<<<<<<<<<
@@ -23878,7 +23534,7 @@ int __pyx_f_3_sa_6Phrase_chunkpos(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":86
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":86
* return self.varpos[k-1]+1
*
* cdef int chunklen(self, int k): # <<<<<<<<<<<<<<
@@ -23892,7 +23548,7 @@ int __pyx_f_3_sa_6Phrase_chunklen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
int __pyx_t_1;
__Pyx_RefNannySetupContext("chunklen", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":87
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":87
*
* cdef int chunklen(self, int k):
* if self.n_vars == 0: # <<<<<<<<<<<<<<
@@ -23902,7 +23558,7 @@ int __pyx_f_3_sa_6Phrase_chunklen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
__pyx_t_1 = (__pyx_v_self->n_vars == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":88
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":88
* cdef int chunklen(self, int k):
* if self.n_vars == 0:
* return self.n # <<<<<<<<<<<<<<
@@ -23914,7 +23570,7 @@ int __pyx_f_3_sa_6Phrase_chunklen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":89
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":89
* if self.n_vars == 0:
* return self.n
* elif k == 0: # <<<<<<<<<<<<<<
@@ -23924,7 +23580,7 @@ int __pyx_f_3_sa_6Phrase_chunklen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
__pyx_t_1 = (__pyx_v_k == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":90
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":90
* return self.n
* elif k == 0:
* return self.varpos[0] # <<<<<<<<<<<<<<
@@ -23936,7 +23592,7 @@ int __pyx_f_3_sa_6Phrase_chunklen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":91
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":91
* elif k == 0:
* return self.varpos[0]
* elif k == self.n_vars: # <<<<<<<<<<<<<<
@@ -23946,7 +23602,7 @@ int __pyx_f_3_sa_6Phrase_chunklen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
__pyx_t_1 = (__pyx_v_k == __pyx_v_self->n_vars);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":92
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":92
* return self.varpos[0]
* elif k == self.n_vars:
* return self.n-self.varpos[k-1]-1 # <<<<<<<<<<<<<<
@@ -23959,7 +23615,7 @@ int __pyx_f_3_sa_6Phrase_chunklen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":94
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":94
* return self.n-self.varpos[k-1]-1
* else:
* return self.varpos[k]-self.varpos[k-1]-1 # <<<<<<<<<<<<<<
@@ -23988,7 +23644,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_17clen(PyObject *__pyx_v_self, PyObject *
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":96
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":96
* return self.varpos[k]-self.varpos[k-1]-1
*
* def clen(self, k): # <<<<<<<<<<<<<<
@@ -24006,7 +23662,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_16clen(struct __pyx_obj_3_sa_Phrase *__py
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("clen", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":97
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":97
*
* def clen(self, k):
* return self.chunklen(k) # <<<<<<<<<<<<<<
@@ -24044,7 +23700,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_19getchunk(PyObject *__pyx_v_self, PyObje
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":99
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":99
* return self.chunklen(k)
*
* def getchunk(self, ci): # <<<<<<<<<<<<<<
@@ -24067,7 +23723,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_18getchunk(struct __pyx_obj_3_sa_Phrase *
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("getchunk", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":101
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":101
* def getchunk(self, ci):
* cdef int start, stop
* start = self.chunkpos(ci) # <<<<<<<<<<<<<<
@@ -24077,7 +23733,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_18getchunk(struct __pyx_obj_3_sa_Phrase *
__pyx_t_1 = __Pyx_PyInt_AsInt(__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_start = ((struct __pyx_vtabstruct_3_sa_Phrase *)__pyx_v_self->__pyx_vtab)->chunkpos(__pyx_v_self, __pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":102
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":102
* cdef int start, stop
* start = self.chunkpos(ci)
* stop = start+self.chunklen(ci) # <<<<<<<<<<<<<<
@@ -24087,7 +23743,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_18getchunk(struct __pyx_obj_3_sa_Phrase *
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_ci); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_stop = (__pyx_v_start + ((struct __pyx_vtabstruct_3_sa_Phrase *)__pyx_v_self->__pyx_vtab)->chunklen(__pyx_v_self, __pyx_t_1));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":103
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":103
* start = self.chunkpos(ci)
* stop = start+self.chunklen(ci)
* chunk = [] # <<<<<<<<<<<<<<
@@ -24099,7 +23755,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_18getchunk(struct __pyx_obj_3_sa_Phrase *
__pyx_v_chunk = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":104
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":104
* stop = start+self.chunklen(ci)
* chunk = []
* for i from start <= i < stop: # <<<<<<<<<<<<<<
@@ -24109,7 +23765,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_18getchunk(struct __pyx_obj_3_sa_Phrase *
__pyx_t_1 = __pyx_v_stop;
for (__pyx_v_i = __pyx_v_start; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":105
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":105
* chunk = []
* for i from start <= i < stop:
* chunk.append(self.syms[i]) # <<<<<<<<<<<<<<
@@ -24122,7 +23778,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_18getchunk(struct __pyx_obj_3_sa_Phrase *
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":106
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":106
* for i from start <= i < stop:
* chunk.append(self.syms[i])
* return chunk # <<<<<<<<<<<<<<
@@ -24160,7 +23816,7 @@ static int __pyx_pw_3_sa_6Phrase_21__cmp__(PyObject *__pyx_v_self, PyObject *__p
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":108
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":108
* return chunk
*
* def __cmp__(self, other): # <<<<<<<<<<<<<<
@@ -24183,7 +23839,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cmp__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":111
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":111
* cdef Phrase otherp
* cdef int i
* otherp = other # <<<<<<<<<<<<<<
@@ -24194,7 +23850,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__Pyx_INCREF(__pyx_v_other);
__pyx_v_otherp = ((struct __pyx_obj_3_sa_Phrase *)__pyx_v_other);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":112
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":112
* cdef int i
* otherp = other
* for i from 0 <= i < min(self.n, otherp.n): # <<<<<<<<<<<<<<
@@ -24211,7 +23867,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_t_1 = __pyx_t_3;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":113
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":113
* otherp = other
* for i from 0 <= i < min(self.n, otherp.n):
* if self.syms[i] < otherp.syms[i]: # <<<<<<<<<<<<<<
@@ -24221,7 +23877,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_t_4 = ((__pyx_v_self->syms[__pyx_v_i]) < (__pyx_v_otherp->syms[__pyx_v_i]));
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":114
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":114
* for i from 0 <= i < min(self.n, otherp.n):
* if self.syms[i] < otherp.syms[i]:
* return -1 # <<<<<<<<<<<<<<
@@ -24233,7 +23889,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
goto __pyx_L5;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":115
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":115
* if self.syms[i] < otherp.syms[i]:
* return -1
* elif self.syms[i] > otherp.syms[i]: # <<<<<<<<<<<<<<
@@ -24243,7 +23899,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_t_4 = ((__pyx_v_self->syms[__pyx_v_i]) > (__pyx_v_otherp->syms[__pyx_v_i]));
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":116
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":116
* return -1
* elif self.syms[i] > otherp.syms[i]:
* return 1 # <<<<<<<<<<<<<<
@@ -24257,7 +23913,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_L5:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":117
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":117
* elif self.syms[i] > otherp.syms[i]:
* return 1
* if self.n < otherp.n: # <<<<<<<<<<<<<<
@@ -24267,7 +23923,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_t_4 = (__pyx_v_self->n < __pyx_v_otherp->n);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":118
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":118
* return 1
* if self.n < otherp.n:
* return -1 # <<<<<<<<<<<<<<
@@ -24279,7 +23935,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
goto __pyx_L6;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":119
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":119
* if self.n < otherp.n:
* return -1
* elif self.n > otherp.n: # <<<<<<<<<<<<<<
@@ -24289,7 +23945,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_t_4 = (__pyx_v_self->n > __pyx_v_otherp->n);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":120
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":120
* return -1
* elif self.n > otherp.n:
* return 1 # <<<<<<<<<<<<<<
@@ -24302,7 +23958,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":122
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":122
* return 1
* else:
* return 0 # <<<<<<<<<<<<<<
@@ -24337,7 +23993,7 @@ static Py_hash_t __pyx_pw_3_sa_6Phrase_23__hash__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":124
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":124
* return 0
*
* def __hash__(self): # <<<<<<<<<<<<<<
@@ -24354,7 +24010,7 @@ static Py_hash_t __pyx_pf_3_sa_6Phrase_22__hash__(struct __pyx_obj_3_sa_Phrase *
int __pyx_t_2;
__Pyx_RefNannySetupContext("__hash__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":127
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":127
* cdef int i
* cdef unsigned h
* h = 0 # <<<<<<<<<<<<<<
@@ -24363,7 +24019,7 @@ static Py_hash_t __pyx_pf_3_sa_6Phrase_22__hash__(struct __pyx_obj_3_sa_Phrase *
*/
__pyx_v_h = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":128
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":128
* cdef unsigned h
* h = 0
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -24373,7 +24029,7 @@ static Py_hash_t __pyx_pf_3_sa_6Phrase_22__hash__(struct __pyx_obj_3_sa_Phrase *
__pyx_t_1 = __pyx_v_self->n;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":129
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":129
* h = 0
* for i from 0 <= i < self.n:
* if self.syms[i] > 0: # <<<<<<<<<<<<<<
@@ -24383,7 +24039,7 @@ static Py_hash_t __pyx_pf_3_sa_6Phrase_22__hash__(struct __pyx_obj_3_sa_Phrase *
__pyx_t_2 = ((__pyx_v_self->syms[__pyx_v_i]) > 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":130
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":130
* for i from 0 <= i < self.n:
* if self.syms[i] > 0:
* h = (h << 1) + self.syms[i] # <<<<<<<<<<<<<<
@@ -24395,7 +24051,7 @@ static Py_hash_t __pyx_pf_3_sa_6Phrase_22__hash__(struct __pyx_obj_3_sa_Phrase *
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":132
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":132
* h = (h << 1) + self.syms[i]
* else:
* h = (h << 1) + -self.syms[i] # <<<<<<<<<<<<<<
@@ -24407,7 +24063,7 @@ static Py_hash_t __pyx_pf_3_sa_6Phrase_22__hash__(struct __pyx_obj_3_sa_Phrase *
__pyx_L5:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":133
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":133
* else:
* h = (h << 1) + -self.syms[i]
* return h # <<<<<<<<<<<<<<
@@ -24435,7 +24091,7 @@ static Py_ssize_t __pyx_pw_3_sa_6Phrase_25__len__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":135
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":135
* return h
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -24448,7 +24104,7 @@ static Py_ssize_t __pyx_pf_3_sa_6Phrase_24__len__(struct __pyx_obj_3_sa_Phrase *
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":136
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":136
*
* def __len__(self):
* return self.n # <<<<<<<<<<<<<<
@@ -24475,7 +24131,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_27__getitem__(PyObject *__pyx_v_self, PyO
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":138
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":138
* return self.n
*
* def __getitem__(self, i): # <<<<<<<<<<<<<<
@@ -24493,7 +24149,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_26__getitem__(struct __pyx_obj_3_sa_Phras
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":139
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":139
*
* def __getitem__(self, i):
* return self.syms[i] # <<<<<<<<<<<<<<
@@ -24532,7 +24188,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_29__iter__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":141
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":141
* return self.syms[i]
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -24594,7 +24250,7 @@ static PyObject *__pyx_gb_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx
__pyx_L3_first_run:;
if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":143
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":143
* def __iter__(self):
* cdef int i
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -24604,7 +24260,7 @@ static PyObject *__pyx_gb_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx
__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++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":144
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":144
* cdef int i
* for i from 0 <= i < self.n:
* yield self.syms[i] # <<<<<<<<<<<<<<
@@ -24633,7 +24289,6 @@ static PyObject *__pyx_gb_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx
__pyx_L0:;
__Pyx_XDECREF(__pyx_r);
__pyx_generator->resume_label = -1;
- __Pyx_Generator_clear((PyObject*)__pyx_generator);
__Pyx_RefNannyFinishContext();
return NULL;
}
@@ -24643,11 +24298,11 @@ static PyObject *__pyx_pw_3_sa_6Phrase_32subst(PyObject *__pyx_v_self, PyObject
static PyObject *__pyx_pw_3_sa_6Phrase_32subst(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_start = 0;
PyObject *__pyx_v_children = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__children,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("subst (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__start,&__pyx_n_s__children,0};
PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -24661,10 +24316,12 @@ static PyObject *__pyx_pw_3_sa_6Phrase_32subst(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__start)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__children)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__children);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("subst", 1, 2, 2, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -24694,7 +24351,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_32subst(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":146
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":146
* yield self.syms[i]
*
* def subst(self, start, children): # <<<<<<<<<<<<<<
@@ -24717,7 +24374,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_31subst(struct __pyx_obj_3_sa_Phrase *__p
__Pyx_RefNannySetupContext("subst", 0);
__Pyx_INCREF(__pyx_v_start);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":148
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":148
* def subst(self, start, children):
* cdef int i
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -24727,7 +24384,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_31subst(struct __pyx_obj_3_sa_Phrase *__p
__pyx_t_1 = __pyx_v_self->n;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":149
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":149
* cdef int i
* for i from 0 <= i < self.n:
* if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<<
@@ -24737,7 +24394,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_31subst(struct __pyx_obj_3_sa_Phrase *__p
__pyx_t_2 = __pyx_f_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i]));
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":150
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":150
* for i from 0 <= i < self.n:
* if sym_isvar(self.syms[i]):
* start = start + children[sym_getindex(self.syms[i])-1] # <<<<<<<<<<<<<<
@@ -24757,7 +24414,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_31subst(struct __pyx_obj_3_sa_Phrase *__p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":152
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":152
* start = start + children[sym_getindex(self.syms[i])-1]
* else:
* start = start + (self.syms[i],) # <<<<<<<<<<<<<<
@@ -24781,7 +24438,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_31subst(struct __pyx_obj_3_sa_Phrase *__p
__pyx_L5:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":153
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":153
* else:
* start = start + (self.syms[i],)
* return start # <<<<<<<<<<<<<<
@@ -24818,7 +24475,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_5words_1__get__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":156
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":156
*
* property words:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -24842,7 +24499,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_5words___get__(struct __pyx_obj_3_sa_Phra
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":157
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":157
* property words:
* def __get__(self):
* return [sym_tostring(w) for w in self if not sym_isvar(w)] # <<<<<<<<<<<<<<
@@ -24863,18 +24520,10 @@ static PyObject *__pyx_pf_3_sa_6Phrase_5words___get__(struct __pyx_obj_3_sa_Phra
for (;;) {
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_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __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_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
if (unlikely(!__pyx_t_5)) {
@@ -24895,7 +24544,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_5words___get__(struct __pyx_obj_3_sa_Phra
__pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
goto __pyx_L5;
}
@@ -24930,14 +24579,14 @@ static int __pyx_pw_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__py
struct __pyx_obj_3_sa_Phrase *__pyx_v_e = 0;
PyObject *__pyx_v_scores = 0;
PyObject *__pyx_v_word_alignments = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lhs,&__pyx_n_s__f,&__pyx_n_s__e,&__pyx_n_s__scores,&__pyx_n_s__word_alignments,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (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__word_alignments,0};
PyObject* values[5] = {0,0,0,0,0};
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":161
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":161
* cdef class Rule:
*
* def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): # <<<<<<<<<<<<<<
@@ -24961,15 +24610,18 @@ static int __pyx_pw_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__py
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--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lhs);
+ if (likely(values[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--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e)) != 0)) kw_args--;
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e);
+ if (likely(values[2])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -25034,7 +24686,7 @@ static int __pyx_pf_3_sa_4Rule___cinit__(struct __pyx_obj_3_sa_Rule *__pyx_v_sel
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":162
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -25063,7 +24715,7 @@ static int __pyx_pf_3_sa_4Rule___cinit__(struct __pyx_obj_3_sa_Rule *__pyx_v_sel
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":163
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":163
* 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 # <<<<<<<<<<<<<<
@@ -25072,7 +24724,7 @@ static int __pyx_pf_3_sa_4Rule___cinit__(struct __pyx_obj_3_sa_Rule *__pyx_v_sel
*/
__pyx_v_self->lhs = __pyx_v_lhs;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":164
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":164
* if not sym_isvar(lhs): raise Exception('Invalid LHS symbol: %d' % lhs)
* self.lhs = lhs
* self.f = f # <<<<<<<<<<<<<<
@@ -25085,7 +24737,7 @@ static int __pyx_pf_3_sa_4Rule___cinit__(struct __pyx_obj_3_sa_Rule *__pyx_v_sel
__Pyx_DECREF(((PyObject *)__pyx_v_self->f));
__pyx_v_self->f = __pyx_v_f;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":165
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":165
* self.lhs = lhs
* self.f = f
* self.e = e # <<<<<<<<<<<<<<
@@ -25098,7 +24750,7 @@ static int __pyx_pf_3_sa_4Rule___cinit__(struct __pyx_obj_3_sa_Rule *__pyx_v_sel
__Pyx_DECREF(((PyObject *)__pyx_v_self->e));
__pyx_v_self->e = __pyx_v_e;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":166
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":166
* self.f = f
* self.e = e
* self.word_alignments = word_alignments # <<<<<<<<<<<<<<
@@ -25111,7 +24763,7 @@ static int __pyx_pf_3_sa_4Rule___cinit__(struct __pyx_obj_3_sa_Rule *__pyx_v_sel
__Pyx_DECREF(__pyx_v_self->word_alignments);
__pyx_v_self->word_alignments = __pyx_v_word_alignments;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":167
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":167
* self.e = e
* self.word_alignments = word_alignments
* self.scores = scores # <<<<<<<<<<<<<<
@@ -25148,7 +24800,7 @@ static Py_hash_t __pyx_pw_3_sa_4Rule_3__hash__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":169
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":169
* self.scores = scores
*
* def __hash__(self): # <<<<<<<<<<<<<<
@@ -25167,7 +24819,7 @@ static Py_hash_t __pyx_pf_3_sa_4Rule_2__hash__(struct __pyx_obj_3_sa_Rule *__pyx
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__hash__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":170
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":170
*
* def __hash__(self):
* return hash((self.lhs, self.f, self.e)) # <<<<<<<<<<<<<<
@@ -25223,7 +24875,7 @@ static int __pyx_pw_3_sa_4Rule_5__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":172
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":172
* return hash((self.lhs, self.f, self.e))
*
* def __cmp__(self, Rule other): # <<<<<<<<<<<<<<
@@ -25244,7 +24896,7 @@ static int __pyx_pf_3_sa_4Rule_4__cmp__(struct __pyx_obj_3_sa_Rule *__pyx_v_self
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cmp__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":173
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":173
*
* def __cmp__(self, Rule other):
* return cmp((self.lhs, self.f, self.e, self.word_alignments), # <<<<<<<<<<<<<<
@@ -25268,7 +24920,7 @@ static int __pyx_pf_3_sa_4Rule_4__cmp__(struct __pyx_obj_3_sa_Rule *__pyx_v_self
__Pyx_GIVEREF(__pyx_v_self->word_alignments);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":174
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":174
* 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)) # <<<<<<<<<<<<<<
@@ -25337,7 +24989,7 @@ static PyObject *__pyx_pw_3_sa_4Rule_7fmerge(PyObject *__pyx_v_self, PyObject *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":176
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":176
* (other.lhs, other.f, other.e, self.word_alignments))
*
* def fmerge(self, Phrase f): # <<<<<<<<<<<<<<
@@ -25355,7 +25007,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_6fmerge(struct __pyx_obj_3_sa_Rule *__pyx_v
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("fmerge", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":177
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":177
*
* def fmerge(self, Phrase f):
* if self.f == f: # <<<<<<<<<<<<<<
@@ -25368,7 +25020,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_6fmerge(struct __pyx_obj_3_sa_Rule *__pyx_v
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":178
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":178
* def fmerge(self, Phrase f):
* if self.f == f:
* self.f = f # <<<<<<<<<<<<<<
@@ -25407,7 +25059,7 @@ static PyObject *__pyx_pw_3_sa_4Rule_9arity(PyObject *__pyx_v_self, CYTHON_UNUSE
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":180
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":180
* self.f = f
*
* def arity(self): # <<<<<<<<<<<<<<
@@ -25425,7 +25077,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_8arity(struct __pyx_obj_3_sa_Rule *__pyx_v_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("arity", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":181
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":181
*
* def arity(self):
* return self.f.arity() # <<<<<<<<<<<<<<
@@ -25467,7 +25119,7 @@ static PyObject *__pyx_pw_3_sa_4Rule_11__str__(PyObject *__pyx_v_self) {
}
static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":187
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":187
* 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())) # <<<<<<<<<<<<<<
@@ -25548,18 +25200,10 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator7(__pyx_GeneratorObject
for (;;) {
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++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __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++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_2 = __pyx_t_4(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
@@ -25607,12 +25251,11 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator7(__pyx_GeneratorObject
__pyx_L0:;
__Pyx_XDECREF(__pyx_r);
__pyx_generator->resume_label = -1;
- __Pyx_Generator_clear((PyObject*)__pyx_generator);
__Pyx_RefNannyFinishContext();
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":183
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":183
* return self.f.arity()
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -25646,7 +25289,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx
__Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
__Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":185
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":185
* def __str__(self):
* cdef unsigned i
* fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)] # <<<<<<<<<<<<<<
@@ -25696,7 +25339,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx
__pyx_v_fields = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":186
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":186
* cdef unsigned i
* fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)]
* if self.word_alignments is not None: # <<<<<<<<<<<<<<
@@ -25706,7 +25349,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx
__pyx_t_6 = (__pyx_cur_scope->__pyx_v_self->word_alignments != Py_None);
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":187
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":187
* 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())) # <<<<<<<<<<<<<<
@@ -25732,7 +25375,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":188
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":188
* if self.word_alignments is not None:
* fields.append(' '.join('%d-%d' % a for a in self.alignments()))
* return ' ||| '.join(fields) # <<<<<<<<<<<<<<
@@ -25785,7 +25428,7 @@ static PyObject *__pyx_pw_3_sa_4Rule_13alignments(PyObject *__pyx_v_self, CYTHON
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":190
+/* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":190
* return ' ||| '.join(fields)
*
* def alignments(self): # <<<<<<<<<<<<<<
@@ -25851,7 +25494,7 @@ static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_g
__pyx_L3_first_run:;
if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":191
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":191
*
* def alignments(self):
* for point in self.word_alignments: # <<<<<<<<<<<<<<
@@ -25868,18 +25511,10 @@ static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_g
for (;;) {
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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __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)) {
@@ -25897,7 +25532,7 @@ static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_g
__pyx_cur_scope->__pyx_v_point = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":192
+ /* "/home/vchahune/tools/cdec/python/src/sa/rule.pxi":192
* def alignments(self):
* for point in self.word_alignments:
* yield point/65536, point%65536 # <<<<<<<<<<<<<<
@@ -25945,7 +25580,6 @@ static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_g
__pyx_L0:;
__Pyx_XDECREF(__pyx_r);
__pyx_generator->resume_label = -1;
- __Pyx_Generator_clear((PyObject*)__pyx_generator);
__Pyx_RefNannyFinishContext();
return NULL;
}
@@ -26012,7 +25646,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_1e___get__(struct __pyx_obj_3_sa_Rule *__py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":21
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":21
* int arr_len
*
* cdef _Trie_Node* new_trie_node(): # <<<<<<<<<<<<<<
@@ -26026,7 +25660,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_new_trie_node(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("new_trie_node", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":23
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":23
* cdef _Trie_Node* new_trie_node():
* cdef _Trie_Node* node
* node = <_Trie_Node*> malloc(sizeof(_Trie_Node)) # <<<<<<<<<<<<<<
@@ -26035,7 +25669,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_new_trie_node(void) {
*/
__pyx_v_node = ((struct __pyx_t_3_sa__Trie_Node *)malloc((sizeof(struct __pyx_t_3_sa__Trie_Node))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":24
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":24
* cdef _Trie_Node* node
* node = <_Trie_Node*> malloc(sizeof(_Trie_Node))
* node.root = NULL # <<<<<<<<<<<<<<
@@ -26044,7 +25678,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_new_trie_node(void) {
*/
__pyx_v_node->root = NULL;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":25
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":25
* node = <_Trie_Node*> malloc(sizeof(_Trie_Node))
* node.root = NULL
* node.arr_len = 0 # <<<<<<<<<<<<<<
@@ -26053,7 +25687,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_new_trie_node(void) {
*/
__pyx_v_node->arr_len = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":26
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":26
* node.root = NULL
* node.arr_len = 0
* node.arr = <int*> malloc(sizeof(0*sizeof(int))) # <<<<<<<<<<<<<<
@@ -26062,7 +25696,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_new_trie_node(void) {
*/
__pyx_v_node->arr = ((int *)malloc((sizeof((0 * (sizeof(int)))))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":27
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":27
* node.arr_len = 0
* node.arr = <int*> malloc(sizeof(0*sizeof(int)))
* return node # <<<<<<<<<<<<<<
@@ -26078,7 +25712,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_new_trie_node(void) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":29
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":29
* return node
*
* cdef _Trie_Edge* new_trie_edge(int val): # <<<<<<<<<<<<<<
@@ -26092,7 +25726,7 @@ static struct __pyx_t_3_sa__Trie_Edge *__pyx_f_3_sa_new_trie_edge(int __pyx_v_va
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("new_trie_edge", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":31
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":31
* cdef _Trie_Edge* new_trie_edge(int val):
* cdef _Trie_Edge* edge
* edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge)) # <<<<<<<<<<<<<<
@@ -26101,7 +25735,7 @@ static struct __pyx_t_3_sa__Trie_Edge *__pyx_f_3_sa_new_trie_edge(int __pyx_v_va
*/
__pyx_v_edge = ((struct __pyx_t_3_sa__Trie_Edge *)malloc((sizeof(struct __pyx_t_3_sa__Trie_Edge))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":32
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":32
* cdef _Trie_Edge* edge
* edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge))
* edge.node = new_trie_node() # <<<<<<<<<<<<<<
@@ -26110,7 +25744,7 @@ static struct __pyx_t_3_sa__Trie_Edge *__pyx_f_3_sa_new_trie_edge(int __pyx_v_va
*/
__pyx_v_edge->node = __pyx_f_3_sa_new_trie_node();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":33
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":33
* edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge))
* edge.node = new_trie_node()
* edge.bigger = NULL # <<<<<<<<<<<<<<
@@ -26119,7 +25753,7 @@ static struct __pyx_t_3_sa__Trie_Edge *__pyx_f_3_sa_new_trie_edge(int __pyx_v_va
*/
__pyx_v_edge->bigger = NULL;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":34
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":34
* edge.node = new_trie_node()
* edge.bigger = NULL
* edge.smaller = NULL # <<<<<<<<<<<<<<
@@ -26128,7 +25762,7 @@ static struct __pyx_t_3_sa__Trie_Edge *__pyx_f_3_sa_new_trie_edge(int __pyx_v_va
*/
__pyx_v_edge->smaller = NULL;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":35
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":35
* edge.bigger = NULL
* edge.smaller = NULL
* edge.val = val # <<<<<<<<<<<<<<
@@ -26137,7 +25771,7 @@ static struct __pyx_t_3_sa__Trie_Edge *__pyx_f_3_sa_new_trie_edge(int __pyx_v_va
*/
__pyx_v_edge->val = __pyx_v_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":36
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":36
* edge.smaller = NULL
* edge.val = val
* return edge # <<<<<<<<<<<<<<
@@ -26153,7 +25787,7 @@ static struct __pyx_t_3_sa__Trie_Edge *__pyx_f_3_sa_new_trie_edge(int __pyx_v_va
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":38
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":38
* return edge
*
* cdef free_trie_node(_Trie_Node* node): # <<<<<<<<<<<<<<
@@ -26171,7 +25805,7 @@ static PyObject *__pyx_f_3_sa_free_trie_node(struct __pyx_t_3_sa__Trie_Node *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("free_trie_node", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":39
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":39
*
* cdef free_trie_node(_Trie_Node* node):
* if node != NULL: # <<<<<<<<<<<<<<
@@ -26181,7 +25815,7 @@ static PyObject *__pyx_f_3_sa_free_trie_node(struct __pyx_t_3_sa__Trie_Node *__p
__pyx_t_1 = (__pyx_v_node != NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":40
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":40
* cdef free_trie_node(_Trie_Node* node):
* if node != NULL:
* free_trie_edge(node.root) # <<<<<<<<<<<<<<
@@ -26192,7 +25826,7 @@ static PyObject *__pyx_f_3_sa_free_trie_node(struct __pyx_t_3_sa__Trie_Node *__p
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":41
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":41
* if node != NULL:
* free_trie_edge(node.root)
* free(node.arr) # <<<<<<<<<<<<<<
@@ -26216,7 +25850,7 @@ static PyObject *__pyx_f_3_sa_free_trie_node(struct __pyx_t_3_sa__Trie_Node *__p
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":43
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":43
* free(node.arr)
*
* cdef free_trie_edge(_Trie_Edge* edge): # <<<<<<<<<<<<<<
@@ -26234,7 +25868,7 @@ static PyObject *__pyx_f_3_sa_free_trie_edge(struct __pyx_t_3_sa__Trie_Edge *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("free_trie_edge", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":44
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":44
*
* cdef free_trie_edge(_Trie_Edge* edge):
* if edge != NULL: # <<<<<<<<<<<<<<
@@ -26244,7 +25878,7 @@ static PyObject *__pyx_f_3_sa_free_trie_edge(struct __pyx_t_3_sa__Trie_Edge *__p
__pyx_t_1 = (__pyx_v_edge != NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":45
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":45
* cdef free_trie_edge(_Trie_Edge* edge):
* if edge != NULL:
* free_trie_node(edge.node) # <<<<<<<<<<<<<<
@@ -26255,7 +25889,7 @@ static PyObject *__pyx_f_3_sa_free_trie_edge(struct __pyx_t_3_sa__Trie_Edge *__p
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":46
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":46
* if edge != NULL:
* free_trie_node(edge.node)
* free_trie_edge(edge.bigger) # <<<<<<<<<<<<<<
@@ -26266,7 +25900,7 @@ static PyObject *__pyx_f_3_sa_free_trie_edge(struct __pyx_t_3_sa__Trie_Edge *__p
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":47
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":47
* free_trie_node(edge.node)
* free_trie_edge(edge.bigger)
* free_trie_edge(edge.smaller) # <<<<<<<<<<<<<<
@@ -26292,7 +25926,7 @@ static PyObject *__pyx_f_3_sa_free_trie_edge(struct __pyx_t_3_sa__Trie_Edge *__p
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":49
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":49
* free_trie_edge(edge.smaller)
*
* cdef _Trie_Node* trie_find(_Trie_Node* node, int val): # <<<<<<<<<<<<<<
@@ -26309,7 +25943,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
int __pyx_t_3;
__Pyx_RefNannySetupContext("trie_find", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":51
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":51
* cdef _Trie_Node* trie_find(_Trie_Node* node, int val):
* cdef _Trie_Edge* cur
* cur = node.root # <<<<<<<<<<<<<<
@@ -26318,7 +25952,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
*/
__pyx_v_cur = __pyx_v_node->root;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":52
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":52
* cdef _Trie_Edge* cur
* cur = node.root
* while cur != NULL and cur.val != val: # <<<<<<<<<<<<<<
@@ -26335,7 +25969,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
}
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":53
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":53
* cur = node.root
* while cur != NULL and cur.val != val:
* if val > cur.val: # <<<<<<<<<<<<<<
@@ -26345,7 +25979,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
__pyx_t_3 = (__pyx_v_val > __pyx_v_cur->val);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":54
* while cur != NULL and cur.val != val:
* if val > cur.val:
* cur = cur.bigger # <<<<<<<<<<<<<<
@@ -26356,7 +25990,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
goto __pyx_L5;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":55
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":55
* if val > cur.val:
* cur = cur.bigger
* elif val < cur.val: # <<<<<<<<<<<<<<
@@ -26366,7 +26000,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
__pyx_t_3 = (__pyx_v_val < __pyx_v_cur->val);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":56
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":56
* cur = cur.bigger
* elif val < cur.val:
* cur = cur.smaller # <<<<<<<<<<<<<<
@@ -26379,7 +26013,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
__pyx_L5:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":57
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":57
* elif val < cur.val:
* cur = cur.smaller
* if cur == NULL: # <<<<<<<<<<<<<<
@@ -26389,7 +26023,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
__pyx_t_3 = (__pyx_v_cur == NULL);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":58
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":58
* cur = cur.smaller
* if cur == NULL:
* return NULL # <<<<<<<<<<<<<<
@@ -26402,7 +26036,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":60
* return NULL
* else:
* return cur.node # <<<<<<<<<<<<<<
@@ -26420,7 +26054,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":62
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":62
* return cur.node
*
* cdef trie_node_data_append(_Trie_Node* node, int val): # <<<<<<<<<<<<<<
@@ -26434,7 +26068,7 @@ static PyObject *__pyx_f_3_sa_trie_node_data_append(struct __pyx_t_3_sa__Trie_No
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("trie_node_data_append", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":64
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":64
* cdef trie_node_data_append(_Trie_Node* node, int val):
* cdef int new_len
* new_len = node.arr_len + 1 # <<<<<<<<<<<<<<
@@ -26443,7 +26077,7 @@ static PyObject *__pyx_f_3_sa_trie_node_data_append(struct __pyx_t_3_sa__Trie_No
*/
__pyx_v_new_len = (__pyx_v_node->arr_len + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":65
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":65
* cdef int new_len
* new_len = node.arr_len + 1
* node.arr = <int*> realloc(node.arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -26452,7 +26086,7 @@ static PyObject *__pyx_f_3_sa_trie_node_data_append(struct __pyx_t_3_sa__Trie_No
*/
__pyx_v_node->arr = ((int *)realloc(__pyx_v_node->arr, (__pyx_v_new_len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":66
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":66
* new_len = node.arr_len + 1
* node.arr = <int*> realloc(node.arr, new_len*sizeof(int))
* node.arr[node.arr_len] = val # <<<<<<<<<<<<<<
@@ -26461,7 +26095,7 @@ static PyObject *__pyx_f_3_sa_trie_node_data_append(struct __pyx_t_3_sa__Trie_No
*/
(__pyx_v_node->arr[__pyx_v_node->arr_len]) = __pyx_v_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":67
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":67
* node.arr = <int*> realloc(node.arr, new_len*sizeof(int))
* node.arr[node.arr_len] = val
* node.arr_len = new_len # <<<<<<<<<<<<<<
@@ -26476,7 +26110,7 @@ static PyObject *__pyx_f_3_sa_trie_node_data_append(struct __pyx_t_3_sa__Trie_No
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":69
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":69
* node.arr_len = new_len
*
* cdef trie_node_data_extend(_Trie_Node* node, int* vals, int num_vals): # <<<<<<<<<<<<<<
@@ -26490,7 +26124,7 @@ static PyObject *__pyx_f_3_sa_trie_node_data_extend(struct __pyx_t_3_sa__Trie_No
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("trie_node_data_extend", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":71
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -26499,7 +26133,7 @@ static PyObject *__pyx_f_3_sa_trie_node_data_extend(struct __pyx_t_3_sa__Trie_No
*/
__pyx_v_new_len = (__pyx_v_node->arr_len + __pyx_v_num_vals);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":72
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":72
* cdef int new_len
* new_len = node.arr_len + num_vals
* node.arr = <int*> realloc(node.arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -26508,7 +26142,7 @@ static PyObject *__pyx_f_3_sa_trie_node_data_extend(struct __pyx_t_3_sa__Trie_No
*/
__pyx_v_node->arr = ((int *)realloc(__pyx_v_node->arr, (__pyx_v_new_len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":73
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":73
* new_len = node.arr_len + num_vals
* node.arr = <int*> realloc(node.arr, new_len*sizeof(int))
* memcpy(node.arr + node.arr_len, vals, num_vals*sizeof(int)) # <<<<<<<<<<<<<<
@@ -26517,7 +26151,7 @@ static PyObject *__pyx_f_3_sa_trie_node_data_extend(struct __pyx_t_3_sa__Trie_No
*/
memcpy((__pyx_v_node->arr + __pyx_v_node->arr_len), __pyx_v_vals, (__pyx_v_num_vals * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":74
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":74
* node.arr = <int*> realloc(node.arr, new_len*sizeof(int))
* memcpy(node.arr + node.arr_len, vals, num_vals*sizeof(int))
* node.arr_len = new_len # <<<<<<<<<<<<<<
@@ -26532,7 +26166,7 @@ static PyObject *__pyx_f_3_sa_trie_node_data_extend(struct __pyx_t_3_sa__Trie_No
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":77
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":77
*
*
* cdef _Trie_Node* trie_insert(_Trie_Node* node, int val): # <<<<<<<<<<<<<<
@@ -26549,7 +26183,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
int __pyx_t_3;
__Pyx_RefNannySetupContext("trie_insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":79
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":79
* cdef _Trie_Node* trie_insert(_Trie_Node* node, int val):
* cdef _Trie_Edge** cur
* cur = &node.root # <<<<<<<<<<<<<<
@@ -26558,7 +26192,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
*/
__pyx_v_cur = (&__pyx_v_node->root);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":80
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":80
* cdef _Trie_Edge** cur
* cur = &node.root
* while cur[0] != NULL and cur[0].val != val: # <<<<<<<<<<<<<<
@@ -26575,7 +26209,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
}
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":81
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":81
* cur = &node.root
* while cur[0] != NULL and cur[0].val != val:
* if val > cur[0].val: # <<<<<<<<<<<<<<
@@ -26585,7 +26219,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
__pyx_t_3 = (__pyx_v_val > (__pyx_v_cur[0])->val);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":82
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":82
* while cur[0] != NULL and cur[0].val != val:
* if val > cur[0].val:
* cur = &cur[0].bigger # <<<<<<<<<<<<<<
@@ -26596,7 +26230,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
goto __pyx_L5;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":83
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":83
* if val > cur[0].val:
* cur = &cur[0].bigger
* elif val < cur[0].val: # <<<<<<<<<<<<<<
@@ -26606,7 +26240,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
__pyx_t_3 = (__pyx_v_val < (__pyx_v_cur[0])->val);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":84
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":84
* cur = &cur[0].bigger
* elif val < cur[0].val:
* cur = &cur[0].smaller # <<<<<<<<<<<<<<
@@ -26619,7 +26253,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
__pyx_L5:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":85
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":85
* elif val < cur[0].val:
* cur = &cur[0].smaller
* if cur[0] == NULL: # <<<<<<<<<<<<<<
@@ -26629,7 +26263,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
__pyx_t_3 = ((__pyx_v_cur[0]) == NULL);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":86
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":86
* cur = &cur[0].smaller
* if cur[0] == NULL:
* cur[0] = new_trie_edge(val) # <<<<<<<<<<<<<<
@@ -26641,7 +26275,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":87
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":87
* if cur[0] == NULL:
* cur[0] = new_trie_edge(val)
* return cur[0].node # <<<<<<<<<<<<<<
@@ -26657,7 +26291,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":89
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":89
* return cur[0].node
*
* cdef trie_node_to_map(_Trie_Node* node, result, prefix, int include_zeros): # <<<<<<<<<<<<<<
@@ -26677,7 +26311,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("trie_node_to_map", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":92
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":92
* cdef IntList arr
*
* if include_zeros or node.arr_len > 0: # <<<<<<<<<<<<<<
@@ -26692,7 +26326,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":93
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":93
*
* if include_zeros or node.arr_len > 0:
* arr = IntList() # <<<<<<<<<<<<<<
@@ -26704,7 +26338,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
__pyx_v_arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":94
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":94
* if include_zeros or node.arr_len > 0:
* arr = IntList()
* free(arr.arr) # <<<<<<<<<<<<<<
@@ -26713,7 +26347,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
*/
free(__pyx_v_arr->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":95
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":95
* arr = IntList()
* free(arr.arr)
* arr.arr = <int*> malloc(node.arr_len * sizeof(int)) # <<<<<<<<<<<<<<
@@ -26722,7 +26356,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
*/
__pyx_v_arr->arr = ((int *)malloc((__pyx_v_node->arr_len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":96
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":96
* free(arr.arr)
* arr.arr = <int*> malloc(node.arr_len * sizeof(int))
* memcpy(arr.arr, node.arr, node.arr_len * sizeof(int)) # <<<<<<<<<<<<<<
@@ -26731,7 +26365,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
*/
memcpy(__pyx_v_arr->arr, __pyx_v_node->arr, (__pyx_v_node->arr_len * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":97
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":97
* arr.arr = <int*> malloc(node.arr_len * sizeof(int))
* memcpy(arr.arr, node.arr, node.arr_len * sizeof(int))
* arr.len = node.arr_len # <<<<<<<<<<<<<<
@@ -26740,7 +26374,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
*/
__pyx_v_arr->len = __pyx_v_node->arr_len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":98
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":98
* memcpy(arr.arr, node.arr, node.arr_len * sizeof(int))
* arr.len = node.arr_len
* arr.size = node.arr_len # <<<<<<<<<<<<<<
@@ -26749,7 +26383,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
*/
__pyx_v_arr->size = __pyx_v_node->arr_len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":99
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":99
* arr.len = node.arr_len
* arr.size = node.arr_len
* result[prefix] = arr # <<<<<<<<<<<<<<
@@ -26761,7 +26395,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":100
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":100
* arr.size = node.arr_len
* result[prefix] = arr
* trie_edge_to_map(node.root, result, prefix, include_zeros) # <<<<<<<<<<<<<<
@@ -26785,7 +26419,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":102
+/* "/home/vchahune/tools/cdec/python/src/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): # <<<<<<<<<<<<<<
@@ -26805,7 +26439,7 @@ static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *_
__Pyx_RefNannySetupContext("trie_edge_to_map", 0);
__Pyx_INCREF(__pyx_v_prefix);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":103
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":103
*
* cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros):
* if edge != NULL: # <<<<<<<<<<<<<<
@@ -26815,7 +26449,7 @@ static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *_
__pyx_t_1 = (__pyx_v_edge != NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":104
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -26826,7 +26460,7 @@ static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *_
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":105
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -26837,7 +26471,7 @@ static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *_
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":106
+ /* "/home/vchahune/tools/cdec/python/src/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,) # <<<<<<<<<<<<<<
@@ -26858,7 +26492,7 @@ static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *_
__pyx_v_prefix = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":107
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -26890,11 +26524,11 @@ static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *_
static int __pyx_pw_3_sa_7TrieMap_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3_sa_7TrieMap_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_alphabet_size;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__alphabet_size,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__alphabet_size,0};
PyObject* values[1] = {0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -26907,7 +26541,8 @@ static int __pyx_pw_3_sa_7TrieMap_1__cinit__(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__alphabet_size)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alphabet_size);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
@@ -26933,7 +26568,7 @@ static int __pyx_pw_3_sa_7TrieMap_1__cinit__(PyObject *__pyx_v_self, PyObject *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":114
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":114
* cdef int V
*
* def __cinit__(self, int alphabet_size): # <<<<<<<<<<<<<<
@@ -26946,7 +26581,7 @@ static int __pyx_pf_3_sa_7TrieMap___cinit__(struct __pyx_obj_3_sa_TrieMap *__pyx
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":115
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":115
*
* def __cinit__(self, int alphabet_size):
* self.V = alphabet_size # <<<<<<<<<<<<<<
@@ -26955,7 +26590,7 @@ static int __pyx_pf_3_sa_7TrieMap___cinit__(struct __pyx_obj_3_sa_TrieMap *__pyx
*/
__pyx_v_self->V = __pyx_v_alphabet_size;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":116
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":116
* def __cinit__(self, int alphabet_size):
* self.V = alphabet_size
* self.root = <_Trie_Node**> malloc(self.V * sizeof(_Trie_Node*)) # <<<<<<<<<<<<<<
@@ -26964,7 +26599,7 @@ static int __pyx_pf_3_sa_7TrieMap___cinit__(struct __pyx_obj_3_sa_TrieMap *__pyx
*/
__pyx_v_self->root = ((struct __pyx_t_3_sa__Trie_Node **)malloc((__pyx_v_self->V * (sizeof(struct __pyx_t_3_sa__Trie_Node *)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":117
+ /* "/home/vchahune/tools/cdec/python/src/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*)) # <<<<<<<<<<<<<<
@@ -26987,7 +26622,7 @@ static void __pyx_pw_3_sa_7TrieMap_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":120
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":120
*
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -27006,7 +26641,7 @@ static void __pyx_pf_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_3_sa_TrieMap *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":122
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":122
* def __dealloc__(self):
* cdef int i
* for i from 0 <= i < self.V: # <<<<<<<<<<<<<<
@@ -27016,7 +26651,7 @@ static void __pyx_pf_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_3_sa_TrieMap *_
__pyx_t_1 = __pyx_v_self->V;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":123
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":123
* cdef int i
* for i from 0 <= i < self.V:
* if self.root[i] != NULL: # <<<<<<<<<<<<<<
@@ -27026,7 +26661,7 @@ static void __pyx_pf_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_3_sa_TrieMap *_
__pyx_t_2 = ((__pyx_v_self->root[__pyx_v_i]) != NULL);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":124
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":124
* for i from 0 <= i < self.V:
* if self.root[i] != NULL:
* free_trie_node(self.root[i]) # <<<<<<<<<<<<<<
@@ -27041,7 +26676,7 @@ static void __pyx_pf_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_3_sa_TrieMap *_
__pyx_L5:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":125
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":125
* if self.root[i] != NULL:
* free_trie_node(self.root[i])
* free(self.root) # <<<<<<<<<<<<<<
@@ -27069,7 +26704,7 @@ static PyObject *__pyx_pw_3_sa_7TrieMap_5insert(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":128
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":128
*
*
* def insert(self, pattern): # <<<<<<<<<<<<<<
@@ -27092,7 +26727,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":131
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":131
* cdef int* p
* cdef int i, l
* l = len(pattern) # <<<<<<<<<<<<<<
@@ -27102,7 +26737,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *_
__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":132
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":132
* cdef int i, l
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int)) # <<<<<<<<<<<<<<
@@ -27111,7 +26746,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *_
*/
__pyx_v_p = ((int *)malloc((__pyx_v_l * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":133
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":133
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l: # <<<<<<<<<<<<<<
@@ -27121,7 +26756,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *_
__pyx_t_2 = __pyx_v_l;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":134
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":134
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l:
* p[i] = pattern[i] # <<<<<<<<<<<<<<
@@ -27135,7 +26770,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *_
(__pyx_v_p[__pyx_v_i]) = __pyx_t_4;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":135
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":135
* for i from 0 <= i < l:
* p[i] = pattern[i]
* self._insert(p,l) # <<<<<<<<<<<<<<
@@ -27144,7 +26779,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *_
*/
((struct __pyx_vtabstruct_3_sa_TrieMap *)__pyx_v_self->__pyx_vtab)->_insert(__pyx_v_self, __pyx_v_p, __pyx_v_l);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":136
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":136
* p[i] = pattern[i]
* self._insert(p,l)
* free(p) # <<<<<<<<<<<<<<
@@ -27165,7 +26800,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":139
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":139
*
*
* cdef _Trie_Node* _insert(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<<
@@ -27182,7 +26817,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__insert(struct __py
int __pyx_t_2;
__Pyx_RefNannySetupContext("_insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":142
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":142
* cdef int i
* cdef _Trie_Node* node
* if self.root[pattern[0]] == NULL: # <<<<<<<<<<<<<<
@@ -27192,7 +26827,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__insert(struct __py
__pyx_t_1 = ((__pyx_v_self->root[(__pyx_v_pattern[0])]) == NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":143
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":143
* cdef _Trie_Node* node
* if self.root[pattern[0]] == NULL:
* self.root[pattern[0]] = new_trie_node() # <<<<<<<<<<<<<<
@@ -27204,7 +26839,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__insert(struct __py
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":144
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":144
* if self.root[pattern[0]] == NULL:
* self.root[pattern[0]] = new_trie_node()
* node = self.root[pattern[0]] # <<<<<<<<<<<<<<
@@ -27213,7 +26848,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__insert(struct __py
*/
__pyx_v_node = (__pyx_v_self->root[(__pyx_v_pattern[0])]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":145
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":145
* self.root[pattern[0]] = new_trie_node()
* node = self.root[pattern[0]]
* for i from 1 <= i < pattern_len: # <<<<<<<<<<<<<<
@@ -27223,7 +26858,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__insert(struct __py
__pyx_t_2 = __pyx_v_pattern_len;
for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":146
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":146
* node = self.root[pattern[0]]
* for i from 1 <= i < pattern_len:
* node = trie_insert(node, pattern[i]) # <<<<<<<<<<<<<<
@@ -27233,7 +26868,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__insert(struct __py
__pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, (__pyx_v_pattern[__pyx_v_i]));
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":147
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":147
* for i from 1 <= i < pattern_len:
* node = trie_insert(node, pattern[i])
* return node # <<<<<<<<<<<<<<
@@ -27260,7 +26895,7 @@ static PyObject *__pyx_pw_3_sa_7TrieMap_7contains(PyObject *__pyx_v_self, PyObje
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":149
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":149
* return node
*
* def contains(self, pattern): # <<<<<<<<<<<<<<
@@ -27285,7 +26920,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("contains", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":153
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":153
* cdef int i, l
* cdef _Trie_Node* node
* l = len(pattern) # <<<<<<<<<<<<<<
@@ -27295,7 +26930,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":154
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":154
* cdef _Trie_Node* node
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int)) # <<<<<<<<<<<<<<
@@ -27304,7 +26939,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
*/
__pyx_v_p = ((int *)malloc((__pyx_v_l * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":155
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":155
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l: # <<<<<<<<<<<<<<
@@ -27314,7 +26949,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
__pyx_t_2 = __pyx_v_l;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":156
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":156
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l:
* p[i] = pattern[i] # <<<<<<<<<<<<<<
@@ -27328,7 +26963,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
(__pyx_v_p[__pyx_v_i]) = __pyx_t_4;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":157
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":157
* for i from 0 <= i < l:
* p[i] = pattern[i]
* node = self._contains(p,l) # <<<<<<<<<<<<<<
@@ -27337,7 +26972,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
*/
__pyx_v_node = ((struct __pyx_vtabstruct_3_sa_TrieMap *)__pyx_v_self->__pyx_vtab)->_contains(__pyx_v_self, __pyx_v_p, __pyx_v_l);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":158
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":158
* p[i] = pattern[i]
* node = self._contains(p,l)
* free(p) # <<<<<<<<<<<<<<
@@ -27346,7 +26981,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
*/
free(__pyx_v_p);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":159
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":159
* node = self._contains(p,l)
* free(p)
* if node == NULL: # <<<<<<<<<<<<<<
@@ -27356,7 +26991,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
__pyx_t_5 = (__pyx_v_node == NULL);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":160
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":160
* free(p)
* if node == NULL:
* return False # <<<<<<<<<<<<<<
@@ -27373,7 +27008,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":162
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":162
* return False
* else:
* return True # <<<<<<<<<<<<<<
@@ -27401,7 +27036,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":164
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":164
* return True
*
* cdef _Trie_Node* _contains(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<<
@@ -27419,7 +27054,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__contains(struct __
int __pyx_t_3;
__Pyx_RefNannySetupContext("_contains", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":167
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":167
* cdef int i
* cdef _Trie_Node* node
* node = self.root[pattern[0]] # <<<<<<<<<<<<<<
@@ -27428,7 +27063,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__contains(struct __
*/
__pyx_v_node = (__pyx_v_self->root[(__pyx_v_pattern[0])]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":168
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":168
* cdef _Trie_Node* node
* node = self.root[pattern[0]]
* i = 1 # <<<<<<<<<<<<<<
@@ -27437,7 +27072,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__contains(struct __
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":169
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":169
* node = self.root[pattern[0]]
* i = 1
* while node != NULL and i < pattern_len: # <<<<<<<<<<<<<<
@@ -27454,7 +27089,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__contains(struct __
}
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":170
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":170
* i = 1
* while node != NULL and i < pattern_len:
* node = trie_find(node, pattern[i]) # <<<<<<<<<<<<<<
@@ -27463,7 +27098,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__contains(struct __
*/
__pyx_v_node = __pyx_f_3_sa_trie_find(__pyx_v_node, (__pyx_v_pattern[__pyx_v_i]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":171
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":171
* while node != NULL and i < pattern_len:
* node = trie_find(node, pattern[i])
* i = i+1 # <<<<<<<<<<<<<<
@@ -27473,7 +27108,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__contains(struct __
__pyx_v_i = (__pyx_v_i + 1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":172
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":172
* node = trie_find(node, pattern[i])
* i = i+1
* return node # <<<<<<<<<<<<<<
@@ -27500,7 +27135,7 @@ static PyObject *__pyx_pw_3_sa_7TrieMap_9toMap(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":174
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":174
* return node
*
* def toMap(self, flag): # <<<<<<<<<<<<<<
@@ -27523,7 +27158,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("toMap", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":177
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":177
* cdef int i, include_zeros
*
* if flag: # <<<<<<<<<<<<<<
@@ -27533,7 +27168,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
__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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":178
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":178
*
* if flag:
* include_zeros=1 # <<<<<<<<<<<<<<
@@ -27545,7 +27180,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":180
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":180
* include_zeros=1
* else:
* include_zeros=0 # <<<<<<<<<<<<<<
@@ -27556,7 +27191,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":181
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":181
* else:
* include_zeros=0
* result = {} # <<<<<<<<<<<<<<
@@ -27568,7 +27203,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":182
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":182
* include_zeros=0
* result = {}
* for i from 0 <= i < self.V: # <<<<<<<<<<<<<<
@@ -27578,7 +27213,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
__pyx_t_3 = __pyx_v_self->V;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":183
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":183
* result = {}
* for i from 0 <= i < self.V:
* if self.root[i] != NULL: # <<<<<<<<<<<<<<
@@ -27588,7 +27223,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
__pyx_t_1 = ((__pyx_v_self->root[__pyx_v_i]) != NULL);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":184
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -27611,7 +27246,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
__pyx_L6:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":185
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":185
* if self.root[i] != NULL:
* trie_node_to_map(self.root[i], result, (i,), include_zeros)
* return result # <<<<<<<<<<<<<<
@@ -27649,14 +27284,14 @@ static int __pyx_pw_3_sa_14Precomputation_1__cinit__(PyObject *__pyx_v_self, PyO
PyObject *__pyx_v_max_nonterminals = 0;
PyObject *__pyx_v_train_max_initial_size = 0;
PyObject *__pyx_v_train_min_gap_size = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fsarray,&__pyx_n_s__from_stats,&__pyx_n_s__from_binary,&__pyx_n_s__precompute_rank,&__pyx_n_s_70,&__pyx_n_s__max_length,&__pyx_n_s__max_nonterminals,&__pyx_n_s_71,&__pyx_n_s__train_min_gap_size,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fsarray,&__pyx_n_s__from_stats,&__pyx_n_s__from_binary,&__pyx_n_s__precompute_rank,&__pyx_n_s_70,&__pyx_n_s__max_length,&__pyx_n_s__max_nonterminals,&__pyx_n_s_71,&__pyx_n_s__train_min_gap_size,0};
PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":200
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":200
* cdef write_map(self, m, FILE* f)
*
* def __cinit__(self, fsarray=None, from_stats=None, from_binary=None, # <<<<<<<<<<<<<<
@@ -27790,7 +27425,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":204
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -27800,7 +27435,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
__pyx_t_1 = __Pyx_PyInt_AsInt(__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":205
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -27810,7 +27445,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
__pyx_t_1 = __Pyx_PyInt_AsInt(__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":206
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":206
* self.precompute_rank = precompute_rank
* self.precompute_secondary_rank = precompute_secondary_rank
* self.max_length = max_length # <<<<<<<<<<<<<<
@@ -27820,7 +27455,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
__pyx_t_1 = __Pyx_PyInt_AsInt(__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":207
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":207
* self.precompute_secondary_rank = precompute_secondary_rank
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals # <<<<<<<<<<<<<<
@@ -27830,7 +27465,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
__pyx_t_1 = __Pyx_PyInt_AsInt(__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":208
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":208
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals
* self.train_max_initial_size = train_max_initial_size # <<<<<<<<<<<<<<
@@ -27840,7 +27475,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
__pyx_t_1 = __Pyx_PyInt_AsInt(__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":209
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -27850,7 +27485,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
__pyx_t_1 = __Pyx_PyInt_AsInt(__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":210
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -27860,7 +27495,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
__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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":211
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":211
* self.train_min_gap_size = train_min_gap_size
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -27882,7 +27517,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":212
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":212
* if from_binary:
* self.read_binary(from_binary)
* elif from_stats: # <<<<<<<<<<<<<<
@@ -27892,7 +27527,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
__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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":213
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":213
* self.read_binary(from_binary)
* elif from_stats:
* self.precompute(from_stats, fsarray) # <<<<<<<<<<<<<<
@@ -27952,7 +27587,7 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_3read_binary(PyObject *__pyx_v_s
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":216
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":216
*
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -27970,7 +27605,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":218
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":218
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -27979,7 +27614,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__r);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":219
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":219
* cdef FILE* f
* f = fopen(filename, "r")
* fread(&(self.precompute_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -27988,7 +27623,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
*/
fread((&__pyx_v_self->precompute_rank), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":220
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -27997,7 +27632,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
*/
fread((&__pyx_v_self->precompute_secondary_rank), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":221
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28006,7 +27641,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
*/
fread((&__pyx_v_self->max_length), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":222
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28015,7 +27650,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
*/
fread((&__pyx_v_self->max_nonterminals), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":223
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28024,7 +27659,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
*/
fread((&__pyx_v_self->train_max_initial_size), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":224
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28033,7 +27668,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
*/
fread((&__pyx_v_self->train_min_gap_size), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":225
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28048,7 +27683,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
__pyx_v_self->precomputed_index = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":226
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28063,7 +27698,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
__pyx_v_self->precomputed_collocations = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":227
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":227
* self.precomputed_index = self.read_map(f)
* self.precomputed_collocations = self.read_map(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -28105,7 +27740,7 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_5write_binary(PyObject *__pyx_v_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":230
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":230
*
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -28124,7 +27759,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":232
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":232
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -28133,7 +27768,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__w);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":233
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":233
* cdef FILE* f
* f = fopen(filename, "w")
* fwrite(&(self.precompute_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -28142,7 +27777,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
*/
fwrite((&__pyx_v_self->precompute_rank), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":234
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28151,7 +27786,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
*/
fwrite((&__pyx_v_self->precompute_secondary_rank), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":235
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28160,7 +27795,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
*/
fwrite((&__pyx_v_self->max_length), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":236
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28169,7 +27804,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
*/
fwrite((&__pyx_v_self->max_nonterminals), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":237
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28178,7 +27813,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
*/
fwrite((&__pyx_v_self->train_max_initial_size), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":238
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28187,7 +27822,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
*/
fwrite((&__pyx_v_self->train_min_gap_size), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":239
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28201,7 +27836,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":240
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -28215,7 +27850,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":241
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":241
* self.write_map(self.precomputed_index, f)
* self.write_map(self.precomputed_collocations, f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -28237,7 +27872,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":244
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":244
*
*
* cdef write_map(self, m, FILE* f): # <<<<<<<<<<<<<<
@@ -28256,19 +27891,21 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
- Py_ssize_t __pyx_t_3;
- int __pyx_t_4;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *(*__pyx_t_4)(PyObject *);
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
- int __pyx_t_7;
- Py_ssize_t __pyx_t_8;
- PyObject *(*__pyx_t_9)(PyObject *);
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ Py_ssize_t __pyx_t_9;
+ PyObject *(*__pyx_t_10)(PyObject *);
+ int __pyx_t_11;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_map", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":248
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":248
* cdef IntList arr
*
* N = len(m) # <<<<<<<<<<<<<<
@@ -28278,7 +27915,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":249
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":249
*
* N = len(m)
* fwrite(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -28287,29 +27924,87 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
*/
fwrite((&__pyx_v_N), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":250
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":250
* N = len(m)
* fwrite(&(N), sizeof(int), 1, f)
* for pattern, val in m.iteritems(): # <<<<<<<<<<<<<<
* N = len(pattern)
* fwrite(&(N), sizeof(int), 1, f)
*/
- __pyx_t_1 = 0;
- if (unlikely(__pyx_v_m == Py_None)) {
- PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_v_m, __pyx_n_s__iteritems); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __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_1 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+ __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
- __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_m, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_2);
- __pyx_t_2 = __pyx_t_5;
- __pyx_t_5 = 0;
- while (1) {
- __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_3, &__pyx_t_1, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
- if (unlikely(__pyx_t_7 == 0)) break;
- if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
+ if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++;
+ } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
+ if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++;
+ } else {
+ __pyx_t_3 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_3)) {
+ if (PyErr_Occurred()) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
+ PyObject* sequence = __pyx_t_3;
+ if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __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[11]; __pyx_lineno = 250; __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;
+ index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
+ __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[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L6_unpacking_done;
+ __pyx_L5_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_L6_unpacking_done:;
+ }
__Pyx_XDECREF(__pyx_v_pattern);
__pyx_v_pattern = __pyx_t_5;
__pyx_t_5 = 0;
@@ -28317,17 +28012,17 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
__pyx_v_val = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":251
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":251
* fwrite(&(N), sizeof(int), 1, f)
* for pattern, val in m.iteritems():
* N = len(pattern) # <<<<<<<<<<<<<<
* fwrite(&(N), sizeof(int), 1, f)
* for word_id in pattern:
*/
- __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;
+ __pyx_t_9 = PyObject_Length(__pyx_v_pattern); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_N = __pyx_t_9;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":252
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":252
* for pattern, val in m.iteritems():
* N = len(pattern)
* fwrite(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -28336,7 +28031,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
*/
fwrite((&__pyx_v_N), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":253
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":253
* N = len(pattern)
* fwrite(&(N), sizeof(int), 1, f)
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -28344,54 +28039,46 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
* fwrite(&(i), sizeof(int), 1, f)
*/
if (PyList_CheckExact(__pyx_v_pattern) || PyTuple_CheckExact(__pyx_v_pattern)) {
- __pyx_t_6 = __pyx_v_pattern; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0;
- __pyx_t_9 = NULL;
+ __pyx_t_3 = __pyx_v_pattern; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
} else {
- __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext;
+ __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_6)) {
- if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_6)) {
- if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
+ if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_3)) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++;
+ } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_3)) {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++;
} else {
- __pyx_t_5 = __pyx_t_9(__pyx_t_6);
- if (unlikely(!__pyx_t_5)) {
+ __pyx_t_6 = __pyx_t_10(__pyx_t_3);
+ if (unlikely(!__pyx_t_6)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[11]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
}
__Pyx_XDECREF(__pyx_v_word_id);
- __pyx_v_word_id = __pyx_t_5;
- __pyx_t_5 = 0;
+ __pyx_v_word_id = __pyx_t_6;
+ __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":254
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":254
* fwrite(&(N), sizeof(int), 1, f)
* for word_id in pattern:
* i = word_id # <<<<<<<<<<<<<<
* fwrite(&(i), sizeof(int), 1, f)
* arr = val
*/
- __pyx_t_7 = __Pyx_PyInt_AsInt(__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;
+ __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_v_word_id); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_i = __pyx_t_11;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":255
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":255
* for word_id in pattern:
* i = word_id
* fwrite(&(i), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -28400,9 +28087,9 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
*/
fwrite((&__pyx_v_i), (sizeof(int)), 1, __pyx_v_f);
}
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":256
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":256
* i = word_id
* fwrite(&(i), sizeof(int), 1, f)
* arr = val # <<<<<<<<<<<<<<
@@ -28414,7 +28101,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
__Pyx_XDECREF(((PyObject *)__pyx_v_arr));
__pyx_v_arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_v_val);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":257
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":257
* fwrite(&(i), sizeof(int), 1, f)
* arr = val
* arr.write_handle(f) # <<<<<<<<<<<<<<
@@ -28429,8 +28116,10 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("_sa.Precomputation.write_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
@@ -28443,7 +28132,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":260
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":260
*
*
* cdef read_map(self, FILE* f): # <<<<<<<<<<<<<<
@@ -28471,7 +28160,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_map", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":264
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":264
* cdef IntList arr
*
* m = {} # <<<<<<<<<<<<<<
@@ -28483,7 +28172,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
__pyx_v_m = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":265
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":265
*
* m = {}
* fread(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -28492,7 +28181,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
*/
fread((&__pyx_v_N), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":266
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":266
* m = {}
* fread(&(N), sizeof(int), 1, f)
* for j from 0 <= j < N: # <<<<<<<<<<<<<<
@@ -28502,7 +28191,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
__pyx_t_2 = __pyx_v_N;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":267
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":267
* fread(&(N), sizeof(int), 1, f)
* for j from 0 <= j < N:
* fread(&(i), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -28511,7 +28200,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
*/
fread((&__pyx_v_i), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":268
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":268
* for j from 0 <= j < N:
* fread(&(i), sizeof(int), 1, f)
* key = () # <<<<<<<<<<<<<<
@@ -28522,7 +28211,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
__Pyx_XDECREF(((PyObject *)__pyx_v_key));
__pyx_v_key = __pyx_empty_tuple;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":269
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":269
* fread(&(i), sizeof(int), 1, f)
* key = ()
* for k from 0 <= k < i: # <<<<<<<<<<<<<<
@@ -28532,7 +28221,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
__pyx_t_3 = __pyx_v_i;
for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":270
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":270
* key = ()
* for k from 0 <= k < i:
* fread(&(word_id), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -28541,7 +28230,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
*/
fread((&__pyx_v_word_id), (sizeof(int)), 1, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":271
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":271
* for k from 0 <= k < i:
* fread(&(word_id), sizeof(int), 1, f)
* key = key + (word_id,) # <<<<<<<<<<<<<<
@@ -28563,7 +28252,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
__pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":272
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":272
* fread(&(word_id), sizeof(int), 1, f)
* key = key + (word_id,)
* arr = IntList() # <<<<<<<<<<<<<<
@@ -28576,7 +28265,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
__pyx_v_arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":273
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":273
* key = key + (word_id,)
* arr = IntList()
* arr.read_handle(f) # <<<<<<<<<<<<<<
@@ -28585,7 +28274,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_arr->__pyx_vtab)->read_handle(__pyx_v_arr, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":274
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":274
* arr = IntList()
* arr.read_handle(f)
* m[key] = arr # <<<<<<<<<<<<<<
@@ -28595,7 +28284,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
if (PyDict_SetItem(((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_arr)) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":275
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":275
* arr.read_handle(f)
* m[key] = arr
* return m # <<<<<<<<<<<<<<
@@ -28628,11 +28317,11 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_7precompute(PyObject *__pyx_v_se
static PyObject *__pyx_pw_3_sa_14Precomputation_7precompute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_stats = 0;
struct __pyx_obj_3_sa_SuffixArray *__pyx_v_sarray = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stats,&__pyx_n_s__sarray,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("precompute (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stats,&__pyx_n_s__sarray,0};
PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -28646,10 +28335,12 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_7precompute(PyObject *__pyx_v_se
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stats)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stats);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sarray)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sarray);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("precompute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -28684,7 +28375,7 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_7precompute(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":278
+/* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":278
*
*
* def precompute(self, stats, SuffixArray sarray): # <<<<<<<<<<<<<<
@@ -28769,7 +28460,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("precompute", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":280
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -28779,7 +28470,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_INCREF(((PyObject *)__pyx_v_sarray->darray));
__pyx_v_darray = __pyx_v_sarray->darray;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":285
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":285
* cdef _Trie_Node* node
*
* data = darray.data # <<<<<<<<<<<<<<
@@ -28789,7 +28480,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_INCREF(((PyObject *)__pyx_v_darray->data));
__pyx_v_data = __pyx_v_darray->data;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":287
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":287
* data = darray.data
*
* frequent_patterns = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<<
@@ -28813,7 +28504,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_frequent_patterns = ((struct __pyx_obj_3_sa_TrieMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":288
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":288
*
* frequent_patterns = TrieMap(len(darray.id2word))
* super_frequent_patterns = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<<
@@ -28837,7 +28528,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_super_frequent_patterns = ((struct __pyx_obj_3_sa_TrieMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":289
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":289
* frequent_patterns = TrieMap(len(darray.id2word))
* super_frequent_patterns = TrieMap(len(darray.id2word))
* collocations = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<<
@@ -28861,7 +28552,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_collocations = ((struct __pyx_obj_3_sa_TrieMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":291
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":291
* collocations = TrieMap(len(darray.id2word))
*
* I_set = set() # <<<<<<<<<<<<<<
@@ -28873,7 +28564,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_I_set = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":292
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":292
*
* I_set = set()
* J_set = set() # <<<<<<<<<<<<<<
@@ -28885,7 +28576,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_J_set = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":293
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":293
* I_set = set()
* J_set = set()
* J2_set = set() # <<<<<<<<<<<<<<
@@ -28897,7 +28588,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_J2_set = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":294
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":294
* J_set = set()
* J2_set = set()
* IJ_set = set() # <<<<<<<<<<<<<<
@@ -28909,7 +28600,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_IJ_set = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":295
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":295
* J2_set = set()
* IJ_set = set()
* pattern_rank = {} # <<<<<<<<<<<<<<
@@ -28921,7 +28612,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern_rank = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":297
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":297
* pattern_rank = {}
*
* logger.info("Precomputing frequent intersections") # <<<<<<<<<<<<<<
@@ -28938,7 +28629,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":298
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":298
*
* logger.info("Precomputing frequent intersections")
* cdef float start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -28947,7 +28638,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_start_time = __pyx_f_3_sa_monitor_cpu();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":300
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":300
* cdef float start_time = monitor_cpu()
*
* max_pattern_len = 0 # <<<<<<<<<<<<<<
@@ -28956,7 +28647,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_max_pattern_len = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":301
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":301
*
* max_pattern_len = 0
* for rank, (_, _, phrase) in enumerate(stats): # <<<<<<<<<<<<<<
@@ -28976,18 +28667,10 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_t_2++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_5 = __pyx_t_4(__pyx_t_3);
if (unlikely(!__pyx_t_5)) {
@@ -29001,22 +28684,21 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
PyObject* sequence = __pyx_t_5;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 3)) {
- if (size > 3) __Pyx_RaiseTooManyValuesError(3);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) {
+ if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
__pyx_t_8 = PyTuple_GET_ITEM(sequence, 2);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 3)) {
+ if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_6 = PyList_GET_ITEM(sequence, 0);
__pyx_t_7 = PyList_GET_ITEM(sequence, 1);
__pyx_t_8 = PyList_GET_ITEM(sequence, 2);
@@ -29024,14 +28706,8 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(__pyx_t_8);
- #else
- __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #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[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
@@ -29044,13 +28720,12 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_8);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_10 = NULL;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
goto __pyx_L6_unpacking_done;
__pyx_L5_unpacking_failed:;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_10 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L6_unpacking_done:;
}
@@ -29072,7 +28747,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_1 = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":302
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":302
* max_pattern_len = 0
* for rank, (_, _, phrase) in enumerate(stats):
* if rank >= self.precompute_rank: # <<<<<<<<<<<<<<
@@ -29088,7 +28763,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":303
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":303
* for rank, (_, _, phrase) in enumerate(stats):
* if rank >= self.precompute_rank:
* break # <<<<<<<<<<<<<<
@@ -29100,7 +28775,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":304
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":304
* if rank >= self.precompute_rank:
* break
* max_pattern_len = max(max_pattern_len, len(phrase)) # <<<<<<<<<<<<<<
@@ -29116,7 +28791,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_v_max_pattern_len = __pyx_t_14;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":305
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":305
* break
* max_pattern_len = max(max_pattern_len, len(phrase))
* frequent_patterns.insert(phrase) # <<<<<<<<<<<<<<
@@ -29136,7 +28811,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":306
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":306
* max_pattern_len = max(max_pattern_len, len(phrase))
* frequent_patterns.insert(phrase)
* I_set.add(phrase) # <<<<<<<<<<<<<<
@@ -29145,7 +28820,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_t_15 = PySet_Add(__pyx_v_I_set, __pyx_v_phrase); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":307
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":307
* frequent_patterns.insert(phrase)
* I_set.add(phrase)
* pattern_rank[phrase] = rank # <<<<<<<<<<<<<<
@@ -29154,7 +28829,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
if (PyDict_SetItem(((PyObject *)__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;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":308
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":308
* I_set.add(phrase)
* pattern_rank[phrase] = rank
* if rank < self.precompute_secondary_rank: # <<<<<<<<<<<<<<
@@ -29170,7 +28845,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":309
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":309
* pattern_rank[phrase] = rank
* if rank < self.precompute_secondary_rank:
* super_frequent_patterns.insert(phrase) # <<<<<<<<<<<<<<
@@ -29190,7 +28865,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":310
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":310
* if rank < self.precompute_secondary_rank:
* super_frequent_patterns.insert(phrase)
* J_set.add(phrase) # <<<<<<<<<<<<<<
@@ -29206,7 +28881,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":312
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":312
* J_set.add(phrase)
*
* queue = IntList(increment=1000) # <<<<<<<<<<<<<<
@@ -29222,7 +28897,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_queue = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":314
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":314
* queue = IntList(increment=1000)
*
* logger.info(" Computing inverted indexes...") # <<<<<<<<<<<<<<
@@ -29239,7 +28914,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":315
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":315
*
* logger.info(" Computing inverted indexes...")
* N = len(data) # <<<<<<<<<<<<<<
@@ -29249,7 +28924,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":316
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":316
* logger.info(" Computing inverted indexes...")
* N = len(data)
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -29259,7 +28934,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_13 = __pyx_v_N;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_13; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":317
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":317
* N = len(data)
* for i from 0 <= i < N:
* sa_word_id = data.arr[i] # <<<<<<<<<<<<<<
@@ -29268,7 +28943,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_sa_word_id = (__pyx_v_data->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":318
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":318
* for i from 0 <= i < N:
* sa_word_id = data.arr[i]
* if sa_word_id == 1: # <<<<<<<<<<<<<<
@@ -29278,7 +28953,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_11 = (__pyx_v_sa_word_id == 1);
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":319
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":319
* sa_word_id = data.arr[i]
* if sa_word_id == 1:
* queue._append(-1) # <<<<<<<<<<<<<<
@@ -29290,7 +28965,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":321
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":321
* queue._append(-1)
* else:
* for l from 1 <= l <= max_pattern_len: # <<<<<<<<<<<<<<
@@ -29300,7 +28975,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_16 = __pyx_v_max_pattern_len;
for (__pyx_v_l = 1; __pyx_v_l <= __pyx_t_16; __pyx_v_l++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":322
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":322
* else:
* for l from 1 <= l <= max_pattern_len:
* node = frequent_patterns._contains(data.arr+i, l) # <<<<<<<<<<<<<<
@@ -29309,7 +28984,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_node = ((struct __pyx_vtabstruct_3_sa_TrieMap *)__pyx_v_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i), __pyx_v_l);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":323
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":323
* for l from 1 <= l <= max_pattern_len:
* node = frequent_patterns._contains(data.arr+i, l)
* if node == NULL: # <<<<<<<<<<<<<<
@@ -29319,7 +28994,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_11 = (__pyx_v_node == NULL);
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":324
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":324
* node = frequent_patterns._contains(data.arr+i, l)
* if node == NULL:
* break # <<<<<<<<<<<<<<
@@ -29331,7 +29006,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_L14:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":325
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":325
* if node == NULL:
* break
* queue._append(i) # <<<<<<<<<<<<<<
@@ -29340,7 +29015,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_queue->__pyx_vtab)->_append(__pyx_v_queue, __pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":326
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":326
* break
* queue._append(i)
* queue._append(l) # <<<<<<<<<<<<<<
@@ -29349,7 +29024,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_queue->__pyx_vtab)->_append(__pyx_v_queue, __pyx_v_l);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":327
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":327
* queue._append(i)
* queue._append(l)
* trie_node_data_append(node, i) # <<<<<<<<<<<<<<
@@ -29365,7 +29040,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_L11:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":329
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":329
* trie_node_data_append(node, i)
*
* logger.info(" Computing collocations...") # <<<<<<<<<<<<<<
@@ -29382,7 +29057,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":330
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":330
*
* logger.info(" Computing collocations...")
* N = len(queue) # <<<<<<<<<<<<<<
@@ -29392,7 +29067,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":331
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":331
* logger.info(" Computing collocations...")
* N = len(queue)
* ptr1 = 0 # <<<<<<<<<<<<<<
@@ -29401,7 +29076,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_ptr1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":332
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":332
* N = len(queue)
* ptr1 = 0
* sent_count = 0 # <<<<<<<<<<<<<<
@@ -29410,7 +29085,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_sent_count = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":333
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":333
* ptr1 = 0
* sent_count = 0
* while ptr1 < N: # main loop # <<<<<<<<<<<<<<
@@ -29421,7 +29096,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_11 = (__pyx_v_ptr1 < __pyx_v_N);
if (!__pyx_t_11) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":334
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":334
* sent_count = 0
* while ptr1 < N: # main loop
* i1 = queue.arr[ptr1] # <<<<<<<<<<<<<<
@@ -29430,7 +29105,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_i1 = (__pyx_v_queue->arr[__pyx_v_ptr1]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":335
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":335
* while ptr1 < N: # main loop
* i1 = queue.arr[ptr1]
* if i1 > -1: # <<<<<<<<<<<<<<
@@ -29440,7 +29115,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_11 = (__pyx_v_i1 > -1);
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":336
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":336
* i1 = queue.arr[ptr1]
* if i1 > -1:
* l1 = queue.arr[ptr1+1] # <<<<<<<<<<<<<<
@@ -29449,7 +29124,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_l1 = (__pyx_v_queue->arr[(__pyx_v_ptr1 + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":337
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":337
* if i1 > -1:
* l1 = queue.arr[ptr1+1]
* ptr2 = ptr1 + 2 # <<<<<<<<<<<<<<
@@ -29458,7 +29133,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_ptr2 = (__pyx_v_ptr1 + 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":338
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":338
* l1 = queue.arr[ptr1+1]
* ptr2 = ptr1 + 2
* while ptr2 < N: # <<<<<<<<<<<<<<
@@ -29469,7 +29144,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_11 = (__pyx_v_ptr2 < __pyx_v_N);
if (!__pyx_t_11) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":339
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":339
* ptr2 = ptr1 + 2
* while ptr2 < N:
* i2 = queue.arr[ptr2] # <<<<<<<<<<<<<<
@@ -29478,7 +29153,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_i2 = (__pyx_v_queue->arr[__pyx_v_ptr2]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":340
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":340
* while ptr2 < N:
* i2 = queue.arr[ptr2]
* if i2 == -1 or i2 - i1 >= self.train_max_initial_size: # <<<<<<<<<<<<<<
@@ -29494,7 +29169,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
if (__pyx_t_18) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":341
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":341
* i2 = queue.arr[ptr2]
* if i2 == -1 or i2 - i1 >= self.train_max_initial_size:
* break # <<<<<<<<<<<<<<
@@ -29506,7 +29181,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_L20:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":342
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":342
* if i2 == -1 or i2 - i1 >= self.train_max_initial_size:
* break
* l2 = queue.arr[ptr2+1] # <<<<<<<<<<<<<<
@@ -29515,7 +29190,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_l2 = (__pyx_v_queue->arr[(__pyx_v_ptr2 + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":343
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":343
* break
* l2 = queue.arr[ptr2+1]
* if (i2 - i1 - l1 >= self.train_min_gap_size and # <<<<<<<<<<<<<<
@@ -29525,7 +29200,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_18 = (((__pyx_v_i2 - __pyx_v_i1) - __pyx_v_l1) >= __pyx_v_self->train_min_gap_size);
if (__pyx_t_18) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":344
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -29535,7 +29210,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_11 = (((__pyx_v_i2 + __pyx_v_l2) - __pyx_v_i1) <= __pyx_v_self->train_max_initial_size);
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":345
+ /* "/home/vchahune/tools/cdec/python/src/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): # <<<<<<<<<<<<<<
@@ -29553,7 +29228,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":346
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -29562,7 +29237,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_node = ((struct __pyx_vtabstruct_3_sa_TrieMap *)__pyx_v_collocations->__pyx_vtab)->_insert(__pyx_v_collocations, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":347
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":347
* l1+l2+1 <= self.max_length):
* node = collocations._insert(data.arr+i1, l1)
* node = trie_insert(node, -1) # <<<<<<<<<<<<<<
@@ -29571,7 +29246,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, -1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":348
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":348
* node = collocations._insert(data.arr+i1, l1)
* node = trie_insert(node, -1)
* for i from i2 <= i < i2+l2: # <<<<<<<<<<<<<<
@@ -29581,7 +29256,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_13 = (__pyx_v_i2 + __pyx_v_l2);
for (__pyx_v_i = __pyx_v_i2; __pyx_v_i < __pyx_t_13; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":349
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":349
* node = trie_insert(node, -1)
* for i from i2 <= i < i2+l2:
* node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<<
@@ -29591,7 +29266,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i]));
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":350
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":350
* for i from i2 <= i < i2+l2:
* node = trie_insert(node, data.arr[i])
* trie_node_data_append(node, i1) # <<<<<<<<<<<<<<
@@ -29602,7 +29277,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":351
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":351
* node = trie_insert(node, data.arr[i])
* trie_node_data_append(node, i1)
* trie_node_data_append(node, i2) # <<<<<<<<<<<<<<
@@ -29613,7 +29288,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":352
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -29623,7 +29298,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_11 = (((struct __pyx_vtabstruct_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);
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":353
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -29633,7 +29308,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_11 = (((struct __pyx_vtabstruct_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);
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":354
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -29645,7 +29320,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":356
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":356
* is_super = 1
* else:
* is_super = 0 # <<<<<<<<<<<<<<
@@ -29656,7 +29331,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_L25:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":357
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":357
* else:
* is_super = 0
* ptr3 = ptr2 + 2 # <<<<<<<<<<<<<<
@@ -29665,7 +29340,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_ptr3 = (__pyx_v_ptr2 + 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":358
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":358
* is_super = 0
* ptr3 = ptr2 + 2
* while ptr3 < N: # <<<<<<<<<<<<<<
@@ -29676,7 +29351,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_11 = (__pyx_v_ptr3 < __pyx_v_N);
if (!__pyx_t_11) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":359
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":359
* ptr3 = ptr2 + 2
* while ptr3 < N:
* i3 = queue.arr[ptr3] # <<<<<<<<<<<<<<
@@ -29685,7 +29360,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_i3 = (__pyx_v_queue->arr[__pyx_v_ptr3]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":360
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":360
* while ptr3 < N:
* i3 = queue.arr[ptr3]
* if i3 == -1 or i3 - i1 >= self.train_max_initial_size: # <<<<<<<<<<<<<<
@@ -29701,7 +29376,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":361
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":361
* i3 = queue.arr[ptr3]
* if i3 == -1 or i3 - i1 >= self.train_max_initial_size:
* break # <<<<<<<<<<<<<<
@@ -29713,7 +29388,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_L28:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":362
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":362
* if i3 == -1 or i3 - i1 >= self.train_max_initial_size:
* break
* l3 = queue.arr[ptr3+1] # <<<<<<<<<<<<<<
@@ -29722,7 +29397,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_l3 = (__pyx_v_queue->arr[(__pyx_v_ptr3 + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":363
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":363
* break
* l3 = queue.arr[ptr3+1]
* if (i3 - i2 - l2 >= self.train_min_gap_size and # <<<<<<<<<<<<<<
@@ -29732,7 +29407,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_19 = (((__pyx_v_i3 - __pyx_v_i2) - __pyx_v_l2) >= __pyx_v_self->train_min_gap_size);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":364
+ /* "/home/vchahune/tools/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -29742,7 +29417,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_11 = (((__pyx_v_i3 + __pyx_v_l3) - __pyx_v_i1) <= __pyx_v_self->train_max_initial_size);
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":365
+ /* "/home/vchahune/tools/cdec/python/src/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): # <<<<<<<<<<<<<<
@@ -29760,7 +29435,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":366
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -29775,7 +29450,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":367
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -29784,7 +29459,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_node = ((struct __pyx_vtabstruct_3_sa_TrieMap *)__pyx_v_collocations->__pyx_vtab)->_insert(__pyx_v_collocations, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":368
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -29793,7 +29468,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, -1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":369
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":369
* node = collocations._insert(data.arr+i1, l1)
* node = trie_insert(node, -1)
* for i from i2 <= i < i2+l2: # <<<<<<<<<<<<<<
@@ -29803,7 +29478,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_13 = (__pyx_v_i2 + __pyx_v_l2);
for (__pyx_v_i = __pyx_v_i2; __pyx_v_i < __pyx_t_13; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":370
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":370
* node = trie_insert(node, -1)
* for i from i2 <= i < i2+l2:
* node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<<
@@ -29813,7 +29488,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i]));
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":371
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":371
* for i from i2 <= i < i2+l2:
* node = trie_insert(node, data.arr[i])
* node = trie_insert(node, -1) # <<<<<<<<<<<<<<
@@ -29822,7 +29497,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, -1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":372
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":372
* node = trie_insert(node, data.arr[i])
* node = trie_insert(node, -1)
* for i from i3 <= i < i3+l3: # <<<<<<<<<<<<<<
@@ -29832,7 +29507,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_13 = (__pyx_v_i3 + __pyx_v_l3);
for (__pyx_v_i = __pyx_v_i3; __pyx_v_i < __pyx_t_13; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":373
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":373
* node = trie_insert(node, -1)
* for i from i3 <= i < i3+l3:
* node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<<
@@ -29842,7 +29517,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i]));
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":374
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":374
* for i from i3 <= i < i3+l3:
* node = trie_insert(node, data.arr[i])
* trie_node_data_append(node, i1) # <<<<<<<<<<<<<<
@@ -29853,7 +29528,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":375
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":375
* node = trie_insert(node, data.arr[i])
* trie_node_data_append(node, i1)
* trie_node_data_append(node, i2) # <<<<<<<<<<<<<<
@@ -29864,7 +29539,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":376
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":376
* trie_node_data_append(node, i1)
* trie_node_data_append(node, i2)
* trie_node_data_append(node, i3) # <<<<<<<<<<<<<<
@@ -29881,7 +29556,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_L29:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":377
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":377
* trie_node_data_append(node, i2)
* trie_node_data_append(node, i3)
* ptr3 = ptr3 + 2 # <<<<<<<<<<<<<<
@@ -29898,7 +29573,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_L21:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":378
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":378
* trie_node_data_append(node, i3)
* ptr3 = ptr3 + 2
* ptr2 = ptr2 + 2 # <<<<<<<<<<<<<<
@@ -29909,7 +29584,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_L19_break:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":379
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":379
* ptr3 = ptr3 + 2
* ptr2 = ptr2 + 2
* ptr1 = ptr1 + 2 # <<<<<<<<<<<<<<
@@ -29921,7 +29596,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":381
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":381
* ptr1 = ptr1 + 2
* else:
* sent_count = sent_count + 1 # <<<<<<<<<<<<<<
@@ -29930,7 +29605,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_sent_count = (__pyx_v_sent_count + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":382
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":382
* else:
* sent_count = sent_count + 1
* if sent_count % 10000 == 0: # <<<<<<<<<<<<<<
@@ -29940,7 +29615,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_19 = (__Pyx_mod_long(__pyx_v_sent_count, 10000) == 0);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":383
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":383
* sent_count = sent_count + 1
* if sent_count % 10000 == 0:
* logger.debug(" %d sentences", sent_count) # <<<<<<<<<<<<<<
@@ -29971,7 +29646,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_L35:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":384
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":384
* if sent_count % 10000 == 0:
* logger.debug(" %d sentences", sent_count)
* ptr1 = ptr1 + 1 # <<<<<<<<<<<<<<
@@ -29983,7 +29658,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_L17:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":386
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":386
* ptr1 = ptr1 + 1
*
* self.precomputed_collocations = collocations.toMap(False) # <<<<<<<<<<<<<<
@@ -30009,7 +29684,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_self->precomputed_collocations = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":387
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":387
*
* self.precomputed_collocations = collocations.toMap(False)
* self.precomputed_index = frequent_patterns.toMap(True) # <<<<<<<<<<<<<<
@@ -30035,7 +29710,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_self->precomputed_index = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":389
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":389
* self.precomputed_index = frequent_patterns.toMap(True)
*
* x = 0 # <<<<<<<<<<<<<<
@@ -30045,7 +29720,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_INCREF(__pyx_int_0);
__pyx_v_x = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":390
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":390
*
* x = 0
* for pattern1 in J_set: # <<<<<<<<<<<<<<
@@ -30071,7 +29746,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern1 = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":391
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":391
* x = 0
* for pattern1 in J_set:
* for pattern2 in J_set: # <<<<<<<<<<<<<<
@@ -30097,7 +29772,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern2 = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":392
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":392
* for pattern1 in J_set:
* for pattern2 in J_set:
* if len(pattern1) + len(pattern2) + 1 < self.max_length: # <<<<<<<<<<<<<<
@@ -30109,7 +29784,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_19 = (((__pyx_t_2 + __pyx_t_14) + 1) < __pyx_v_self->max_length);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":393
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":393
* for pattern2 in J_set:
* if len(pattern1) + len(pattern2) + 1 < self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -30125,7 +29800,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_combined_pattern = __pyx_t_7;
__pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":394
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":394
* if len(pattern1) + len(pattern2) + 1 < self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2
* J2_set.add(combined_pattern) # <<<<<<<<<<<<<<
@@ -30141,7 +29816,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":396
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":396
* J2_set.add(combined_pattern)
*
* for pattern1 in I_set: # <<<<<<<<<<<<<<
@@ -30167,7 +29842,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern1 = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":397
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":397
*
* for pattern1 in I_set:
* for pattern2 in I_set: # <<<<<<<<<<<<<<
@@ -30193,7 +29868,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern2 = __pyx_t_7;
__pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":398
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":398
* for pattern1 in I_set:
* for pattern2 in I_set:
* x = x+1 # <<<<<<<<<<<<<<
@@ -30206,7 +29881,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_x = __pyx_t_7;
__pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":399
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":399
* for pattern2 in I_set:
* x = x+1
* if len(pattern1) + len(pattern2) + 1 <= self.max_length: # <<<<<<<<<<<<<<
@@ -30218,7 +29893,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_19 = (((__pyx_t_14 + __pyx_t_2) + 1) <= __pyx_v_self->max_length);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":400
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":400
* x = x+1
* if len(pattern1) + len(pattern2) + 1 <= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -30234,7 +29909,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_combined_pattern = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":401
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":401
* if len(pattern1) + len(pattern2) + 1 <= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2
* IJ_set.add(combined_pattern) # <<<<<<<<<<<<<<
@@ -30250,7 +29925,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":403
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":403
* IJ_set.add(combined_pattern)
*
* for pattern1 in I_set: # <<<<<<<<<<<<<<
@@ -30276,7 +29951,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern1 = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":404
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":404
*
* for pattern1 in I_set:
* for pattern2 in J2_set: # <<<<<<<<<<<<<<
@@ -30302,7 +29977,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern2 = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":405
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":405
* for pattern1 in I_set:
* for pattern2 in J2_set:
* x = x+2 # <<<<<<<<<<<<<<
@@ -30315,7 +29990,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_x = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":406
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":406
* for pattern2 in J2_set:
* x = x+2
* if len(pattern1) + len(pattern2) + 1<= self.max_length: # <<<<<<<<<<<<<<
@@ -30327,7 +30002,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_19 = (((__pyx_t_2 + __pyx_t_14) + 1) <= __pyx_v_self->max_length);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":407
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":407
* x = x+2
* if len(pattern1) + len(pattern2) + 1<= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -30343,7 +30018,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_combined_pattern = __pyx_t_7;
__pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":408
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":408
* if len(pattern1) + len(pattern2) + 1<= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2
* IJ_set.add(combined_pattern) # <<<<<<<<<<<<<<
@@ -30352,7 +30027,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_t_15 = PySet_Add(__pyx_v_IJ_set, __pyx_v_combined_pattern); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":409
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":409
* combined_pattern = pattern1 + (-1,) + pattern2
* IJ_set.add(combined_pattern)
* combined_pattern = pattern2 + (-1,) + pattern1 # <<<<<<<<<<<<<<
@@ -30368,7 +30043,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_combined_pattern = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":410
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":410
* IJ_set.add(combined_pattern)
* combined_pattern = pattern2 + (-1,) + pattern1
* IJ_set.add(combined_pattern) # <<<<<<<<<<<<<<
@@ -30384,17 +30059,17 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":412
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":412
* IJ_set.add(combined_pattern)
*
* N = len(pattern_rank) # <<<<<<<<<<<<<<
* cost_by_rank = IntList(initial_len=N)
* count_by_rank = IntList(initial_len=N)
*/
- __pyx_t_14 = PyDict_Size(((PyObject *)__pyx_v_pattern_rank)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyDict_Size(((PyObject *)__pyx_v_pattern_rank));
__pyx_v_N = __pyx_t_14;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":413
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":413
*
* N = len(pattern_rank)
* cost_by_rank = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -30413,7 +30088,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_cost_by_rank = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":414
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":414
* N = len(pattern_rank)
* cost_by_rank = IntList(initial_len=N)
* count_by_rank = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -30432,37 +30107,95 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_count_by_rank = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":415
+ /* "/home/vchahune/tools/cdec/python/src/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(): # <<<<<<<<<<<<<<
* if pattern not in IJ_set:
* s = ""
*/
- __pyx_t_14 = 0;
- if (unlikely(__pyx_v_self->precomputed_collocations == Py_None)) {
- PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->precomputed_collocations, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_2), (&__pyx_t_13)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->precomputed_collocations, __pyx_n_s__iteritems); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __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[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_1);
- __pyx_t_1 = __pyx_t_3;
- __pyx_t_3 = 0;
- while (1) {
- __pyx_t_16 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_2, &__pyx_t_14, &__pyx_t_3, &__pyx_t_8, NULL, __pyx_t_13);
- if (unlikely(__pyx_t_16 == 0)) break;
- if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_14 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+ __pyx_t_14 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
+ if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++;
+ } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
+ if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++;
+ } else {
+ __pyx_t_3 = __pyx_t_4(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ if (PyErr_Occurred()) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
+ PyObject* sequence = __pyx_t_3;
+ if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext;
+ index = 0; __pyx_t_8 = __pyx_t_10(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L53_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L53_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L54_unpacking_done;
+ __pyx_L53_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
+ {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_L54_unpacking_done:;
+ }
__Pyx_XDECREF(__pyx_v_pattern);
- __pyx_v_pattern = __pyx_t_3;
- __pyx_t_3 = 0;
- __Pyx_XDECREF(__pyx_v_arr);
- __pyx_v_arr = __pyx_t_8;
+ __pyx_v_pattern = __pyx_t_8;
__pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_v_arr);
+ __pyx_v_arr = __pyx_t_7;
+ __pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":416
+ /* "/home/vchahune/tools/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -30472,7 +30205,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_19 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_v_IJ_set), __pyx_v_pattern))); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":417
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":417
* for pattern, arr in self.precomputed_collocations.iteritems():
* if pattern not in IJ_set:
* s = "" # <<<<<<<<<<<<<<
@@ -30483,7 +30216,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_XDECREF(__pyx_v_s);
__pyx_v_s = ((PyObject *)__pyx_kp_s_45);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":418
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":418
* if pattern not in IJ_set:
* s = ""
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -30491,125 +30224,117 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
* s = s + "X "
*/
if (PyList_CheckExact(__pyx_v_pattern) || PyTuple_CheckExact(__pyx_v_pattern)) {
- __pyx_t_8 = __pyx_v_pattern; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0;
- __pyx_t_4 = NULL;
+ __pyx_t_3 = __pyx_v_pattern; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0;
+ __pyx_t_20 = NULL;
} else {
- __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = Py_TYPE(__pyx_t_8)->tp_iternext;
+ __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_20 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_8)) {
- if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_8)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++;
- #else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_8)) {
- if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++;
- #else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
+ if (!__pyx_t_20 && PyList_CheckExact(__pyx_t_3)) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++;
+ } else if (!__pyx_t_20 && PyTuple_CheckExact(__pyx_t_3)) {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++;
} else {
- __pyx_t_3 = __pyx_t_4(__pyx_t_8);
- if (unlikely(!__pyx_t_3)) {
+ __pyx_t_7 = __pyx_t_20(__pyx_t_3);
+ if (unlikely(!__pyx_t_7)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[11]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GOTREF(__pyx_t_7);
}
__Pyx_XDECREF(__pyx_v_word_id);
- __pyx_v_word_id = __pyx_t_3;
- __pyx_t_3 = 0;
+ __pyx_v_word_id = __pyx_t_7;
+ __pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":419
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":419
* s = ""
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
* s = s + "X "
* else:
*/
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":420
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":420
* for word_id in pattern:
* if word_id == -1:
* s = s + "X " # <<<<<<<<<<<<<<
* else:
* s = s + darray.id2word[word_id] + " "
*/
- __pyx_t_3 = PyNumber_Add(__pyx_v_s, ((PyObject *)__pyx_kp_s_83)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = PyNumber_Add(__pyx_v_s, ((PyObject *)__pyx_kp_s_83)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_v_s);
- __pyx_v_s = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L56;
+ __pyx_v_s = __pyx_t_7;
+ __pyx_t_7 = 0;
+ goto __pyx_L58;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":422
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":422
* s = s + "X "
* else:
* s = s + darray.id2word[word_id] + " " # <<<<<<<<<<<<<<
* logger.warn("ERROR: unexpected pattern %s in set of precomputed collocations", s)
* else:
*/
- __pyx_t_3 = PyObject_GetItem(__pyx_v_darray->id2word, __pyx_v_word_id); if (!__pyx_t_3) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = PyNumber_Add(__pyx_v_s, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_darray->id2word, __pyx_v_word_id); if (!__pyx_t_7) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyNumber_Add(__pyx_t_7, ((PyObject *)__pyx_kp_s_67)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = PyNumber_Add(__pyx_v_s, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Add(__pyx_t_8, ((PyObject *)__pyx_kp_s_67)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_v_s);
- __pyx_v_s = __pyx_t_3;
- __pyx_t_3 = 0;
+ __pyx_v_s = __pyx_t_7;
+ __pyx_t_7 = 0;
}
- __pyx_L56:;
+ __pyx_L58:;
}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":423
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":423
* else:
* s = s + darray.id2word[word_id] + " "
* logger.warn("ERROR: unexpected pattern %s in set of precomputed collocations", s) # <<<<<<<<<<<<<<
* else:
* chunk = ()
*/
- __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__warn); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__warn); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(((PyObject *)__pyx_kp_s_84));
- PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_kp_s_84));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_84));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_84));
__Pyx_INCREF(__pyx_v_s);
- PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_s);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_s);
__Pyx_GIVEREF(__pyx_v_s);
- __pyx_t_7 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
+ __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- goto __pyx_L53;
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L55;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":425
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":425
* logger.warn("ERROR: unexpected pattern %s in set of precomputed collocations", s)
* else:
* chunk = () # <<<<<<<<<<<<<<
@@ -30620,7 +30345,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_XDECREF(((PyObject *)__pyx_v_chunk));
__pyx_v_chunk = __pyx_empty_tuple;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":426
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":426
* else:
* chunk = ()
* max_rank = 0 # <<<<<<<<<<<<<<
@@ -30629,7 +30354,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_max_rank = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":427
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":427
* chunk = ()
* max_rank = 0
* arity = 0 # <<<<<<<<<<<<<<
@@ -30640,7 +30365,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_XDECREF(__pyx_v_arity);
__pyx_v_arity = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":428
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":428
* max_rank = 0
* arity = 0
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -30648,101 +30373,93 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
* max_rank = max(max_rank, pattern_rank[chunk])
*/
if (PyList_CheckExact(__pyx_v_pattern) || PyTuple_CheckExact(__pyx_v_pattern)) {
- __pyx_t_7 = __pyx_v_pattern; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0;
- __pyx_t_4 = NULL;
+ __pyx_t_8 = __pyx_v_pattern; __Pyx_INCREF(__pyx_t_8); __pyx_t_2 = 0;
+ __pyx_t_20 = NULL;
} else {
- __pyx_t_12 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_4 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ __pyx_t_2 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_20 = Py_TYPE(__pyx_t_8)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_7)) {
- if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++;
- #else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_7)) {
- if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++;
- #else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
+ if (!__pyx_t_20 && PyList_CheckExact(__pyx_t_8)) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_8)) break;
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
+ } else if (!__pyx_t_20 && PyTuple_CheckExact(__pyx_t_8)) {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
} else {
- __pyx_t_8 = __pyx_t_4(__pyx_t_7);
- if (unlikely(!__pyx_t_8)) {
+ __pyx_t_3 = __pyx_t_20(__pyx_t_8);
+ if (unlikely(!__pyx_t_3)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[11]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GOTREF(__pyx_t_3);
}
__Pyx_XDECREF(__pyx_v_word_id);
- __pyx_v_word_id = __pyx_t_8;
- __pyx_t_8 = 0;
+ __pyx_v_word_id = __pyx_t_3;
+ __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":429
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":429
* arity = 0
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
* max_rank = max(max_rank, pattern_rank[chunk])
* arity = arity + 1
*/
- __pyx_t_8 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":430
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":430
* for word_id in pattern:
* if word_id == -1:
* max_rank = max(max_rank, pattern_rank[chunk]) # <<<<<<<<<<<<<<
* arity = arity + 1
* chunk = ()
*/
- __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_pattern_rank), ((PyObject *)__pyx_v_chunk)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_16 = __pyx_v_max_rank;
- __pyx_t_5 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_pattern_rank), ((PyObject *)__pyx_v_chunk)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_13 = __pyx_v_max_rank;
+ __pyx_t_5 = PyInt_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_t_5, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_19) {
- __Pyx_INCREF(__pyx_t_8);
- __pyx_t_3 = __pyx_t_8;
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_7 = __pyx_t_3;
} else {
- __pyx_t_6 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = __pyx_t_6;
+ __pyx_t_7 = __pyx_t_6;
__pyx_t_6 = 0;
}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_16 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_v_max_rank = __pyx_t_16;
+ __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_v_max_rank = __pyx_t_13;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":431
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":431
* if word_id == -1:
* max_rank = max(max_rank, pattern_rank[chunk])
* arity = arity + 1 # <<<<<<<<<<<<<<
* chunk = ()
* else:
*/
- __pyx_t_3 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_v_arity);
- __pyx_v_arity = __pyx_t_3;
- __pyx_t_3 = 0;
+ __pyx_v_arity = __pyx_t_7;
+ __pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":432
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":432
* max_rank = max(max_rank, pattern_rank[chunk])
* arity = arity + 1
* chunk = () # <<<<<<<<<<<<<<
@@ -30752,105 +30469,105 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
__Pyx_DECREF(((PyObject *)__pyx_v_chunk));
__pyx_v_chunk = __pyx_empty_tuple;
- goto __pyx_L59;
+ goto __pyx_L61;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":434
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":434
* chunk = ()
* else:
* 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))
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_word_id);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_word_id);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_word_id);
__Pyx_GIVEREF(__pyx_v_word_id);
- __pyx_t_8 = PyNumber_Add(((PyObject *)__pyx_v_chunk), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_8));
- __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_chunk), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+ __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_chunk));
- __pyx_v_chunk = __pyx_t_8;
- __pyx_t_8 = 0;
+ __pyx_v_chunk = __pyx_t_3;
+ __pyx_t_3 = 0;
}
- __pyx_L59:;
+ __pyx_L61:;
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":435
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":435
* else:
* 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))
* count_by_rank.arr[max_rank] = count_by_rank.arr[max_rank] + (len(arr)/(arity+1))
*/
- __pyx_t_7 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_pattern_rank), ((PyObject *)__pyx_v_chunk)); if (!__pyx_t_7) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_pattern_rank), ((PyObject *)__pyx_v_chunk)); if (!__pyx_t_8) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_13 = __pyx_v_max_rank;
+ __pyx_t_7 = PyInt_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_16 = __pyx_v_max_rank;
- __pyx_t_3 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_3, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_t_7, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_19) {
- __Pyx_INCREF(__pyx_t_7);
- __pyx_t_8 = __pyx_t_7;
+ __Pyx_INCREF(__pyx_t_8);
+ __pyx_t_3 = __pyx_t_8;
} else {
- __pyx_t_6 = PyInt_FromLong(__pyx_t_16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_t_13); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_8 = __pyx_t_6;
+ __pyx_t_3 = __pyx_t_6;
__pyx_t_6 = 0;
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_16 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_v_max_rank = __pyx_t_16;
+ __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_max_rank = __pyx_t_13;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":436
+ /* "/home/vchahune/tools/cdec/python/src/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)) # <<<<<<<<<<<<<<
* count_by_rank.arr[max_rank] = count_by_rank.arr[max_rank] + (len(arr)/(arity+1))
*
*/
- __pyx_t_12 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_12 == -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_12));
+ __pyx_t_2 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_2 == -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_2));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":437
+ /* "/home/vchahune/tools/cdec/python/src/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)) # <<<<<<<<<<<<<<
*
* cumul_cost = 0
*/
- __pyx_t_8 = PyInt_FromLong((__pyx_v_count_by_rank->arr[__pyx_v_max_rank])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong((__pyx_v_count_by_rank->arr[__pyx_v_max_rank])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_12 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
__pyx_t_6 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyNumber_Add(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_16 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- (__pyx_v_count_by_rank->arr[__pyx_v_max_rank]) = __pyx_t_16;
+ (__pyx_v_count_by_rank->arr[__pyx_v_max_rank]) = __pyx_t_13;
}
- __pyx_L53:;
+ __pyx_L55:;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":439
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":439
* count_by_rank.arr[max_rank] = count_by_rank.arr[max_rank] + (len(arr)/(arity+1))
*
* cumul_cost = 0 # <<<<<<<<<<<<<<
@@ -30860,7 +30577,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_INCREF(__pyx_int_0);
__pyx_v_cumul_cost = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":440
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":440
*
* cumul_cost = 0
* cumul_count = 0 # <<<<<<<<<<<<<<
@@ -30870,7 +30587,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_INCREF(__pyx_int_0);
__pyx_v_cumul_count = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":441
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":441
* cumul_cost = 0
* cumul_count = 0
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -30880,7 +30597,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_13 = __pyx_v_N;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_13; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":442
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":442
* cumul_count = 0
* for i from 0 <= i < N:
* cumul_cost = cumul_cost + cost_by_rank.arr[i] # <<<<<<<<<<<<<<
@@ -30896,7 +30613,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_cumul_cost = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":443
+ /* "/home/vchahune/tools/cdec/python/src/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] # <<<<<<<<<<<<<<
@@ -30912,7 +30629,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_cumul_count = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":444
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -30926,80 +30643,80 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyInt_FromLong((__pyx_v_count_by_rank->arr[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong((__pyx_v_count_by_rank->arr[__pyx_v_i])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = PyInt_FromLong((__pyx_v_cost_by_rank->arr[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyInt_FromLong((__pyx_v_cost_by_rank->arr[__pyx_v_i])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(((PyObject *)__pyx_kp_s_85));
- PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_85));
+ PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_kp_s_85));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_85));
- PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_cumul_count);
- PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_cumul_count);
+ PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_v_cumul_count);
__Pyx_GIVEREF(__pyx_v_cumul_count);
__Pyx_INCREF(__pyx_v_cumul_cost);
- PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_v_cumul_cost);
+ PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_v_cumul_cost);
__Pyx_GIVEREF(__pyx_v_cumul_cost);
__pyx_t_1 = 0;
+ __pyx_t_7 = 0;
__pyx_t_3 = 0;
- __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":446
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
* for pattern in IJ_set:
* if pattern not in self.precomputed_collocations:
*/
- __pyx_t_8 = __pyx_v_self->precomputed_collocations;
- __Pyx_INCREF(__pyx_t_8);
- __pyx_t_2 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_v_num_found_patterns = __pyx_t_8;
- __pyx_t_8 = 0;
+ __pyx_t_3 = __pyx_v_self->precomputed_collocations;
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_14 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_num_found_patterns = __pyx_t_3;
+ __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":447
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":447
*
* num_found_patterns = len(self.precomputed_collocations)
* for pattern in IJ_set: # <<<<<<<<<<<<<<
* if pattern not in self.precomputed_collocations:
* self.precomputed_collocations[pattern] = IntList()
*/
- __pyx_t_8 = PyObject_GetIter(((PyObject *)__pyx_v_IJ_set)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = Py_TYPE(__pyx_t_8)->tp_iternext;
+ __pyx_t_3 = PyObject_GetIter(((PyObject *)__pyx_v_IJ_set)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
for (;;) {
{
- __pyx_t_7 = __pyx_t_4(__pyx_t_8);
- if (unlikely(!__pyx_t_7)) {
+ __pyx_t_8 = __pyx_t_4(__pyx_t_3);
+ if (unlikely(!__pyx_t_8)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[11]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GOTREF(__pyx_t_8);
}
__Pyx_XDECREF(__pyx_v_pattern);
- __pyx_v_pattern = __pyx_t_7;
- __pyx_t_7 = 0;
+ __pyx_v_pattern = __pyx_t_8;
+ __pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":448
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":448
* num_found_patterns = len(self.precomputed_collocations)
* for pattern in IJ_set:
* if pattern not in self.precomputed_collocations: # <<<<<<<<<<<<<<
@@ -31009,24 +30726,24 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_19 = (__Pyx_NegateNonNeg(PySequence_Contains(__pyx_v_self->precomputed_collocations, __pyx_v_pattern))); if (unlikely(__pyx_t_19 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":449
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":449
* for pattern in IJ_set:
* if pattern not in self.precomputed_collocations:
* self.precomputed_collocations[pattern] = IntList() # <<<<<<<<<<<<<<
*
* cdef float stop_time = monitor_cpu()
*/
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- if (PyObject_SetItem(__pyx_v_self->precomputed_collocations, __pyx_v_pattern, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- goto __pyx_L64;
+ __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ if (PyObject_SetItem(__pyx_v_self->precomputed_collocations, __pyx_v_pattern, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L66;
}
- __pyx_L64:;
+ __pyx_L66:;
}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":451
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":451
* self.precomputed_collocations[pattern] = IntList()
*
* cdef float stop_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -31035,24 +30752,24 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_v_stop_time = __pyx_f_3_sa_monitor_cpu();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":452
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
* logger.info("Precomputed inverted index for %d patterns ", len(self.precomputed_index))
* logger.info("Precomputation took %f seconds", (stop_time - start_time))
*/
- __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = __pyx_v_self->precomputed_collocations;
- __Pyx_INCREF(__pyx_t_8);
- __pyx_t_2 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __pyx_v_self->precomputed_collocations;
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_14 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(((PyObject *)__pyx_kp_s_86));
@@ -31061,74 +30778,74 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_INCREF(__pyx_v_num_found_patterns);
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_num_found_patterns);
__Pyx_GIVEREF(__pyx_v_num_found_patterns);
- PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_x);
__Pyx_GIVEREF(__pyx_v_x);
- __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":453
+ /* "/home/vchahune/tools/cdec/python/src/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)) # <<<<<<<<<<<<<<
* logger.info("Precomputation took %f seconds", (stop_time - start_time))
*/
- __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = __pyx_v_self->precomputed_index;
- __Pyx_INCREF(__pyx_t_8);
- __pyx_t_2 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __pyx_v_self->precomputed_index;
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_14 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(((PyObject *)__pyx_kp_s_87));
- PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_kp_s_87));
+ PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_kp_s_87));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_87));
- PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_8);
- __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":454
+ /* "/home/vchahune/tools/cdec/python/src/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)) # <<<<<<<<<<<<<<
*/
- __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyFloat_FromDouble((__pyx_v_stop_time - __pyx_v_start_time)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyFloat_FromDouble((__pyx_v_stop_time - __pyx_v_start_time)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(((PyObject *)__pyx_kp_s_88));
PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_88));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_88));
- PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_8);
- __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
@@ -31183,14 +30900,14 @@ static int __pyx_pw_3_sa_11SuffixArray_1__cinit__(PyObject *__pyx_v_self, PyObje
PyObject *__pyx_v_from_binary = 0;
PyObject *__pyx_v_from_text = 0;
PyObject *__pyx_v_side = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__from_binary,&__pyx_n_s__from_text,&__pyx_n_s__side,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__from_binary,&__pyx_n_s__from_text,&__pyx_n_s__side,0};
PyObject* values[3] = {0,0,0};
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":11
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":11
* cdef IntList ha
*
* def __cinit__(self, from_binary=None, from_text=None, side=None): # <<<<<<<<<<<<<<
@@ -31269,7 +30986,7 @@ static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArr
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":12
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":12
*
* def __cinit__(self, from_binary=None, from_text=None, side=None):
* self.darray = DataArray() # <<<<<<<<<<<<<<
@@ -31284,7 +31001,7 @@ static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArr
__pyx_v_self->darray = ((struct __pyx_obj_3_sa_DataArray *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":13
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":13
* def __cinit__(self, from_binary=None, from_text=None, side=None):
* self.darray = DataArray()
* self.sa = IntList() # <<<<<<<<<<<<<<
@@ -31299,7 +31016,7 @@ static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArr
__pyx_v_self->sa = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":14
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":14
* self.darray = DataArray()
* self.sa = IntList()
* self.ha = IntList() # <<<<<<<<<<<<<<
@@ -31314,7 +31031,7 @@ static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArr
__pyx_v_self->ha = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":15
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":15
* self.sa = IntList()
* self.ha = IntList()
* if from_binary: # <<<<<<<<<<<<<<
@@ -31324,7 +31041,7 @@ static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArr
__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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":16
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":16
* self.ha = IntList()
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -31346,7 +31063,7 @@ static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArr
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":17
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":17
* if from_binary:
* self.read_binary(from_binary)
* elif from_text: # <<<<<<<<<<<<<<
@@ -31356,7 +31073,7 @@ static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArr
__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) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":18
* self.read_binary(from_binary)
* elif from_text:
* self.read_text(from_text, side) # <<<<<<<<<<<<<<
@@ -31406,7 +31123,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_3__getitem__(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":20
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":20
* self.read_text(from_text, side)
*
* def __getitem__(self, i): # <<<<<<<<<<<<<<
@@ -31424,7 +31141,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_2__getitem__(struct __pyx_obj_3_sa_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":21
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":21
*
* def __getitem__(self, i):
* return self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -31462,7 +31179,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_5getSentId(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":23
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":23
* return self.sa.arr[i]
*
* def getSentId(self, i): # <<<<<<<<<<<<<<
@@ -31481,7 +31198,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4getSentId(struct __pyx_obj_3_sa_Su
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("getSentId", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":24
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":24
*
* def getSentId(self, i):
* return self.darray.getSentId(i) # <<<<<<<<<<<<<<
@@ -31529,7 +31246,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_7getSent(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":26
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":26
* return self.darray.getSentId(i)
*
* def getSent(self, i): # <<<<<<<<<<<<<<
@@ -31548,7 +31265,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6getSent(struct __pyx_obj_3_sa_Suff
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("getSent", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":27
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":27
*
* def getSent(self, i):
* return self.darray.getSent(i) # <<<<<<<<<<<<<<
@@ -31596,7 +31313,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_9getSentPos(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":29
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":29
* return self.darray.getSent(i)
*
* def getSentPos(self, loc): # <<<<<<<<<<<<<<
@@ -31615,7 +31332,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_8getSentPos(struct __pyx_obj_3_sa_S
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("getSentPos", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":30
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":30
*
* def getSentPos(self, loc):
* return self.darray.getSentPos(loc) # <<<<<<<<<<<<<<
@@ -31658,11 +31375,11 @@ static char __pyx_doc_3_sa_11SuffixArray_10read_text[] = "Constructs suffix arra
static PyObject *__pyx_pw_3_sa_11SuffixArray_11read_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_filename = 0;
PyObject *__pyx_v_side = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__side,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_text (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__side,0};
PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -31676,10 +31393,12 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_11read_text(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__filename)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__side)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__side);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("read_text", 1, 2, 2, 1); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -31709,7 +31428,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_11read_text(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":32
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":32
* return self.darray.getSentPos(loc)
*
* def read_text(self, filename, side): # <<<<<<<<<<<<<<
@@ -31749,7 +31468,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_text", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":38
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":38
* cdef IntList isa, word_count
*
* self.darray = DataArray(from_text=filename, side=side, use_sent_id=True) # <<<<<<<<<<<<<<
@@ -31773,7 +31492,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_v_self->darray = ((struct __pyx_obj_3_sa_DataArray *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":39
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":39
*
* self.darray = DataArray(from_text=filename, side=side, use_sent_id=True)
* N = len(self.darray) # <<<<<<<<<<<<<<
@@ -31786,7 +31505,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_N = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":40
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":40
* self.darray = DataArray(from_text=filename, side=side, use_sent_id=True)
* N = len(self.darray)
* V = len(self.darray.id2word) # <<<<<<<<<<<<<<
@@ -31799,7 +31518,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_V = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":42
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":42
* V = len(self.darray.id2word)
*
* self.sa = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -31821,7 +31540,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_v_self->sa = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":43
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":43
*
* self.sa = IntList(initial_len=N)
* self.ha = IntList(initial_len=V+1) # <<<<<<<<<<<<<<
@@ -31843,7 +31562,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_v_self->ha = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":45
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":45
* self.ha = IntList(initial_len=V+1)
*
* isa = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -31862,7 +31581,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_v_isa = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":46
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":46
*
* isa = IntList(initial_len=N)
* word_count = IntList(initial_len=V+1) # <<<<<<<<<<<<<<
@@ -31881,7 +31600,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_v_word_count = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":49
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":49
*
* '''Step 1: bucket sort data'''
* cdef float sort_start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -31890,7 +31609,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_sort_start_time = __pyx_f_3_sa_monitor_cpu();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":50
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":50
* '''Step 1: bucket sort data'''
* cdef float sort_start_time = monitor_cpu()
* cdef float start_time = sort_start_time # <<<<<<<<<<<<<<
@@ -31899,7 +31618,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_start_time = __pyx_v_sort_start_time;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":51
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":51
* cdef float sort_start_time = monitor_cpu()
* cdef float start_time = sort_start_time
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -31909,7 +31628,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_4 = __pyx_v_N;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":52
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":52
* cdef float start_time = sort_start_time
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i] # <<<<<<<<<<<<<<
@@ -31918,7 +31637,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_a_i = (__pyx_v_self->darray->data->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":53
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":53
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i]
* word_count.arr[a_i] = word_count.arr[a_i] + 1 # <<<<<<<<<<<<<<
@@ -31928,7 +31647,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
(__pyx_v_word_count->arr[__pyx_v_a_i]) = ((__pyx_v_word_count->arr[__pyx_v_a_i]) + 1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":55
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":55
* word_count.arr[a_i] = word_count.arr[a_i] + 1
*
* n = 0 # <<<<<<<<<<<<<<
@@ -31937,7 +31656,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_n = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":56
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":56
*
* n = 0
* for i from 0 <= i < V+1: # <<<<<<<<<<<<<<
@@ -31947,7 +31666,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_5 = (__pyx_v_V + 1);
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":57
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":57
* n = 0
* for i from 0 <= i < V+1:
* self.ha.arr[i] = n # <<<<<<<<<<<<<<
@@ -31956,7 +31675,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
(__pyx_v_self->ha->arr[__pyx_v_i]) = __pyx_v_n;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":58
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":58
* for i from 0 <= i < V+1:
* self.ha.arr[i] = n
* n = n + word_count.arr[i] # <<<<<<<<<<<<<<
@@ -31965,7 +31684,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_n = (__pyx_v_n + (__pyx_v_word_count->arr[__pyx_v_i]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":59
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":59
* self.ha.arr[i] = n
* n = n + word_count.arr[i]
* word_count.arr[i] = 0 # <<<<<<<<<<<<<<
@@ -31975,7 +31694,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
(__pyx_v_word_count->arr[__pyx_v_i]) = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":61
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":61
* word_count.arr[i] = 0
*
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -31985,7 +31704,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_4 = __pyx_v_N;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":62
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":62
*
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i] # <<<<<<<<<<<<<<
@@ -31994,7 +31713,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_a_i = (__pyx_v_self->darray->data->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":63
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":63
* 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 # <<<<<<<<<<<<<<
@@ -32003,7 +31722,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
(__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":64
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":64
* 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 # <<<<<<<<<<<<<<
@@ -32012,7 +31731,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
(__pyx_v_isa->arr[__pyx_v_i]) = ((__pyx_v_self->ha->arr[(__pyx_v_a_i + 1)]) - 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":65
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":65
* 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 # <<<<<<<<<<<<<<
@@ -32022,7 +31741,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
(__pyx_v_word_count->arr[__pyx_v_a_i]) = ((__pyx_v_word_count->arr[__pyx_v_a_i]) + 1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":68
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":68
*
* '''Determine size of initial runs'''
* current_run = 0 # <<<<<<<<<<<<<<
@@ -32031,7 +31750,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_current_run = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":69
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":69
* '''Determine size of initial runs'''
* current_run = 0
* for i from 0 <= i < V+1: # <<<<<<<<<<<<<<
@@ -32041,7 +31760,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_5 = (__pyx_v_V + 1);
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":70
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":70
* current_run = 0
* for i from 0 <= i < V+1:
* if i < V and self.ha.arr[i+1] - self.ha.arr[i] == 1: # <<<<<<<<<<<<<<
@@ -32057,7 +31776,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":71
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":71
* 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 # <<<<<<<<<<<<<<
@@ -32069,7 +31788,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":73
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":73
* current_run = current_run + 1
* else:
* if current_run > 0: # <<<<<<<<<<<<<<
@@ -32079,7 +31798,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_8 = (__pyx_v_current_run > 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":74
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":74
* else:
* if current_run > 0:
* self.sa.arr[self.ha.arr[i] - current_run] = -current_run # <<<<<<<<<<<<<<
@@ -32088,7 +31807,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
(__pyx_v_self->sa->arr[((__pyx_v_self->ha->arr[__pyx_v_i]) - __pyx_v_current_run)]) = (-__pyx_v_current_run);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":75
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":75
* if current_run > 0:
* self.sa.arr[self.ha.arr[i] - current_run] = -current_run
* current_run = 0 # <<<<<<<<<<<<<<
@@ -32103,7 +31822,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_L11:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":77
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":77
* current_run = 0
*
* logger.info(" Bucket sort took %f seconds", (monitor_cpu() - sort_start_time)) # <<<<<<<<<<<<<<
@@ -32131,7 +31850,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":80
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":80
*
* '''Step 2: prefix-doubling sort'''
* h = 1 # <<<<<<<<<<<<<<
@@ -32140,7 +31859,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_h = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":81
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":81
* '''Step 2: prefix-doubling sort'''
* h = 1
* while self.sa.arr[0] != -N: # <<<<<<<<<<<<<<
@@ -32151,7 +31870,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_8 = ((__pyx_v_self->sa->arr[0]) != (-__pyx_v_N));
if (!__pyx_t_8) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":82
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":82
* h = 1
* while self.sa.arr[0] != -N:
* sort_start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -32160,7 +31879,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_sort_start_time = __pyx_f_3_sa_monitor_cpu();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":83
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":83
* while self.sa.arr[0] != -N:
* sort_start_time = monitor_cpu()
* logger.debug(" Refining, sort depth = %d", h) # <<<<<<<<<<<<<<
@@ -32188,7 +31907,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":84
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":84
* sort_start_time = monitor_cpu()
* logger.debug(" Refining, sort depth = %d", h)
* i = 0 # <<<<<<<<<<<<<<
@@ -32197,7 +31916,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_i = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":85
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":85
* logger.debug(" Refining, sort depth = %d", h)
* i = 0
* skip = 0 # <<<<<<<<<<<<<<
@@ -32206,7 +31925,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_skip = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":86
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":86
* i = 0
* skip = 0
* while i < N: # <<<<<<<<<<<<<<
@@ -32217,7 +31936,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_8 = (__pyx_v_i < __pyx_v_N);
if (!__pyx_t_8) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":87
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":87
* skip = 0
* while i < N:
* if self.sa.arr[i] < 0: # <<<<<<<<<<<<<<
@@ -32227,7 +31946,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_8 = ((__pyx_v_self->sa->arr[__pyx_v_i]) < 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":88
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":88
* while i < N:
* if self.sa.arr[i] < 0:
* skip = skip + self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -32236,7 +31955,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_skip = (__pyx_v_skip + (__pyx_v_self->sa->arr[__pyx_v_i]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":89
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":89
* if self.sa.arr[i] < 0:
* skip = skip + self.sa.arr[i]
* i = i - self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -32248,7 +31967,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":91
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":91
* i = i - self.sa.arr[i]
* else:
* if skip < 0: # <<<<<<<<<<<<<<
@@ -32258,7 +31977,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_8 = (__pyx_v_skip < 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":92
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":92
* else:
* if skip < 0:
* self.sa.arr[i+skip] = skip # <<<<<<<<<<<<<<
@@ -32267,7 +31986,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
(__pyx_v_self->sa->arr[(__pyx_v_i + __pyx_v_skip)]) = __pyx_v_skip;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":93
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":93
* if skip < 0:
* self.sa.arr[i+skip] = skip
* skip = 0 # <<<<<<<<<<<<<<
@@ -32279,7 +31998,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
}
__pyx_L18:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":94
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":94
* self.sa.arr[i+skip] = skip
* skip = 0
* j = isa.arr[self.sa.arr[i]] # <<<<<<<<<<<<<<
@@ -32288,7 +32007,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_j = (__pyx_v_isa->arr[(__pyx_v_self->sa->arr[__pyx_v_i])]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":95
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":95
* skip = 0
* j = isa.arr[self.sa.arr[i]]
* self.q3sort(i, j, h, isa) # <<<<<<<<<<<<<<
@@ -32323,7 +32042,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":96
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":96
* j = isa.arr[self.sa.arr[i]]
* self.q3sort(i, j, h, isa)
* i = j+1 # <<<<<<<<<<<<<<
@@ -32335,7 +32054,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_L17:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":97
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":97
* self.q3sort(i, j, h, isa)
* i = j+1
* if skip < 0: # <<<<<<<<<<<<<<
@@ -32345,7 +32064,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_8 = (__pyx_v_skip < 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":98
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":98
* i = j+1
* if skip < 0:
* self.sa.arr[i+skip] = skip # <<<<<<<<<<<<<<
@@ -32357,7 +32076,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
}
__pyx_L19:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":99
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":99
* if skip < 0:
* self.sa.arr[i+skip] = skip
* h = h * 2 # <<<<<<<<<<<<<<
@@ -32366,7 +32085,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_h = (__pyx_v_h * 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":100
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":100
* self.sa.arr[i+skip] = skip
* h = h * 2
* logger.debug(" Refinement took %f seconds", (monitor_cpu() - sort_start_time)) # <<<<<<<<<<<<<<
@@ -32395,7 +32114,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":103
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":103
*
* '''Step 3: read off suffix array from inverse suffix array'''
* logger.info(" Finalizing sort...") # <<<<<<<<<<<<<<
@@ -32412,7 +32131,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":104
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":104
* '''Step 3: read off suffix array from inverse suffix array'''
* logger.info(" Finalizing sort...")
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -32422,7 +32141,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
__pyx_t_4 = __pyx_v_N;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":105
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":105
* logger.info(" Finalizing sort...")
* for i from 0 <= i < N:
* j = isa.arr[i] # <<<<<<<<<<<<<<
@@ -32431,7 +32150,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
*/
__pyx_v_j = (__pyx_v_isa->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":106
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":106
* for i from 0 <= i < N:
* j = isa.arr[i]
* self.sa.arr[j] = i # <<<<<<<<<<<<<<
@@ -32441,7 +32160,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_text(struct __pyx_obj_3_sa_S
(__pyx_v_self->sa->arr[__pyx_v_j]) = __pyx_v_i;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":107
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":107
* j = isa.arr[i]
* self.sa.arr[j] = i
* logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time)) # <<<<<<<<<<<<<<
@@ -32496,11 +32215,11 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_13q3sort(PyObject *__pyx_v_self, Py
int __pyx_v_h;
struct __pyx_obj_3_sa_IntList *__pyx_v_isa = 0;
PyObject *__pyx_v_pad = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__i,&__pyx_n_s__j,&__pyx_n_s__h,&__pyx_n_s__isa,&__pyx_n_s__pad,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("q3sort (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__i,&__pyx_n_s__j,&__pyx_n_s__h,&__pyx_n_s__isa,&__pyx_n_s__pad,0};
PyObject* values[5] = {0,0,0,0,0};
values[4] = ((PyObject *)__pyx_kp_s_45);
if (unlikely(__pyx_kwds)) {
@@ -32518,20 +32237,24 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_13q3sort(PyObject *__pyx_v_self, Py
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__j)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__j);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("q3sort", 0, 4, 5, 1); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__h)) != 0)) kw_args--;
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__h);
+ if (likely(values[2])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("q3sort", 0, 4, 5, 2); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__isa)) != 0)) kw_args--;
+ values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__isa);
+ if (likely(values[3])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("q3sort", 0, 4, 5, 3); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -32579,7 +32302,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_13q3sort(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":109
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":109
* logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time))
*
* def q3sort(self, int i, int j, int h, IntList isa, pad=""): # <<<<<<<<<<<<<<
@@ -32609,7 +32332,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("q3sort", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":116
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":116
* cdef int k, midpoint, pval, phead, ptail, tmp
*
* if j-i < -1: # <<<<<<<<<<<<<<
@@ -32619,7 +32342,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = ((__pyx_v_j - __pyx_v_i) < -1);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":117
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":117
*
* if j-i < -1:
* raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j)) # <<<<<<<<<<<<<<
@@ -32656,7 +32379,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":118
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":118
* 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 # <<<<<<<<<<<<<<
@@ -32666,7 +32389,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = ((__pyx_v_j - __pyx_v_i) == -1);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":119
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":119
* raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j))
* if j-i == -1: # recursive base case -- empty interval
* return # <<<<<<<<<<<<<<
@@ -32680,7 +32403,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":120
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":120
* if j-i == -1: # recursive base case -- empty interval
* return
* if (j-i == 0): # recursive base case -- singleton interval # <<<<<<<<<<<<<<
@@ -32690,7 +32413,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = ((__pyx_v_j - __pyx_v_i) == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":121
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":121
* return
* if (j-i == 0): # recursive base case -- singleton interval
* isa.arr[self.sa.arr[i]] = i # <<<<<<<<<<<<<<
@@ -32699,7 +32422,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
(__pyx_v_isa->arr[(__pyx_v_self->sa->arr[__pyx_v_i])]) = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":122
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":122
* if (j-i == 0): # recursive base case -- singleton interval
* isa.arr[self.sa.arr[i]] = i
* self.sa.arr[i] = -1 # <<<<<<<<<<<<<<
@@ -32708,7 +32431,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
(__pyx_v_self->sa->arr[__pyx_v_i]) = -1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":123
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":123
* isa.arr[self.sa.arr[i]] = i
* self.sa.arr[i] = -1
* return # <<<<<<<<<<<<<<
@@ -32722,7 +32445,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":132
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":132
* # If the method of assigning word_id's is changed, this method
* # may need to be reconsidered as well.
* midpoint = (i+j)/2 # <<<<<<<<<<<<<<
@@ -32731,7 +32454,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
__pyx_v_midpoint = __Pyx_div_long((__pyx_v_i + __pyx_v_j), 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":133
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":133
* # may need to be reconsidered as well.
* midpoint = (i+j)/2
* pval = isa.arr[self.sa.arr[midpoint] + h] # <<<<<<<<<<<<<<
@@ -32740,7 +32463,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
__pyx_v_pval = (__pyx_v_isa->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_h)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":134
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":134
* midpoint = (i+j)/2
* pval = isa.arr[self.sa.arr[midpoint] + h]
* if i != midpoint: # <<<<<<<<<<<<<<
@@ -32750,7 +32473,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = (__pyx_v_i != __pyx_v_midpoint);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":135
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":135
* pval = isa.arr[self.sa.arr[midpoint] + h]
* if i != midpoint:
* tmp = self.sa.arr[midpoint] # <<<<<<<<<<<<<<
@@ -32759,7 +32482,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
__pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_midpoint]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":136
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":136
* if i != midpoint:
* tmp = self.sa.arr[midpoint]
* self.sa.arr[midpoint] = self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -32768,7 +32491,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
(__pyx_v_self->sa->arr[__pyx_v_midpoint]) = (__pyx_v_self->sa->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":137
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":137
* tmp = self.sa.arr[midpoint]
* self.sa.arr[midpoint] = self.sa.arr[i]
* self.sa.arr[i] = tmp # <<<<<<<<<<<<<<
@@ -32780,7 +32503,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":138
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":138
* self.sa.arr[midpoint] = self.sa.arr[i]
* self.sa.arr[i] = tmp
* phead = i # <<<<<<<<<<<<<<
@@ -32789,7 +32512,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
__pyx_v_phead = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":139
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":139
* self.sa.arr[i] = tmp
* phead = i
* ptail = i # <<<<<<<<<<<<<<
@@ -32798,7 +32521,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
__pyx_v_ptail = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":143
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":143
* # 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: # <<<<<<<<<<<<<<
@@ -32808,7 +32531,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_5 = (__pyx_v_j + 1);
for (__pyx_v_k = (__pyx_v_i + 1); __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":144
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":144
* # 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: # <<<<<<<<<<<<<<
@@ -32818,7 +32541,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = ((__pyx_v_isa->arr[((__pyx_v_self->sa->arr[__pyx_v_k]) + __pyx_v_h)]) < __pyx_v_pval);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":145
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":145
* for k from i+1 <= k < j+1:
* if isa.arr[self.sa.arr[k] + h] < pval:
* if k > ptail+1: # <<<<<<<<<<<<<<
@@ -32828,7 +32551,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = (__pyx_v_k > (__pyx_v_ptail + 1));
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":146
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":146
* if isa.arr[self.sa.arr[k] + h] < pval:
* if k > ptail+1:
* tmp = self.sa.arr[phead] # <<<<<<<<<<<<<<
@@ -32837,7 +32560,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
__pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_phead]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":147
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":147
* if k > ptail+1:
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k] # <<<<<<<<<<<<<<
@@ -32846,7 +32569,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
(__pyx_v_self->sa->arr[__pyx_v_phead]) = (__pyx_v_self->sa->arr[__pyx_v_k]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":148
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":148
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = self.sa.arr[ptail+1] # <<<<<<<<<<<<<<
@@ -32855,7 +32578,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
(__pyx_v_self->sa->arr[__pyx_v_k]) = (__pyx_v_self->sa->arr[(__pyx_v_ptail + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":149
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":149
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = self.sa.arr[ptail+1]
* self.sa.arr[ptail+1] = tmp # <<<<<<<<<<<<<<
@@ -32867,7 +32590,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":151
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":151
* self.sa.arr[ptail+1] = tmp
* else: # k == ptail+1
* tmp = self.sa.arr[phead] # <<<<<<<<<<<<<<
@@ -32876,7 +32599,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
__pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_phead]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":152
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":152
* else: # k == ptail+1
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k] # <<<<<<<<<<<<<<
@@ -32885,7 +32608,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
(__pyx_v_self->sa->arr[__pyx_v_phead]) = (__pyx_v_self->sa->arr[__pyx_v_k]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":153
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":153
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = tmp # <<<<<<<<<<<<<<
@@ -32896,7 +32619,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
}
__pyx_L10:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":154
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":154
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = tmp
* phead = phead + 1 # <<<<<<<<<<<<<<
@@ -32905,7 +32628,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
__pyx_v_phead = (__pyx_v_phead + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":155
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":155
* self.sa.arr[k] = tmp
* phead = phead + 1
* ptail = ptail + 1 # <<<<<<<<<<<<<<
@@ -32917,7 +32640,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":157
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":157
* ptail = ptail + 1
* else:
* if isa.arr[self.sa.arr[k] + h] == pval: # <<<<<<<<<<<<<<
@@ -32927,7 +32650,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = ((__pyx_v_isa->arr[((__pyx_v_self->sa->arr[__pyx_v_k]) + __pyx_v_h)]) == __pyx_v_pval);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":158
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":158
* else:
* if isa.arr[self.sa.arr[k] + h] == pval:
* if k > ptail+1: # <<<<<<<<<<<<<<
@@ -32937,7 +32660,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = (__pyx_v_k > (__pyx_v_ptail + 1));
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":159
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":159
* if isa.arr[self.sa.arr[k] + h] == pval:
* if k > ptail+1:
* tmp = self.sa.arr[ptail+1] # <<<<<<<<<<<<<<
@@ -32946,7 +32669,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
__pyx_v_tmp = (__pyx_v_self->sa->arr[(__pyx_v_ptail + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":160
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":160
* if k > ptail+1:
* tmp = self.sa.arr[ptail+1]
* self.sa.arr[ptail+1] = self.sa.arr[k] # <<<<<<<<<<<<<<
@@ -32955,7 +32678,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
*/
(__pyx_v_self->sa->arr[(__pyx_v_ptail + 1)]) = (__pyx_v_self->sa->arr[__pyx_v_k]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":161
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":161
* tmp = self.sa.arr[ptail+1]
* self.sa.arr[ptail+1] = self.sa.arr[k]
* self.sa.arr[k] = tmp # <<<<<<<<<<<<<<
@@ -32967,7 +32690,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":162
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":162
* self.sa.arr[ptail+1] = self.sa.arr[k]
* self.sa.arr[k] = tmp
* ptail = ptail + 1 # <<<<<<<<<<<<<<
@@ -32982,7 +32705,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_L9:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":165
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":165
*
* # recursively sort smaller suffixes
* self.q3sort(i, phead-1, h, isa, pad+" ") # <<<<<<<<<<<<<<
@@ -33022,7 +32745,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":169
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":169
* # update suffixes with pivot value
* # corresponds to update_group function in Larsson & Sadakane
* for k from phead <= k < ptail+1: # <<<<<<<<<<<<<<
@@ -33032,7 +32755,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_5 = (__pyx_v_ptail + 1);
for (__pyx_v_k = __pyx_v_phead; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":170
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":170
* # corresponds to update_group function in Larsson & Sadakane
* for k from phead <= k < ptail+1:
* isa.arr[self.sa.arr[k]] = ptail # <<<<<<<<<<<<<<
@@ -33042,7 +32765,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
(__pyx_v_isa->arr[(__pyx_v_self->sa->arr[__pyx_v_k])]) = __pyx_v_ptail;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":171
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":171
* for k from phead <= k < ptail+1:
* isa.arr[self.sa.arr[k]] = ptail
* if phead == ptail: # <<<<<<<<<<<<<<
@@ -33052,7 +32775,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = (__pyx_v_phead == __pyx_v_ptail);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":172
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":172
* isa.arr[self.sa.arr[k]] = ptail
* if phead == ptail:
* self.sa.arr[phead] = -1 # <<<<<<<<<<<<<<
@@ -33064,7 +32787,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12q3sort(struct __pyx_obj_3_sa_Suff
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":175
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":175
*
* # recursively sort larger suffixes
* self.q3sort(ptail+1, j, h, isa, pad+" ") # <<<<<<<<<<<<<<
@@ -33142,7 +32865,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_15write_text(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":178
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":178
*
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -33161,7 +32884,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_text(struct __pyx_obj_3_sa_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_text", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":179
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":179
*
* def write_text(self, char* filename):
* self.darray.write_text(filename) # <<<<<<<<<<<<<<
@@ -33218,7 +32941,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_17read_binary(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":181
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":181
* self.darray.write_text(filename)
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -33232,7 +32955,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16read_binary(struct __pyx_obj_3_sa
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":183
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":183
* def read_binary(self, char* filename):
* cdef FILE *f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -33241,7 +32964,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16read_binary(struct __pyx_obj_3_sa
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__r);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":184
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":184
* cdef FILE *f
* f = fopen(filename, "r")
* self.darray.read_handle(f) # <<<<<<<<<<<<<<
@@ -33250,7 +32973,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16read_binary(struct __pyx_obj_3_sa
*/
((struct __pyx_vtabstruct_3_sa_DataArray *)__pyx_v_self->darray->__pyx_vtab)->read_handle(__pyx_v_self->darray, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":185
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":185
* f = fopen(filename, "r")
* self.darray.read_handle(f)
* self.sa.read_handle(f) # <<<<<<<<<<<<<<
@@ -33259,7 +32982,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16read_binary(struct __pyx_obj_3_sa
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sa->__pyx_vtab)->read_handle(__pyx_v_self->sa, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":186
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":186
* self.darray.read_handle(f)
* self.sa.read_handle(f)
* self.ha.read_handle(f) # <<<<<<<<<<<<<<
@@ -33268,7 +32991,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16read_binary(struct __pyx_obj_3_sa
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->ha->__pyx_vtab)->read_handle(__pyx_v_self->ha, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":187
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":187
* self.sa.read_handle(f)
* self.ha.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -33304,7 +33027,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_19write_binary(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":189
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":189
* fclose(f)
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -33318,7 +33041,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_18write_binary(struct __pyx_obj_3_s
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":191
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":191
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -33327,7 +33050,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_18write_binary(struct __pyx_obj_3_s
*/
__pyx_v_f = fopen(__pyx_v_filename, __pyx_k__w);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":192
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":192
* cdef FILE* f
* f = fopen(filename, "w")
* self.darray.write_handle(f) # <<<<<<<<<<<<<<
@@ -33336,7 +33059,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_18write_binary(struct __pyx_obj_3_s
*/
((struct __pyx_vtabstruct_3_sa_DataArray *)__pyx_v_self->darray->__pyx_vtab)->write_handle(__pyx_v_self->darray, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":193
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":193
* f = fopen(filename, "w")
* self.darray.write_handle(f)
* self.sa.write_handle(f) # <<<<<<<<<<<<<<
@@ -33345,7 +33068,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_18write_binary(struct __pyx_obj_3_s
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sa->__pyx_vtab)->write_handle(__pyx_v_self->sa, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":194
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":194
* self.darray.write_handle(f)
* self.sa.write_handle(f)
* self.ha.write_handle(f) # <<<<<<<<<<<<<<
@@ -33354,7 +33077,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_18write_binary(struct __pyx_obj_3_s
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->ha->__pyx_vtab)->write_handle(__pyx_v_self->ha, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":195
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":195
* self.sa.write_handle(f)
* self.ha.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -33390,7 +33113,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_21write_enhanced(PyObject *__pyx_v_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":197
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":197
* fclose(f)
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -33422,7 +33145,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_enhanced", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":198
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":198
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -33462,7 +33185,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
__pyx_v_f = __pyx_t_4;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":199
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":199
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* self.darray.write_enhanced_handle(f) # <<<<<<<<<<<<<<
@@ -33482,7 +33205,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":200
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":200
* with open(filename, "w") as f:
* self.darray.write_enhanced_handle(f)
* for a_i in self.sa: # <<<<<<<<<<<<<<
@@ -33500,18 +33223,10 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
for (;;) {
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_1 = __pyx_t_9(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {
@@ -33527,7 +33242,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
__pyx_v_a_i = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":201
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":201
* self.darray.write_enhanced_handle(f)
* for a_i in self.sa:
* f.write("%d " % a_i) # <<<<<<<<<<<<<<
@@ -33551,7 +33266,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":202
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":202
* for a_i in self.sa:
* f.write("%d " % a_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -33565,7 +33280,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":203
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":203
* f.write("%d " % a_i)
* f.write("\n")
* for w_i in self.ha: # <<<<<<<<<<<<<<
@@ -33583,18 +33298,10 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
for (;;) {
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_4)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_4)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L7_error;};
- #endif
} else {
__pyx_t_2 = __pyx_t_9(__pyx_t_4);
if (unlikely(!__pyx_t_2)) {
@@ -33610,7 +33317,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
__pyx_v_w_i = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":204
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":204
* f.write("\n")
* for w_i in self.ha:
* f.write("%d " % w_i) # <<<<<<<<<<<<<<
@@ -33634,7 +33341,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":205
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":205
* for w_i in self.ha:
* f.write("%d " % w_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -33658,7 +33365,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":198
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":198
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -33756,7 +33463,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_20write_enhanced(struct __pyx_obj_3
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":207
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":207
* f.write("\n")
*
* cdef int __search_high(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -33771,7 +33478,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_high(struct __pyx_obj_3_sa_Suffix
int __pyx_t_1;
__Pyx_RefNannySetupContext("__search_high", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":210
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":210
* cdef int midpoint
*
* if low >= high: # <<<<<<<<<<<<<<
@@ -33781,7 +33488,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_high(struct __pyx_obj_3_sa_Suffix
__pyx_t_1 = (__pyx_v_low >= __pyx_v_high);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":211
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":211
*
* if low >= high:
* return high # <<<<<<<<<<<<<<
@@ -33794,7 +33501,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_high(struct __pyx_obj_3_sa_Suffix
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":212
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":212
* if low >= high:
* return high
* midpoint = (high + low) / 2 # <<<<<<<<<<<<<<
@@ -33803,7 +33510,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_high(struct __pyx_obj_3_sa_Suffix
*/
__pyx_v_midpoint = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":213
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":213
* return high
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<<
@@ -33813,7 +33520,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_high(struct __pyx_obj_3_sa_Suffix
__pyx_t_1 = ((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) == __pyx_v_word_id);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":214
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":214
* 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) # <<<<<<<<<<<<<<
@@ -33826,7 +33533,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_high(struct __pyx_obj_3_sa_Suffix
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":216
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":216
* return self.__search_high(word_id, offset, midpoint+1, high)
* else:
* return self.__search_high(word_id, offset, low, midpoint) # <<<<<<<<<<<<<<
@@ -33844,7 +33551,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_high(struct __pyx_obj_3_sa_Suffix
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":218
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":218
* return self.__search_high(word_id, offset, low, midpoint)
*
* cdef int __search_low(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -33859,7 +33566,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_low(struct __pyx_obj_3_sa_SuffixA
int __pyx_t_1;
__Pyx_RefNannySetupContext("__search_low", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":221
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":221
* cdef int midpoint
*
* if low >= high: # <<<<<<<<<<<<<<
@@ -33869,7 +33576,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_low(struct __pyx_obj_3_sa_SuffixA
__pyx_t_1 = (__pyx_v_low >= __pyx_v_high);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":222
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":222
*
* if low >= high:
* return high # <<<<<<<<<<<<<<
@@ -33882,7 +33589,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_low(struct __pyx_obj_3_sa_SuffixA
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":223
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":223
* if low >= high:
* return high
* midpoint = (high + low) / 2 # <<<<<<<<<<<<<<
@@ -33891,7 +33598,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_low(struct __pyx_obj_3_sa_SuffixA
*/
__pyx_v_midpoint = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":224
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":224
* return high
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<<
@@ -33901,7 +33608,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_low(struct __pyx_obj_3_sa_SuffixA
__pyx_t_1 = ((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) == __pyx_v_word_id);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":225
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":225
* 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) # <<<<<<<<<<<<<<
@@ -33914,7 +33621,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_low(struct __pyx_obj_3_sa_SuffixA
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":227
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":227
* return self.__search_low(word_id, offset, low, midpoint)
* else:
* return self.__search_low(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<<
@@ -33932,7 +33639,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_low(struct __pyx_obj_3_sa_SuffixA
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":229
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":229
* 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): # <<<<<<<<<<<<<<
@@ -33951,7 +33658,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___get_range(struct __pyx_obj_3_sa_Su
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get_range", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":230
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":230
*
* cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint):
* return (self.__search_low(word_id, offset, low, midpoint), # <<<<<<<<<<<<<<
@@ -33962,7 +33669,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___get_range(struct __pyx_obj_3_sa_Su
__pyx_t_1 = PyInt_FromLong(((struct __pyx_vtabstruct_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 = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":231
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":231
* 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)) # <<<<<<<<<<<<<<
@@ -33997,7 +33704,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___get_range(struct __pyx_obj_3_sa_Su
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":233
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":233
* self.__search_high(word_id, offset, midpoint, high))
*
* cdef __lookup_helper(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -34018,7 +33725,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__lookup_helper", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":236
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":236
* cdef int midpoint
*
* if offset == 0: # <<<<<<<<<<<<<<
@@ -34028,7 +33735,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
__pyx_t_1 = (__pyx_v_offset == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":237
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":237
*
* if offset == 0:
* return (self.ha.arr[word_id], self.ha.arr[word_id+1]) # <<<<<<<<<<<<<<
@@ -34055,7 +33762,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":238
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":238
* if offset == 0:
* return (self.ha.arr[word_id], self.ha.arr[word_id+1])
* if low >= high: # <<<<<<<<<<<<<<
@@ -34065,7 +33772,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
__pyx_t_1 = (__pyx_v_low >= __pyx_v_high);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":239
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":239
* return (self.ha.arr[word_id], self.ha.arr[word_id+1])
* if low >= high:
* return None # <<<<<<<<<<<<<<
@@ -34080,7 +33787,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":241
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":241
* return None
*
* midpoint = (high + low) / 2 # <<<<<<<<<<<<<<
@@ -34089,7 +33796,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
*/
__pyx_v_midpoint = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":242
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":242
*
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<<
@@ -34099,7 +33806,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
__pyx_t_1 = ((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) == __pyx_v_word_id);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":243
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":243
* 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) # <<<<<<<<<<<<<<
@@ -34116,7 +33823,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":244
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":244
* 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: # <<<<<<<<<<<<<<
@@ -34126,7 +33833,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
__pyx_t_1 = ((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) > __pyx_v_word_id);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":245
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":245
* 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) # <<<<<<<<<<<<<<
@@ -34143,7 +33850,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":247
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":247
* return self.__lookup_helper(word_id, offset, low, midpoint)
* else:
* return self.__lookup_helper(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<<
@@ -34180,11 +33887,11 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_23lookup(PyObject *__pyx_v_self, Py
int __pyx_v_offset;
int __pyx_v_low;
int __pyx_v_high;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__word,&__pyx_n_s__offset,&__pyx_n_s__low,&__pyx_n_s__high,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("lookup (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__word,&__pyx_n_s__offset,&__pyx_n_s__low,&__pyx_n_s__high,0};
PyObject* values[4] = {0,0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -34200,20 +33907,24 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_23lookup(PyObject *__pyx_v_self, Py
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__word)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__word);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__offset)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__offset);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("lookup", 1, 4, 4, 1); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__low)) != 0)) kw_args--;
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__low);
+ if (likely(values[2])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("lookup", 1, 4, 4, 2); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__high)) != 0)) kw_args--;
+ values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__high);
+ if (likely(values[3])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("lookup", 1, 4, 4, 3); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -34247,7 +33958,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_23lookup(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":249
+/* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":249
* return self.__lookup_helper(word_id, offset, midpoint+1, high)
*
* def lookup(self, word, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -34268,7 +33979,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_22lookup(struct __pyx_obj_3_sa_Suff
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("lookup", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":251
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":251
* def lookup(self, word, int offset, int low, int high):
* cdef int wordid
* if low == -1: # <<<<<<<<<<<<<<
@@ -34278,7 +33989,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_22lookup(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = (__pyx_v_low == -1);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":252
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":252
* cdef int wordid
* if low == -1:
* low = 0 # <<<<<<<<<<<<<<
@@ -34290,7 +34001,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_22lookup(struct __pyx_obj_3_sa_Suff
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":253
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":253
* if low == -1:
* low = 0
* if high == -1: # <<<<<<<<<<<<<<
@@ -34300,7 +34011,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_22lookup(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = (__pyx_v_high == -1);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":254
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":254
* low = 0
* if high == -1:
* high = len(self.sa) # <<<<<<<<<<<<<<
@@ -34316,7 +34027,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_22lookup(struct __pyx_obj_3_sa_Suff
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":255
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":255
* if high == -1:
* high = len(self.sa)
* if word in self.darray.word2id: # <<<<<<<<<<<<<<
@@ -34326,7 +34037,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_22lookup(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = ((PySequence_Contains(__pyx_v_self->darray->word2id, __pyx_v_word))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":256
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":256
* high = len(self.sa)
* if word in self.darray.word2id:
* word_id = self.darray.word2id[word] # <<<<<<<<<<<<<<
@@ -34338,7 +34049,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_22lookup(struct __pyx_obj_3_sa_Suff
__pyx_v_word_id = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":257
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":257
* if word in self.darray.word2id:
* word_id = self.darray.word2id[word]
* return self.__lookup_helper(word_id, offset, low, high) # <<<<<<<<<<<<<<
@@ -34356,7 +34067,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_22lookup(struct __pyx_obj_3_sa_Suff
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":259
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":259
* return self.__lookup_helper(word_id, offset, low, high)
* else:
* return None # <<<<<<<<<<<<<<
@@ -34395,7 +34106,7 @@ static int __pyx_pw_3_sa_13FeatureVector_1__cinit__(PyObject *__pyx_v_self, PyOb
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":7
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":7
*
* cdef class FeatureVector:
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -34414,7 +34125,7 @@ static int __pyx_pf_3_sa_13FeatureVector___cinit__(struct __pyx_obj_3_sa_Feature
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":8
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":8
* cdef class FeatureVector:
* def __cinit__(self):
* self.names = IntList(INITIAL_CAPACITY, INCREMENT) # <<<<<<<<<<<<<<
@@ -34442,7 +34153,7 @@ static int __pyx_pf_3_sa_13FeatureVector___cinit__(struct __pyx_obj_3_sa_Feature
__pyx_v_self->names = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":9
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":9
* def __cinit__(self):
* self.names = IntList(INITIAL_CAPACITY, INCREMENT)
* self.values = FloatList(INITIAL_CAPACITY, INCREMENT) # <<<<<<<<<<<<<<
@@ -34488,11 +34199,11 @@ static PyObject *__pyx_pw_3_sa_13FeatureVector_3set(PyObject *__pyx_v_self, PyOb
static PyObject *__pyx_pw_3_sa_13FeatureVector_3set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
unsigned int __pyx_v_name;
float __pyx_v_value;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__value,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__value,0};
PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -34506,10 +34217,12 @@ static PyObject *__pyx_pw_3_sa_13FeatureVector_3set(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__name)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[13]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -34539,7 +34252,7 @@ static PyObject *__pyx_pw_3_sa_13FeatureVector_3set(PyObject *__pyx_v_self, PyOb
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":11
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":11
* self.values = FloatList(INITIAL_CAPACITY, INCREMENT)
*
* def set(self, unsigned name, float value): # <<<<<<<<<<<<<<
@@ -34557,7 +34270,7 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_2set(struct __pyx_obj_3_sa_Featur
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":12
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":12
*
* def set(self, unsigned name, float value):
* self.names.append(name) # <<<<<<<<<<<<<<
@@ -34571,7 +34284,7 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_2set(struct __pyx_obj_3_sa_Featur
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":13
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":13
* def set(self, unsigned name, float value):
* self.names.append(name)
* self.values.append(value) # <<<<<<<<<<<<<<
@@ -34610,7 +34323,7 @@ static PyObject *__pyx_pw_3_sa_13FeatureVector_5__iter__(PyObject *__pyx_v_self)
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":15
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":15
* self.values.append(value)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -34676,7 +34389,7 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_6generator4(__pyx_GeneratorObject
__pyx_L3_first_run:;
if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":17
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":17
* def __iter__(self):
* cdef unsigned i
* for i in range(self.names.len): # <<<<<<<<<<<<<<
@@ -34687,7 +34400,7 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_6generator4(__pyx_GeneratorObject
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_cur_scope->__pyx_v_i = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":18
* cdef unsigned i
* for i in range(self.names.len):
* yield (FD.word(self.names[i]), self.values[i]) # <<<<<<<<<<<<<<
@@ -34734,7 +34447,6 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_6generator4(__pyx_GeneratorObject
__pyx_L0:;
__Pyx_XDECREF(__pyx_r);
__pyx_generator->resume_label = -1;
- __Pyx_Generator_clear((PyObject*)__pyx_generator);
__Pyx_RefNannyFinishContext();
return NULL;
}
@@ -34751,7 +34463,7 @@ static PyObject *__pyx_pw_3_sa_13FeatureVector_8__str__(PyObject *__pyx_v_self)
}
static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":21
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":21
*
* def __str__(self):
* return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<<
@@ -34826,18 +34538,10 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator8(__pyx_Genera
for (;;) {
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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
@@ -34885,12 +34589,11 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator8(__pyx_Genera
__pyx_L0:;
__Pyx_XDECREF(__pyx_r);
__pyx_generator->resume_label = -1;
- __Pyx_Generator_clear((PyObject*)__pyx_generator);
__Pyx_RefNannyFinishContext();
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":20
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":20
* yield (FD.word(self.names[i]), self.values[i])
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -34919,7 +34622,7 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str__(struct __pyx_obj_3_sa_Fe
__Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
__Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":21
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":21
*
* def __str__(self):
* return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<<
@@ -34975,7 +34678,7 @@ static int __pyx_pw_3_sa_6Scorer_1__init__(PyObject *__pyx_v_self, PyObject *__p
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":25
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":25
* cdef class Scorer:
* cdef models
* def __init__(self, *models): # <<<<<<<<<<<<<<
@@ -34998,7 +34701,7 @@ static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":26
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":26
* cdef models
* def __init__(self, *models):
* names = [FD.index(<char *>model.__name__) for model in models] # <<<<<<<<<<<<<<
@@ -35010,11 +34713,7 @@ static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_
__pyx_t_2 = ((PyObject *)__pyx_v_models); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
for (;;) {
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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
__Pyx_XDECREF(__pyx_v_model);
__pyx_v_model = __pyx_t_4;
__pyx_t_4 = 0;
@@ -35024,7 +34723,7 @@ static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = PyInt_FromLong(((struct __pyx_vtabstruct_3_sa_StringMap *)__pyx_v_3_sa_FD->__pyx_vtab)->index(__pyx_v_3_sa_FD, ((char *)__pyx_t_5))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 26; __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;
@@ -35032,7 +34731,7 @@ static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_
__pyx_v_names = __pyx_t_1;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":27
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":27
* def __init__(self, *models):
* names = [FD.index(<char *>model.__name__) for model in models]
* self.models = zip(names, models) # <<<<<<<<<<<<<<
@@ -35071,7 +34770,7 @@ static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":29
+/* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":29
* self.models = zip(names, models)
*
* cdef FeatureVector score(self, Phrase fphrase, Phrase ephrase, # <<<<<<<<<<<<<<
@@ -35099,7 +34798,7 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("score", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":31
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":31
* cdef FeatureVector score(self, Phrase fphrase, Phrase ephrase,
* unsigned paircount, unsigned fcount, unsigned fsample_count):
* cdef FeatureVector scores = FeatureVector() # <<<<<<<<<<<<<<
@@ -35111,7 +34810,7 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
__pyx_v_scores = ((struct __pyx_obj_3_sa_FeatureVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":32
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":32
* unsigned paircount, unsigned fcount, unsigned fsample_count):
* cdef FeatureVector scores = FeatureVector()
* for name, model in self.models: # <<<<<<<<<<<<<<
@@ -35129,18 +34828,10 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
for (;;) {
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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 32; __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++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
@@ -35154,33 +34845,27 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
}
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
PyObject* sequence = __pyx_t_4;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[13]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[13]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[13]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_5 = PyList_GET_ITEM(sequence, 0);
__pyx_t_6 = PyList_GET_ITEM(sequence, 1);
}
__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[13]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- } else
- {
+ } else {
Py_ssize_t index = -1;
__pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
@@ -35191,13 +34876,12 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
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[13]; __pyx_lineno = 32; __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;
__pyx_L5_unpacking_failed:;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_8 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[13]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L6_unpacking_done:;
}
@@ -35208,12 +34892,11 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
__pyx_v_model = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":33
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":33
* cdef FeatureVector scores = FeatureVector()
* for name, model in self.models:
* scores.set(name, model(fphrase, ephrase, paircount, fcount, fsample_count)) # <<<<<<<<<<<<<<
* return scores
- *
*/
__pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_scores), __pyx_n_s__set); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
@@ -35259,12 +34942,10 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":34
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":34
* for name, model in self.models:
* scores.set(name, model(fphrase, ephrase, paircount, fcount, fsample_count))
* return scores # <<<<<<<<<<<<<<
- *
- * from libc.stdlib cimport malloc, realloc, free
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
__Pyx_INCREF(((PyObject *)__pyx_v_scores));
@@ -35292,954 +34973,6 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
}
/* Python wrapper */
-static void __pyx_pw_3_sa_13DefaultScorer_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_3_sa_13DefaultScorer_1__dealloc__(PyObject *__pyx_v_self) {
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_pf_3_sa_13DefaultScorer___dealloc__(((struct __pyx_obj_3_sa_DefaultScorer *)__pyx_v_self));
- __Pyx_RefNannyFinishContext();
-}
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":53
- * cdef int* fid
- *
- * def __dealloc__(self): # <<<<<<<<<<<<<<
- * free(self.fid)
- *
- */
-
-static void __pyx_pf_3_sa_13DefaultScorer___dealloc__(struct __pyx_obj_3_sa_DefaultScorer *__pyx_v_self) {
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__dealloc__", 0);
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":54
- *
- * def __dealloc__(self):
- * free(self.fid) # <<<<<<<<<<<<<<
- *
- * def __init__(self, BiLex ttable):
- */
- free(__pyx_v_self->fid);
-
- __Pyx_RefNannyFinishContext();
-}
-
-/* Python wrapper */
-static int __pyx_pw_3_sa_13DefaultScorer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_13DefaultScorer_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- struct __pyx_obj_3_sa_BiLex *__pyx_v_ttable = 0;
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
- {
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ttable,0};
- PyObject* values[1] = {0};
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ttable)) != 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[13]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- }
- __pyx_v_ttable = ((struct __pyx_obj_3_sa_BiLex *)values[0]);
- }
- 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[13]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_L3_error:;
- __Pyx_AddTraceback("_sa.DefaultScorer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return -1;
- __pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ttable), __pyx_ptype_3_sa_BiLex, 1, "ttable", 0))) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_13DefaultScorer_2__init__(((struct __pyx_obj_3_sa_DefaultScorer *)__pyx_v_self), __pyx_v_ttable);
- goto __pyx_L0;
- __pyx_L1_error:;
- __pyx_r = -1;
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":56
- * free(self.fid)
- *
- * def __init__(self, BiLex ttable): # <<<<<<<<<<<<<<
- * self.ttable = ttable
- * self.fid = <int*> malloc(NFEATURES*sizeof(int))
- */
-
-static int __pyx_pf_3_sa_13DefaultScorer_2__init__(struct __pyx_obj_3_sa_DefaultScorer *__pyx_v_self, struct __pyx_obj_3_sa_BiLex *__pyx_v_ttable) {
- unsigned int __pyx_v_i;
- PyObject *__pyx_v_fnames = NULL;
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- size_t __pyx_t_4;
- unsigned int __pyx_t_5;
- Py_ssize_t __pyx_t_6;
- char *__pyx_t_7;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__init__", 0);
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":57
- *
- * def __init__(self, BiLex ttable):
- * self.ttable = ttable # <<<<<<<<<<<<<<
- * self.fid = <int*> malloc(NFEATURES*sizeof(int))
- * cdef unsigned i
- */
- __Pyx_INCREF(((PyObject *)__pyx_v_ttable));
- __Pyx_GIVEREF(((PyObject *)__pyx_v_ttable));
- __Pyx_GOTREF(__pyx_v_self->ttable);
- __Pyx_DECREF(((PyObject *)__pyx_v_self->ttable));
- __pyx_v_self->ttable = __pyx_v_ttable;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":58
- * def __init__(self, BiLex ttable):
- * self.ttable = ttable
- * self.fid = <int*> malloc(NFEATURES*sizeof(int)) # <<<<<<<<<<<<<<
- * cdef unsigned i
- * for i, fnames in enumerate(('EgivenFCoherent', 'SampleCountF', 'CountEF',
- */
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__NFEATURES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_v_self->fid = ((int *)malloc(__pyx_t_4));
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":60
- * self.fid = <int*> malloc(NFEATURES*sizeof(int))
- * cdef unsigned i
- * for i, fnames in enumerate(('EgivenFCoherent', 'SampleCountF', 'CountEF', # <<<<<<<<<<<<<<
- * 'MaxLexFgivenE', 'MaxLexEgivenF', 'IsSingletonF', 'IsSingletonFE')):
- * self.fid[i] = FD.index(fnames)
- */
- __pyx_t_5 = 0;
- __pyx_t_3 = ((PyObject *)__pyx_k_tuple_100); __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
- for (;;) {
- if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- __Pyx_XDECREF(__pyx_v_fnames);
- __pyx_v_fnames = __pyx_t_2;
- __pyx_t_2 = 0;
- __pyx_v_i = __pyx_t_5;
- __pyx_t_5 = (__pyx_t_5 + 1);
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":62
- * for i, fnames in enumerate(('EgivenFCoherent', 'SampleCountF', 'CountEF',
- * 'MaxLexFgivenE', 'MaxLexEgivenF', 'IsSingletonF', 'IsSingletonFE')):
- * self.fid[i] = FD.index(fnames) # <<<<<<<<<<<<<<
- *
- * cdef FeatureVector score(self, Phrase fphrase, Phrase ephrase,
- */
- __pyx_t_7 = PyBytes_AsString(__pyx_v_fnames); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- (__pyx_v_self->fid[__pyx_v_i]) = ((struct __pyx_vtabstruct_3_sa_StringMap *)__pyx_v_3_sa_FD->__pyx_vtab)->index(__pyx_v_3_sa_FD, __pyx_t_7);
- }
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
- __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.DefaultScorer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_fnames);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":64
- * self.fid[i] = FD.index(fnames)
- *
- * cdef FeatureVector score(self, Phrase fphrase, Phrase ephrase, # <<<<<<<<<<<<<<
- * unsigned paircount, unsigned fcount, unsigned fsample_count):
- * cdef FeatureVector scores = FeatureVector()
- */
-
-static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_13DefaultScorer_score(struct __pyx_obj_3_sa_DefaultScorer *__pyx_v_self, struct __pyx_obj_3_sa_Phrase *__pyx_v_fphrase, struct __pyx_obj_3_sa_Phrase *__pyx_v_ephrase, unsigned int __pyx_v_paircount, unsigned int __pyx_v_fcount, unsigned int __pyx_v_fsample_count) {
- struct __pyx_obj_3_sa_FeatureVector *__pyx_v_scores = 0;
- float __pyx_v_efc;
- PyObject *__pyx_v_ewords = NULL;
- float __pyx_v_mlfe;
- float __pyx_v_max_score;
- PyObject *__pyx_v_f = NULL;
- PyObject *__pyx_v_e = NULL;
- PyObject *__pyx_v_score = NULL;
- PyObject *__pyx_v_fwords = NULL;
- float __pyx_v_mlef;
- struct __pyx_obj_3_sa_FeatureVector *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- Py_ssize_t __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *(*__pyx_t_6)(PyObject *);
- Py_ssize_t __pyx_t_7;
- PyObject *(*__pyx_t_8)(PyObject *);
- PyObject *__pyx_t_9 = NULL;
- int __pyx_t_10;
- float __pyx_t_11;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("score", 0);
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":66
- * cdef FeatureVector score(self, Phrase fphrase, Phrase ephrase,
- * unsigned paircount, unsigned fcount, unsigned fsample_count):
- * cdef FeatureVector scores = FeatureVector() # <<<<<<<<<<<<<<
- *
- * # EgivenFCoherent
- */
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_FeatureVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_scores = ((struct __pyx_obj_3_sa_FeatureVector *)__pyx_t_1);
- __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":69
- *
- * # EgivenFCoherent
- * cdef float efc = <float>paircount/fsample_count # <<<<<<<<<<<<<<
- * scores.set(self.fid[EgivenFCoherent], -log10(efc) if efc > 0 else MAXSCORE)
- *
- */
- if (unlikely(__pyx_v_fsample_count == 0)) {
- PyErr_Format(PyExc_ZeroDivisionError, "float division");
- {__pyx_filename = __pyx_f[13]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- __pyx_v_efc = (((float)__pyx_v_paircount) / __pyx_v_fsample_count);
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":70
- * # EgivenFCoherent
- * cdef float efc = <float>paircount/fsample_count
- * scores.set(self.fid[EgivenFCoherent], -log10(efc) if efc > 0 else MAXSCORE) # <<<<<<<<<<<<<<
- *
- * # SampleCountF
- */
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_scores), __pyx_n_s__set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__EgivenFCoherent); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyInt_FromLong((__pyx_v_self->fid[__pyx_t_3])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- if ((__pyx_v_efc > 0.0)) {
- __pyx_t_5 = PyFloat_FromDouble((-log10(__pyx_v_efc))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = __pyx_t_5;
- __pyx_t_5 = 0;
- } else {
- __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__MAXSCORE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = __pyx_t_5;
- __pyx_t_5 = 0;
- }
- __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 70; __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_4);
- __Pyx_GIVEREF(__pyx_t_4);
- __pyx_t_2 = 0;
- __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 70; __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_5)); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":73
- *
- * # SampleCountF
- * scores.set(self.fid[SampleCountF], log10(1 + fsample_count)) # <<<<<<<<<<<<<<
- *
- * # CountEF
- */
- __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_scores), __pyx_n_s__set); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__SampleCountF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyInt_FromLong((__pyx_v_self->fid[__pyx_t_3])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = PyFloat_FromDouble(log10((1 + __pyx_v_fsample_count))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 73; __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[13]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
- __pyx_t_5 = 0;
- __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 73; __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_2)); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":76
- *
- * # CountEF
- * scores.set(self.fid[CountEF], log10(1 + paircount)) # <<<<<<<<<<<<<<
- *
- * # MaxLexFgivenE TODO typify
- */
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_scores), __pyx_n_s__set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CountEF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyInt_FromLong((__pyx_v_self->fid[__pyx_t_3])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyFloat_FromDouble(log10((1 + __pyx_v_paircount))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 76; __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[13]; __pyx_lineno = 76; __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_4);
- __Pyx_GIVEREF(__pyx_t_4);
- __pyx_t_2 = 0;
- __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 76; __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_5)); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":79
- *
- * # MaxLexFgivenE TODO typify
- * ewords = ephrase.words # <<<<<<<<<<<<<<
- * ewords.append('NULL')
- * cdef float mlfe = 0, max_score = -1
- */
- __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_ephrase), __pyx_n_s__words); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_v_ewords = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":80
- * # MaxLexFgivenE TODO typify
- * ewords = ephrase.words
- * ewords.append('NULL') # <<<<<<<<<<<<<<
- * cdef float mlfe = 0, max_score = -1
- * for f in fphrase.words:
- */
- __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_ewords, ((PyObject *)__pyx_n_s__NULL)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":81
- * ewords = ephrase.words
- * ewords.append('NULL')
- * cdef float mlfe = 0, max_score = -1 # <<<<<<<<<<<<<<
- * for f in fphrase.words:
- * for e in ewords:
- */
- __pyx_v_mlfe = 0.0;
- __pyx_v_max_score = -1.0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":82
- * ewords.append('NULL')
- * cdef float mlfe = 0, max_score = -1
- * for f in fphrase.words: # <<<<<<<<<<<<<<
- * for e in ewords:
- * score = self.ttable.get_score(f, e, 1)
- */
- __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_fphrase), __pyx_n_s__words); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 82; __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_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0;
- __pyx_t_6 = NULL;
- } else {
- __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- for (;;) {
- if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_5)) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_5)) {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else {
- __pyx_t_4 = __pyx_t_6(__pyx_t_5);
- if (unlikely(!__pyx_t_4)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[13]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_4);
- }
- __Pyx_XDECREF(__pyx_v_f);
- __pyx_v_f = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":83
- * cdef float mlfe = 0, max_score = -1
- * for f in fphrase.words:
- * for e in ewords: # <<<<<<<<<<<<<<
- * score = self.ttable.get_score(f, e, 1)
- * if score > max_score:
- */
- if (PyList_CheckExact(__pyx_v_ewords) || PyTuple_CheckExact(__pyx_v_ewords)) {
- __pyx_t_4 = __pyx_v_ewords; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
- __pyx_t_8 = NULL;
- } else {
- __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_ewords); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
- }
- for (;;) {
- if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_4)) {
- if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_4)) {
- if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else {
- __pyx_t_1 = __pyx_t_8(__pyx_t_4);
- if (unlikely(!__pyx_t_1)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[13]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_XDECREF(__pyx_v_e);
- __pyx_v_e = __pyx_t_1;
- __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":84
- * for f in fphrase.words:
- * for e in ewords:
- * score = self.ttable.get_score(f, e, 1) # <<<<<<<<<<<<<<
- * if score > max_score:
- * max_score = score
- */
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->ttable), __pyx_n_s__get_score); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 84; __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);
- __Pyx_GIVEREF(__pyx_v_f);
- __Pyx_INCREF(__pyx_v_e);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_e);
- __Pyx_GIVEREF(__pyx_v_e);
- __Pyx_INCREF(__pyx_int_1);
- PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_1);
- __Pyx_GIVEREF(__pyx_int_1);
- __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __Pyx_XDECREF(__pyx_v_score);
- __pyx_v_score = __pyx_t_9;
- __pyx_t_9 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":85
- * for e in ewords:
- * score = self.ttable.get_score(f, e, 1)
- * if score > max_score: # <<<<<<<<<<<<<<
- * max_score = score
- * mlfe += -log10(max_score) if max_score > 0 else MAXSCORE
- */
- __pyx_t_9 = PyFloat_FromDouble(__pyx_v_max_score); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_score, __pyx_t_9, Py_GT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__pyx_t_10) {
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":86
- * score = self.ttable.get_score(f, e, 1)
- * if score > max_score:
- * max_score = score # <<<<<<<<<<<<<<
- * mlfe += -log10(max_score) if max_score > 0 else MAXSCORE
- * scores.set(self.fid[MaxLexFgivenE], mlfe)
- */
- __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_v_score); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_max_score = __pyx_t_11;
- goto __pyx_L7;
- }
- __pyx_L7:;
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":87
- * if score > max_score:
- * max_score = score
- * mlfe += -log10(max_score) if max_score > 0 else MAXSCORE # <<<<<<<<<<<<<<
- * scores.set(self.fid[MaxLexFgivenE], mlfe)
- *
- */
- __pyx_t_4 = PyFloat_FromDouble(__pyx_v_mlfe); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- if ((__pyx_v_max_score > 0.0)) {
- __pyx_t_9 = PyFloat_FromDouble((-log10(__pyx_v_max_score))); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = __pyx_t_9;
- __pyx_t_9 = 0;
- } else {
- __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__MAXSCORE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = __pyx_t_9;
- __pyx_t_9 = 0;
- }
- __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_t_9); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_v_mlfe = __pyx_t_11;
- }
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":88
- * max_score = score
- * mlfe += -log10(max_score) if max_score > 0 else MAXSCORE
- * scores.set(self.fid[MaxLexFgivenE], mlfe) # <<<<<<<<<<<<<<
- *
- * # MaxLexEgivenF TODO same
- */
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_scores), __pyx_n_s__set); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__MaxLexFgivenE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyInt_FromLong((__pyx_v_self->fid[__pyx_t_3])); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = PyFloat_FromDouble(__pyx_v_mlfe); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_2);
- __pyx_t_9 = 0;
- __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":91
- *
- * # MaxLexEgivenF TODO same
- * fwords = fphrase.words # <<<<<<<<<<<<<<
- * fwords.append('NULL')
- * cdef float mlef = 0
- */
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_fphrase), __pyx_n_s__words); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_v_fwords = __pyx_t_2;
- __pyx_t_2 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":92
- * # MaxLexEgivenF TODO same
- * fwords = fphrase.words
- * fwords.append('NULL') # <<<<<<<<<<<<<<
- * cdef float mlef = 0
- * max_score = -1
- */
- __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_fwords, ((PyObject *)__pyx_n_s__NULL)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":93
- * fwords = fphrase.words
- * fwords.append('NULL')
- * cdef float mlef = 0 # <<<<<<<<<<<<<<
- * max_score = -1
- * for e in ephrase.words:
- */
- __pyx_v_mlef = 0.0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":94
- * fwords.append('NULL')
- * cdef float mlef = 0
- * max_score = -1 # <<<<<<<<<<<<<<
- * for e in ephrase.words:
- * for f in fwords:
- */
- __pyx_v_max_score = -1.0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":95
- * cdef float mlef = 0
- * max_score = -1
- * for e in ephrase.words: # <<<<<<<<<<<<<<
- * for f in fwords:
- * score = self.ttable.get_score(f, e, 0)
- */
- __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_ephrase), __pyx_n_s__words); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 95; __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_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
- __pyx_t_6 = NULL;
- } else {
- __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- for (;;) {
- if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else {
- __pyx_t_2 = __pyx_t_6(__pyx_t_4);
- if (unlikely(!__pyx_t_2)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[13]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_XDECREF(__pyx_v_e);
- __pyx_v_e = __pyx_t_2;
- __pyx_t_2 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":96
- * max_score = -1
- * for e in ephrase.words:
- * for f in fwords: # <<<<<<<<<<<<<<
- * score = self.ttable.get_score(f, e, 0)
- * if score > max_score:
- */
- if (PyList_CheckExact(__pyx_v_fwords) || PyTuple_CheckExact(__pyx_v_fwords)) {
- __pyx_t_2 = __pyx_v_fwords; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
- __pyx_t_8 = NULL;
- } else {
- __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_fwords); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext;
- }
- for (;;) {
- if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_2)) {
- if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_2)) {
- if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++;
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else {
- __pyx_t_5 = __pyx_t_8(__pyx_t_2);
- if (unlikely(!__pyx_t_5)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[13]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_5);
- }
- __Pyx_XDECREF(__pyx_v_f);
- __pyx_v_f = __pyx_t_5;
- __pyx_t_5 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":97
- * for e in ephrase.words:
- * for f in fwords:
- * score = self.ttable.get_score(f, e, 0) # <<<<<<<<<<<<<<
- * if score > max_score:
- * max_score = score
- */
- __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self->ttable), __pyx_n_s__get_score); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_INCREF(__pyx_v_f);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_f);
- __Pyx_GIVEREF(__pyx_v_f);
- __Pyx_INCREF(__pyx_v_e);
- PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_e);
- __Pyx_GIVEREF(__pyx_v_e);
- __Pyx_INCREF(__pyx_int_0);
- PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_int_0);
- __Pyx_GIVEREF(__pyx_int_0);
- __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __Pyx_XDECREF(__pyx_v_score);
- __pyx_v_score = __pyx_t_1;
- __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":98
- * for f in fwords:
- * score = self.ttable.get_score(f, e, 0)
- * if score > max_score: # <<<<<<<<<<<<<<
- * max_score = score
- * mlef += -log10(max_score) if max_score > 0 else MAXSCORE
- */
- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_max_score); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = PyObject_RichCompare(__pyx_v_score, __pyx_t_1, Py_GT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (__pyx_t_10) {
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":99
- * score = self.ttable.get_score(f, e, 0)
- * if score > max_score:
- * max_score = score # <<<<<<<<<<<<<<
- * mlef += -log10(max_score) if max_score > 0 else MAXSCORE
- * scores.set(self.fid[MaxLexEgivenF], mlef)
- */
- __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_v_score); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_max_score = __pyx_t_11;
- goto __pyx_L12;
- }
- __pyx_L12:;
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":100
- * if score > max_score:
- * max_score = score
- * mlef += -log10(max_score) if max_score > 0 else MAXSCORE # <<<<<<<<<<<<<<
- * scores.set(self.fid[MaxLexEgivenF], mlef)
- *
- */
- __pyx_t_2 = PyFloat_FromDouble(__pyx_v_mlef); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- if ((__pyx_v_max_score > 0.0)) {
- __pyx_t_1 = PyFloat_FromDouble((-log10(__pyx_v_max_score))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __pyx_t_1;
- __pyx_t_1 = 0;
- } else {
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__MAXSCORE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __pyx_t_1;
- __pyx_t_1 = 0;
- }
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 100; __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_9); __pyx_t_9 = 0;
- __pyx_t_11 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_11 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_mlef = __pyx_t_11;
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":101
- * max_score = score
- * mlef += -log10(max_score) if max_score > 0 else MAXSCORE
- * scores.set(self.fid[MaxLexEgivenF], mlef) # <<<<<<<<<<<<<<
- *
- * # IsSingletonF
- */
- __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_scores), __pyx_n_s__set); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__MaxLexEgivenF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromLong((__pyx_v_self->fid[__pyx_t_3])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = PyFloat_FromDouble(__pyx_v_mlef); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 101; __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, 1, __pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_9);
- __pyx_t_1 = 0;
- __pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":104
- *
- * # IsSingletonF
- * scores.set(self.fid[IsSingletonF], (fcount == 1)) # <<<<<<<<<<<<<<
- *
- * # IsSingletonFE
- */
- __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_scores), __pyx_n_s__set); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__IsSingletonF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyInt_FromLong((__pyx_v_self->fid[__pyx_t_3])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_fcount == 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 104; __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);
- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_4);
- __pyx_t_2 = 0;
- __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":107
- *
- * # IsSingletonFE
- * scores.set(self.fid[IsSingletonFE], (paircount == 1)) # <<<<<<<<<<<<<<
- *
- * return scores
- */
- __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_scores), __pyx_n_s__set); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__IsSingletonFE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromLong((__pyx_v_self->fid[__pyx_t_3])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __Pyx_PyBool_FromLong((__pyx_v_paircount == 1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 107; __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, 1, __pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_9);
- __pyx_t_1 = 0;
- __pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":109
- * scores.set(self.fid[IsSingletonFE], (paircount == 1))
- *
- * return scores # <<<<<<<<<<<<<<
- */
- __Pyx_XDECREF(((PyObject *)__pyx_r));
- __Pyx_INCREF(((PyObject *)__pyx_v_scores));
- __pyx_r = __pyx_v_scores;
- goto __pyx_L0;
-
- __pyx_r = ((struct __pyx_obj_3_sa_FeatureVector *)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_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_AddTraceback("_sa.DefaultScorer.score", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XDECREF((PyObject *)__pyx_v_scores);
- __Pyx_XDECREF(__pyx_v_ewords);
- __Pyx_XDECREF(__pyx_v_f);
- __Pyx_XDECREF(__pyx_v_e);
- __Pyx_XDECREF(__pyx_v_score);
- __Pyx_XDECREF(__pyx_v_fwords);
- __Pyx_XGIVEREF((PyObject *)__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
static int __pyx_pw_3_sa_8TrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3_sa_8TrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_r;
@@ -36253,7 +34986,7 @@ static int __pyx_pw_3_sa_8TrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":23
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":23
* cdef public children
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -36270,7 +35003,7 @@ static int __pyx_pf_3_sa_8TrieNode___cinit__(struct __pyx_obj_3_sa_TrieNode *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":24
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":24
*
* def __cinit__(self):
* self.children = {} # <<<<<<<<<<<<<<
@@ -36307,7 +35040,7 @@ static PyObject *__pyx_pw_3_sa_8TrieNode_8children_1__get__(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":21
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":21
*
* cdef class TrieNode:
* cdef public children # <<<<<<<<<<<<<<
@@ -36389,14 +35122,14 @@ static int __pyx_pw_3_sa_16ExtendedTrieNode_1__cinit__(PyObject *__pyx_v_self, P
PyObject *__pyx_v_phrase = 0;
PyObject *__pyx_v_phrase_location = 0;
PyObject *__pyx_v_suffix_link = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__phrase,&__pyx_n_s__phrase_location,&__pyx_n_s__suffix_link,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__phrase,&__pyx_n_s__phrase_location,&__pyx_n_s__suffix_link,0};
PyObject* values[3] = {0,0,0};
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":31
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":31
* cdef public suffix_link
*
* def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): # <<<<<<<<<<<<<<
@@ -36468,7 +35201,7 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj_3_sa_Exte
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":32
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":32
*
* def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None):
* self.phrase = phrase # <<<<<<<<<<<<<<
@@ -36481,7 +35214,7 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj_3_sa_Exte
__Pyx_DECREF(__pyx_v_self->phrase);
__pyx_v_self->phrase = __pyx_v_phrase;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":33
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":33
* def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None):
* self.phrase = phrase
* self.phrase_location = phrase_location # <<<<<<<<<<<<<<
@@ -36494,7 +35227,7 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj_3_sa_Exte
__Pyx_DECREF(__pyx_v_self->phrase_location);
__pyx_v_self->phrase_location = __pyx_v_phrase_location;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":34
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":34
* self.phrase = phrase
* self.phrase_location = phrase_location
* self.suffix_link = suffix_link # <<<<<<<<<<<<<<
@@ -36523,7 +35256,7 @@ static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_6phrase_1__get__(PyObject *__p
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":27
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":27
*
* cdef class ExtendedTrieNode(TrieNode):
* cdef public phrase # <<<<<<<<<<<<<<
@@ -36610,7 +35343,7 @@ static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_1__get__(PyO
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":28
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":28
* cdef class ExtendedTrieNode(TrieNode):
* cdef public phrase
* cdef public phrase_location # <<<<<<<<<<<<<<
@@ -36697,7 +35430,7 @@ static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_1__get__(PyObjec
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":29
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":29
* cdef public phrase
* cdef public phrase_location
* cdef public suffix_link # <<<<<<<<<<<<<<
@@ -36777,13 +35510,13 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link_4__del__(struct __pyx_
static int __pyx_pw_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_extended = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__extended,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__extended,0};
PyObject* values[1] = {0};
- values[0] = __pyx_k_101;
+ values[0] = __pyx_k_100;
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -36825,7 +35558,7 @@ static int __pyx_pw_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":41
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":41
* cdef public int count
* cdef public root
* def __cinit__(self, extended=False): # <<<<<<<<<<<<<<
@@ -36844,7 +35577,7 @@ static int __pyx_pf_3_sa_9TrieTable___cinit__(struct __pyx_obj_3_sa_TrieTable *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":42
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":42
* cdef public root
* def __cinit__(self, extended=False):
* self.count = 0 # <<<<<<<<<<<<<<
@@ -36853,7 +35586,7 @@ static int __pyx_pf_3_sa_9TrieTable___cinit__(struct __pyx_obj_3_sa_TrieTable *_
*/
__pyx_v_self->count = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":43
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":43
* def __cinit__(self, extended=False):
* self.count = 0
* self.extended = extended # <<<<<<<<<<<<<<
@@ -36863,7 +35596,7 @@ static int __pyx_pf_3_sa_9TrieTable___cinit__(struct __pyx_obj_3_sa_TrieTable *_
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_extended); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->extended = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":44
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":44
* self.count = 0
* self.extended = extended
* if extended: # <<<<<<<<<<<<<<
@@ -36873,7 +35606,7 @@ static int __pyx_pf_3_sa_9TrieTable___cinit__(struct __pyx_obj_3_sa_TrieTable *_
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_extended); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":45
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":45
* self.extended = extended
* if extended:
* self.root = ExtendedTrieNode() # <<<<<<<<<<<<<<
@@ -36891,7 +35624,7 @@ static int __pyx_pf_3_sa_9TrieTable___cinit__(struct __pyx_obj_3_sa_TrieTable *_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":47
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":47
* self.root = ExtendedTrieNode()
* else:
* self.root = TrieNode() # <<<<<<<<<<<<<<
@@ -36930,7 +35663,7 @@ static PyObject *__pyx_pw_3_sa_9TrieTable_8extended_1__get__(PyObject *__pyx_v_s
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":38
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":38
*
* cdef class TrieTable:
* cdef public int extended # <<<<<<<<<<<<<<
@@ -37008,7 +35741,7 @@ static PyObject *__pyx_pw_3_sa_9TrieTable_5count_1__get__(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":39
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":39
* cdef class TrieTable:
* cdef public int extended
* cdef public int count # <<<<<<<<<<<<<<
@@ -37086,7 +35819,7 @@ static PyObject *__pyx_pw_3_sa_9TrieTable_4root_1__get__(PyObject *__pyx_v_self)
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":40
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":40
* cdef public int extended
* cdef public int count
* cdef public root # <<<<<<<<<<<<<<
@@ -37162,7 +35895,7 @@ static int __pyx_pf_3_sa_9TrieTable_4root_4__del__(struct __pyx_obj_3_sa_TrieTab
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":67
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":67
*
* # returns true if sent_id is contained
* cdef int contains(self, int sent_id): # <<<<<<<<<<<<<<
@@ -37175,7 +35908,7 @@ static int __pyx_f_3_sa_14PhraseLocation_contains(CYTHON_UNUSED struct __pyx_obj
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("contains", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":68
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":68
* # returns true if sent_id is contained
* cdef int contains(self, int sent_id):
* return 1 # <<<<<<<<<<<<<<
@@ -37200,14 +35933,14 @@ static int __pyx_pw_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyO
int __pyx_v_arr_high;
PyObject *__pyx_v_arr = 0;
int __pyx_v_num_subpatterns;
+ 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};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- 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};
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":71
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":71
*
* 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): # <<<<<<<<<<<<<<
@@ -37264,6 +35997,26 @@ static int __pyx_pw_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyO
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 = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
+ if (values[0]) {
+ } else {
+ __pyx_v_sa_low = ((int)-1);
+ }
+ if (values[1]) {
+ } else {
+ __pyx_v_sa_high = ((int)-1);
+ }
+ if (values[2]) {
+ } else {
+ __pyx_v_arr_low = ((int)-1);
+ }
+ if (values[3]) {
+ } else {
+ __pyx_v_arr_high = ((int)-1);
+ }
+ if (values[5]) {
+ } else {
+ __pyx_v_num_subpatterns = ((int)1);
+ }
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
@@ -37316,7 +36069,7 @@ static int __pyx_pw_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyO
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":70
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":70
* return 1
*
* def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, # <<<<<<<<<<<<<<
@@ -37332,7 +36085,7 @@ static int __pyx_pf_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_3_sa_Phrase
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":72
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":72
* 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 # <<<<<<<<<<<<<<
@@ -37341,7 +36094,7 @@ static int __pyx_pf_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_3_sa_Phrase
*/
__pyx_v_self->sa_low = __pyx_v_sa_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":73
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":73
* arr=None, int num_subpatterns=1):
* self.sa_low = sa_low
* self.sa_high = sa_high # <<<<<<<<<<<<<<
@@ -37350,7 +36103,7 @@ static int __pyx_pf_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_3_sa_Phrase
*/
__pyx_v_self->sa_high = __pyx_v_sa_high;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":74
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":74
* self.sa_low = sa_low
* self.sa_high = sa_high
* self.arr_low = arr_low # <<<<<<<<<<<<<<
@@ -37359,7 +36112,7 @@ static int __pyx_pf_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_3_sa_Phrase
*/
__pyx_v_self->arr_low = __pyx_v_arr_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":75
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":75
* self.sa_high = sa_high
* self.arr_low = arr_low
* self.arr_high = arr_high # <<<<<<<<<<<<<<
@@ -37368,7 +36121,7 @@ static int __pyx_pf_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_3_sa_Phrase
*/
__pyx_v_self->arr_high = __pyx_v_arr_high;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":76
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":76
* self.arr_low = arr_low
* self.arr_high = arr_high
* self.arr = arr # <<<<<<<<<<<<<<
@@ -37382,7 +36135,7 @@ static int __pyx_pf_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_3_sa_Phrase
__Pyx_DECREF(((PyObject *)__pyx_v_self->arr));
__pyx_v_self->arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_v_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":77
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":77
* self.arr_high = arr_high
* self.arr = arr
* self.num_subpatterns = num_subpatterns # <<<<<<<<<<<<<<
@@ -37406,11 +36159,11 @@ static int __pyx_pw_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, PyObject *_
static int __pyx_pw_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_sample_size;
struct __pyx_obj_3_sa_SuffixArray *__pyx_v_fsarray = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sample_size,&__pyx_n_s__fsarray,0};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sample_size,&__pyx_n_s__fsarray,0};
PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -37424,10 +36177,12 @@ static int __pyx_pw_3_sa_7Sampler_1__cinit__(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__sample_size)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sample_size);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fsarray)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fsarray);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -37462,7 +36217,7 @@ static int __pyx_pw_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, PyObject *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":87
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":87
* cdef IntList sa
*
* def __cinit__(self, int sample_size, SuffixArray fsarray): # <<<<<<<<<<<<<<
@@ -37482,7 +36237,7 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":88
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":88
*
* def __cinit__(self, int sample_size, SuffixArray fsarray):
* self.sample_size = sample_size # <<<<<<<<<<<<<<
@@ -37491,7 +36246,7 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
*/
__pyx_v_self->sample_size = __pyx_v_sample_size;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":89
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":89
* def __cinit__(self, int sample_size, SuffixArray fsarray):
* self.sample_size = sample_size
* self.sa = fsarray.sa # <<<<<<<<<<<<<<
@@ -37504,7 +36259,7 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
__Pyx_DECREF(((PyObject *)__pyx_v_self->sa));
__pyx_v_self->sa = __pyx_v_fsarray->sa;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":90
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":90
* self.sample_size = sample_size
* self.sa = fsarray.sa
* if sample_size > 0: # <<<<<<<<<<<<<<
@@ -37514,7 +36269,7 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
__pyx_t_1 = (__pyx_v_sample_size > 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":91
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":91
* self.sa = fsarray.sa
* if sample_size > 0:
* logger.info("Sampling strategy: uniform, max sample size = %d", sample_size) # <<<<<<<<<<<<<<
@@ -37530,9 +36285,9 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_102));
- PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_102));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_102));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_101));
+ PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_101));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_101));
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
@@ -37545,7 +36300,7 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":93
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":93
* logger.info("Sampling strategy: uniform, max sample size = %d", sample_size)
* else:
* logger.info("Sampling strategy: no sampling") # <<<<<<<<<<<<<<
@@ -37557,7 +36312,7 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
__pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 93; __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_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 93; __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_2); __pyx_t_2 = 0;
@@ -37594,7 +36349,7 @@ static PyObject *__pyx_pw_3_sa_7Sampler_3sample(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":95
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":95
* logger.info("Sampling strategy: no sampling")
*
* def sample(self, PhraseLocation phrase_location): # <<<<<<<<<<<<<<
@@ -37621,7 +36376,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("sample", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":108
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":108
* cdef int num_locations, val, j
*
* sample = IntList() # <<<<<<<<<<<<<<
@@ -37633,7 +36388,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
__pyx_v_sample = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":109
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":109
*
* sample = IntList()
* if phrase_location.arr is None: # <<<<<<<<<<<<<<
@@ -37643,7 +36398,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
__pyx_t_2 = (((PyObject *)__pyx_v_phrase_location->arr) == Py_None);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":110
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":110
* sample = IntList()
* if phrase_location.arr is None:
* num_locations = phrase_location.sa_high - phrase_location.sa_low # <<<<<<<<<<<<<<
@@ -37652,7 +36407,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
*/
__pyx_v_num_locations = (__pyx_v_phrase_location->sa_high - __pyx_v_phrase_location->sa_low);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":111
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":111
* 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: # <<<<<<<<<<<<<<
@@ -37668,7 +36423,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":112
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":112
* 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) # <<<<<<<<<<<<<<
@@ -37680,7 +36435,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":114
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":114
* sample._extend_arr(self.sa.arr + phrase_location.sa_low, num_locations)
* else:
* stepsize = float(num_locations)/float(self.sample_size) # <<<<<<<<<<<<<<
@@ -37693,7 +36448,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
__pyx_v_stepsize = (((double)__pyx_v_num_locations) / ((double)__pyx_v_self->sample_size));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":115
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":115
* else:
* stepsize = float(num_locations)/float(self.sample_size)
* i = phrase_location.sa_low # <<<<<<<<<<<<<<
@@ -37702,7 +36457,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
*/
__pyx_v_i = __pyx_v_phrase_location->sa_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":116
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":116
* 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: # <<<<<<<<<<<<<<
@@ -37719,7 +36474,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":119
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":119
* '''Note: int(i) not guaranteed to have the desired
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5: # <<<<<<<<<<<<<<
@@ -37729,7 +36484,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
__pyx_t_3 = (fmod(__pyx_v_i, 1.0) > 0.5);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":120
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":120
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5:
* val = int(ceil(i)) # <<<<<<<<<<<<<<
@@ -37741,7 +36496,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":122
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":122
* val = int(ceil(i))
* else:
* val = int(floor(i)) # <<<<<<<<<<<<<<
@@ -37752,7 +36507,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":123
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":123
* else:
* val = int(floor(i))
* sample._append(self.sa.arr[val]) # <<<<<<<<<<<<<<
@@ -37761,7 +36516,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_sample->__pyx_vtab)->_append(__pyx_v_sample, (__pyx_v_self->sa->arr[__pyx_v_val]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":124
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":124
* val = int(floor(i))
* sample._append(self.sa.arr[val])
* i = i + stepsize # <<<<<<<<<<<<<<
@@ -37776,7 +36531,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":126
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":126
* i = i + stepsize
* else:
* num_locations = (phrase_location.arr_high - phrase_location.arr_low) / phrase_location.num_subpatterns # <<<<<<<<<<<<<<
@@ -37794,7 +36549,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
__pyx_v_num_locations = __Pyx_div_int(__pyx_t_5, __pyx_v_phrase_location->num_subpatterns);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":127
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":127
* 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: # <<<<<<<<<<<<<<
@@ -37810,7 +36565,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":128
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":128
* 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 # <<<<<<<<<<<<<<
@@ -37824,7 +36579,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":130
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":130
* sample = phrase_location.arr
* else:
* stepsize = float(num_locations)/float(self.sample_size) # <<<<<<<<<<<<<<
@@ -37837,7 +36592,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
__pyx_v_stepsize = (((double)__pyx_v_num_locations) / ((double)__pyx_v_self->sample_size));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":131
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":131
* else:
* stepsize = float(num_locations)/float(self.sample_size)
* i = phrase_location.arr_low # <<<<<<<<<<<<<<
@@ -37846,7 +36601,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
*/
__pyx_v_i = __pyx_v_phrase_location->arr_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":132
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":132
* 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: # <<<<<<<<<<<<<<
@@ -37863,7 +36618,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
if (!__pyx_t_4) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":135
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":135
* '''Note: int(i) not guaranteed to have the desired
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5: # <<<<<<<<<<<<<<
@@ -37873,7 +36628,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
__pyx_t_4 = (fmod(__pyx_v_i, 1.0) > 0.5);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":136
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":136
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5:
* val = int(ceil(i)) # <<<<<<<<<<<<<<
@@ -37885,7 +36640,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":138
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":138
* val = int(ceil(i))
* else:
* val = int(floor(i)) # <<<<<<<<<<<<<<
@@ -37896,7 +36651,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":139
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":139
* else:
* val = int(floor(i))
* j = phrase_location.arr_low + (val*phrase_location.num_subpatterns) # <<<<<<<<<<<<<<
@@ -37905,7 +36660,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
*/
__pyx_v_j = (__pyx_v_phrase_location->arr_low + (__pyx_v_val * __pyx_v_phrase_location->num_subpatterns));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":140
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":140
* 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) # <<<<<<<<<<<<<<
@@ -37914,7 +36669,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
*/
((struct __pyx_vtabstruct_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":141
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":141
* 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 # <<<<<<<<<<<<<<
@@ -37928,7 +36683,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":142
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":142
* sample._extend_arr(phrase_location.arr.arr + j, phrase_location.num_subpatterns)
* i = i + stepsize
* return sample # <<<<<<<<<<<<<<
@@ -37953,7 +36708,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":154
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":154
*
*
* cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): # <<<<<<<<<<<<<<
@@ -37965,7 +36720,7 @@ static void __pyx_f_3_sa_assign_matching(struct __pyx_t_3_sa_Matching *__pyx_v_m
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("assign_matching", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":155
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":155
*
* cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr):
* m.arr = arr # <<<<<<<<<<<<<<
@@ -37974,7 +36729,7 @@ static void __pyx_f_3_sa_assign_matching(struct __pyx_t_3_sa_Matching *__pyx_v_m
*/
__pyx_v_m->arr = __pyx_v_arr;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":156
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":156
* cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr):
* m.arr = arr
* m.start = start # <<<<<<<<<<<<<<
@@ -37983,7 +36738,7 @@ static void __pyx_f_3_sa_assign_matching(struct __pyx_t_3_sa_Matching *__pyx_v_m
*/
__pyx_v_m->start = __pyx_v_start;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":157
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":157
* m.arr = arr
* m.start = start
* m.end = start + step # <<<<<<<<<<<<<<
@@ -37992,7 +36747,7 @@ static void __pyx_f_3_sa_assign_matching(struct __pyx_t_3_sa_Matching *__pyx_v_m
*/
__pyx_v_m->end = (__pyx_v_start + __pyx_v_step);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":158
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":158
* m.start = start
* m.end = start + step
* m.sent_id = sent_id_arr[arr[start]] # <<<<<<<<<<<<<<
@@ -38001,7 +36756,7 @@ static void __pyx_f_3_sa_assign_matching(struct __pyx_t_3_sa_Matching *__pyx_v_m
*/
__pyx_v_m->sent_id = (__pyx_v_sent_id_arr[(__pyx_v_arr[__pyx_v_start])]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":159
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":159
* m.end = start + step
* m.sent_id = sent_id_arr[arr[start]]
* m.size = step # <<<<<<<<<<<<<<
@@ -38013,7 +36768,7 @@ static void __pyx_f_3_sa_assign_matching(struct __pyx_t_3_sa_Matching *__pyx_v_m
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":162
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":162
*
*
* cdef int* append_combined_matching(int* arr, Matching* loc1, Matching* loc2, # <<<<<<<<<<<<<<
@@ -38030,7 +36785,7 @@ static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx
int __pyx_t_2;
__Pyx_RefNannySetupContext("append_combined_matching", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":166
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":166
* cdef int i, new_len
*
* new_len = result_len[0] + num_subpatterns # <<<<<<<<<<<<<<
@@ -38039,7 +36794,7 @@ static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx
*/
__pyx_v_new_len = ((__pyx_v_result_len[0]) + __pyx_v_num_subpatterns);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":167
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":167
*
* new_len = result_len[0] + num_subpatterns
* arr = <int*> realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -38048,7 +36803,7 @@ static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx
*/
__pyx_v_arr = ((int *)realloc(__pyx_v_arr, (__pyx_v_new_len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":169
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":169
* arr = <int*> realloc(arr, new_len*sizeof(int))
*
* for i from 0 <= i < loc1.size: # <<<<<<<<<<<<<<
@@ -38058,7 +36813,7 @@ static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx
__pyx_t_1 = __pyx_v_loc1->size;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":170
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":170
*
* for i from 0 <= i < loc1.size:
* arr[result_len[0]+i] = loc1.arr[loc1.start+i] # <<<<<<<<<<<<<<
@@ -38068,7 +36823,7 @@ static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx
(__pyx_v_arr[((__pyx_v_result_len[0]) + __pyx_v_i)]) = (__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":171
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":171
* for i from 0 <= i < loc1.size:
* arr[result_len[0]+i] = loc1.arr[loc1.start+i]
* if num_subpatterns > loc1.size: # <<<<<<<<<<<<<<
@@ -38078,7 +36833,7 @@ static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx
__pyx_t_2 = (__pyx_v_num_subpatterns > __pyx_v_loc1->size);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":172
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":172
* arr[result_len[0]+i] = loc1.arr[loc1.start+i]
* if num_subpatterns > loc1.size:
* arr[new_len-1] = loc2.arr[loc2.end-1] # <<<<<<<<<<<<<<
@@ -38090,7 +36845,7 @@ static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":173
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":173
* if num_subpatterns > loc1.size:
* arr[new_len-1] = loc2.arr[loc2.end-1]
* result_len[0] = new_len # <<<<<<<<<<<<<<
@@ -38099,7 +36854,7 @@ static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx
*/
(__pyx_v_result_len[0]) = __pyx_v_new_len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":174
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":174
* arr[new_len-1] = loc2.arr[loc2.end-1]
* result_len[0] = new_len
* return arr # <<<<<<<<<<<<<<
@@ -38115,7 +36870,7 @@ static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":177
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":177
*
*
* cdef int* extend_arr(int* arr, int* arr_len, int* appendix, int appendix_len): # <<<<<<<<<<<<<<
@@ -38129,7 +36884,7 @@ static int *__pyx_f_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr_len, int
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("extend_arr", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":180
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":180
* cdef int new_len
*
* new_len = arr_len[0] + appendix_len # <<<<<<<<<<<<<<
@@ -38138,7 +36893,7 @@ static int *__pyx_f_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr_len, int
*/
__pyx_v_new_len = ((__pyx_v_arr_len[0]) + __pyx_v_appendix_len);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":181
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":181
*
* new_len = arr_len[0] + appendix_len
* arr = <int*> realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -38147,7 +36902,7 @@ static int *__pyx_f_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr_len, int
*/
__pyx_v_arr = ((int *)realloc(__pyx_v_arr, (__pyx_v_new_len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":182
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":182
* new_len = arr_len[0] + appendix_len
* arr = <int*> realloc(arr, new_len*sizeof(int))
* memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -38156,7 +36911,7 @@ static int *__pyx_f_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr_len, int
*/
memcpy((__pyx_v_arr + (__pyx_v_arr_len[0])), __pyx_v_appendix, (__pyx_v_appendix_len * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":183
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":183
* arr = <int*> realloc(arr, new_len*sizeof(int))
* memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int))
* arr_len[0] = new_len # <<<<<<<<<<<<<<
@@ -38165,7 +36920,7 @@ static int *__pyx_f_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr_len, int
*/
(__pyx_v_arr_len[0]) = __pyx_v_new_len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":184
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":184
* memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int))
* arr_len[0] = new_len
* return arr # <<<<<<<<<<<<<<
@@ -38181,7 +36936,7 @@ static int *__pyx_f_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr_len, int
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":186
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":186
* return arr
*
* cdef int median(int low, int high, int step): # <<<<<<<<<<<<<<
@@ -38198,7 +36953,7 @@ static int __pyx_f_3_sa_median(int __pyx_v_low, int __pyx_v_high, int __pyx_v_st
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("median", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":187
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":187
*
* cdef int median(int low, int high, int step):
* return low + (((high - low)/step)/2)*step # <<<<<<<<<<<<<<
@@ -38227,7 +36982,7 @@ static int __pyx_f_3_sa_median(int __pyx_v_low, int __pyx_v_high, int __pyx_v_st
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":190
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":190
*
*
* cdef void find_comparable_matchings(int low, int high, int* arr, int step, int loc, int* loc_minus, int* loc_plus): # <<<<<<<<<<<<<<
@@ -38242,7 +36997,7 @@ static void __pyx_f_3_sa_find_comparable_matchings(int __pyx_v_low, int __pyx_v_
int __pyx_t_3;
__Pyx_RefNannySetupContext("find_comparable_matchings", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":194
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":194
* # in which all matchings have the same first index as the one
* # starting at loc
* loc_plus[0] = loc + step # <<<<<<<<<<<<<<
@@ -38251,7 +37006,7 @@ static void __pyx_f_3_sa_find_comparable_matchings(int __pyx_v_low, int __pyx_v_
*/
(__pyx_v_loc_plus[0]) = (__pyx_v_loc + __pyx_v_step);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":195
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":195
* # starting at loc
* loc_plus[0] = loc + step
* while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]: # <<<<<<<<<<<<<<
@@ -38268,7 +37023,7 @@ static void __pyx_f_3_sa_find_comparable_matchings(int __pyx_v_low, int __pyx_v_
}
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":196
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":196
* loc_plus[0] = loc + step
* while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]:
* loc_plus[0] = loc_plus[0] + step # <<<<<<<<<<<<<<
@@ -38278,7 +37033,7 @@ static void __pyx_f_3_sa_find_comparable_matchings(int __pyx_v_low, int __pyx_v_
(__pyx_v_loc_plus[0]) = ((__pyx_v_loc_plus[0]) + __pyx_v_step);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":197
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":197
* while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]:
* loc_plus[0] = loc_plus[0] + step
* loc_minus[0] = loc # <<<<<<<<<<<<<<
@@ -38287,7 +37042,7 @@ static void __pyx_f_3_sa_find_comparable_matchings(int __pyx_v_low, int __pyx_v_
*/
(__pyx_v_loc_minus[0]) = __pyx_v_loc;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":198
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":198
* 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]: # <<<<<<<<<<<<<<
@@ -38304,7 +37059,7 @@ static void __pyx_f_3_sa_find_comparable_matchings(int __pyx_v_low, int __pyx_v_
}
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":199
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":199
* 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 # <<<<<<<<<<<<<<
@@ -38341,14 +37096,14 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
int __pyx_v_use_baeza_yates;
int __pyx_v_use_collocations;
int __pyx_v_use_index;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__alignment,&__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_70,&__pyx_n_s__precompute_rank,&__pyx_n_s_104,&__pyx_n_s_105,&__pyx_n_s_71,&__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};
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__alignment,&__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_70,&__pyx_n_s__precompute_rank,&__pyx_n_s_105,&__pyx_n_s_106,&__pyx_n_s_71,&__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[21] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":259
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":259
* 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, # <<<<<<<<<<<<<<
@@ -38357,7 +37112,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
*/
values[3] = ((PyObject *)Py_None);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":267
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":267
* 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, # <<<<<<<<<<<<<<
@@ -38366,7 +37121,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
*/
values[7] = ((PyObject *)Py_None);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":269
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":269
* 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, # <<<<<<<<<<<<<<
@@ -38375,7 +37130,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
*/
values[8] = ((PyObject *)Py_None);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":273
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":273
* unsigned min_gap_size=2,
* # filename of file containing precomputed collocations
* precompute_file=None, # <<<<<<<<<<<<<<
@@ -38414,7 +37169,8 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alignment)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alignment);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (kw_args > 0) {
@@ -38478,12 +37234,12 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
}
case 13:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_105);
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_104);
if (value) { values[13] = value; kw_args--; }
}
case 14:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_106);
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_105);
if (value) { values[14] = value; kw_args--; }
}
case 15:
@@ -38520,6 +37276,126 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_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 = 251; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
+ if (values[1]) {
+ } else {
+
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":255
+ * Alignment alignment,
+ * # parameter for double-binary search; doesn't seem to matter much
+ * float by_slack_factor=1.0, # <<<<<<<<<<<<<<
+ * # name of generic nonterminal used by Hiero
+ * char* category="[X]",
+ */
+ __pyx_v_by_slack_factor = ((float)1.0);
+ }
+ if (values[2]) {
+ } else {
+ __pyx_v_category = ((char *)__pyx_k_106);
+ }
+ if (values[4]) {
+ } else {
+ __pyx_v_max_initial_size = ((unsigned int)10);
+ }
+ if (values[5]) {
+ } else {
+ __pyx_v_max_length = ((unsigned int)5);
+ }
+ if (values[6]) {
+ } else {
+ __pyx_v_max_nonterminals = ((unsigned int)2);
+ }
+ if (values[9]) {
+ } else {
+ __pyx_v_min_gap_size = ((unsigned int)2);
+ }
+ if (values[11]) {
+ } else {
+ __pyx_v_precompute_secondary_rank = ((unsigned int)20);
+ }
+ if (values[12]) {
+ } else {
+ __pyx_v_precompute_rank = ((unsigned int)100);
+ }
+ if (values[13]) {
+ } else {
+
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":279
+ * unsigned precompute_rank=100,
+ * # require extracted rules to have at least one aligned word
+ * bint require_aligned_terminal=True, # <<<<<<<<<<<<<<
+ * # require each contiguous chunk of extracted rules to have at least one aligned word
+ * bint require_aligned_chunks=False,
+ */
+ __pyx_v_require_aligned_terminal = ((int)1);
+ }
+ if (values[14]) {
+ } else {
+
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":281
+ * bint require_aligned_terminal=True,
+ * # require each contiguous chunk of extracted rules to have at least one aligned word
+ * bint require_aligned_chunks=False, # <<<<<<<<<<<<<<
+ * # maximum span of a grammar rule extracted from TRAINING DATA
+ * unsigned train_max_initial_size=10,
+ */
+ __pyx_v_require_aligned_chunks = ((int)0);
+ }
+ if (values[15]) {
+ } else {
+ __pyx_v_train_max_initial_size = ((unsigned int)10);
+ }
+ if (values[16]) {
+ } else {
+ __pyx_v_train_min_gap_size = ((unsigned int)2);
+ }
+ if (values[17]) {
+ } else {
+
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":287
+ * unsigned train_min_gap_size=2,
+ * # True if phrases should be tight, False otherwise (False == slower but better results)
+ * bint tight_phrases=False, # <<<<<<<<<<<<<<
+ * # True to require use of double-binary alg, false otherwise
+ * bint use_baeza_yates=True,
+ */
+ __pyx_v_tight_phrases = ((int)0);
+ }
+ if (values[18]) {
+ } else {
+
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":289
+ * bint tight_phrases=False,
+ * # True to require use of double-binary alg, false otherwise
+ * bint use_baeza_yates=True, # <<<<<<<<<<<<<<
+ * # True to enable used of precomputed collocations
+ * bint use_collocations=True,
+ */
+ __pyx_v_use_baeza_yates = ((int)1);
+ }
+ if (values[19]) {
+ } else {
+
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":291
+ * bint use_baeza_yates=True,
+ * # True to enable used of precomputed collocations
+ * bint use_collocations=True, # <<<<<<<<<<<<<<
+ * # True to enable use of precomputed inverted indices
+ * bint use_index=True):
+ */
+ __pyx_v_use_collocations = ((int)1);
+ }
+ if (values[20]) {
+ } else {
+
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":293
+ * bint use_collocations=True,
+ * # True to enable use of precomputed inverted indices
+ * bint use_index=True): # <<<<<<<<<<<<<<
+ * '''Note: we make a distinction between the min_gap_size
+ * and max_initial_size used in test and train. The latter
+ */
+ __pyx_v_use_index = ((int)1);
+ }
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
@@ -38552,7 +37428,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_by_slack_factor = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_by_slack_factor == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":255
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":255
* Alignment alignment,
* # parameter for double-binary search; doesn't seem to matter much
* float by_slack_factor=1.0, # <<<<<<<<<<<<<<
@@ -38564,7 +37440,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
if (values[2]) {
__pyx_v_category = PyBytes_AsString(values[2]); if (unlikely((!__pyx_v_category) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- __pyx_v_category = ((char *)__pyx_k_107);
+ __pyx_v_category = ((char *)__pyx_k_106);
}
__pyx_v_max_chunks = values[3];
if (values[4]) {
@@ -38604,7 +37480,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_require_aligned_terminal = __Pyx_PyObject_IsTrue(values[13]); if (unlikely((__pyx_v_require_aligned_terminal == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":279
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":279
* unsigned precompute_rank=100,
* # require extracted rules to have at least one aligned word
* bint require_aligned_terminal=True, # <<<<<<<<<<<<<<
@@ -38617,7 +37493,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_require_aligned_chunks = __Pyx_PyObject_IsTrue(values[14]); if (unlikely((__pyx_v_require_aligned_chunks == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":281
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":281
* bint require_aligned_terminal=True,
* # require each contiguous chunk of extracted rules to have at least one aligned word
* bint require_aligned_chunks=False, # <<<<<<<<<<<<<<
@@ -38640,7 +37516,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_tight_phrases = __Pyx_PyObject_IsTrue(values[17]); if (unlikely((__pyx_v_tight_phrases == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":287
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":287
* unsigned train_min_gap_size=2,
* # True if phrases should be tight, False otherwise (False == slower but better results)
* bint tight_phrases=False, # <<<<<<<<<<<<<<
@@ -38653,7 +37529,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_use_baeza_yates = __Pyx_PyObject_IsTrue(values[18]); if (unlikely((__pyx_v_use_baeza_yates == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":289
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":289
* bint tight_phrases=False,
* # True to require use of double-binary alg, false otherwise
* bint use_baeza_yates=True, # <<<<<<<<<<<<<<
@@ -38666,7 +37542,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_use_collocations = __Pyx_PyObject_IsTrue(values[19]); if (unlikely((__pyx_v_use_collocations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":291
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":291
* bint use_baeza_yates=True,
* # True to enable used of precomputed collocations
* bint use_collocations=True, # <<<<<<<<<<<<<<
@@ -38679,7 +37555,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_use_index = __Pyx_PyObject_IsTrue(values[20]); if (unlikely((__pyx_v_use_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":293
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":293
* bint use_collocations=True,
* # True to enable use of precomputed inverted indices
* bint use_index=True): # <<<<<<<<<<<<<<
@@ -38707,7 +37583,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":251
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":251
* cdef IntList findexes1
*
* def __cinit__(self, # <<<<<<<<<<<<<<
@@ -38729,7 +37605,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":299
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":299
* 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 # <<<<<<<<<<<<<<
@@ -38752,7 +37628,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_v_self->rules = ((struct __pyx_obj_3_sa_TrieTable *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":300
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":300
* them to be the same, therefore we don't either.'''
* self.rules = TrieTable(True) # cache
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) # <<<<<<<<<<<<<<
@@ -38774,7 +37650,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_v_self->rules->root = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":301
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":301
* self.rules = TrieTable(True) # cache
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
* if alignment is None: # <<<<<<<<<<<<<<
@@ -38784,14 +37660,14 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_t_3 = (((PyObject *)__pyx_v_alignment) == Py_None);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":302
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":302
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
* if alignment is None:
* raise Exception("Must specify an alignment object") # <<<<<<<<<<<<<<
* self.alignment = alignment
*
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_108), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 302; __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;
@@ -38800,7 +37676,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":303
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":303
* if alignment is None:
* raise Exception("Must specify an alignment object")
* self.alignment = alignment # <<<<<<<<<<<<<<
@@ -38813,7 +37689,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__Pyx_DECREF(((PyObject *)__pyx_v_self->alignment));
__pyx_v_self->alignment = __pyx_v_alignment;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":307
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":307
* # grammar parameters and settings
* # NOTE: setting max_nonterminals > 2 is not currently supported in Hiero
* self.max_length = max_length # <<<<<<<<<<<<<<
@@ -38822,7 +37698,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->max_length = __pyx_v_max_length;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":308
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":308
* # NOTE: setting max_nonterminals > 2 is not currently supported in Hiero
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals # <<<<<<<<<<<<<<
@@ -38831,7 +37707,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->max_nonterminals = __pyx_v_max_nonterminals;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":309
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":309
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals
* self.max_initial_size = max_initial_size # <<<<<<<<<<<<<<
@@ -38840,7 +37716,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->max_initial_size = __pyx_v_max_initial_size;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":310
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":310
* self.max_nonterminals = max_nonterminals
* self.max_initial_size = max_initial_size
* self.train_max_initial_size = train_max_initial_size # <<<<<<<<<<<<<<
@@ -38849,7 +37725,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->train_max_initial_size = __pyx_v_train_max_initial_size;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":311
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":311
* self.max_initial_size = max_initial_size
* self.train_max_initial_size = train_max_initial_size
* self.min_gap_size = min_gap_size # <<<<<<<<<<<<<<
@@ -38858,7 +37734,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->min_gap_size = __pyx_v_min_gap_size;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":312
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":312
* 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 # <<<<<<<<<<<<<<
@@ -38867,7 +37743,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->train_min_gap_size = __pyx_v_train_min_gap_size;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":313
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":313
* self.min_gap_size = min_gap_size
* self.train_min_gap_size = train_min_gap_size
* self.category = sym_fromstring(category, False) # <<<<<<<<<<<<<<
@@ -38896,7 +37772,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_self->category = __pyx_t_6;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":315
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":315
* self.category = sym_fromstring(category, False)
*
* if max_chunks is None: # <<<<<<<<<<<<<<
@@ -38906,7 +37782,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_t_3 = (__pyx_v_max_chunks == Py_None);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":316
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":316
*
* if max_chunks is None:
* self.max_chunks = self.max_nonterminals + 1 # <<<<<<<<<<<<<<
@@ -38918,7 +37794,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":318
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":318
* self.max_chunks = self.max_nonterminals + 1
* else:
* self.max_chunks = max_chunks # <<<<<<<<<<<<<<
@@ -38930,7 +37806,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":320
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":320
* self.max_chunks = max_chunks
*
* if max_target_chunks is None: # <<<<<<<<<<<<<<
@@ -38940,7 +37816,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_t_3 = (__pyx_v_max_target_chunks == Py_None);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":321
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":321
*
* if max_target_chunks is None:
* self.max_target_chunks = self.max_nonterminals + 1 # <<<<<<<<<<<<<<
@@ -38952,7 +37828,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":323
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":323
* self.max_target_chunks = self.max_nonterminals + 1
* else:
* self.max_target_chunks = max_target_chunks # <<<<<<<<<<<<<<
@@ -38964,7 +37840,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":325
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":325
* self.max_target_chunks = max_target_chunks
*
* if max_target_length is None: # <<<<<<<<<<<<<<
@@ -38974,7 +37850,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_t_3 = (__pyx_v_max_target_length == Py_None);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":326
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":326
*
* if max_target_length is None:
* self.max_target_length = max_initial_size # <<<<<<<<<<<<<<
@@ -38986,7 +37862,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":328
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":328
* self.max_target_length = max_initial_size
* else:
* self.max_target_length = max_target_length # <<<<<<<<<<<<<<
@@ -38998,7 +37874,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":331
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":331
*
* # algorithmic parameters and settings
* self.precomputed_collocations = {} # <<<<<<<<<<<<<<
@@ -39013,7 +37889,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_v_self->precomputed_collocations = ((PyObject *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":332
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":332
* # algorithmic parameters and settings
* self.precomputed_collocations = {}
* self.precomputed_index = {} # <<<<<<<<<<<<<<
@@ -39028,7 +37904,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_v_self->precomputed_index = ((PyObject *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":333
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":333
* self.precomputed_collocations = {}
* self.precomputed_index = {}
* self.use_index = use_index # <<<<<<<<<<<<<<
@@ -39037,7 +37913,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->use_index = __pyx_v_use_index;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":334
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":334
* self.precomputed_index = {}
* self.use_index = use_index
* self.use_collocations = use_collocations # <<<<<<<<<<<<<<
@@ -39046,7 +37922,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->use_collocations = __pyx_v_use_collocations;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":335
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":335
* self.use_index = use_index
* self.use_collocations = use_collocations
* self.max_rank = {} # <<<<<<<<<<<<<<
@@ -39061,7 +37937,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_v_self->max_rank = ((PyObject *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":336
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":336
* self.use_collocations = use_collocations
* self.max_rank = {}
* self.precompute_file = precompute_file # <<<<<<<<<<<<<<
@@ -39074,7 +37950,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__Pyx_DECREF(__pyx_v_self->precompute_file);
__pyx_v_self->precompute_file = __pyx_v_precompute_file;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":337
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":337
* self.max_rank = {}
* self.precompute_file = precompute_file
* self.precompute_rank = precompute_rank # <<<<<<<<<<<<<<
@@ -39083,7 +37959,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->precompute_rank = __pyx_v_precompute_rank;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":338
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":338
* self.precompute_file = precompute_file
* self.precompute_rank = precompute_rank
* self.precompute_secondary_rank = precompute_secondary_rank # <<<<<<<<<<<<<<
@@ -39092,7 +37968,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->precompute_secondary_rank = __pyx_v_precompute_secondary_rank;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":339
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":339
* self.precompute_rank = precompute_rank
* self.precompute_secondary_rank = precompute_secondary_rank
* self.use_baeza_yates = use_baeza_yates # <<<<<<<<<<<<<<
@@ -39101,7 +37977,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->use_baeza_yates = __pyx_v_use_baeza_yates;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":340
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":340
* self.precompute_secondary_rank = precompute_secondary_rank
* self.use_baeza_yates = use_baeza_yates
* self.by_slack_factor = by_slack_factor # <<<<<<<<<<<<<<
@@ -39110,7 +37986,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->by_slack_factor = __pyx_v_by_slack_factor;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":341
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":341
* self.use_baeza_yates = use_baeza_yates
* self.by_slack_factor = by_slack_factor
* if tight_phrases: # <<<<<<<<<<<<<<
@@ -39119,7 +37995,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
if (__pyx_v_tight_phrases) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":342
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":342
* self.by_slack_factor = by_slack_factor
* if tight_phrases:
* self.tight_phrases = 1 # <<<<<<<<<<<<<<
@@ -39131,7 +38007,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":344
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":344
* self.tight_phrases = 1
* else:
* self.tight_phrases = 0 # <<<<<<<<<<<<<<
@@ -39142,7 +38018,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":346
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":346
* self.tight_phrases = 0
*
* if require_aligned_chunks: # <<<<<<<<<<<<<<
@@ -39151,7 +38027,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
if (__pyx_v_require_aligned_chunks) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":348
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":348
* if require_aligned_chunks:
* # one condition is a stronger version of the other.
* self.require_aligned_chunks = 1 # <<<<<<<<<<<<<<
@@ -39160,7 +38036,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->require_aligned_chunks = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":349
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":349
* # one condition is a stronger version of the other.
* self.require_aligned_chunks = 1
* self.require_aligned_terminal = 1 # <<<<<<<<<<<<<<
@@ -39171,7 +38047,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
goto __pyx_L8;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":350
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":350
* self.require_aligned_chunks = 1
* self.require_aligned_terminal = 1
* elif require_aligned_terminal: # <<<<<<<<<<<<<<
@@ -39180,7 +38056,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
if (__pyx_v_require_aligned_terminal) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":351
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":351
* self.require_aligned_terminal = 1
* elif require_aligned_terminal:
* self.require_aligned_chunks = 0 # <<<<<<<<<<<<<<
@@ -39189,7 +38065,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->require_aligned_chunks = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":352
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":352
* elif require_aligned_terminal:
* self.require_aligned_chunks = 0
* self.require_aligned_terminal = 1 # <<<<<<<<<<<<<<
@@ -39201,7 +38077,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":354
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":354
* self.require_aligned_terminal = 1
* else:
* self.require_aligned_chunks = 0 # <<<<<<<<<<<<<<
@@ -39210,7 +38086,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->require_aligned_chunks = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":355
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":355
* else:
* self.require_aligned_chunks = 0
* self.require_aligned_terminal = 0 # <<<<<<<<<<<<<<
@@ -39221,7 +38097,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":359
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":359
*
* # diagnostics
* self.prev_norm_prefix = () # <<<<<<<<<<<<<<
@@ -39234,7 +38110,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__Pyx_DECREF(__pyx_v_self->prev_norm_prefix);
__pyx_v_self->prev_norm_prefix = ((PyObject *)__pyx_empty_tuple);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":361
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":361
* self.prev_norm_prefix = ()
*
* self.findexes = IntList(initial_len=10) # <<<<<<<<<<<<<<
@@ -39253,7 +38129,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_v_self->findexes = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":362
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":362
*
* self.findexes = IntList(initial_len=10)
* self.findexes1 = IntList(initial_len=10) # <<<<<<<<<<<<<<
@@ -39294,11 +38170,11 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__
struct __pyx_obj_3_sa_DataArray *__pyx_v_edarray = 0;
struct __pyx_obj_3_sa_Sampler *__pyx_v_sampler = 0;
struct __pyx_obj_3_sa_Scorer *__pyx_v_scorer = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fsarray,&__pyx_n_s__edarray,&__pyx_n_s__sampler,&__pyx_n_s__scorer,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("configure (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fsarray,&__pyx_n_s__edarray,&__pyx_n_s__sampler,&__pyx_n_s__scorer,0};
PyObject* values[4] = {0,0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -39314,20 +38190,24 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fsarray)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fsarray);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__edarray)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__edarray);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sampler)) != 0)) kw_args--;
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sampler);
+ if (likely(values[2])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scorer)) != 0)) kw_args--;
+ values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scorer);
+ if (likely(values[3])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -39369,7 +38249,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":364
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":364
* self.findexes1 = IntList(initial_len=10)
*
* def configure(self, SuffixArray fsarray, DataArray edarray, # <<<<<<<<<<<<<<
@@ -39387,7 +38267,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("configure", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":369
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":369
* Here we also use it to precompute the most expensive intersections
* in the corpus quickly.'''
* self.fsa = fsarray # <<<<<<<<<<<<<<
@@ -39400,7 +38280,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
__Pyx_DECREF(((PyObject *)__pyx_v_self->fsa));
__pyx_v_self->fsa = __pyx_v_fsarray;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":370
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":370
* in the corpus quickly.'''
* self.fsa = fsarray
* self.fda = fsarray.darray # <<<<<<<<<<<<<<
@@ -39413,7 +38293,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
__Pyx_DECREF(((PyObject *)__pyx_v_self->fda));
__pyx_v_self->fda = __pyx_v_fsarray->darray;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":371
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":371
* self.fsa = fsarray
* self.fda = fsarray.darray
* self.eda = edarray # <<<<<<<<<<<<<<
@@ -39426,7 +38306,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
__Pyx_DECREF(((PyObject *)__pyx_v_self->eda));
__pyx_v_self->eda = __pyx_v_edarray;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":372
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":372
* self.fda = fsarray.darray
* self.eda = edarray
* self.fid2symid = self.set_idmap(self.fda) # <<<<<<<<<<<<<<
@@ -39445,7 +38325,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
__pyx_v_self->fid2symid = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":373
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":373
* self.eda = edarray
* self.fid2symid = self.set_idmap(self.fda)
* self.eid2symid = self.set_idmap(self.eda) # <<<<<<<<<<<<<<
@@ -39464,7 +38344,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
__pyx_v_self->eid2symid = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":374
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":374
* self.fid2symid = self.set_idmap(self.fda)
* self.eid2symid = self.set_idmap(self.eda)
* self.precompute() # <<<<<<<<<<<<<<
@@ -39478,7 +38358,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":375
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":375
* self.eid2symid = self.set_idmap(self.eda)
* self.precompute()
* self.sampler = sampler # <<<<<<<<<<<<<<
@@ -39491,7 +38371,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
__Pyx_DECREF(((PyObject *)__pyx_v_self->sampler));
__pyx_v_self->sampler = __pyx_v_sampler;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":376
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":376
* self.precompute()
* self.sampler = sampler
* self.scorer = scorer # <<<<<<<<<<<<<<
@@ -39517,7 +38397,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":378
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":378
* self.scorer = scorer
*
* cdef set_idmap(self, DataArray darray): # <<<<<<<<<<<<<<
@@ -39544,7 +38424,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_idmap", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":382
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":382
* cdef IntList idmap
*
* N = len(darray.id2word) # <<<<<<<<<<<<<<
@@ -39557,7 +38437,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_N = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":383
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":383
*
* N = len(darray.id2word)
* idmap = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -39576,7 +38456,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED
__pyx_v_idmap = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":384
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":384
* N = len(darray.id2word)
* idmap = IntList(initial_len=N)
* for word_id from 0 <= word_id < N: # <<<<<<<<<<<<<<
@@ -39586,7 +38466,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED
__pyx_t_4 = __pyx_v_N;
for (__pyx_v_word_id = 0; __pyx_v_word_id < __pyx_t_4; __pyx_v_word_id++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":385
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":385
* idmap = IntList(initial_len=N)
* for word_id from 0 <= word_id < N:
* new_word_id = sym_fromstring(darray.id2word[word_id], True) # <<<<<<<<<<<<<<
@@ -39615,7 +38495,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_new_word_id = __pyx_t_7;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":386
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":386
* 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 # <<<<<<<<<<<<<<
@@ -39625,7 +38505,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED
(__pyx_v_idmap->arr[__pyx_v_word_id]) = __pyx_v_new_word_id;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":387
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":387
* new_word_id = sym_fromstring(darray.id2word[word_id], True)
* idmap.arr[word_id] = new_word_id
* return idmap # <<<<<<<<<<<<<<
@@ -39664,7 +38544,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5pattern2phrase(PyObjec
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":390
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":390
*
*
* def pattern2phrase(self, pattern): # <<<<<<<<<<<<<<
@@ -39693,7 +38573,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("pattern2phrase", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":392
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":392
* def pattern2phrase(self, pattern):
* # pattern is a tuple, which we must convert to a hiero Phrase
* result = () # <<<<<<<<<<<<<<
@@ -39703,7 +38583,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
__Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
__pyx_v_result = __pyx_empty_tuple;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":393
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":393
* # pattern is a tuple, which we must convert to a hiero Phrase
* result = ()
* arity = 0 # <<<<<<<<<<<<<<
@@ -39713,7 +38593,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
__Pyx_INCREF(__pyx_int_0);
__pyx_v_arity = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":394
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":394
* result = ()
* arity = 0
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -39731,18 +38611,10 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
for (;;) {
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++;
- #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 = 394; __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++;
- #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 = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
@@ -39758,7 +38630,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
__pyx_v_word_id = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":395
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":395
* arity = 0
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
@@ -39771,7 +38643,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":396
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":396
* for word_id in pattern:
* if word_id == -1:
* arity = arity + 1 # <<<<<<<<<<<<<<
@@ -39784,7 +38656,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
__pyx_v_arity = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":397
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":397
* if word_id == -1:
* arity = arity + 1
* new_id = sym_setindex(self.category, arity) # <<<<<<<<<<<<<<
@@ -39801,7 +38673,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":399
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":399
* new_id = sym_setindex(self.category, arity)
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True) # <<<<<<<<<<<<<<
@@ -39832,7 +38704,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":400
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":400
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,) # <<<<<<<<<<<<<<
@@ -39853,7 +38725,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":401
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":401
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,)
* return Phrase(result) # <<<<<<<<<<<<<<
@@ -39904,7 +38776,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_7pattern2phrase_plus(Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":403
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":403
* return Phrase(result)
*
* def pattern2phrase_plus(self, pattern): # <<<<<<<<<<<<<<
@@ -39935,7 +38807,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("pattern2phrase_plus", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":406
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":406
* # returns a list containing both the pattern, and pattern
* # suffixed/prefixed with the NT category.
* patterns = [] # <<<<<<<<<<<<<<
@@ -39947,7 +38819,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__pyx_v_patterns = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":407
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":407
* # suffixed/prefixed with the NT category.
* patterns = []
* result = () # <<<<<<<<<<<<<<
@@ -39957,7 +38829,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
__pyx_v_result = __pyx_empty_tuple;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":408
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":408
* patterns = []
* result = ()
* arity = 0 # <<<<<<<<<<<<<<
@@ -39967,7 +38839,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__Pyx_INCREF(__pyx_int_0);
__pyx_v_arity = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":409
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":409
* result = ()
* arity = 0
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -39985,18 +38857,10 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
for (;;) {
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++;
- #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 = 409; __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++;
- #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 = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
@@ -40012,7 +38876,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__pyx_v_word_id = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":410
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":410
* arity = 0
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
@@ -40025,7 +38889,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":411
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":411
* for word_id in pattern:
* if word_id == -1:
* arity = arity + 1 # <<<<<<<<<<<<<<
@@ -40038,7 +38902,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__pyx_v_arity = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":412
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":412
* if word_id == -1:
* arity = arity + 1
* new_id = sym_setindex(self.category, arity) # <<<<<<<<<<<<<<
@@ -40055,7 +38919,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":414
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":414
* new_id = sym_setindex(self.category, arity)
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True) # <<<<<<<<<<<<<<
@@ -40086,7 +38950,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":415
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":415
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,) # <<<<<<<<<<<<<<
@@ -40107,7 +38971,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":416
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":416
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,)
* patterns.append(Phrase(result)) # <<<<<<<<<<<<<<
@@ -40125,7 +38989,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__pyx_t_10 = PyList_Append(__pyx_v_patterns, __pyx_t_9); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":417
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":417
* result = result + (new_id,)
* patterns.append(Phrase(result))
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) # <<<<<<<<<<<<<<
@@ -40153,7 +39017,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__pyx_t_10 = PyList_Append(__pyx_v_patterns, __pyx_t_9); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":418
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":418
* patterns.append(Phrase(result))
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),)))
* patterns.append(Phrase((sym_setindex(self.category, 1),) + result)) # <<<<<<<<<<<<<<
@@ -40181,7 +39045,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__pyx_t_10 = PyList_Append(__pyx_v_patterns, __pyx_t_9); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":419
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":419
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),)))
* patterns.append(Phrase((sym_setindex(self.category, 1),) + result))
* return patterns # <<<<<<<<<<<<<<
@@ -40225,7 +39089,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9precompute(PyObject *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":421
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":421
* return patterns
*
* def precompute(self): # <<<<<<<<<<<<<<
@@ -40249,9 +39113,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
Py_ssize_t __pyx_t_6;
- Py_ssize_t __pyx_t_7;
- int __pyx_t_8;
- int __pyx_t_9;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *(*__pyx_t_9)(PyObject *);
Py_ssize_t __pyx_t_10;
PyObject *(*__pyx_t_11)(PyObject *);
int __pyx_lineno = 0;
@@ -40259,7 +39123,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("precompute", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":424
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":424
* cdef Precomputation pre
*
* if self.precompute_file is not None: # <<<<<<<<<<<<<<
@@ -40269,7 +39133,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_1 = (__pyx_v_self->precompute_file != Py_None);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":425
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":425
*
* if self.precompute_file is not None:
* start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -40281,7 +39145,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_v_start_time = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":426
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":426
* if self.precompute_file is not None:
* start_time = monitor_cpu()
* logger.info("Reading precomputed data from file %s... ", self.precompute_file) # <<<<<<<<<<<<<<
@@ -40295,9 +39159,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__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 = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_110));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_110));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_110));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_109));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_109));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_109));
__Pyx_INCREF(__pyx_v_self->precompute_file);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->precompute_file);
__Pyx_GIVEREF(__pyx_v_self->precompute_file);
@@ -40307,7 +39171,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":427
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":427
* start_time = monitor_cpu()
* logger.info("Reading precomputed data from file %s... ", self.precompute_file)
* pre = Precomputation(from_binary=self.precompute_file) # <<<<<<<<<<<<<<
@@ -40323,7 +39187,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_v_pre = ((struct __pyx_obj_3_sa_Precomputation *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":429
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":429
* 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: # <<<<<<<<<<<<<<
@@ -40333,7 +39197,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_1 = (__pyx_v_pre->max_nonterminals != __pyx_v_self->max_nonterminals);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":430
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":430
* # 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) # <<<<<<<<<<<<<<
@@ -40351,9 +39215,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_111));
- PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_111));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_111));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_110));
+ PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_110));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_110));
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
@@ -40369,7 +39233,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":431
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":431
* 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: # <<<<<<<<<<<<<<
@@ -40379,7 +39243,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_1 = (__pyx_v_pre->max_length != __pyx_v_self->max_length);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":432
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":432
* 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) # <<<<<<<<<<<<<<
@@ -40397,9 +39261,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_2 = PyTuple_New(3); 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_INCREF(((PyObject *)__pyx_kp_s_112));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_112));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_112));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_111));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_111));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_111));
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
@@ -40415,7 +39279,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":433
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":433
* 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: # <<<<<<<<<<<<<<
@@ -40425,7 +39289,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_1 = (__pyx_v_pre->train_max_initial_size != __pyx_v_self->train_max_initial_size);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":434
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":434
* 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)) # <<<<<<<<<<<<<<
@@ -40444,7 +39308,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_4 = 0;
__pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_113), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_112), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_DECREF(((PyObject *)__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 = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -40462,7 +39326,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":435
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":435
* 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: # <<<<<<<<<<<<<<
@@ -40472,7 +39336,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_1 = (__pyx_v_pre->train_min_gap_size != __pyx_v_self->train_min_gap_size);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":436
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":436
* 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)) # <<<<<<<<<<<<<<
@@ -40491,7 +39355,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_2 = 0;
__pyx_t_5 = 0;
- __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_114), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_113), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
__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[8]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -40509,7 +39373,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":437
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":437
* 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: # <<<<<<<<<<<<<<
@@ -40518,7 +39382,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
*/
if (__pyx_v_self->use_index) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":438
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":438
* 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)) # <<<<<<<<<<<<<<
@@ -40538,9 +39402,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_115));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_115));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_115));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_114));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_114));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_114));
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
@@ -40550,59 +39414,117 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":439
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":439
* 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)
* for phrase in phrases:
*/
- __pyx_t_6 = 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 = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_pre->precomputed_index, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(__pyx_v_pre->precomputed_index, __pyx_n_s__iteritems); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_5);
- __pyx_t_5 = __pyx_t_2;
- __pyx_t_2 = 0;
- while (1) {
- __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_7, &__pyx_t_6, &__pyx_t_2, &__pyx_t_4, NULL, __pyx_t_8);
- if (unlikely(__pyx_t_9 == 0)) break;
- if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_5)) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
+ } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
+ } else {
+ __pyx_t_2 = __pyx_t_7(__pyx_t_5);
+ if (unlikely(!__pyx_t_2)) {
+ if (PyErr_Occurred()) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+ PyObject* sequence = __pyx_t_2;
+ if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
+ index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L12_unpacking_done;
+ __pyx_L11_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_L12_unpacking_done:;
+ }
__Pyx_XDECREF(__pyx_v_pattern);
- __pyx_v_pattern = __pyx_t_2;
- __pyx_t_2 = 0;
- __Pyx_XDECREF(__pyx_v_arr);
- __pyx_v_arr = __pyx_t_4;
+ __pyx_v_pattern = __pyx_t_4;
__pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_v_arr);
+ __pyx_v_arr = __pyx_t_3;
+ __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":440
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":440
* 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_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pattern2phrase_plus); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__pattern2phrase_plus); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 440; __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 = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_pattern);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_pattern);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_pattern);
__Pyx_GIVEREF(__pyx_v_pattern);
- __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 440; __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_2)); __pyx_t_2 = 0;
+ __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_v_phrases);
- __pyx_v_phrases = __pyx_t_3;
- __pyx_t_3 = 0;
+ __pyx_v_phrases = __pyx_t_4;
+ __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":441
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":441
* for pattern, arr in pre.precomputed_index.iteritems():
* phrases = self.pattern2phrase_plus(pattern)
* for phrase in phrases: # <<<<<<<<<<<<<<
@@ -40610,44 +39532,36 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
* if self.use_collocations:
*/
if (PyList_CheckExact(__pyx_v_phrases) || PyTuple_CheckExact(__pyx_v_phrases)) {
- __pyx_t_3 = __pyx_v_phrases; __Pyx_INCREF(__pyx_t_3); __pyx_t_10 = 0;
+ __pyx_t_4 = __pyx_v_phrases; __Pyx_INCREF(__pyx_t_4); __pyx_t_10 = 0;
__pyx_t_11 = NULL;
} else {
- __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_phrases); 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_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_phrases); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_3)) {
- if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_3)) {
- if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
+ if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++;
+ } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++;
} else {
- __pyx_t_2 = __pyx_t_11(__pyx_t_3);
- if (unlikely(!__pyx_t_2)) {
+ __pyx_t_3 = __pyx_t_11(__pyx_t_4);
+ if (unlikely(!__pyx_t_3)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_t_3);
}
__Pyx_XDECREF(__pyx_v_phrase);
- __pyx_v_phrase = __pyx_t_2;
- __pyx_t_2 = 0;
+ __pyx_v_phrase = __pyx_t_3;
+ __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":442
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":442
* phrases = self.pattern2phrase_plus(pattern)
* for phrase in phrases:
* self.precomputed_index[phrase] = arr # <<<<<<<<<<<<<<
@@ -40656,14 +39570,14 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
*/
if (PyObject_SetItem(__pyx_v_self->precomputed_index, __pyx_v_phrase, __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __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;
goto __pyx_L8;
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":443
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":443
* for phrase in phrases:
* self.precomputed_index[phrase] = arr
* if self.use_collocations: # <<<<<<<<<<<<<<
@@ -40672,7 +39586,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
*/
if (__pyx_v_self->use_collocations) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":444
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":444
* self.precomputed_index[phrase] = arr
* if self.use_collocations:
* logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations)) # <<<<<<<<<<<<<<
@@ -40681,60 +39595,118 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
*/
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = __pyx_v_pre->precomputed_collocations;
__Pyx_INCREF(__pyx_t_5);
- __pyx_t_7 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __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 = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_116));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_116));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_116));
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_115));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_115));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_115));
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __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_2)); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":445
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":445
* 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)
* self.precomputed_collocations[phrase] = arr
*/
- __pyx_t_7 = 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 = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetAttr(__pyx_v_pre->precomputed_collocations, __pyx_n_s__iteritems); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
}
- __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_pre->precomputed_collocations, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_6), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_5);
- __pyx_t_5 = __pyx_t_2;
- __pyx_t_2 = 0;
- while (1) {
- __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_6, &__pyx_t_7, &__pyx_t_2, &__pyx_t_3, NULL, __pyx_t_8);
- if (unlikely(__pyx_t_9 == 0)) break;
- if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_5)) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++;
+ } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++;
+ } else {
+ __pyx_t_3 = __pyx_t_7(__pyx_t_5);
+ if (unlikely(!__pyx_t_3)) {
+ if (PyErr_Occurred()) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
+ PyObject* sequence = __pyx_t_3;
+ if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
+ index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L18_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L18_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L19_unpacking_done;
+ __pyx_L18_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_L19_unpacking_done:;
+ }
__Pyx_XDECREF(__pyx_v_pattern);
- __pyx_v_pattern = __pyx_t_2;
- __pyx_t_2 = 0;
+ __pyx_v_pattern = __pyx_t_4;
+ __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_v_arr);
- __pyx_v_arr = __pyx_t_3;
- __pyx_t_3 = 0;
+ __pyx_v_arr = __pyx_t_2;
+ __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":446
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":446
* 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) # <<<<<<<<<<<<<<
@@ -40756,7 +39728,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_v_phrase = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":447
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":447
* for pattern, arr in pre.precomputed_collocations.iteritems():
* phrase = self.pattern2phrase(pattern)
* self.precomputed_collocations[phrase] = arr # <<<<<<<<<<<<<<
@@ -40766,11 +39738,11 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
if (PyObject_SetItem(__pyx_v_self->precomputed_collocations, __pyx_v_phrase, __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- goto __pyx_L13;
+ goto __pyx_L15;
}
- __pyx_L13:;
+ __pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":448
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":448
* phrase = self.pattern2phrase(pattern)
* self.precomputed_collocations[phrase] = arr
* stop_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -40782,7 +39754,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_v_stop_time = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":449
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":449
* self.precomputed_collocations[phrase] = arr
* stop_time = monitor_cpu()
* logger.info("Processing precomputations took %f seconds", stop_time - start_time) # <<<<<<<<<<<<<<
@@ -40798,9 +39770,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_117));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_117));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_117));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_116));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_116));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_116));
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
@@ -40820,6 +39792,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("_sa.HieroCachingRuleFactory.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -40846,7 +39819,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_11get_precomputed_collo
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":452
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":452
*
*
* def get_precomputed_collocation(self, phrase): # <<<<<<<<<<<<<<
@@ -40868,7 +39841,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_precomputed_collocation", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":453
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":453
*
* def get_precomputed_collocation(self, phrase):
* if phrase in self.precomputed_collocations: # <<<<<<<<<<<<<<
@@ -40878,7 +39851,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
__pyx_t_1 = ((PySequence_Contains(__pyx_v_self->precomputed_collocations, __pyx_v_phrase))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":454
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":454
* def get_precomputed_collocation(self, phrase):
* if phrase in self.precomputed_collocations:
* arr = self.precomputed_collocations[phrase] # <<<<<<<<<<<<<<
@@ -40890,7 +39863,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
__pyx_v_arr = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":455
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":455
* 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) # <<<<<<<<<<<<<<
@@ -40927,7 +39900,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":456
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":456
* arr = self.precomputed_collocations[phrase]
* return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1)
* return None # <<<<<<<<<<<<<<
@@ -40954,7 +39927,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":459
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":459
*
*
* cdef int* baeza_yates_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<<
@@ -41000,7 +39973,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("baeza_yates_helper", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":472
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":472
* cdef Matching loc1, loc2
*
* result = <int*> malloc(0*sizeof(int*)) # <<<<<<<<<<<<<<
@@ -41009,7 +39982,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_result = ((int *)malloc((0 * (sizeof(int *)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":474
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":474
* result = <int*> malloc(0*sizeof(int*))
*
* d_first = 0 # <<<<<<<<<<<<<<
@@ -41018,7 +39991,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_d_first = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":475
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":475
*
* d_first = 0
* if high1 - low1 > high2 - low2: # <<<<<<<<<<<<<<
@@ -41028,7 +40001,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_1 = ((__pyx_v_high1 - __pyx_v_low1) > (__pyx_v_high2 - __pyx_v_low2));
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":476
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":476
* d_first = 0
* if high1 - low1 > high2 - low2:
* d_first = 1 # <<<<<<<<<<<<<<
@@ -41040,7 +40013,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":480
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":480
* # 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: # <<<<<<<<<<<<<<
@@ -41056,7 +40029,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":481
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":481
* # Case 1: one of the sets is empty
* if low1 >= high1 or low2 >= high2:
* return result # <<<<<<<<<<<<<<
@@ -41069,7 +40042,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":484
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":484
*
* # Case 2: sets are non-overlapping
* assign_matching(&loc1, arr1, high1-step1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -41078,7 +40051,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":485
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":485
* # 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) # <<<<<<<<<<<<<<
@@ -41087,7 +40060,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_low2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":486
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":486
* 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: # <<<<<<<<<<<<<<
@@ -41097,7 +40070,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (((struct __pyx_vtabstruct_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);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":487
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":487
* 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 # <<<<<<<<<<<<<<
@@ -41110,7 +40083,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":489
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":489
* return result
*
* assign_matching(&loc1, arr1, low1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -41119,7 +40092,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_low1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":490
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":490
*
* assign_matching(&loc1, arr1, low1, step1, self.fda.sent_id.arr)
* assign_matching(&loc2, arr2, high2-step2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -41128,7 +40101,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":491
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":491
* 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: # <<<<<<<<<<<<<<
@@ -41138,7 +40111,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (((struct __pyx_vtabstruct_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);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":492
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":492
* 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 # <<<<<<<<<<<<<<
@@ -41151,7 +40124,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":496
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":496
* # Case 3: query set and data set do not meet size mismatch constraints;
* # We use mergesort instead in this case
* qsetsize = (high1-low1) / step1 # <<<<<<<<<<<<<<
@@ -41169,7 +40142,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_v_qsetsize = __Pyx_div_int(__pyx_t_4, __pyx_v_step1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":497
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":497
* # We use mergesort instead in this case
* qsetsize = (high1-low1) / step1
* dsetsize = (high2-low2) / step2 # <<<<<<<<<<<<<<
@@ -41187,7 +40160,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_v_dsetsize = __Pyx_div_int(__pyx_t_4, __pyx_v_step2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":498
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":498
* qsetsize = (high1-low1) / step1
* dsetsize = (high2-low2) / step2
* if d_first: # <<<<<<<<<<<<<<
@@ -41196,7 +40169,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
if (__pyx_v_d_first) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":499
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":499
* dsetsize = (high2-low2) / step2
* if d_first:
* tmp = qsetsize # <<<<<<<<<<<<<<
@@ -41205,7 +40178,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_tmp = __pyx_v_qsetsize;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":500
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":500
* if d_first:
* tmp = qsetsize
* qsetsize = dsetsize # <<<<<<<<<<<<<<
@@ -41214,7 +40187,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_qsetsize = __pyx_v_dsetsize;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":501
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":501
* tmp = qsetsize
* qsetsize = dsetsize
* dsetsize = tmp # <<<<<<<<<<<<<<
@@ -41226,7 +40199,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":503
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":503
* dsetsize = tmp
*
* if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize: # <<<<<<<<<<<<<<
@@ -41242,7 +40215,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_t_5 / __pyx_t_6) > __pyx_v_dsetsize);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":504
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":504
*
* if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize:
* free(result) # <<<<<<<<<<<<<<
@@ -41251,7 +40224,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
free(__pyx_v_result);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":505
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":505
* 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) # <<<<<<<<<<<<<<
@@ -41264,7 +40237,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":509
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":509
* # binary search. There are two flavors, depending on
* # whether the queryset or dataset is first
* if d_first: # <<<<<<<<<<<<<<
@@ -41273,7 +40246,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
if (__pyx_v_d_first) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":510
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":510
* # whether the queryset or dataset is first
* if d_first:
* med2 = median(low2, high2, step2) # <<<<<<<<<<<<<<
@@ -41282,7 +40255,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med2 = __pyx_f_3_sa_median(__pyx_v_low2, __pyx_v_high2, __pyx_v_step2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":511
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":511
* if d_first:
* med2 = median(low2, high2, step2)
* assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -41291,7 +40264,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_med2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":513
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":513
* assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr)
*
* search_low = low1 # <<<<<<<<<<<<<<
@@ -41300,7 +40273,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_search_low = __pyx_v_low1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":514
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":514
*
* search_low = low1
* search_high = high1 # <<<<<<<<<<<<<<
@@ -41309,7 +40282,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_search_high = __pyx_v_high1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":515
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":515
* search_low = low1
* search_high = high1
* while search_low < search_high: # <<<<<<<<<<<<<<
@@ -41320,7 +40293,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_search_low < __pyx_v_search_high);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":516
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":516
* search_high = high1
* while search_low < search_high:
* med1 = median(search_low, search_high, step1) # <<<<<<<<<<<<<<
@@ -41329,7 +40302,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med1 = __pyx_f_3_sa_median(__pyx_v_search_low, __pyx_v_search_high, __pyx_v_step1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":517
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":517
* while search_low < search_high:
* med1 = median(search_low, search_high, step1)
* find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) # <<<<<<<<<<<<<<
@@ -41338,7 +40311,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_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));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":518
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":518
* 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) # <<<<<<<<<<<<<<
@@ -41347,7 +40320,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_comparison = ((struct __pyx_vtabstruct_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":521
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":521
* if comparison == -1:
* search_low = med1_plus
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -41356,7 +40329,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
switch (__pyx_v_comparison) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":519
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":519
* 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: # <<<<<<<<<<<<<<
@@ -41365,7 +40338,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case -1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":520
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":520
* comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last)
* if comparison == -1:
* search_low = med1_plus # <<<<<<<<<<<<<<
@@ -41375,7 +40348,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_v_search_low = __pyx_v_med1_plus;
break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":521
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":521
* if comparison == -1:
* search_low = med1_plus
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -41384,7 +40357,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case 1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":522
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":522
* search_low = med1_plus
* elif comparison == 1:
* search_high = med1_minus # <<<<<<<<<<<<<<
@@ -41395,7 +40368,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
break;
default:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":524
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":524
* search_high = med1_minus
* else:
* break # <<<<<<<<<<<<<<
@@ -41411,7 +40384,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":526
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":526
* break
* else:
* med1 = median(low1, high1, step1) # <<<<<<<<<<<<<<
@@ -41420,7 +40393,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med1 = __pyx_f_3_sa_median(__pyx_v_low1, __pyx_v_high1, __pyx_v_step1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":527
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":527
* else:
* med1 = median(low1, high1, step1)
* find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) # <<<<<<<<<<<<<<
@@ -41429,7 +40402,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_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));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":529
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":529
* find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus)
*
* search_low = low2 # <<<<<<<<<<<<<<
@@ -41438,7 +40411,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_search_low = __pyx_v_low2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":530
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":530
*
* search_low = low2
* search_high = high2 # <<<<<<<<<<<<<<
@@ -41447,7 +40420,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_search_high = __pyx_v_high2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":531
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":531
* search_low = low2
* search_high = high2
* while search_low < search_high: # <<<<<<<<<<<<<<
@@ -41458,7 +40431,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_search_low < __pyx_v_search_high);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":532
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":532
* search_high = high2
* while search_low < search_high:
* med2 = median(search_low, search_high, step2) # <<<<<<<<<<<<<<
@@ -41467,7 +40440,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med2 = __pyx_f_3_sa_median(__pyx_v_search_low, __pyx_v_search_high, __pyx_v_step2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":533
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":533
* while search_low < search_high:
* med2 = median(search_low, search_high, step2)
* assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -41476,7 +40449,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_med2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":534
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":534
* 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) # <<<<<<<<<<<<<<
@@ -41485,7 +40458,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_comparison = ((struct __pyx_vtabstruct_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":537
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":537
* if comparison == -1:
* search_high = med2
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -41494,7 +40467,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
switch (__pyx_v_comparison) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":535
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":535
* 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: # <<<<<<<<<<<<<<
@@ -41503,7 +40476,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case -1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":536
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":536
* comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last)
* if comparison == -1:
* search_high = med2 # <<<<<<<<<<<<<<
@@ -41513,7 +40486,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_v_search_high = __pyx_v_med2;
break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":537
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":537
* if comparison == -1:
* search_high = med2
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -41522,7 +40495,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case 1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":538
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":538
* search_high = med2
* elif comparison == 1:
* search_low = med2 + step2 # <<<<<<<<<<<<<<
@@ -41533,7 +40506,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
break;
default:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":540
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":540
* search_low = med2 + step2
* else:
* break # <<<<<<<<<<<<<<
@@ -41548,7 +40521,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":542
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":542
* break
*
* med_result_len = 0 # <<<<<<<<<<<<<<
@@ -41557,7 +40530,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med_result_len = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":543
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":543
*
* med_result_len = 0
* med_result = <int*> malloc(0*sizeof(int*)) # <<<<<<<<<<<<<<
@@ -41566,7 +40539,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med_result = ((int *)malloc((0 * (sizeof(int *)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":544
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":544
* med_result_len = 0
* med_result = <int*> malloc(0*sizeof(int*))
* if search_high > search_low: # <<<<<<<<<<<<<<
@@ -41576,7 +40549,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_search_high > __pyx_v_search_low);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":550
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":550
* # want to store the bindings for all of those elements. We can
* # subsequently throw all of them away.
* med2_minus = med2 # <<<<<<<<<<<<<<
@@ -41585,7 +40558,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med2_minus = __pyx_v_med2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":551
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":551
* # subsequently throw all of them away.
* med2_minus = med2
* med2_plus = med2 + step2 # <<<<<<<<<<<<<<
@@ -41594,7 +40567,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med2_plus = (__pyx_v_med2 + __pyx_v_step2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":552
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":552
* med2_minus = med2
* med2_plus = med2 + step2
* i1 = med1_minus # <<<<<<<<<<<<<<
@@ -41603,7 +40576,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_i1 = __pyx_v_med1_minus;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":553
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":553
* med2_plus = med2 + step2
* i1 = med1_minus
* while i1 < med1_plus: # <<<<<<<<<<<<<<
@@ -41614,7 +40587,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_i1 < __pyx_v_med1_plus);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":554
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":554
* i1 = med1_minus
* while i1 < med1_plus:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -41623,7 +40596,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":555
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":555
* while i1 < med1_plus:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* while med2_minus-step2 >= low2: # <<<<<<<<<<<<<<
@@ -41634,7 +40607,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_med2_minus - __pyx_v_step2) >= __pyx_v_low2);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":556
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":556
* 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) # <<<<<<<<<<<<<<
@@ -41643,7 +40616,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":557
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":557
* 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: # <<<<<<<<<<<<<<
@@ -41653,7 +40626,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (((struct __pyx_vtabstruct_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);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":558
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":558
* 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 # <<<<<<<<<<<<<<
@@ -41665,7 +40638,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":560
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":560
* med2_minus = med2_minus - step2
* else:
* break # <<<<<<<<<<<<<<
@@ -41678,7 +40651,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L18_break:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":561
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":561
* else:
* break
* i2 = med2_minus # <<<<<<<<<<<<<<
@@ -41687,7 +40660,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_i2 = __pyx_v_med2_minus;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":562
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":562
* break
* i2 = med2_minus
* while i2 < high2: # <<<<<<<<<<<<<<
@@ -41698,7 +40671,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_i2 < __pyx_v_high2);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":563
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":563
* i2 = med2_minus
* while i2 < high2:
* assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -41707,7 +40680,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_f_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_i2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":564
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":564
* 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) # <<<<<<<<<<<<<<
@@ -41716,7 +40689,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_comparison = ((struct __pyx_vtabstruct_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":565
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":565
* 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: # <<<<<<<<<<<<<<
@@ -41726,7 +40699,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_comparison == 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":567
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":567
* if comparison == 0:
* pass
* med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len) # <<<<<<<<<<<<<<
@@ -41738,7 +40711,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L22:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":568
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":568
* pass
* med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len)
* if comparison == -1: # <<<<<<<<<<<<<<
@@ -41748,7 +40721,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_comparison == -1);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":569
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":569
* med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len)
* if comparison == -1:
* break # <<<<<<<<<<<<<<
@@ -41760,7 +40733,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L23:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":570
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":570
* if comparison == -1:
* break
* i2 = i2 + step2 # <<<<<<<<<<<<<<
@@ -41771,7 +40744,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L21_break:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":571
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":571
* break
* i2 = i2 + step2
* if i2 > med2_plus: # <<<<<<<<<<<<<<
@@ -41781,7 +40754,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_i2 > __pyx_v_med2_plus);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":572
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":572
* i2 = i2 + step2
* if i2 > med2_plus:
* med2_plus = i2 # <<<<<<<<<<<<<<
@@ -41793,7 +40766,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":573
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":573
* if i2 > med2_plus:
* med2_plus = i2
* i1 = i1 + step1 # <<<<<<<<<<<<<<
@@ -41803,7 +40776,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_v_i1 = (__pyx_v_i1 + __pyx_v_step1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":575
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":575
* i1 = i1 + step1
*
* tmp = med1_minus # <<<<<<<<<<<<<<
@@ -41812,7 +40785,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_tmp = __pyx_v_med1_minus;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":576
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":576
*
* tmp = med1_minus
* med1_minus = med1_plus # <<<<<<<<<<<<<<
@@ -41821,7 +40794,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med1_minus = __pyx_v_med1_plus;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":577
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":577
* tmp = med1_minus
* med1_minus = med1_plus
* med1_plus = tmp # <<<<<<<<<<<<<<
@@ -41833,7 +40806,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":580
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":580
* else:
* # No match; need to figure out the point of division in D and Q
* med2_minus = med2 # <<<<<<<<<<<<<<
@@ -41842,7 +40815,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med2_minus = __pyx_v_med2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":581
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":581
* # No match; need to figure out the point of division in D and Q
* med2_minus = med2
* med2_plus = med2 # <<<<<<<<<<<<<<
@@ -41851,7 +40824,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med2_plus = __pyx_v_med2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":582
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":582
* med2_minus = med2
* med2_plus = med2
* if d_first: # <<<<<<<<<<<<<<
@@ -41860,7 +40833,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
if (__pyx_v_d_first) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":583
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":583
* med2_plus = med2
* if d_first:
* med2_minus = med2_minus + step2 # <<<<<<<<<<<<<<
@@ -41869,7 +40842,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med2_minus = (__pyx_v_med2_minus + __pyx_v_step2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":584
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":584
* if d_first:
* med2_minus = med2_minus + step2
* if comparison == -1: # <<<<<<<<<<<<<<
@@ -41879,7 +40852,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_comparison == -1);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":585
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":585
* med2_minus = med2_minus + step2
* if comparison == -1:
* med1_minus = med1_plus # <<<<<<<<<<<<<<
@@ -41891,7 +40864,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L26:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":586
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":586
* if comparison == -1:
* med1_minus = med1_plus
* if comparison == 1: # <<<<<<<<<<<<<<
@@ -41901,7 +40874,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_comparison == 1);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":587
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":587
* med1_minus = med1_plus
* if comparison == 1:
* med1_plus = med1_minus # <<<<<<<<<<<<<<
@@ -41916,7 +40889,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":589
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":589
* med1_plus = med1_minus
* else:
* tmp = med1_minus # <<<<<<<<<<<<<<
@@ -41925,7 +40898,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_tmp = __pyx_v_med1_minus;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":590
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":590
* else:
* tmp = med1_minus
* med1_minus = med1_plus # <<<<<<<<<<<<<<
@@ -41934,7 +40907,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med1_minus = __pyx_v_med1_plus;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":591
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":591
* tmp = med1_minus
* med1_minus = med1_plus
* med1_plus = tmp # <<<<<<<<<<<<<<
@@ -41943,7 +40916,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med1_plus = __pyx_v_tmp;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":592
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":592
* med1_minus = med1_plus
* med1_plus = tmp
* if comparison == 1: # <<<<<<<<<<<<<<
@@ -41953,7 +40926,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_comparison == 1);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":593
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":593
* med1_plus = tmp
* if comparison == 1:
* med2_minus = med2_minus + step2 # <<<<<<<<<<<<<<
@@ -41962,7 +40935,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_med2_minus = (__pyx_v_med2_minus + __pyx_v_step2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":594
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":594
* if comparison == 1:
* med2_minus = med2_minus + step2
* med2_plus = med2_plus + step2 # <<<<<<<<<<<<<<
@@ -41978,7 +40951,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L14:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":596
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":596
* med2_plus = med2_plus + step2
*
* low_result_len = 0 # <<<<<<<<<<<<<<
@@ -41987,7 +40960,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_low_result_len = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":597
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":597
*
* 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) # <<<<<<<<<<<<<<
@@ -41996,7 +40969,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_low_result = ((struct __pyx_vtabstruct_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));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":598
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":598
* 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 # <<<<<<<<<<<<<<
@@ -42005,7 +40978,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_high_result_len = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":599
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":599
* 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) # <<<<<<<<<<<<<<
@@ -42014,7 +40987,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_high_result = ((struct __pyx_vtabstruct_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));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":601
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":601
* 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) # <<<<<<<<<<<<<<
@@ -42023,7 +40996,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_result = __pyx_f_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_low_result, __pyx_v_low_result_len);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":602
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":602
*
* result = extend_arr(result, result_len, low_result, low_result_len)
* result = extend_arr(result, result_len, med_result, med_result_len) # <<<<<<<<<<<<<<
@@ -42032,7 +41005,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_result = __pyx_f_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_med_result, __pyx_v_med_result_len);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":603
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":603
* 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) # <<<<<<<<<<<<<<
@@ -42041,7 +41014,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
__pyx_v_result = __pyx_f_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_high_result, __pyx_v_high_result_len);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":604
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":604
* 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) # <<<<<<<<<<<<<<
@@ -42050,7 +41023,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
free(__pyx_v_low_result);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":605
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":605
* result = extend_arr(result, result_len, high_result, high_result_len)
* free(low_result)
* free(med_result) # <<<<<<<<<<<<<<
@@ -42059,7 +41032,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
free(__pyx_v_med_result);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":606
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":606
* free(low_result)
* free(med_result)
* free(high_result) # <<<<<<<<<<<<<<
@@ -42068,7 +41041,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
free(__pyx_v_high_result);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":608
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":608
* free(high_result)
*
* return result # <<<<<<<<<<<<<<
@@ -42088,7 +41061,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":612
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":612
*
*
* cdef long compare_matchings_set(self, int i1_minus, int i1_plus, int* arr1, int step1, # <<<<<<<<<<<<<<
@@ -42107,7 +41080,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
int __pyx_t_1;
__Pyx_RefNannySetupContext("compare_matchings_set", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":623
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":623
* cdef Matching* loc1
*
* loc1 = &l1_stack # <<<<<<<<<<<<<<
@@ -42116,7 +41089,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
*/
__pyx_v_loc1 = (&__pyx_v_l1_stack);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":625
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":625
* loc1 = &l1_stack
*
* i1 = i1_minus # <<<<<<<<<<<<<<
@@ -42125,7 +41098,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
*/
__pyx_v_i1 = __pyx_v_i1_minus;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":626
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":626
*
* i1 = i1_minus
* while i1 < i1_plus: # <<<<<<<<<<<<<<
@@ -42136,7 +41109,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
__pyx_t_1 = (__pyx_v_i1 < __pyx_v_i1_plus);
if (!__pyx_t_1) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":627
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":627
* i1 = i1_minus
* while i1 < i1_plus:
* assign_matching(loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -42145,7 +41118,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
*/
__pyx_f_3_sa_assign_matching(__pyx_v_loc1, __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":628
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":628
* 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) # <<<<<<<<<<<<<<
@@ -42154,7 +41127,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
*/
__pyx_v_comparison = ((struct __pyx_vtabstruct_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":629
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":629
* 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: # <<<<<<<<<<<<<<
@@ -42164,7 +41137,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
__pyx_t_1 = (__pyx_v_comparison == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":630
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":630
* comparison = self.compare_matchings(loc1, loc2, offset_by_one, len_last)
* if comparison == 0:
* prev_comparison = 0 # <<<<<<<<<<<<<<
@@ -42173,7 +41146,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
*/
__pyx_v_prev_comparison = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":631
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":631
* if comparison == 0:
* prev_comparison = 0
* break # <<<<<<<<<<<<<<
@@ -42184,7 +41157,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
goto __pyx_L5;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":632
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":632
* prev_comparison = 0
* break
* elif i1 == i1_minus: # <<<<<<<<<<<<<<
@@ -42194,7 +41167,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
__pyx_t_1 = (__pyx_v_i1 == __pyx_v_i1_minus);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":633
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":633
* break
* elif i1 == i1_minus:
* prev_comparison = comparison # <<<<<<<<<<<<<<
@@ -42206,7 +41179,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":635
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":635
* prev_comparison = comparison
* else:
* if comparison != prev_comparison: # <<<<<<<<<<<<<<
@@ -42216,7 +41189,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
__pyx_t_1 = (__pyx_v_comparison != __pyx_v_prev_comparison);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":636
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":636
* else:
* if comparison != prev_comparison:
* prev_comparison = 0 # <<<<<<<<<<<<<<
@@ -42225,7 +41198,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
*/
__pyx_v_prev_comparison = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":637
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":637
* if comparison != prev_comparison:
* prev_comparison = 0
* break # <<<<<<<<<<<<<<
@@ -42239,7 +41212,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":638
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":638
* prev_comparison = 0
* break
* i1 = i1 + step1 # <<<<<<<<<<<<<<
@@ -42250,7 +41223,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
}
__pyx_L4_break:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":639
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":639
* break
* i1 = i1 + step1
* return prev_comparison # <<<<<<<<<<<<<<
@@ -42266,7 +41239,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":642
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":642
*
*
* cdef long compare_matchings(self, Matching* loc1, Matching* loc2, int offset_by_one, int len_last): # <<<<<<<<<<<<<<
@@ -42284,7 +41257,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
int __pyx_t_4;
__Pyx_RefNannySetupContext("compare_matchings", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":645
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":645
* cdef int i
*
* if loc1.sent_id > loc2.sent_id: # <<<<<<<<<<<<<<
@@ -42294,7 +41267,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__pyx_t_1 = (__pyx_v_loc1->sent_id > __pyx_v_loc2->sent_id);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":646
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":646
*
* if loc1.sent_id > loc2.sent_id:
* return 1 # <<<<<<<<<<<<<<
@@ -42307,7 +41280,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":647
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":647
* if loc1.sent_id > loc2.sent_id:
* return 1
* if loc2.sent_id > loc1.sent_id: # <<<<<<<<<<<<<<
@@ -42317,7 +41290,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__pyx_t_1 = (__pyx_v_loc2->sent_id > __pyx_v_loc1->sent_id);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":648
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":648
* return 1
* if loc2.sent_id > loc1.sent_id:
* return -1 # <<<<<<<<<<<<<<
@@ -42330,7 +41303,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":650
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":650
* return -1
*
* if loc1.size == 1 and loc2.size == 1: # <<<<<<<<<<<<<<
@@ -42346,7 +41319,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":651
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":651
*
* if loc1.size == 1 and loc2.size == 1:
* if loc2.arr[loc2.start] - loc1.arr[loc1.start] <= self.train_min_gap_size: # <<<<<<<<<<<<<<
@@ -42356,7 +41329,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__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);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":652
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":652
* if loc1.size == 1 and loc2.size == 1:
* if loc2.arr[loc2.start] - loc1.arr[loc1.start] <= self.train_min_gap_size:
* return 1 # <<<<<<<<<<<<<<
@@ -42371,7 +41344,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
goto __pyx_L5;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":654
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":654
* return 1
*
* elif offset_by_one: # <<<<<<<<<<<<<<
@@ -42380,7 +41353,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
*/
if (__pyx_v_offset_by_one) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":655
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":655
*
* elif offset_by_one:
* for i from 1 <= i < loc1.size: # <<<<<<<<<<<<<<
@@ -42390,7 +41363,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__pyx_t_4 = __pyx_v_loc1->size;
for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":656
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":656
* elif offset_by_one:
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]: # <<<<<<<<<<<<<<
@@ -42400,7 +41373,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__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)]));
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":657
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":657
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]:
* return 1 # <<<<<<<<<<<<<<
@@ -42413,7 +41386,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":658
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":658
* 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]: # <<<<<<<<<<<<<<
@@ -42423,7 +41396,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__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)]));
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":659
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":659
* return 1
* if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i-1]:
* return -1 # <<<<<<<<<<<<<<
@@ -42440,7 +41413,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":662
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":662
*
* else:
* if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]: # <<<<<<<<<<<<<<
@@ -42450,7 +41423,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__pyx_t_3 = (((__pyx_v_loc1->arr[__pyx_v_loc1->start]) + 1) > (__pyx_v_loc2->arr[__pyx_v_loc2->start]));
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":663
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":663
* else:
* if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]:
* return 1 # <<<<<<<<<<<<<<
@@ -42463,7 +41436,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":664
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":664
* if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]:
* return 1
* if loc1.arr[loc1.start]+1 < loc2.arr[loc2.start]: # <<<<<<<<<<<<<<
@@ -42473,7 +41446,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__pyx_t_3 = (((__pyx_v_loc1->arr[__pyx_v_loc1->start]) + 1) < (__pyx_v_loc2->arr[__pyx_v_loc2->start]));
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":665
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":665
* return 1
* if loc1.arr[loc1.start]+1 < loc2.arr[loc2.start]:
* return -1 # <<<<<<<<<<<<<<
@@ -42486,7 +41459,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":667
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":667
* return -1
*
* for i from 1 <= i < loc1.size: # <<<<<<<<<<<<<<
@@ -42496,7 +41469,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__pyx_t_4 = __pyx_v_loc1->size;
for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":668
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":668
*
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]: # <<<<<<<<<<<<<<
@@ -42506,7 +41479,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__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)]));
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":669
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":669
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]:
* return 1 # <<<<<<<<<<<<<<
@@ -42519,7 +41492,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":670
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":670
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]:
* return 1
* if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i]: # <<<<<<<<<<<<<<
@@ -42529,7 +41502,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__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)]));
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":671
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":671
* return 1
* if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i]:
* return -1 # <<<<<<<<<<<<<<
@@ -42545,7 +41518,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":673
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":673
* return -1
*
* if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size: # <<<<<<<<<<<<<<
@@ -42555,7 +41528,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__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);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":674
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":674
*
* if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size:
* return -1 # <<<<<<<<<<<<<<
@@ -42568,7 +41541,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":675
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":675
* if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size:
* return -1
* return 0 # <<<<<<<<<<<<<<
@@ -42584,7 +41557,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":678
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":678
*
*
* cdef int* merge_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<<
@@ -42608,7 +41581,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
int __pyx_t_3;
__Pyx_RefNannySetupContext("merge_helper", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":686
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":686
* cdef Matching loc1, loc2
*
* result_len[0] = 0 # <<<<<<<<<<<<<<
@@ -42617,7 +41590,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
(__pyx_v_result_len[0]) = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":687
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":687
*
* result_len[0] = 0
* result = <int*> malloc(0*sizeof(int)) # <<<<<<<<<<<<<<
@@ -42626,7 +41599,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
__pyx_v_result = ((int *)malloc((0 * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":689
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":689
* result = <int*> malloc(0*sizeof(int))
*
* i1 = low1 # <<<<<<<<<<<<<<
@@ -42635,7 +41608,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
__pyx_v_i1 = __pyx_v_low1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":690
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":690
*
* i1 = low1
* i2 = low2 # <<<<<<<<<<<<<<
@@ -42644,7 +41617,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
__pyx_v_i2 = __pyx_v_low2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":691
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":691
* i1 = low1
* i2 = low2
* while i1 < high1 and i2 < high2: # <<<<<<<<<<<<<<
@@ -42661,7 +41634,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":694
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":694
*
* # First, pop all unneeded loc2's off the stack
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -42670,7 +41643,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
__pyx_f_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":695
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":695
* # First, pop all unneeded loc2's off the stack
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* while i2 < high2: # <<<<<<<<<<<<<<
@@ -42681,7 +41654,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
__pyx_t_3 = (__pyx_v_i2 < __pyx_v_high2);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":696
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":696
* 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) # <<<<<<<<<<<<<<
@@ -42690,7 +41663,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
__pyx_f_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_i2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":697
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":697
* 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: # <<<<<<<<<<<<<<
@@ -42700,7 +41673,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
__pyx_t_3 = (((struct __pyx_vtabstruct_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);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":698
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":698
* 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 # <<<<<<<<<<<<<<
@@ -42712,7 +41685,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":700
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":700
* i2 = i2 + step2
* else:
* break # <<<<<<<<<<<<<<
@@ -42725,7 +41698,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
__pyx_L6_break:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":703
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":703
*
* # Next: process all loc1's with the same starting val
* j1 = i1 # <<<<<<<<<<<<<<
@@ -42734,7 +41707,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
__pyx_v_j1 = __pyx_v_i1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":704
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":704
* # Next: process all loc1's with the same starting val
* j1 = i1
* while i1 < high1 and arr1[j1] == arr1[i1]: # <<<<<<<<<<<<<<
@@ -42751,7 +41724,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":705
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":705
* j1 = i1
* while i1 < high1 and arr1[j1] == arr1[i1]:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -42760,7 +41733,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
__pyx_f_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":706
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":706
* while i1 < high1 and arr1[j1] == arr1[i1]:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* j2 = i2 # <<<<<<<<<<<<<<
@@ -42769,7 +41742,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
__pyx_v_j2 = __pyx_v_i2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":707
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":707
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* j2 = i2
* while j2 < high2: # <<<<<<<<<<<<<<
@@ -42780,7 +41753,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
__pyx_t_2 = (__pyx_v_j2 < __pyx_v_high2);
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":708
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":708
* j2 = i2
* while j2 < high2:
* assign_matching(&loc2, arr2, j2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -42789,7 +41762,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
__pyx_f_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_j2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":709
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":709
* 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) # <<<<<<<<<<<<<<
@@ -42798,7 +41771,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
*/
__pyx_v_comparison = ((struct __pyx_vtabstruct_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":710
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":710
* 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: # <<<<<<<<<<<<<<
@@ -42808,7 +41781,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
__pyx_t_2 = (__pyx_v_comparison == 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":711
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":711
* 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) # <<<<<<<<<<<<<<
@@ -42820,7 +41793,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":712
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":712
* if comparison == 0:
* result = append_combined_matching(result, &loc1, &loc2, offset_by_one, num_subpatterns, result_len)
* if comparison == 1: # <<<<<<<<<<<<<<
@@ -42833,7 +41806,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
__pyx_L13:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":714
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":714
* if comparison == 1:
* pass
* if comparison == -1: # <<<<<<<<<<<<<<
@@ -42843,7 +41816,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
__pyx_t_2 = (__pyx_v_comparison == -1);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":715
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":715
* pass
* if comparison == -1:
* break # <<<<<<<<<<<<<<
@@ -42855,7 +41828,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":717
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":717
* break
* else:
* j2 = j2 + step2 # <<<<<<<<<<<<<<
@@ -42868,7 +41841,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
__pyx_L11_break:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":718
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":718
* else:
* j2 = j2 + step2
* i1 = i1 + step1 # <<<<<<<<<<<<<<
@@ -42879,7 +41852,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":719
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":719
* j2 = j2 + step2
* i1 = i1 + step1
* return result # <<<<<<<<<<<<<<
@@ -42895,7 +41868,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":722
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":722
*
*
* cdef void sort_phrase_loc(self, IntList arr, PhraseLocation loc, Phrase phrase): # <<<<<<<<<<<<<<
@@ -42917,7 +41890,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("sort_phrase_loc", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":727
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":727
* cdef IntList result
*
* if phrase in self.precomputed_index: # <<<<<<<<<<<<<<
@@ -42927,7 +41900,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__pyx_t_1 = ((PySequence_Contains(__pyx_v_self->precomputed_index, ((PyObject *)__pyx_v_phrase)))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":728
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":728
*
* if phrase in self.precomputed_index:
* loc.arr = self.precomputed_index[phrase] # <<<<<<<<<<<<<<
@@ -42946,7 +41919,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":730
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":730
* loc.arr = self.precomputed_index[phrase]
* else:
* loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low) # <<<<<<<<<<<<<<
@@ -42968,7 +41941,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__pyx_v_loc->arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":731
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":731
* else:
* loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low)
* veb = VEB(arr.len) # <<<<<<<<<<<<<<
@@ -42988,7 +41961,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__pyx_v_veb = ((struct __pyx_obj_3_sa_VEB *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":732
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":732
* 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: # <<<<<<<<<<<<<<
@@ -42998,7 +41971,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__pyx_t_4 = __pyx_v_loc->sa_high;
for (__pyx_v_i = __pyx_v_loc->sa_low; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":733
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":733
* veb = VEB(arr.len)
* for i from loc.sa_low <= i < loc.sa_high:
* veb._insert(arr.arr[i]) # <<<<<<<<<<<<<<
@@ -43008,7 +41981,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
((struct __pyx_vtabstruct_3_sa_VEB *)__pyx_v_veb->__pyx_vtab)->_insert(__pyx_v_veb, (__pyx_v_arr->arr[__pyx_v_i]));
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":734
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":734
* for i from loc.sa_low <= i < loc.sa_high:
* veb._insert(arr.arr[i])
* i = veb.veb.min_val # <<<<<<<<<<<<<<
@@ -43017,7 +41990,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
*/
__pyx_v_i = __pyx_v_veb->veb->min_val;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":735
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":735
* veb._insert(arr.arr[i])
* i = veb.veb.min_val
* for j from 0 <= j < loc.sa_high-loc.sa_low: # <<<<<<<<<<<<<<
@@ -43027,7 +42000,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__pyx_t_4 = (__pyx_v_loc->sa_high - __pyx_v_loc->sa_low);
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":736
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":736
* i = veb.veb.min_val
* for j from 0 <= j < loc.sa_high-loc.sa_low:
* loc.arr.arr[j] = i # <<<<<<<<<<<<<<
@@ -43036,7 +42009,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
*/
(__pyx_v_loc->arr->arr[__pyx_v_j]) = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":737
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":737
* for j from 0 <= j < loc.sa_high-loc.sa_low:
* loc.arr.arr[j] = i
* i = veb._findsucc(i) # <<<<<<<<<<<<<<
@@ -43048,7 +42021,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":738
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":738
* loc.arr.arr[j] = i
* i = veb._findsucc(i)
* loc.arr_low = 0 # <<<<<<<<<<<<<<
@@ -43057,7 +42030,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
*/
__pyx_v_loc->arr_low = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":739
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":739
* i = veb._findsucc(i)
* loc.arr_low = 0
* loc.arr_high = loc.arr.len # <<<<<<<<<<<<<<
@@ -43076,7 +42049,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":742
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":742
*
*
* cdef intersect_helper(self, Phrase prefix, Phrase suffix, # <<<<<<<<<<<<<<
@@ -43113,7 +42086,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("intersect_helper", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":749
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":749
* cdef int* result_ptr
*
* result_len = 0 # <<<<<<<<<<<<<<
@@ -43122,7 +42095,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_result_len = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":751
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":751
* result_len = 0
*
* if sym_isvar(suffix[0]): # <<<<<<<<<<<<<<
@@ -43136,7 +42109,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_3 = __pyx_f_3_sa_sym_isvar(__pyx_t_2);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":752
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":752
*
* if sym_isvar(suffix[0]):
* offset_by_one = 1 # <<<<<<<<<<<<<<
@@ -43148,7 +42121,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":754
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":754
* offset_by_one = 1
* else:
* offset_by_one = 0 # <<<<<<<<<<<<<<
@@ -43159,7 +42132,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":756
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":756
* offset_by_one = 0
*
* len_last = len(suffix.getchunk(suffix.arity())) # <<<<<<<<<<<<<<
@@ -43186,7 +42159,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_len_last = __pyx_t_6;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":758
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":758
* len_last = len(suffix.getchunk(suffix.arity()))
*
* if prefix_loc.arr is None: # <<<<<<<<<<<<<<
@@ -43196,7 +42169,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_7 = (((PyObject *)__pyx_v_prefix_loc->arr) == Py_None);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":759
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":759
*
* if prefix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix) # <<<<<<<<<<<<<<
@@ -43211,7 +42184,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":760
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":760
* if prefix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix)
* arr1 = prefix_loc.arr # <<<<<<<<<<<<<<
@@ -43221,7 +42194,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__Pyx_INCREF(((PyObject *)__pyx_v_prefix_loc->arr));
__pyx_v_arr1 = __pyx_v_prefix_loc->arr;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":761
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":761
* self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix)
* arr1 = prefix_loc.arr
* low1 = prefix_loc.arr_low # <<<<<<<<<<<<<<
@@ -43230,7 +42203,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_low1 = __pyx_v_prefix_loc->arr_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":762
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":762
* arr1 = prefix_loc.arr
* low1 = prefix_loc.arr_low
* high1 = prefix_loc.arr_high # <<<<<<<<<<<<<<
@@ -43239,7 +42212,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_high1 = __pyx_v_prefix_loc->arr_high;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":763
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":763
* low1 = prefix_loc.arr_low
* high1 = prefix_loc.arr_high
* step1 = prefix_loc.num_subpatterns # <<<<<<<<<<<<<<
@@ -43248,7 +42221,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_step1 = __pyx_v_prefix_loc->num_subpatterns;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":765
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":765
* step1 = prefix_loc.num_subpatterns
*
* if suffix_loc.arr is None: # <<<<<<<<<<<<<<
@@ -43258,7 +42231,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_7 = (((PyObject *)__pyx_v_suffix_loc->arr) == Py_None);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":766
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":766
*
* if suffix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix) # <<<<<<<<<<<<<<
@@ -43273,7 +42246,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":767
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":767
* if suffix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix)
* arr2 = suffix_loc.arr # <<<<<<<<<<<<<<
@@ -43283,7 +42256,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__Pyx_INCREF(((PyObject *)__pyx_v_suffix_loc->arr));
__pyx_v_arr2 = __pyx_v_suffix_loc->arr;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":768
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":768
* self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix)
* arr2 = suffix_loc.arr
* low2 = suffix_loc.arr_low # <<<<<<<<<<<<<<
@@ -43292,7 +42265,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_low2 = __pyx_v_suffix_loc->arr_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":769
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":769
* arr2 = suffix_loc.arr
* low2 = suffix_loc.arr_low
* high2 = suffix_loc.arr_high # <<<<<<<<<<<<<<
@@ -43301,7 +42274,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_high2 = __pyx_v_suffix_loc->arr_high;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":770
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":770
* low2 = suffix_loc.arr_low
* high2 = suffix_loc.arr_high
* step2 = suffix_loc.num_subpatterns # <<<<<<<<<<<<<<
@@ -43310,7 +42283,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_step2 = __pyx_v_suffix_loc->num_subpatterns;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":772
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":772
* step2 = suffix_loc.num_subpatterns
*
* num_subpatterns = prefix.arity()+1 # <<<<<<<<<<<<<<
@@ -43329,7 +42302,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_num_subpatterns = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":774
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":774
* num_subpatterns = prefix.arity()+1
*
* if algorithm == MERGE: # <<<<<<<<<<<<<<
@@ -43339,7 +42312,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_7 = (__pyx_v_algorithm == __pyx_v_3_sa_MERGE);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":777
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":777
* result_ptr = self.merge_helper(low1, high1, arr1.arr, step1,
* low2, high2, arr2.arr, step2,
* offset_by_one, len_last, num_subpatterns, &result_len) # <<<<<<<<<<<<<<
@@ -43351,7 +42324,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":781
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":781
* result_ptr = self.baeza_yates_helper(low1, high1, arr1.arr, step1,
* low2, high2, arr2.arr, step2,
* offset_by_one, len_last, num_subpatterns, &result_len) # <<<<<<<<<<<<<<
@@ -43362,7 +42335,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":783
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":783
* offset_by_one, len_last, num_subpatterns, &result_len)
*
* if result_len == 0: # <<<<<<<<<<<<<<
@@ -43372,7 +42345,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_7 = (__pyx_v_result_len == 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":784
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":784
*
* if result_len == 0:
* free(result_ptr) # <<<<<<<<<<<<<<
@@ -43381,7 +42354,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
free(__pyx_v_result_ptr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":785
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":785
* if result_len == 0:
* free(result_ptr)
* return None # <<<<<<<<<<<<<<
@@ -43396,7 +42369,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":787
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":787
* return None
* else:
* result = IntList() # <<<<<<<<<<<<<<
@@ -43408,7 +42381,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_v_result = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":788
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":788
* else:
* result = IntList()
* free(result.arr) # <<<<<<<<<<<<<<
@@ -43417,7 +42390,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
free(__pyx_v_result->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":789
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":789
* result = IntList()
* free(result.arr)
* result.arr = result_ptr # <<<<<<<<<<<<<<
@@ -43426,7 +42399,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_result->arr = __pyx_v_result_ptr;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":790
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":790
* free(result.arr)
* result.arr = result_ptr
* result.len = result_len # <<<<<<<<<<<<<<
@@ -43435,7 +42408,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_result->len = __pyx_v_result_len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":791
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":791
* result.arr = result_ptr
* result.len = result_len
* result.size = result_len # <<<<<<<<<<<<<<
@@ -43444,7 +42417,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_result->size = __pyx_v_result_len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":792
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":792
* result.len = result_len
* result.size = result_len
* return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns) # <<<<<<<<<<<<<<
@@ -43490,7 +42463,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":794
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":794
* return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns)
*
* cdef loc2str(self, PhraseLocation loc): # <<<<<<<<<<<<<<
@@ -43513,17 +42486,17 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("loc2str", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":796
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":796
* cdef loc2str(self, PhraseLocation loc):
* cdef int i, j
* result = "{" # <<<<<<<<<<<<<<
* i = 0
* while i < loc.arr_high:
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_118));
- __pyx_v_result = ((PyObject *)__pyx_kp_s_118);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_117));
+ __pyx_v_result = ((PyObject *)__pyx_kp_s_117);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":797
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":797
* cdef int i, j
* result = "{"
* i = 0 # <<<<<<<<<<<<<<
@@ -43532,7 +42505,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
*/
__pyx_v_i = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":798
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":798
* result = "{"
* i = 0
* while i < loc.arr_high: # <<<<<<<<<<<<<<
@@ -43543,20 +42516,20 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
__pyx_t_1 = (__pyx_v_i < __pyx_v_loc->arr_high);
if (!__pyx_t_1) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":799
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":799
* 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, ((PyObject *)__pyx_kp_s_119)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_kp_s_118)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_result);
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":800
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":800
* while i < loc.arr_high:
* result = result + "("
* for j from i <= j < i + loc.num_subpatterns: # <<<<<<<<<<<<<<
@@ -43566,7 +42539,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
__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++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":801
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":801
* result = result + "("
* for j from i <= j < i + loc.num_subpatterns:
* result = result + ("%d " %loc.arr[j]) # <<<<<<<<<<<<<<
@@ -43586,7 +42559,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
__pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":802
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":802
* for j from i <= j < i + loc.num_subpatterns:
* result = result + ("%d " %loc.arr[j])
* result = result + ")" # <<<<<<<<<<<<<<
@@ -43599,7 +42572,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":803
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":803
* result = result + ("%d " %loc.arr[j])
* result = result + ")"
* i = i + loc.num_subpatterns # <<<<<<<<<<<<<<
@@ -43609,20 +42582,20 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
__pyx_v_i = (__pyx_v_i + __pyx_v_loc->num_subpatterns);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":804
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":804
* result = result + ")"
* i = i + loc.num_subpatterns
* result = result + "}" # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_kp_s_120)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_kp_s_119)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_result);
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":805
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":805
* i = i + loc.num_subpatterns
* result = result + "}"
* return result # <<<<<<<<<<<<<<
@@ -43648,7 +42621,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":807
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":807
* return result
*
* cdef PhraseLocation intersect(self, prefix_node, suffix_node, Phrase phrase): # <<<<<<<<<<<<<<
@@ -43674,7 +42647,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("intersect", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":811
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":811
* cdef PhraseLocation prefix_loc, suffix_loc, result
*
* prefix = prefix_node.phrase # <<<<<<<<<<<<<<
@@ -43687,7 +42660,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_v_prefix = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":812
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":812
*
* prefix = prefix_node.phrase
* suffix = suffix_node.phrase # <<<<<<<<<<<<<<
@@ -43700,7 +42673,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_v_suffix = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":813
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":813
* prefix = prefix_node.phrase
* suffix = suffix_node.phrase
* prefix_loc = prefix_node.phrase_location # <<<<<<<<<<<<<<
@@ -43713,7 +42686,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_v_prefix_loc = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":814
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":814
* suffix = suffix_node.phrase
* prefix_loc = prefix_node.phrase_location
* suffix_loc = suffix_node.phrase_location # <<<<<<<<<<<<<<
@@ -43726,14 +42699,14 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_v_suffix_loc = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":816
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":816
* suffix_loc = suffix_node.phrase_location
*
* result = self.get_precomputed_collocation(phrase) # <<<<<<<<<<<<<<
* if result is not None:
* intersect_method = "precomputed"
*/
- __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_121); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_120); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __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 = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -43748,7 +42721,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_v_result = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":817
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":817
*
* result = self.get_precomputed_collocation(phrase)
* if result is not None: # <<<<<<<<<<<<<<
@@ -43758,7 +42731,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_t_4 = (((PyObject *)__pyx_v_result) != Py_None);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":818
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":818
* result = self.get_precomputed_collocation(phrase)
* if result is not None:
* intersect_method = "precomputed" # <<<<<<<<<<<<<<
@@ -43771,7 +42744,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":820
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":820
* intersect_method = "precomputed"
*
* if result is None: # <<<<<<<<<<<<<<
@@ -43781,7 +42754,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_t_4 = (((PyObject *)__pyx_v_result) == Py_None);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":821
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":821
*
* if result is None:
* if self.use_baeza_yates: # <<<<<<<<<<<<<<
@@ -43790,7 +42763,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
*/
if (__pyx_v_self->use_baeza_yates) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":822
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":822
* if result is None:
* if self.use_baeza_yates:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, BAEZA_YATES) # <<<<<<<<<<<<<<
@@ -43804,21 +42777,21 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_v_result = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":823
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":823
* if self.use_baeza_yates:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, BAEZA_YATES)
* intersect_method="double binary" # <<<<<<<<<<<<<<
* else:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE)
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_122));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_121));
__Pyx_XDECREF(__pyx_v_intersect_method);
- __pyx_v_intersect_method = ((PyObject *)__pyx_kp_s_122);
+ __pyx_v_intersect_method = ((PyObject *)__pyx_kp_s_121);
goto __pyx_L5;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":825
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":825
* intersect_method="double binary"
* else:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE) # <<<<<<<<<<<<<<
@@ -43832,7 +42805,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_v_result = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":826
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":826
* else:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE)
* intersect_method="merge" # <<<<<<<<<<<<<<
@@ -43848,7 +42821,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":827
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":827
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE)
* intersect_method="merge"
* return result # <<<<<<<<<<<<<<
@@ -43886,11 +42859,11 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__p
PyObject *__pyx_v_frontier = 0;
PyObject *__pyx_v_res = 0;
PyObject *__pyx_v_fwords = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__frontier,&__pyx_n_s__res,&__pyx_n_s__fwords,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("advance (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__frontier,&__pyx_n_s__res,&__pyx_n_s__fwords,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -43905,15 +42878,18 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__p
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__frontier)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__frontier);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__res)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__res);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fwords)) != 0)) kw_args--;
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fwords);
+ if (likely(values[2])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -43945,7 +42921,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__p
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":829
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":829
* return result
*
* def advance(self, frontier, res, fwords): # <<<<<<<<<<<<<<
@@ -43986,7 +42962,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("advance", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":831
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":831
* def advance(self, frontier, res, fwords):
* cdef unsigned na
* nf = [] # <<<<<<<<<<<<<<
@@ -43998,7 +42974,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__pyx_v_nf = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":832
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":832
* cdef unsigned na
* nf = []
* for (toskip, (i, alt, pathlen)) in frontier: # <<<<<<<<<<<<<<
@@ -44016,18 +42992,10 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
for (;;) {
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++;
- #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 = 832; __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++;
- #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 = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
@@ -44041,33 +43009,27 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
PyObject* sequence = __pyx_t_4;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_5 = PyList_GET_ITEM(sequence, 0);
__pyx_t_6 = PyList_GET_ITEM(sequence, 1);
}
__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 = 832; __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 = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- } else
- {
+ } 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 = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
@@ -44078,13 +43040,12 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
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 = 832; __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;
__pyx_L5_unpacking_failed:;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_8 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[8]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L6_unpacking_done:;
}
@@ -44093,22 +43054,21 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__pyx_t_5 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
PyObject* sequence = __pyx_t_6;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 3)) {
- if (size > 3) __Pyx_RaiseTooManyValuesError(3);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) {
+ if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_9 = PyTuple_GET_ITEM(sequence, 1);
__pyx_t_10 = PyTuple_GET_ITEM(sequence, 2);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 3)) {
+ if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_7 = PyList_GET_ITEM(sequence, 0);
__pyx_t_9 = PyList_GET_ITEM(sequence, 1);
__pyx_t_10 = PyList_GET_ITEM(sequence, 2);
@@ -44116,14 +43076,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_INCREF(__pyx_t_7);
__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 = 832; __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 = 832; __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 = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- } else
- {
+ } 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 = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
@@ -44136,13 +43090,12 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
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 = 832; __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;
__pyx_L7_unpacking_failed:;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_8 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[8]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L8_unpacking_done:;
}
@@ -44156,7 +43109,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__pyx_v_pathlen = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":833
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":833
* nf = []
* for (toskip, (i, alt, pathlen)) in frontier:
* spanlen = fwords[i][alt][2] # <<<<<<<<<<<<<<
@@ -44175,7 +43128,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__pyx_v_spanlen = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":834
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":834
* for (toskip, (i, alt, pathlen)) in frontier:
* spanlen = fwords[i][alt][2]
* if (toskip == 0): # <<<<<<<<<<<<<<
@@ -44188,7 +43141,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":835
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":835
* spanlen = fwords[i][alt][2]
* if (toskip == 0):
* res.append((i, alt, pathlen)) # <<<<<<<<<<<<<<
@@ -44214,7 +43167,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":836
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":836
* if (toskip == 0):
* res.append((i, alt, pathlen))
* ni = i + spanlen # <<<<<<<<<<<<<<
@@ -44227,7 +43180,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__pyx_v_ni = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":837
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":837
* res.append((i, alt, pathlen))
* ni = i + spanlen
* if (ni < len(fwords) and (pathlen + 1) < self.max_initial_size): # <<<<<<<<<<<<<<
@@ -44259,7 +43212,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
if (__pyx_t_15) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":838
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":838
* ni = i + spanlen
* if (ni < len(fwords) and (pathlen + 1) < self.max_initial_size):
* for na in range(len(fwords[ni])): # <<<<<<<<<<<<<<
@@ -44273,7 +43226,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_13; __pyx_t_16+=1) {
__pyx_v_na = __pyx_t_16;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":839
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":839
* 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))) # <<<<<<<<<<<<<<
@@ -44314,18 +43267,18 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":840
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":840
* 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(((PyObject *)__pyx_v_nf)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_nf));
__pyx_t_15 = (__pyx_t_2 > 0);
if (__pyx_t_15) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":841
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":841
* nf.append((toskip - 1, (ni, na, pathlen + 1)))
* if (len(nf) > 0):
* return self.advance(nf, res, fwords) # <<<<<<<<<<<<<<
@@ -44357,7 +43310,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":843
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":843
* return self.advance(nf, res, fwords)
* else:
* return res # <<<<<<<<<<<<<<
@@ -44407,11 +43360,11 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_
PyObject *__pyx_v_fwords = 0;
PyObject *__pyx_v_next_states = 0;
PyObject *__pyx_v_reachable_buffer = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__skip,&__pyx_n_s__i,&__pyx_n_s__spanlen,&__pyx_n_s__pathlen,&__pyx_n_s__fwords,&__pyx_n_s__next_states,&__pyx_n_s__reachable_buffer,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_all_nodes_isteps_away (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__skip,&__pyx_n_s__i,&__pyx_n_s__spanlen,&__pyx_n_s__pathlen,&__pyx_n_s__fwords,&__pyx_n_s__next_states,&__pyx_n_s__reachable_buffer,0};
PyObject* values[7] = {0,0,0,0,0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -44430,35 +43383,42 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__skip)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__skip);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__spanlen)) != 0)) kw_args--;
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__spanlen);
+ if (likely(values[2])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
- if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pathlen)) != 0)) kw_args--;
+ values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pathlen);
+ if (likely(values[3])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
- if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fwords)) != 0)) kw_args--;
+ values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fwords);
+ if (likely(values[4])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 845; __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--;
+ values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__next_states);
+ if (likely(values[5])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 845; __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--;
+ values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reachable_buffer);
+ if (likely(values[6])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -44498,7 +43458,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":845
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":845
* return res
*
* def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer): # <<<<<<<<<<<<<<
@@ -44536,7 +43496,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_all_nodes_isteps_away", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":847
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":847
* def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer):
* cdef unsigned alt_it
* frontier = [] # <<<<<<<<<<<<<<
@@ -44548,7 +43508,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_frontier = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":848
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":848
* cdef unsigned alt_it
* frontier = []
* if (i+spanlen+skip >= len(next_states)): # <<<<<<<<<<<<<<
@@ -44571,7 +43531,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":849
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":849
* frontier = []
* if (i+spanlen+skip >= len(next_states)):
* return frontier # <<<<<<<<<<<<<<
@@ -44586,7 +43546,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":850
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":850
* if (i+spanlen+skip >= len(next_states)):
* return frontier
* key = tuple([i,spanlen]) # <<<<<<<<<<<<<<
@@ -44607,7 +43567,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_key = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":851
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":851
* return frontier
* key = tuple([i,spanlen])
* reachable = [] # <<<<<<<<<<<<<<
@@ -44619,7 +43579,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_reachable = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":852
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":852
* key = tuple([i,spanlen])
* reachable = []
* if (key in reachable_buffer): # <<<<<<<<<<<<<<
@@ -44629,7 +43589,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_t_5 = ((PySequence_Contains(__pyx_v_reachable_buffer, ((PyObject *)__pyx_v_key)))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":853
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":853
* reachable = []
* if (key in reachable_buffer):
* reachable = reachable_buffer[key] # <<<<<<<<<<<<<<
@@ -44645,7 +43605,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":855
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":855
* reachable = reachable_buffer[key]
* else:
* reachable = self.reachable(fwords, i, spanlen) # <<<<<<<<<<<<<<
@@ -44673,7 +43633,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_reachable = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":856
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":856
* else:
* reachable = self.reachable(fwords, i, spanlen)
* reachable_buffer[key] = reachable # <<<<<<<<<<<<<<
@@ -44684,7 +43644,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":857
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":857
* reachable = self.reachable(fwords, i, spanlen)
* reachable_buffer[key] = reachable
* for nextreachable in reachable: # <<<<<<<<<<<<<<
@@ -44702,18 +43662,10 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
for (;;) {
if (!__pyx_t_6 && 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++;
- #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 = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_6 && 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++;
- #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 = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_6(__pyx_t_2);
if (unlikely(!__pyx_t_4)) {
@@ -44729,7 +43681,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_nextreachable = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":858
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":858
* reachable_buffer[key] = reachable
* for nextreachable in reachable:
* for next_id in next_states[nextreachable]: # <<<<<<<<<<<<<<
@@ -44750,18 +43702,10 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
for (;;) {
if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_8(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
@@ -44777,7 +43721,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_next_id = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":859
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":859
* for nextreachable in reachable:
* for next_id in next_states[nextreachable]:
* jump = self.shortest(fwords,i,next_id) # <<<<<<<<<<<<<<
@@ -44805,7 +43749,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_jump = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":860
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":860
* for next_id in next_states[nextreachable]:
* jump = self.shortest(fwords,i,next_id)
* if jump < skip: # <<<<<<<<<<<<<<
@@ -44818,7 +43762,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":861
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":861
* jump = self.shortest(fwords,i,next_id)
* if jump < skip:
* continue # <<<<<<<<<<<<<<
@@ -44830,7 +43774,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":862
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":862
* if jump < skip:
* continue
* if pathlen+jump <= self.max_initial_size: # <<<<<<<<<<<<<<
@@ -44849,7 +43793,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":863
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":863
* continue
* if pathlen+jump <= self.max_initial_size:
* for alt_id in range(len(fwords[next_id])): # <<<<<<<<<<<<<<
@@ -44882,18 +43826,10 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
for (;;) {
if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_9)) {
if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_9)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_9, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_9)) {
if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++;
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_9, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_4 = __pyx_t_12(__pyx_t_9);
if (unlikely(!__pyx_t_4)) {
@@ -44909,7 +43845,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_alt_id = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":864
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":864
* if pathlen+jump <= self.max_initial_size:
* for alt_id in range(len(fwords[next_id])):
* if (fwords[next_id][alt_id][0] != EPSILON): # <<<<<<<<<<<<<<
@@ -44934,7 +43870,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":865
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":865
* for alt_id in range(len(fwords[next_id])):
* if (fwords[next_id][alt_id][0] != EPSILON):
* newel = (next_id,alt_id,pathlen+jump) # <<<<<<<<<<<<<<
@@ -44958,7 +43894,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_newel = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":866
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":866
* if (fwords[next_id][alt_id][0] != EPSILON):
* newel = (next_id,alt_id,pathlen+jump)
* if newel not in frontier: # <<<<<<<<<<<<<<
@@ -44968,7 +43904,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_t_5 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_v_frontier), ((PyObject *)__pyx_v_newel)))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":867
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":867
* newel = (next_id,alt_id,pathlen+jump)
* if newel not in frontier:
* frontier.append((next_id,alt_id,pathlen+jump)) # <<<<<<<<<<<<<<
@@ -45007,7 +43943,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":868
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":868
* if newel not in frontier:
* frontier.append((next_id,alt_id,pathlen+jump))
* return frontier # <<<<<<<<<<<<<<
@@ -45050,11 +43986,11 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *_
PyObject *__pyx_v_fwords = 0;
PyObject *__pyx_v_ifrom = 0;
PyObject *__pyx_v_dist = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fwords,&__pyx_n_s__ifrom,&__pyx_n_s__dist,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reachable (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fwords,&__pyx_n_s__ifrom,&__pyx_n_s__dist,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -45069,15 +44005,18 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *_
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fwords)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fwords);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ifrom)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ifrom);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dist)) != 0)) kw_args--;
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dist);
+ if (likely(values[2])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -45109,7 +44048,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":870
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":870
* return frontier
*
* def reachable(self, fwords, ifrom, dist): # <<<<<<<<<<<<<<
@@ -45139,7 +44078,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("reachable", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":871
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":871
*
* def reachable(self, fwords, ifrom, dist):
* ret = [] # <<<<<<<<<<<<<<
@@ -45151,7 +44090,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__pyx_v_ret = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":872
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":872
* def reachable(self, fwords, ifrom, dist):
* ret = []
* if (ifrom >= len(fwords)): # <<<<<<<<<<<<<<
@@ -45168,7 +44107,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":873
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":873
* ret = []
* if (ifrom >= len(fwords)):
* return ret # <<<<<<<<<<<<<<
@@ -45183,7 +44122,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":874
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":874
* if (ifrom >= len(fwords)):
* return ret
* for alt_id in range(len(fwords[ifrom])): # <<<<<<<<<<<<<<
@@ -45216,18 +44155,10 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
for (;;) {
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++;
- #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 = 874; __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++;
- #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 = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_3 = __pyx_t_5(__pyx_t_1);
if (unlikely(!__pyx_t_3)) {
@@ -45243,7 +44174,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__pyx_v_alt_id = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":875
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":875
* return ret
* for alt_id in range(len(fwords[ifrom])):
* if (fwords[ifrom][alt_id][0] == EPSILON): # <<<<<<<<<<<<<<
@@ -45268,7 +44199,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":876
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":876
* 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)) # <<<<<<<<<<<<<<
@@ -45319,7 +44250,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":878
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":878
* ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist))
* else:
* if (dist==0): # <<<<<<<<<<<<<<
@@ -45332,7 +44263,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":879
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":879
* else:
* if (dist==0):
* if (ifrom not in ret): # <<<<<<<<<<<<<<
@@ -45342,7 +44273,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__pyx_t_4 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_v_ret), __pyx_v_ifrom))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":880
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":880
* if (dist==0):
* if (ifrom not in ret):
* ret.append(ifrom) # <<<<<<<<<<<<<<
@@ -45357,7 +44288,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":882
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":882
* ret.append(ifrom)
* else:
* for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1): # <<<<<<<<<<<<<<
@@ -45406,18 +44337,10 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
for (;;) {
if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_6)) {
if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++;
- #else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_6)) {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++;
- #else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_3 = __pyx_t_11(__pyx_t_6);
if (unlikely(!__pyx_t_3)) {
@@ -45433,7 +44356,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__pyx_v_ifromchild = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":883
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":883
* else:
* for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1):
* if (ifromchild not in ret): # <<<<<<<<<<<<<<
@@ -45443,7 +44366,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__pyx_t_4 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_v_ret), __pyx_v_ifromchild))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":884
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":884
* for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1):
* if (ifromchild not in ret):
* ret.append(ifromchild) # <<<<<<<<<<<<<<
@@ -45463,7 +44386,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":886
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":886
* ret.append(ifromchild)
*
* return ret # <<<<<<<<<<<<<<
@@ -45500,11 +44423,11 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__
PyObject *__pyx_v_fwords = 0;
PyObject *__pyx_v_ifrom = 0;
PyObject *__pyx_v_ito = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fwords,&__pyx_n_s__ifrom,&__pyx_n_s__ito,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("shortest (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fwords,&__pyx_n_s__ifrom,&__pyx_n_s__ito,0};
PyObject* values[3] = {0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -45519,15 +44442,18 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fwords)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fwords);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ifrom)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ifrom);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ito)) != 0)) kw_args--;
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ito);
+ if (likely(values[2])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -45559,7 +44485,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":888
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":888
* return ret
*
* def shortest(self, fwords, ifrom, ito): # <<<<<<<<<<<<<<
@@ -45584,7 +44510,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("shortest", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":890
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":890
* def shortest(self, fwords, ifrom, ito):
* cdef unsigned alt_id
* min = 1000 # <<<<<<<<<<<<<<
@@ -45594,7 +44520,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
__Pyx_INCREF(__pyx_int_1000);
__pyx_v_min = __pyx_int_1000;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":891
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":891
* cdef unsigned alt_id
* min = 1000
* if (ifrom > ito): # <<<<<<<<<<<<<<
@@ -45607,7 +44533,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":892
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":892
* min = 1000
* if (ifrom > ito):
* return min # <<<<<<<<<<<<<<
@@ -45622,7 +44548,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":893
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":893
* if (ifrom > ito):
* return min
* if (ifrom == ito): # <<<<<<<<<<<<<<
@@ -45635,7 +44561,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":894
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":894
* return min
* if (ifrom == ito):
* return 0 # <<<<<<<<<<<<<<
@@ -45650,7 +44576,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":895
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":895
* if (ifrom == ito):
* return 0
* for alt_id in range(len(fwords[ifrom])): # <<<<<<<<<<<<<<
@@ -45664,7 +44590,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_alt_id = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":896
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":896
* return 0
* for alt_id in range(len(fwords[ifrom])):
* currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito) # <<<<<<<<<<<<<<
@@ -45703,7 +44629,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
__pyx_v_currmin = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":897
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":897
* 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): # <<<<<<<<<<<<<<
@@ -45728,7 +44654,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":898
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":898
* currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito)
* if (fwords[ifrom][alt_id][0] != EPSILON):
* currmin += 1 # <<<<<<<<<<<<<<
@@ -45744,7 +44670,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":899
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":899
* if (fwords[ifrom][alt_id][0] != EPSILON):
* currmin += 1
* if (currmin<min): # <<<<<<<<<<<<<<
@@ -45757,7 +44683,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":900
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":900
* currmin += 1
* if (currmin<min):
* min = currmin # <<<<<<<<<<<<<<
@@ -45772,7 +44698,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
__pyx_L8:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":901
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":901
* if (currmin<min):
* min = currmin
* return min # <<<<<<<<<<<<<<
@@ -45806,11 +44732,11 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObj
PyObject *__pyx_v__columns = 0;
PyObject *__pyx_v_curr_idx = 0;
PyObject *__pyx_v_min_dist = 0;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s___columns,&__pyx_n_s__curr_idx,&__pyx_n_s__min_dist,0};
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_next_states (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s___columns,&__pyx_n_s__curr_idx,&__pyx_n_s__min_dist,0};
PyObject* values[3] = {0,0,0};
values[2] = ((PyObject *)__pyx_int_2);
if (unlikely(__pyx_kwds)) {
@@ -45826,10 +44752,12 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObj
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s___columns)) != 0)) kw_args--;
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s___columns);
+ if (likely(values[0])) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__curr_idx)) != 0)) kw_args--;
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__curr_idx);
+ if (likely(values[1])) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("get_next_states", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
@@ -45868,7 +44796,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":903
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":903
* return min
*
* def get_next_states(self, _columns, curr_idx, min_dist=2): # <<<<<<<<<<<<<<
@@ -45901,7 +44829,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_next_states", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":904
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":904
*
* def get_next_states(self, _columns, curr_idx, min_dist=2):
* result = [] # <<<<<<<<<<<<<<
@@ -45913,7 +44841,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_v_result = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":905
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":905
* def get_next_states(self, _columns, curr_idx, min_dist=2):
* result = []
* candidate = [[curr_idx,0]] # <<<<<<<<<<<<<<
@@ -45936,7 +44864,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_v_candidate = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":907
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":907
* candidate = [[curr_idx,0]]
*
* while len(candidate) > 0: # <<<<<<<<<<<<<<
@@ -45944,11 +44872,11 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
* if curr[0] >= len(_columns):
*/
while (1) {
- __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_candidate)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_candidate));
__pyx_t_4 = (__pyx_t_3 > 0);
if (!__pyx_t_4) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":908
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":908
*
* while len(candidate) > 0:
* curr = candidate.pop() # <<<<<<<<<<<<<<
@@ -45961,7 +44889,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_v_curr = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":909
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":909
* while len(candidate) > 0:
* curr = candidate.pop()
* if curr[0] >= len(_columns): # <<<<<<<<<<<<<<
@@ -45981,7 +44909,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":910
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":910
* curr = candidate.pop()
* if curr[0] >= len(_columns):
* continue # <<<<<<<<<<<<<<
@@ -45993,7 +44921,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":911
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":911
* if curr[0] >= len(_columns):
* continue
* if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size: # <<<<<<<<<<<<<<
@@ -46026,7 +44954,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":912
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":912
* continue
* if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size:
* result.append(curr[0]); # <<<<<<<<<<<<<<
@@ -46041,7 +44969,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":913
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":913
* if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size:
* result.append(curr[0]);
* curr_col = _columns[curr[0]] # <<<<<<<<<<<<<<
@@ -46057,7 +44985,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_v_curr_col = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":914
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":914
* result.append(curr[0]);
* curr_col = _columns[curr[0]]
* for alt in curr_col: # <<<<<<<<<<<<<<
@@ -46075,18 +45003,10 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
for (;;) {
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++;
- #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 = 914; __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++;
- #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 = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_1 = __pyx_t_9(__pyx_t_5);
if (unlikely(!__pyx_t_1)) {
@@ -46102,7 +45022,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_v_alt = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":915
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":915
* curr_col = _columns[curr[0]]
* for alt in curr_col:
* next_id = curr[0]+alt[2] # <<<<<<<<<<<<<<
@@ -46121,7 +45041,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_v_next_id = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":916
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":916
* for alt in curr_col:
* next_id = curr[0]+alt[2]
* jump = 1 # <<<<<<<<<<<<<<
@@ -46132,7 +45052,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__Pyx_XDECREF(__pyx_v_jump);
__pyx_v_jump = __pyx_int_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":917
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":917
* next_id = curr[0]+alt[2]
* jump = 1
* if (alt[0] == EPSILON): # <<<<<<<<<<<<<<
@@ -46151,7 +45071,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":918
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":918
* jump = 1
* if (alt[0] == EPSILON):
* jump = 0 # <<<<<<<<<<<<<<
@@ -46165,7 +45085,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":919
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":919
* if (alt[0] == EPSILON):
* jump = 0
* if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1: # <<<<<<<<<<<<<<
@@ -46198,7 +45118,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":920
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":920
* 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]) # <<<<<<<<<<<<<<
@@ -46228,7 +45148,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_L3_continue:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":921
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":921
* 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); # <<<<<<<<<<<<<<
@@ -46290,19 +45210,73 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_lambda1(PyObject
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
+ __pyx_self = __pyx_self;
__pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1082
+/* Python wrapper */
+static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_7lambda1_lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_5input_7lambda1_lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_7lambda1_lambda2, METH_NOARGS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_7lambda1_lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
+ __pyx_self = __pyx_self;
+ __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1082
* if len(extracts) > 0:
- * fcount = Counter()
- * fphrases = defaultdict(lambda: defaultdict(Counter)) # <<<<<<<<<<<<<<
+ * fcount = defaultdict(int)
+ * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(int))) # <<<<<<<<<<<<<<
* for f, e, count, als in extracts:
* fcount[f] += count
*/
+static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self) {
+ 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("lambda2", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __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 = 1082; __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 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __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_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ __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("_sa.HieroCachingRuleFactory.input.lambda1.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -46316,7 +45290,7 @@ static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Counter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_5input_7lambda1_lambda2, 0, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __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 = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -46345,7 +45319,7 @@ static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":923
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":923
* return sorted(result);
*
* def input(self, fwords): # <<<<<<<<<<<<<<
@@ -46416,22 +45390,20 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
int __pyx_t_18;
int __pyx_t_19;
float __pyx_t_20;
- Py_ssize_t __pyx_t_21;
+ PyObject *(*__pyx_t_21)(PyObject *);
Py_ssize_t __pyx_t_22;
- Py_ssize_t __pyx_t_23;
+ PyObject *(*__pyx_t_23)(PyObject *);
Py_ssize_t __pyx_t_24;
- Py_ssize_t __pyx_t_25;
- int __pyx_t_26;
+ PyObject *(*__pyx_t_25)(PyObject *);
+ unsigned int __pyx_t_26;
unsigned int __pyx_t_27;
- unsigned int __pyx_t_28;
+ int __pyx_t_28;
int __pyx_t_29;
- int __pyx_t_30;
- PyObject *(*__pyx_t_31)(PyObject *);
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("None", 0);
switch (__pyx_generator->resume_label) {
case 0: goto __pyx_L3_first_run;
- case 1: goto __pyx_L57_resume_from_yield;
+ case 1: goto __pyx_L63_resume_from_yield;
default: /* CPython raises the right error here */
__Pyx_RefNannyFinishContext();
return NULL;
@@ -46439,7 +45411,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_L3_first_run:;
if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":934
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":934
* cdef Phrase hiero_phrase
*
* flen = len(fwords) # <<<<<<<<<<<<<<
@@ -46449,7 +45421,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_1 = PyObject_Length(__pyx_cur_scope->__pyx_v_fwords); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_cur_scope->__pyx_v_flen = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":935
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":935
*
* flen = len(fwords)
* start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -46458,7 +45430,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_start_time = __pyx_f_3_sa_monitor_cpu();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":936
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":936
* flen = len(fwords)
* start_time = monitor_cpu()
* self.extract_time = 0.0 # <<<<<<<<<<<<<<
@@ -46467,7 +45439,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_self->extract_time = 0.0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":937
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":937
* start_time = monitor_cpu()
* self.extract_time = 0.0
* nodes_isteps_away_buffer = {} # <<<<<<<<<<<<<<
@@ -46480,7 +45452,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":938
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":938
* self.extract_time = 0.0
* nodes_isteps_away_buffer = {}
* hit = 0 # <<<<<<<<<<<<<<
@@ -46489,7 +45461,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_hit = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":939
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":939
* nodes_isteps_away_buffer = {}
* hit = 0
* reachable_buffer = {} # <<<<<<<<<<<<<<
@@ -46502,7 +45474,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_reachable_buffer = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":942
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":942
*
* # Do not cache between sentences
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) # <<<<<<<<<<<<<<
@@ -46524,7 +45496,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_self->rules->root = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":944
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":944
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
*
* frontier = [] # <<<<<<<<<<<<<<
@@ -46537,7 +45509,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_frontier = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":945
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":945
*
* frontier = []
* for i in range(len(fwords)): # <<<<<<<<<<<<<<
@@ -46548,7 +45520,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_1; __pyx_t_4+=1) {
__pyx_cur_scope->__pyx_v_i = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":946
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":946
* frontier = []
* for i in range(len(fwords)):
* for alt in range(0, len(fwords[i])): # <<<<<<<<<<<<<<
@@ -46562,7 +45534,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_cur_scope->__pyx_v_alt = __pyx_t_6;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":947
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":947
* for i in range(len(fwords)):
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON: # <<<<<<<<<<<<<<
@@ -46587,7 +45559,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":948
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":948
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON:
* frontier.append((i, i, alt, 0, self.rules.root, (), False)) # <<<<<<<<<<<<<<
@@ -46633,7 +45605,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":950
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":950
* frontier.append((i, i, alt, 0, self.rules.root, (), False))
*
* xroot = None # <<<<<<<<<<<<<<
@@ -46644,7 +45616,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GIVEREF(Py_None);
__pyx_cur_scope->__pyx_v_xroot = Py_None;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":951
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":951
*
* xroot = None
* x1 = sym_setindex(self.category, 1) # <<<<<<<<<<<<<<
@@ -46653,7 +45625,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_x1 = __pyx_f_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":952
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":952
* xroot = None
* x1 = sym_setindex(self.category, 1)
* if x1 in self.rules.root.children: # <<<<<<<<<<<<<<
@@ -46669,7 +45641,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":953
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":953
* x1 = sym_setindex(self.category, 1)
* if x1 in self.rules.root.children:
* xroot = self.rules.root.children[x1] # <<<<<<<<<<<<<<
@@ -46690,7 +45662,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":955
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":955
* xroot = self.rules.root.children[x1]
* else:
* xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation()) # <<<<<<<<<<<<<<
@@ -46713,7 +45685,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_xroot = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":956
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":956
* else:
* xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation())
* self.rules.root.children[x1] = xroot # <<<<<<<<<<<<<<
@@ -46727,7 +45699,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":958
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":958
* self.rules.root.children[x1] = xroot
*
* for i in range(self.min_gap_size, len(fwords)): # <<<<<<<<<<<<<<
@@ -46738,7 +45710,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
for (__pyx_t_4 = __pyx_cur_scope->__pyx_v_self->min_gap_size; __pyx_t_4 < __pyx_t_1; __pyx_t_4+=1) {
__pyx_cur_scope->__pyx_v_i = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":959
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":959
*
* for i in range(self.min_gap_size, len(fwords)):
* for alt in range(0, len(fwords[i])): # <<<<<<<<<<<<<<
@@ -46752,7 +45724,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_cur_scope->__pyx_v_alt = __pyx_t_6;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":960
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":960
* for i in range(self.min_gap_size, len(fwords)):
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON: # <<<<<<<<<<<<<<
@@ -46777,7 +45749,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":961
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":961
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON:
* frontier.append((i-self.min_gap_size, i, alt, self.min_gap_size, xroot, (x1,), True)) # <<<<<<<<<<<<<<
@@ -46832,7 +45804,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":963
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":963
* frontier.append((i-self.min_gap_size, i, alt, self.min_gap_size, xroot, (x1,), True))
*
* next_states = [] # <<<<<<<<<<<<<<
@@ -46845,7 +45817,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_next_states = __pyx_t_13;
__pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":964
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":964
*
* next_states = []
* for i in range(len(fwords)): # <<<<<<<<<<<<<<
@@ -46856,7 +45828,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_1; __pyx_t_4+=1) {
__pyx_cur_scope->__pyx_v_i = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":965
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":965
* next_states = []
* for i in range(len(fwords)):
* next_states.append(self.get_next_states(fwords,i,self.min_gap_size)) # <<<<<<<<<<<<<<
@@ -46888,7 +45860,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":967
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":967
* next_states.append(self.get_next_states(fwords,i,self.min_gap_size))
*
* while len(frontier) > 0: # <<<<<<<<<<<<<<
@@ -46896,11 +45868,11 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
* for k, i, alt, pathlen, node, prefix, is_shadow_path in frontier:
*/
while (1) {
- __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_cur_scope->__pyx_v_frontier)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_cur_scope->__pyx_v_frontier));
__pyx_t_8 = (__pyx_t_1 > 0);
if (!__pyx_t_8) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":968
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":968
*
* while len(frontier) > 0:
* new_frontier = [] # <<<<<<<<<<<<<<
@@ -46915,7 +45887,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_new_frontier = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":969
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":969
* while len(frontier) > 0:
* new_frontier = []
* for k, i, alt, pathlen, node, prefix, is_shadow_path in frontier: # <<<<<<<<<<<<<<
@@ -46925,25 +45897,15 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_12 = ((PyObject *)__pyx_cur_scope->__pyx_v_frontier); __Pyx_INCREF(__pyx_t_12); __pyx_t_1 = 0;
for (;;) {
if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_12)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_1++;
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_12, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
PyObject* sequence = __pyx_t_2;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 7)) {
- if (size > 7) __Pyx_RaiseTooManyValuesError(7);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 7)) {
+ if (PyTuple_GET_SIZE(sequence) > 7) __Pyx_RaiseTooManyValuesError(7);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_13 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
__pyx_t_9 = PyTuple_GET_ITEM(sequence, 2);
@@ -46952,6 +45914,11 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_14 = PyTuple_GET_ITEM(sequence, 5);
__pyx_t_15 = PyTuple_GET_ITEM(sequence, 6);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 7)) {
+ if (PyList_GET_SIZE(sequence) > 7) __Pyx_RaiseTooManyValuesError(7);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_13 = PyList_GET_ITEM(sequence, 0);
__pyx_t_7 = PyList_GET_ITEM(sequence, 1);
__pyx_t_9 = PyList_GET_ITEM(sequence, 2);
@@ -46967,36 +45934,34 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_14);
__Pyx_INCREF(__pyx_t_15);
- #else
- Py_ssize_t i;
- PyObject** temps[7] = {&__pyx_t_13,&__pyx_t_7,&__pyx_t_9,&__pyx_t_10,&__pyx_t_3,&__pyx_t_14,&__pyx_t_15};
- for (i=0; i < 7; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- *(temps[i]) = item;
- }
- #endif
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- } else
- {
+ } else {
Py_ssize_t index = -1;
- PyObject** temps[7] = {&__pyx_t_13,&__pyx_t_7,&__pyx_t_9,&__pyx_t_10,&__pyx_t_3,&__pyx_t_14,&__pyx_t_15};
__pyx_t_16 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_17 = Py_TYPE(__pyx_t_16)->tp_iternext;
- for (index=0; index < 7; index++) {
- PyObject* item = __pyx_t_17(__pyx_t_16); if (unlikely(!item)) goto __pyx_L21_unpacking_failed;
- __Pyx_GOTREF(item);
- *(temps[index]) = item;
- }
+ index = 0; __pyx_t_13 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_13)) goto __pyx_L21_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_13);
+ index = 1; __pyx_t_7 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_7)) goto __pyx_L21_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_7);
+ index = 2; __pyx_t_9 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_9)) goto __pyx_L21_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_9);
+ index = 3; __pyx_t_10 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_10)) goto __pyx_L21_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_10);
+ index = 4; __pyx_t_3 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_3)) goto __pyx_L21_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 5; __pyx_t_14 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_14)) goto __pyx_L21_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_14);
+ index = 6; __pyx_t_15 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_15)) goto __pyx_L21_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_15);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_16), 7) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_17 = NULL;
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
goto __pyx_L22_unpacking_done;
__pyx_L21_unpacking_failed:;
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __pyx_t_17 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L22_unpacking_done:;
}
@@ -47030,7 +45995,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_is_shadow_path = __pyx_t_15;
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":970
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":970
* new_frontier = []
* for k, i, alt, pathlen, node, prefix, is_shadow_path in frontier:
* word_id = fwords[i][alt][0] # <<<<<<<<<<<<<<
@@ -47051,7 +46016,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_word_id = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":971
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":971
* for k, i, alt, pathlen, node, prefix, is_shadow_path in frontier:
* word_id = fwords[i][alt][0]
* spanlen = fwords[i][alt][2] # <<<<<<<<<<<<<<
@@ -47072,7 +46037,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_spanlen = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":973
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":973
* spanlen = fwords[i][alt][2]
* # TODO get rid of k -- pathlen is replacing it
* if word_id == EPSILON: # <<<<<<<<<<<<<<
@@ -47088,7 +46053,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":975
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":975
* if word_id == EPSILON:
* # skipping because word_id is epsilon
* if i+spanlen >= len(fwords): # <<<<<<<<<<<<<<
@@ -47111,7 +46076,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":976
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":976
* # skipping because word_id is epsilon
* if i+spanlen >= len(fwords):
* continue # <<<<<<<<<<<<<<
@@ -47123,7 +46088,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":977
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":977
* if i+spanlen >= len(fwords):
* continue
* for nualt in range(0,len(fwords[i+spanlen])): # <<<<<<<<<<<<<<
@@ -47143,7 +46108,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_5; __pyx_t_18+=1) {
__pyx_cur_scope->__pyx_v_nualt = __pyx_t_18;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":978
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":978
* continue
* for nualt in range(0,len(fwords[i+spanlen])):
* frontier.append((k, i+spanlen, nualt, pathlen, node, prefix, is_shadow_path)) # <<<<<<<<<<<<<<
@@ -47186,7 +46151,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":979
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":979
* for nualt in range(0,len(fwords[i+spanlen])):
* frontier.append((k, i+spanlen, nualt, pathlen, node, prefix, is_shadow_path))
* continue # <<<<<<<<<<<<<<
@@ -47198,7 +46163,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L23:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":981
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":981
* continue
*
* phrase = prefix + (word_id,) # <<<<<<<<<<<<<<
@@ -47219,7 +46184,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_phrase = __pyx_t_15;
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":982
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":982
*
* phrase = prefix + (word_id,)
* hiero_phrase = Phrase(phrase) # <<<<<<<<<<<<<<
@@ -47240,7 +46205,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_hiero_phrase = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":983
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":983
* phrase = prefix + (word_id,)
* hiero_phrase = Phrase(phrase)
* arity = hiero_phrase.arity() # <<<<<<<<<<<<<<
@@ -47256,7 +46221,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__pyx_cur_scope->__pyx_v_arity = __pyx_t_18;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":985
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":985
* arity = hiero_phrase.arity()
*
* lookup_required = False # <<<<<<<<<<<<<<
@@ -47265,7 +46230,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_lookup_required = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":986
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":986
*
* lookup_required = False
* if word_id in node.children: # <<<<<<<<<<<<<<
@@ -47278,7 +46243,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":987
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":987
* lookup_required = False
* if word_id in node.children:
* if node.children[word_id] is None: # <<<<<<<<<<<<<<
@@ -47294,7 +46259,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":989
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":989
* if node.children[word_id] is None:
* # Path dead-ends at this node
* continue # <<<<<<<<<<<<<<
@@ -47306,7 +46271,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":992
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":992
* else:
* # Path continues at this node
* node = node.children[word_id] # <<<<<<<<<<<<<<
@@ -47329,7 +46294,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":994
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":994
* node = node.children[word_id]
* else:
* if node.suffix_link is None: # <<<<<<<<<<<<<<
@@ -47342,7 +46307,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":996
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":996
* if node.suffix_link is None:
* # Current node is root; lookup required
* lookup_required = True # <<<<<<<<<<<<<<
@@ -47354,7 +46319,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":998
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":998
* lookup_required = True
* else:
* if word_id in node.suffix_link.children: # <<<<<<<<<<<<<<
@@ -47370,7 +46335,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":999
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":999
* else:
* if word_id in node.suffix_link.children:
* if node.suffix_link.children[word_id] is None: # <<<<<<<<<<<<<<
@@ -47389,7 +46354,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1001
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1001
* if node.suffix_link.children[word_id] is None:
* # Suffix link reports path is dead end
* node.children[word_id] = None # <<<<<<<<<<<<<<
@@ -47401,7 +46366,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
if (PyObject_SetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1002
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1002
* # Suffix link reports path is dead end
* node.children[word_id] = None
* continue # <<<<<<<<<<<<<<
@@ -47413,7 +46378,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1005
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1005
* else:
* # Suffix link indicates lookup is reqired
* lookup_required = True # <<<<<<<<<<<<<<
@@ -47427,14 +46392,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1008
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1008
* else:
* #ERROR: We never get here
* raise Exception("Keyword trie error") # <<<<<<<<<<<<<<
* # checking whether lookup_required
* if lookup_required:
*/
- __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_124), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_123), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __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;
@@ -47446,7 +46411,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L27:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1010
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1010
* raise Exception("Keyword trie error")
* # checking whether lookup_required
* if lookup_required: # <<<<<<<<<<<<<<
@@ -47455,7 +46420,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
if (__pyx_cur_scope->__pyx_v_lookup_required) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1011
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1011
* # checking whether lookup_required
* if lookup_required:
* new_node = None # <<<<<<<<<<<<<<
@@ -47468,7 +46433,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GIVEREF(Py_None);
__pyx_cur_scope->__pyx_v_new_node = Py_None;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1012
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1012
* if lookup_required:
* new_node = None
* if is_shadow_path: # <<<<<<<<<<<<<<
@@ -47478,7 +46443,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1015
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1015
* # 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, # <<<<<<<<<<<<<<
@@ -47501,7 +46466,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1016
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1016
* # 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], # <<<<<<<<<<<<<<
@@ -47519,7 +46484,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__suffix_link), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1017
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1017
* new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location,
* suffix_link=node.suffix_link.children[word_id],
* phrase=hiero_phrase) # <<<<<<<<<<<<<<
@@ -47539,7 +46504,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1019
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1019
* phrase=hiero_phrase)
* else:
* if arity > 0: # <<<<<<<<<<<<<<
@@ -47549,7 +46514,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_8 = (__pyx_cur_scope->__pyx_v_arity > 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1021
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1021
* if arity > 0:
* # Intersecting because of arity > 0
* phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase) # <<<<<<<<<<<<<<
@@ -47576,7 +46541,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1024
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1024
* else:
* # Suffix array search
* phrase_location = node.phrase_location # <<<<<<<<<<<<<<
@@ -47592,7 +46557,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_phrase_location = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1025
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1025
* # 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) # <<<<<<<<<<<<<<
@@ -47638,7 +46603,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_sa_range = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1026
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1026
* 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: # <<<<<<<<<<<<<<
@@ -47648,7 +46613,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_8 = (__pyx_cur_scope->__pyx_v_sa_range != Py_None);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1027
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1027
* 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]) # <<<<<<<<<<<<<<
@@ -47677,7 +46642,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1029
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1029
* phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1])
* else:
* phrase_location = None # <<<<<<<<<<<<<<
@@ -47694,7 +46659,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L34:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1031
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1031
* phrase_location = None
*
* if phrase_location is None: # <<<<<<<<<<<<<<
@@ -47704,7 +46669,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_8 = (((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location) == Py_None);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1032
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1032
*
* if phrase_location is None:
* node.children[word_id] = None # <<<<<<<<<<<<<<
@@ -47716,7 +46681,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
if (PyObject_SetItem(__pyx_t_9, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1034
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1034
* node.children[word_id] = None
* # Search failed
* continue # <<<<<<<<<<<<<<
@@ -47728,7 +46693,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L36:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1036
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1036
* continue
* # Search succeeded
* suffix_link = self.rules.root # <<<<<<<<<<<<<<
@@ -47741,7 +46706,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->rules->root);
__pyx_cur_scope->__pyx_v_suffix_link = __pyx_cur_scope->__pyx_v_self->rules->root;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1037
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1037
* # Search succeeded
* suffix_link = self.rules.root
* if node.suffix_link is not None: # <<<<<<<<<<<<<<
@@ -47754,7 +46719,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1038
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1038
* suffix_link = self.rules.root
* if node.suffix_link is not None:
* suffix_link = node.suffix_link.children[word_id] # <<<<<<<<<<<<<<
@@ -47778,7 +46743,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L37:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1039
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1039
* if node.suffix_link is not None:
* suffix_link = node.suffix_link.children[word_id]
* new_node = ExtendedTrieNode(phrase_location=phrase_location, # <<<<<<<<<<<<<<
@@ -47789,7 +46754,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GOTREF(((PyObject *)__pyx_t_9));
if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__phrase_location), ((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1040
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1040
* suffix_link = node.suffix_link.children[word_id]
* new_node = ExtendedTrieNode(phrase_location=phrase_location,
* suffix_link=suffix_link, # <<<<<<<<<<<<<<
@@ -47798,7 +46763,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__suffix_link), __pyx_cur_scope->__pyx_v_suffix_link) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1041
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1041
* new_node = ExtendedTrieNode(phrase_location=phrase_location,
* suffix_link=suffix_link,
* phrase=hiero_phrase) # <<<<<<<<<<<<<<
@@ -47817,7 +46782,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L33:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1042
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1042
* suffix_link=suffix_link,
* phrase=hiero_phrase)
* node.children[word_id] = new_node # <<<<<<<<<<<<<<
@@ -47829,7 +46794,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
if (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 = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1043
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1043
* phrase=hiero_phrase)
* node.children[word_id] = new_node
* node = new_node # <<<<<<<<<<<<<<
@@ -47842,7 +46807,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_new_node);
__pyx_cur_scope->__pyx_v_node = __pyx_cur_scope->__pyx_v_new_node;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1048
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1048
* This should happen before we get to extraction (so that
* the node will exist if needed)'''
* if arity < self.max_nonterminals: # <<<<<<<<<<<<<<
@@ -47852,7 +46817,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_8 = (__pyx_cur_scope->__pyx_v_arity < __pyx_cur_scope->__pyx_v_self->max_nonterminals);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1049
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1049
* the node will exist if needed)'''
* if arity < self.max_nonterminals:
* xcat_index = arity+1 # <<<<<<<<<<<<<<
@@ -47867,7 +46832,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_xcat_index = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1050
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1050
* if arity < self.max_nonterminals:
* xcat_index = arity+1
* xcat = sym_setindex(self.category, xcat_index) # <<<<<<<<<<<<<<
@@ -47877,7 +46842,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_18 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_xcat_index); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_cur_scope->__pyx_v_xcat = __pyx_f_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_18);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1051
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1051
* xcat_index = arity+1
* xcat = sym_setindex(self.category, xcat_index)
* suffix_link_xcat_index = xcat_index # <<<<<<<<<<<<<<
@@ -47890,7 +46855,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_xcat_index);
__pyx_cur_scope->__pyx_v_suffix_link_xcat_index = __pyx_cur_scope->__pyx_v_xcat_index;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1052
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1052
* xcat = sym_setindex(self.category, xcat_index)
* suffix_link_xcat_index = xcat_index
* if is_shadow_path: # <<<<<<<<<<<<<<
@@ -47900,7 +46865,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1053
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1053
* suffix_link_xcat_index = xcat_index
* if is_shadow_path:
* suffix_link_xcat_index = xcat_index-1 # <<<<<<<<<<<<<<
@@ -47918,7 +46883,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L39:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1054
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1054
* if is_shadow_path:
* suffix_link_xcat_index = xcat_index-1
* suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) # <<<<<<<<<<<<<<
@@ -47928,7 +46893,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_18 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_cur_scope->__pyx_v_suffix_link_xcat = __pyx_f_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_18);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1055
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1055
* 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, # <<<<<<<<<<<<<<
@@ -47942,7 +46907,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1056
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1056
* 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], # <<<<<<<<<<<<<<
@@ -47960,7 +46925,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__suffix_link), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1057
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1057
* node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location,
* suffix_link=node.suffix_link.children[suffix_link_xcat],
* phrase= Phrase(phrase + (xcat,))) # <<<<<<<<<<<<<<
@@ -47991,7 +46956,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1055
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1055
* 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, # <<<<<<<<<<<<<<
@@ -48007,7 +46972,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L38:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1060
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1060
*
* # sample from range
* if not is_shadow_path: # <<<<<<<<<<<<<<
@@ -48018,7 +46983,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_19 = (!__pyx_t_8);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1061
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1061
* # sample from range
* if not is_shadow_path:
* sample = self.sampler.sample(node.phrase_location) # <<<<<<<<<<<<<<
@@ -48045,7 +47010,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_sample = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_10);
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1062
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1062
* if not is_shadow_path:
* sample = self.sampler.sample(node.phrase_location)
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns # <<<<<<<<<<<<<<
@@ -48057,7 +47022,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_num_subpatterns = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_10)->num_subpatterns;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1063
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1063
* sample = self.sampler.sample(node.phrase_location)
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns
* chunklen = IntList(initial_len=num_subpatterns) # <<<<<<<<<<<<<<
@@ -48079,7 +47044,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_chunklen = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1064
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1064
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns
* chunklen = IntList(initial_len=num_subpatterns)
* for j from 0 <= j < num_subpatterns: # <<<<<<<<<<<<<<
@@ -48089,7 +47054,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_18 = __pyx_cur_scope->__pyx_v_num_subpatterns;
for (__pyx_cur_scope->__pyx_v_j = 0; __pyx_cur_scope->__pyx_v_j < __pyx_t_18; __pyx_cur_scope->__pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1065
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1065
* chunklen = IntList(initial_len=num_subpatterns)
* for j from 0 <= j < num_subpatterns:
* chunklen.arr[j] = hiero_phrase.chunklen(j) # <<<<<<<<<<<<<<
@@ -48099,7 +47064,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
(__pyx_cur_scope->__pyx_v_chunklen->arr[__pyx_cur_scope->__pyx_v_j]) = ((struct __pyx_vtabstruct_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);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1066
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1066
* for j from 0 <= j < num_subpatterns:
* chunklen.arr[j] = hiero_phrase.chunklen(j)
* extracts = [] # <<<<<<<<<<<<<<
@@ -48114,7 +47079,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_extracts = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1067
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1067
* chunklen.arr[j] = hiero_phrase.chunklen(j)
* extracts = []
* j = 0 # <<<<<<<<<<<<<<
@@ -48123,7 +47088,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_j = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1068
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1068
* extracts = []
* j = 0
* extract_start = monitor_cpu() # <<<<<<<<<<<<<<
@@ -48138,7 +47103,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_extract_start = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1069
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1069
* j = 0
* extract_start = monitor_cpu()
* while j < sample.len: # <<<<<<<<<<<<<<
@@ -48149,7 +47114,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_19 = (__pyx_cur_scope->__pyx_v_j < __pyx_cur_scope->__pyx_v_sample->len);
if (!__pyx_t_19) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1070
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1070
* extract_start = monitor_cpu()
* while j < sample.len:
* extract = [] # <<<<<<<<<<<<<<
@@ -48164,7 +47129,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_extract = ((PyObject *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1072
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1072
* extract = []
*
* assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -48173,7 +47138,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
__pyx_f_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1073
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1073
*
* assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr)
* extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns) # <<<<<<<<<<<<<<
@@ -48188,7 +47153,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_extract = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1074
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1074
* assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr)
* extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns)
* extracts.extend(extract) # <<<<<<<<<<<<<<
@@ -48208,7 +47173,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1075
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1075
* extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns)
* extracts.extend(extract)
* j = j + num_subpatterns # <<<<<<<<<<<<<<
@@ -48218,7 +47183,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_j = (__pyx_cur_scope->__pyx_v_j + __pyx_cur_scope->__pyx_v_num_subpatterns);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1077
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1077
* j = j + num_subpatterns
*
* num_samples = sample.len/num_subpatterns # <<<<<<<<<<<<<<
@@ -48235,7 +47200,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_cur_scope->__pyx_v_num_samples = __Pyx_div_int(__pyx_cur_scope->__pyx_v_sample->len, __pyx_cur_scope->__pyx_v_num_subpatterns);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1078
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1078
*
* num_samples = sample.len/num_subpatterns
* extract_stop = monitor_cpu() # <<<<<<<<<<<<<<
@@ -48250,12 +47215,12 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_extract_stop = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1079
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1079
* 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()
+ * fcount = defaultdict(int)
*/
__pyx_t_9 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
@@ -48269,142 +47234,135 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_cur_scope->__pyx_v_self->extract_time = __pyx_t_20;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1080
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1080
* extract_stop = monitor_cpu()
* self.extract_time = self.extract_time + extract_stop - extract_start
* if len(extracts) > 0: # <<<<<<<<<<<<<<
- * fcount = Counter()
- * fphrases = defaultdict(lambda: defaultdict(Counter))
+ * fcount = defaultdict(int)
+ * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(int)))
*/
- __pyx_t_5 = PyList_GET_SIZE(((PyObject *)__pyx_cur_scope->__pyx_v_extracts)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyList_GET_SIZE(((PyObject *)__pyx_cur_scope->__pyx_v_extracts));
__pyx_t_19 = (__pyx_t_5 > 0);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1081
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1081
* self.extract_time = self.extract_time + extract_stop - extract_start
* if len(extracts) > 0:
- * fcount = Counter() # <<<<<<<<<<<<<<
- * fphrases = defaultdict(lambda: defaultdict(Counter))
+ * fcount = defaultdict(int) # <<<<<<<<<<<<<<
+ * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(int)))
* for f, e, count, als in extracts:
*/
- __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__Counter); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1081; __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 = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ __pyx_t_3 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fcount);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_fcount);
- __Pyx_GIVEREF(__pyx_t_10);
- __pyx_cur_scope->__pyx_v_fcount = __pyx_t_10;
- __pyx_t_10 = 0;
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_v_fcount = __pyx_t_3;
+ __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1082
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1082
* if len(extracts) > 0:
- * fcount = Counter()
- * fphrases = defaultdict(lambda: defaultdict(Counter)) # <<<<<<<<<<<<<<
+ * fcount = defaultdict(int)
+ * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(int))) # <<<<<<<<<<<<<<
* for f, e, count, als in extracts:
* fcount[f] += count
*/
- __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_5input_lambda1, 0, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__defaultdict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_9);
- __pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_5input_lambda1, 0, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_10 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fphrases);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_fphrases);
- __Pyx_GIVEREF(__pyx_t_9);
- __pyx_cur_scope->__pyx_v_fphrases = __pyx_t_9;
- __pyx_t_9 = 0;
+ __Pyx_GIVEREF(__pyx_t_10);
+ __pyx_cur_scope->__pyx_v_fphrases = __pyx_t_10;
+ __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1083
- * fcount = Counter()
- * fphrases = defaultdict(lambda: defaultdict(Counter))
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1083
+ * fcount = defaultdict(int)
+ * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(int)))
* for f, e, count, als in extracts: # <<<<<<<<<<<<<<
* fcount[f] += count
* fphrases[f][e][als] += count
*/
- __pyx_t_9 = ((PyObject *)__pyx_cur_scope->__pyx_v_extracts); __Pyx_INCREF(__pyx_t_9); __pyx_t_5 = 0;
+ __pyx_t_10 = ((PyObject *)__pyx_cur_scope->__pyx_v_extracts); __Pyx_INCREF(__pyx_t_10); __pyx_t_5 = 0;
for (;;) {
- if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_9)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
- #else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_9, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __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;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 4)) {
- if (size > 4) __Pyx_RaiseTooManyValuesError(4);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
+ if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_10)) break;
+ __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++;
+ if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
+ PyObject* sequence = __pyx_t_9;
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0);
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 4)) {
+ if (PyTuple_GET_SIZE(sequence) > 4) __Pyx_RaiseTooManyValuesError(4);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_14 = PyTuple_GET_ITEM(sequence, 1);
__pyx_t_15 = PyTuple_GET_ITEM(sequence, 2);
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 3);
} else {
- __pyx_t_10 = PyList_GET_ITEM(sequence, 0);
+ if (unlikely(PyList_GET_SIZE(sequence) != 4)) {
+ if (PyList_GET_SIZE(sequence) > 4) __Pyx_RaiseTooManyValuesError(4);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
__pyx_t_14 = PyList_GET_ITEM(sequence, 1);
__pyx_t_15 = PyList_GET_ITEM(sequence, 2);
__pyx_t_2 = PyList_GET_ITEM(sequence, 3);
}
- __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_14);
__Pyx_INCREF(__pyx_t_15);
__Pyx_INCREF(__pyx_t_2);
- #else
- Py_ssize_t i;
- PyObject** temps[4] = {&__pyx_t_10,&__pyx_t_14,&__pyx_t_15,&__pyx_t_2};
- for (i=0; i < 4; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- *(temps[i]) = item;
- }
- #endif
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- } else
- {
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
Py_ssize_t index = -1;
- PyObject** temps[4] = {&__pyx_t_10,&__pyx_t_14,&__pyx_t_15,&__pyx_t_2};
- __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_17 = Py_TYPE(__pyx_t_7)->tp_iternext;
- for (index=0; index < 4; index++) {
- PyObject* item = __pyx_t_17(__pyx_t_7); if (unlikely(!item)) goto __pyx_L48_unpacking_failed;
- __Pyx_GOTREF(item);
- *(temps[index]) = item;
- }
+ index = 0; __pyx_t_3 = __pyx_t_17(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L48_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_14 = __pyx_t_17(__pyx_t_7); if (unlikely(!__pyx_t_14)) goto __pyx_L48_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_14);
+ index = 2; __pyx_t_15 = __pyx_t_17(__pyx_t_7); if (unlikely(!__pyx_t_15)) goto __pyx_L48_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_15);
+ index = 3; __pyx_t_2 = __pyx_t_17(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L48_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_7), 4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_17 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L49_unpacking_done;
__pyx_L48_unpacking_failed:;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_17 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L49_unpacking_done:;
}
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_f);
- __Pyx_GIVEREF(__pyx_t_10);
- __pyx_cur_scope->__pyx_v_f = __pyx_t_10;
- __pyx_t_10 = 0;
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_v_f = __pyx_t_3;
+ __pyx_t_3 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_e);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_e);
__Pyx_GIVEREF(__pyx_t_14);
@@ -48421,119 +47379,235 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_als = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1084
- * fphrases = defaultdict(lambda: defaultdict(Counter))
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1084
+ * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(int)))
* for f, e, count, als in extracts:
* fcount[f] += count # <<<<<<<<<<<<<<
* fphrases[f][e][als] += count
* for f, elist in fphrases.iteritems():
*/
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
- __pyx_t_3 = __pyx_cur_scope->__pyx_v_f;
- __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __pyx_cur_scope->__pyx_v_f;
+ __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_9); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_15 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_cur_scope->__pyx_v_count); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyObject_SetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_3, __pyx_t_15) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_9, __pyx_t_15) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1085
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1085
* for f, e, count, als in extracts:
* fcount[f] += count
* fphrases[f][e][als] += count # <<<<<<<<<<<<<<
* for f, elist in fphrases.iteritems():
* for e, alslist in elist.iteritems():
*/
- __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fphrases, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_15 = PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_e); if (!__pyx_t_15) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fphrases, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_9) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_15 = PyObject_GetItem(__pyx_t_9, __pyx_cur_scope->__pyx_v_e); if (!__pyx_t_15) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __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_9); __pyx_t_9 = 0;
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_als);
- __pyx_t_3 = __pyx_cur_scope->__pyx_v_als;
- __pyx_t_2 = PyObject_GetItem(__pyx_t_15, __pyx_t_3); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __pyx_cur_scope->__pyx_v_als;
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_15, __pyx_t_9); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_cur_scope->__pyx_v_count); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyObject_SetItem(__pyx_t_15, __pyx_t_3, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_15, __pyx_t_9, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1086
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1086
* fcount[f] += count
* fphrases[f][e][als] += count
* for f, elist in fphrases.iteritems(): # <<<<<<<<<<<<<<
* for e, alslist in elist.iteritems():
* alignment = None
*/
- __pyx_t_5 = 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 = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- __pyx_t_15 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_fphrases, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_21), (&__pyx_t_18)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_fphrases, __pyx_n_s__iteritems); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_15 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __Pyx_XDECREF(__pyx_t_9);
- __pyx_t_9 = __pyx_t_15;
- __pyx_t_15 = 0;
- while (1) {
- __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_21, &__pyx_t_5, &__pyx_t_15, &__pyx_t_3, NULL, __pyx_t_18);
- if (unlikely(__pyx_t_6 == 0)) break;
- if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (PyList_CheckExact(__pyx_t_15) || PyTuple_CheckExact(__pyx_t_15)) {
+ __pyx_t_10 = __pyx_t_15; __Pyx_INCREF(__pyx_t_10); __pyx_t_5 = 0;
+ __pyx_t_21 = NULL;
+ } else {
+ __pyx_t_5 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_21 = Py_TYPE(__pyx_t_10)->tp_iternext;
+ }
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ for (;;) {
+ if (!__pyx_t_21 && PyList_CheckExact(__pyx_t_10)) {
+ if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_10)) break;
+ __pyx_t_15 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_5); __Pyx_INCREF(__pyx_t_15); __pyx_t_5++;
+ } else if (!__pyx_t_21 && PyTuple_CheckExact(__pyx_t_10)) {
+ if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
+ __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_5); __Pyx_INCREF(__pyx_t_15); __pyx_t_5++;
+ } else {
+ __pyx_t_15 = __pyx_t_21(__pyx_t_10);
+ if (unlikely(!__pyx_t_15)) {
+ if (PyErr_Occurred()) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_15);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_15))) || (PyList_CheckExact(__pyx_t_15))) {
+ PyObject* sequence = __pyx_t_15;
+ if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_9 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_14 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_2 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_17 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ index = 0; __pyx_t_9 = __pyx_t_17(__pyx_t_2); if (unlikely(!__pyx_t_9)) goto __pyx_L52_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_9);
+ index = 1; __pyx_t_14 = __pyx_t_17(__pyx_t_2); if (unlikely(!__pyx_t_14)) goto __pyx_L52_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_14);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_2), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L53_unpacking_done;
+ __pyx_L52_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_L53_unpacking_done:;
+ }
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_f);
- __Pyx_GIVEREF(__pyx_t_15);
- __pyx_cur_scope->__pyx_v_f = __pyx_t_15;
- __pyx_t_15 = 0;
+ __Pyx_GIVEREF(__pyx_t_9);
+ __pyx_cur_scope->__pyx_v_f = __pyx_t_9;
+ __pyx_t_9 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elist);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_elist);
- __Pyx_GIVEREF(__pyx_t_3);
- __pyx_cur_scope->__pyx_v_elist = __pyx_t_3;
- __pyx_t_3 = 0;
+ __Pyx_GIVEREF(__pyx_t_14);
+ __pyx_cur_scope->__pyx_v_elist = __pyx_t_14;
+ __pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1087
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1087
* fphrases[f][e][als] += count
* for f, elist in fphrases.iteritems():
* for e, alslist in elist.iteritems(): # <<<<<<<<<<<<<<
* alignment = None
* count = 0
*/
- __pyx_t_22 = 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 = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- __pyx_t_15 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_elist, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_23), (&__pyx_t_6)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_elist, __pyx_n_s__iteritems); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __Pyx_XDECREF(__pyx_t_3);
- __pyx_t_3 = __pyx_t_15;
- __pyx_t_15 = 0;
- while (1) {
- __pyx_t_4 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_23, &__pyx_t_22, &__pyx_t_15, &__pyx_t_14, NULL, __pyx_t_6);
- if (unlikely(__pyx_t_4 == 0)) break;
- if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ if (PyList_CheckExact(__pyx_t_14) || PyTuple_CheckExact(__pyx_t_14)) {
+ __pyx_t_15 = __pyx_t_14; __Pyx_INCREF(__pyx_t_15); __pyx_t_22 = 0;
+ __pyx_t_23 = NULL;
+ } else {
+ __pyx_t_22 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_23 = Py_TYPE(__pyx_t_15)->tp_iternext;
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ for (;;) {
+ if (!__pyx_t_23 && PyList_CheckExact(__pyx_t_15)) {
+ if (__pyx_t_22 >= PyList_GET_SIZE(__pyx_t_15)) break;
+ __pyx_t_14 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_22); __Pyx_INCREF(__pyx_t_14); __pyx_t_22++;
+ } else if (!__pyx_t_23 && PyTuple_CheckExact(__pyx_t_15)) {
+ if (__pyx_t_22 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
+ __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_22); __Pyx_INCREF(__pyx_t_14); __pyx_t_22++;
+ } else {
+ __pyx_t_14 = __pyx_t_23(__pyx_t_15);
+ if (unlikely(!__pyx_t_14)) {
+ if (PyErr_Occurred()) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_14);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) {
+ PyObject* sequence = __pyx_t_14;
+ if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_9 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_17 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_9 = __pyx_t_17(__pyx_t_3); if (unlikely(!__pyx_t_9)) goto __pyx_L56_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_9);
+ index = 1; __pyx_t_2 = __pyx_t_17(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L56_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_3), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L57_unpacking_done;
+ __pyx_L56_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_L57_unpacking_done:;
+ }
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_e);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_e);
- __Pyx_GIVEREF(__pyx_t_15);
- __pyx_cur_scope->__pyx_v_e = __pyx_t_15;
- __pyx_t_15 = 0;
+ __Pyx_GIVEREF(__pyx_t_9);
+ __pyx_cur_scope->__pyx_v_e = __pyx_t_9;
+ __pyx_t_9 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_alslist);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_alslist);
- __Pyx_GIVEREF(__pyx_t_14);
- __pyx_cur_scope->__pyx_v_alslist = __pyx_t_14;
- __pyx_t_14 = 0;
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_v_alslist = __pyx_t_2;
+ __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1088
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1088
* for f, elist in fphrases.iteritems():
* for e, alslist in elist.iteritems():
* alignment = None # <<<<<<<<<<<<<<
@@ -48546,7 +47620,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GIVEREF(Py_None);
__pyx_cur_scope->__pyx_v_alignment = Py_None;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1089
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1089
* for e, alslist in elist.iteritems():
* alignment = None
* count = 0 # <<<<<<<<<<<<<<
@@ -48559,41 +47633,99 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GIVEREF(__pyx_int_0);
__pyx_cur_scope->__pyx_v_count = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1090
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1090
* alignment = None
* count = 0
* for als, currcount in alslist.iteritems(): # <<<<<<<<<<<<<<
* if currcount > count:
* alignment = als
*/
- __pyx_t_24 = 0;
- if (unlikely(__pyx_cur_scope->__pyx_v_alslist == Py_None)) {
- PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_alslist, __pyx_n_s__iteritems); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_2 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_14 = __pyx_t_2; __Pyx_INCREF(__pyx_t_14); __pyx_t_24 = 0;
+ __pyx_t_25 = NULL;
+ } else {
+ __pyx_t_24 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_25 = Py_TYPE(__pyx_t_14)->tp_iternext;
}
- __pyx_t_15 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_alslist, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_25), (&__pyx_t_4)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_XDECREF(__pyx_t_14);
- __pyx_t_14 = __pyx_t_15;
- __pyx_t_15 = 0;
- while (1) {
- __pyx_t_26 = __Pyx_dict_iter_next(__pyx_t_14, __pyx_t_25, &__pyx_t_24, &__pyx_t_15, &__pyx_t_2, NULL, __pyx_t_4);
- if (unlikely(__pyx_t_26 == 0)) break;
- if (unlikely(__pyx_t_26 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (!__pyx_t_25 && PyList_CheckExact(__pyx_t_14)) {
+ if (__pyx_t_24 >= PyList_GET_SIZE(__pyx_t_14)) break;
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_24); __Pyx_INCREF(__pyx_t_2); __pyx_t_24++;
+ } else if (!__pyx_t_25 && PyTuple_CheckExact(__pyx_t_14)) {
+ if (__pyx_t_24 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_24); __Pyx_INCREF(__pyx_t_2); __pyx_t_24++;
+ } else {
+ __pyx_t_2 = __pyx_t_25(__pyx_t_14);
+ if (unlikely(!__pyx_t_2)) {
+ if (PyErr_Occurred()) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+ PyObject* sequence = __pyx_t_2;
+ if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_9 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_17 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ index = 0; __pyx_t_9 = __pyx_t_17(__pyx_t_7); if (unlikely(!__pyx_t_9)) goto __pyx_L60_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_9);
+ index = 1; __pyx_t_3 = __pyx_t_17(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L60_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L61_unpacking_done;
+ __pyx_L60_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_L61_unpacking_done:;
+ }
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_als);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_als);
- __Pyx_GIVEREF(__pyx_t_15);
- __pyx_cur_scope->__pyx_v_als = __pyx_t_15;
- __pyx_t_15 = 0;
+ __Pyx_GIVEREF(__pyx_t_9);
+ __pyx_cur_scope->__pyx_v_als = __pyx_t_9;
+ __pyx_t_9 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_currcount);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_currcount);
- __Pyx_GIVEREF(__pyx_t_2);
- __pyx_cur_scope->__pyx_v_currcount = __pyx_t_2;
- __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_v_currcount = __pyx_t_3;
+ __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1091
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1091
* count = 0
* for als, currcount in alslist.iteritems():
* if currcount > count: # <<<<<<<<<<<<<<
@@ -48606,7 +47738,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1092
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1092
* for als, currcount in alslist.iteritems():
* if currcount > count:
* alignment = als # <<<<<<<<<<<<<<
@@ -48619,7 +47751,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_als);
__pyx_cur_scope->__pyx_v_alignment = __pyx_cur_scope->__pyx_v_als;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1093
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1093
* if currcount > count:
* alignment = als
* count = currcount # <<<<<<<<<<<<<<
@@ -48631,13 +47763,13 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_cur_scope->__pyx_v_count);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_currcount);
__pyx_cur_scope->__pyx_v_count = __pyx_cur_scope->__pyx_v_currcount;
- goto __pyx_L56;
+ goto __pyx_L62;
}
- __pyx_L56:;
+ __pyx_L62:;
}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1094
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1094
* alignment = als
* count = currcount
* scores = self.scorer.score(f, e, count, # <<<<<<<<<<<<<<
@@ -48650,42 +47782,42 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
if (!(likely(((__pyx_cur_scope->__pyx_v_e) == Py_None) || likely(__Pyx_TypeTest(__pyx_cur_scope->__pyx_v_e, __pyx_ptype_3_sa_Phrase))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = __pyx_cur_scope->__pyx_v_e;
__Pyx_INCREF(__pyx_t_2);
- __pyx_t_27 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_count); if (unlikely((__pyx_t_27 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_26 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_count); if (unlikely((__pyx_t_26 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1095
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1095
* count = currcount
* scores = self.scorer.score(f, e, count,
* fcount[f], num_samples) # <<<<<<<<<<<<<<
* yield Rule(self.category, f, e, scores, alignment)
*
*/
- __pyx_t_15 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_15) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_28 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_15); if (unlikely((__pyx_t_28 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_15 = ((PyObject *)((struct __pyx_vtabstruct_3_sa_Scorer *)__pyx_cur_scope->__pyx_v_self->scorer->__pyx_vtab)->score(__pyx_cur_scope->__pyx_v_self->scorer, ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_14), ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_2), __pyx_t_27, __pyx_t_28, __pyx_cur_scope->__pyx_v_num_samples)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_27 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_3); if (unlikely((__pyx_t_27 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_3_sa_Scorer *)__pyx_cur_scope->__pyx_v_self->scorer->__pyx_vtab)->score(__pyx_cur_scope->__pyx_v_self->scorer, ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_14), ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_2), __pyx_t_26, __pyx_t_27, __pyx_cur_scope->__pyx_v_num_samples)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __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_2); __pyx_t_2 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_scores));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_scores));
- __Pyx_GIVEREF(__pyx_t_15);
- __pyx_cur_scope->__pyx_v_scores = ((struct __pyx_obj_3_sa_FeatureVector *)__pyx_t_15);
- __pyx_t_15 = 0;
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_v_scores = ((struct __pyx_obj_3_sa_FeatureVector *)__pyx_t_3);
+ __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1096
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1096
* scores = self.scorer.score(f, e, count,
* fcount[f], num_samples)
* 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_15 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->category); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->category); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_f);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f);
@@ -48698,52 +47830,48 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_alignment);
PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_cur_scope->__pyx_v_alignment);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_alignment);
- __pyx_t_15 = 0;
- __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Rule)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Rule)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_15;
- __pyx_t_15 = 0;
+ __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_5;
- __pyx_cur_scope->__pyx_t_3 = __pyx_t_6;
- __Pyx_XGIVEREF(__pyx_t_9);
- __pyx_cur_scope->__pyx_t_4 = __pyx_t_9;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_10;
__Pyx_XGIVEREF(__pyx_t_12);
- __pyx_cur_scope->__pyx_t_5 = __pyx_t_12;
- __pyx_cur_scope->__pyx_t_6 = __pyx_t_18;
- __pyx_cur_scope->__pyx_t_7 = __pyx_t_21;
- __pyx_cur_scope->__pyx_t_8 = __pyx_t_22;
- __pyx_cur_scope->__pyx_t_9 = __pyx_t_23;
+ __pyx_cur_scope->__pyx_t_3 = __pyx_t_12;
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __pyx_cur_scope->__pyx_t_4 = __pyx_t_15;
+ __pyx_cur_scope->__pyx_t_5 = __pyx_t_21;
+ __pyx_cur_scope->__pyx_t_6 = __pyx_t_22;
+ __pyx_cur_scope->__pyx_t_7 = __pyx_t_23;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
/* return from generator, yielding value */
__pyx_generator->resume_label = 1;
return __pyx_r;
- __pyx_L57_resume_from_yield:;
+ __pyx_L63_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_5 = __pyx_cur_scope->__pyx_t_2;
- __pyx_t_6 = __pyx_cur_scope->__pyx_t_3;
- __pyx_t_9 = __pyx_cur_scope->__pyx_t_4;
- __pyx_cur_scope->__pyx_t_4 = 0;
- __Pyx_XGOTREF(__pyx_t_9);
- __pyx_t_12 = __pyx_cur_scope->__pyx_t_5;
- __pyx_cur_scope->__pyx_t_5 = 0;
+ __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_10 = __pyx_cur_scope->__pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = 0;
+ __Pyx_XGOTREF(__pyx_t_10);
+ __pyx_t_12 = __pyx_cur_scope->__pyx_t_3;
+ __pyx_cur_scope->__pyx_t_3 = 0;
__Pyx_XGOTREF(__pyx_t_12);
- __pyx_t_18 = __pyx_cur_scope->__pyx_t_6;
- __pyx_t_21 = __pyx_cur_scope->__pyx_t_7;
- __pyx_t_22 = __pyx_cur_scope->__pyx_t_8;
- __pyx_t_23 = __pyx_cur_scope->__pyx_t_9;
+ __pyx_t_15 = __pyx_cur_scope->__pyx_t_4;
+ __pyx_cur_scope->__pyx_t_4 = 0;
+ __Pyx_XGOTREF(__pyx_t_15);
+ __pyx_t_21 = __pyx_cur_scope->__pyx_t_5;
+ __pyx_t_22 = __pyx_cur_scope->__pyx_t_6;
+ __pyx_t_23 = __pyx_cur_scope->__pyx_t_7;
if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L45;
}
__pyx_L45:;
@@ -48754,97 +47882,97 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
}
__pyx_L32:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1098
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1098
* 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, alt_id, pathlen + 1, node, phrase, is_shadow_path))
*/
- __pyx_t_21 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_19 = (__pyx_t_21 < __pyx_cur_scope->__pyx_v_self->max_length);
+ __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_19 = (__pyx_t_5 < __pyx_cur_scope->__pyx_v_self->max_length);
if (__pyx_t_19) {
- __pyx_t_9 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_3 = PyNumber_Add(__pyx_t_9, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_21 = PyObject_Length(__pyx_cur_scope->__pyx_v_fwords); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_21); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_15 = PyObject_RichCompare(__pyx_t_3, __pyx_t_9, Py_LT); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_15 = PyNumber_Add(__pyx_t_10, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __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_9); __pyx_t_9 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_fwords); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_15, __pyx_t_10, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __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_10); __pyx_t_10 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_8) {
- __pyx_t_15 = PyNumber_Add(__pyx_cur_scope->__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_9 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_3 = PyObject_RichCompare(__pyx_t_15, __pyx_t_9, Py_LE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __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 = 1098; __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_9); __pyx_t_9 = 0;
- __pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_29 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_15 = PyObject_RichCompare(__pyx_t_3, __pyx_t_10, Py_LE); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_30 = __pyx_t_29;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_28 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_29 = __pyx_t_28;
} else {
- __pyx_t_30 = __pyx_t_8;
+ __pyx_t_29 = __pyx_t_8;
}
- __pyx_t_8 = __pyx_t_30;
+ __pyx_t_8 = __pyx_t_29;
} else {
__pyx_t_8 = __pyx_t_19;
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1099
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1099
*
* 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, alt_id, pathlen + 1, node, phrase, is_shadow_path))
* num_subpatterns = arity
*/
- __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_9 = PyNumber_Add(__pyx_t_3, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fwords, __pyx_t_9); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_21 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_21; __pyx_t_18+=1) {
+ __pyx_t_15 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_10 = PyNumber_Add(__pyx_t_15, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fwords, __pyx_t_10); if (!__pyx_t_15) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_5 = PyObject_Length(__pyx_t_15); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_5; __pyx_t_18+=1) {
__pyx_cur_scope->__pyx_v_alt_id = __pyx_t_18;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1100
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1100
* 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, alt_id, pathlen + 1, node, phrase, is_shadow_path)) # <<<<<<<<<<<<<<
* num_subpatterns = arity
* if not is_shadow_path:
*/
- __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_9 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_15 = PyNumber_Add(__pyx_t_9, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt_id); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_3 = PyNumber_Add(__pyx_t_10, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt_id); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
__pyx_t_2 = PyNumber_Add(__pyx_cur_scope->__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_14 = PyTuple_New(7); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __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);
- PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_15);
__Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_10);
PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
@@ -48856,15 +47984,15 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_is_shadow_path);
PyTuple_SET_ITEM(__pyx_t_14, 6, __pyx_cur_scope->__pyx_v_is_shadow_path);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_is_shadow_path);
- __pyx_t_3 = 0;
__pyx_t_15 = 0;
- __pyx_t_9 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_10 = 0;
__pyx_t_2 = 0;
__pyx_t_11 = PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, ((PyObject *)__pyx_t_14)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1101
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1101
* for alt_id in range(len(fwords[i+spanlen])):
* new_frontier.append((k, i+spanlen, alt_id, pathlen + 1, node, phrase, is_shadow_path))
* num_subpatterns = arity # <<<<<<<<<<<<<<
@@ -48873,7 +48001,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_num_subpatterns = __pyx_cur_scope->__pyx_v_arity;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1102
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1102
* new_frontier.append((k, i+spanlen, alt_id, pathlen + 1, node, phrase, is_shadow_path))
* num_subpatterns = arity
* if not is_shadow_path: # <<<<<<<<<<<<<<
@@ -48884,7 +48012,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_19 = (!__pyx_t_8);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1103
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1103
* num_subpatterns = arity
* if not is_shadow_path:
* num_subpatterns = num_subpatterns + 1 # <<<<<<<<<<<<<<
@@ -48892,34 +48020,34 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
* xcat = sym_setindex(self.category, arity+1)
*/
__pyx_cur_scope->__pyx_v_num_subpatterns = (__pyx_cur_scope->__pyx_v_num_subpatterns + 1);
- goto __pyx_L61;
+ goto __pyx_L67;
}
- __pyx_L61:;
+ __pyx_L67:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1104
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1104
* 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_21 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_21 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_19 = ((__pyx_t_21 + 1) < __pyx_cur_scope->__pyx_v_self->max_length);
+ __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_19 = ((__pyx_t_5 + 1) < __pyx_cur_scope->__pyx_v_self->max_length);
if (__pyx_t_19) {
__pyx_t_8 = (__pyx_cur_scope->__pyx_v_arity < __pyx_cur_scope->__pyx_v_self->max_nonterminals);
if (__pyx_t_8) {
- __pyx_t_30 = (__pyx_cur_scope->__pyx_v_num_subpatterns < __pyx_cur_scope->__pyx_v_self->max_chunks);
- __pyx_t_29 = __pyx_t_30;
+ __pyx_t_29 = (__pyx_cur_scope->__pyx_v_num_subpatterns < __pyx_cur_scope->__pyx_v_self->max_chunks);
+ __pyx_t_28 = __pyx_t_29;
} else {
- __pyx_t_29 = __pyx_t_8;
+ __pyx_t_28 = __pyx_t_8;
}
- __pyx_t_8 = __pyx_t_29;
+ __pyx_t_8 = __pyx_t_28;
} else {
__pyx_t_8 = __pyx_t_19;
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1105
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1105
* 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) # <<<<<<<<<<<<<<
@@ -48928,7 +48056,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_xcat = __pyx_f_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, (__pyx_cur_scope->__pyx_v_arity + 1));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1106
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1106
* 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] # <<<<<<<<<<<<<<
@@ -48946,7 +48074,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_xnode = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1108
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1108
* xnode = node.children[xcat]
* # I put spanlen=1 below
* key = tuple([self.min_gap_size, i, 1, pathlen]) # <<<<<<<<<<<<<<
@@ -48957,30 +48085,30 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_14 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_9 = PyList_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
+ __pyx_t_10 = PyList_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
- PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_14);
+ PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_14);
__Pyx_GIVEREF(__pyx_t_14);
__Pyx_INCREF(__pyx_int_1);
- PyList_SET_ITEM(__pyx_t_9, 2, __pyx_int_1);
+ PyList_SET_ITEM(__pyx_t_10, 2, __pyx_int_1);
__Pyx_GIVEREF(__pyx_int_1);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_pathlen);
- PyList_SET_ITEM(__pyx_t_9, 3, __pyx_cur_scope->__pyx_v_pathlen);
+ PyList_SET_ITEM(__pyx_t_10, 3, __pyx_cur_scope->__pyx_v_pathlen);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pathlen);
__pyx_t_2 = 0;
__pyx_t_14 = 0;
- __pyx_t_14 = ((PyObject *)PyList_AsTuple(__pyx_t_9)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = ((PyObject *)PyList_AsTuple(__pyx_t_10)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_14));
- __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_key));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_key));
__Pyx_GIVEREF(((PyObject *)__pyx_t_14));
__pyx_cur_scope->__pyx_v_key = __pyx_t_14;
__pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1109
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1109
* # I put spanlen=1 below
* key = tuple([self.min_gap_size, i, 1, pathlen])
* frontier_nodes = [] # <<<<<<<<<<<<<<
@@ -48995,7 +48123,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_frontier_nodes = ((PyObject *)__pyx_t_14);
__pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1110
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1110
* key = tuple([self.min_gap_size, i, 1, pathlen])
* frontier_nodes = []
* if (key in nodes_isteps_away_buffer): # <<<<<<<<<<<<<<
@@ -49005,7 +48133,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_t_8 = ((PyDict_Contains(((PyObject *)__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer), ((PyObject *)__pyx_cur_scope->__pyx_v_key)))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1111
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1111
* frontier_nodes = []
* if (key in nodes_isteps_away_buffer):
* frontier_nodes = nodes_isteps_away_buffer[key] # <<<<<<<<<<<<<<
@@ -49019,57 +48147,57 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_GIVEREF(__pyx_t_14);
__pyx_cur_scope->__pyx_v_frontier_nodes = __pyx_t_14;
__pyx_t_14 = 0;
- goto __pyx_L63;
+ goto __pyx_L69;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1113
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1113
* 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_14 = PyObject_GetAttr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_125); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_GetAttr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_124); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_9 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
__pyx_t_2 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_15 = PyTuple_New(7); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_2);
+ __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(__pyx_int_1);
- PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_1);
__Pyx_GIVEREF(__pyx_int_1);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_pathlen);
- PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_cur_scope->__pyx_v_pathlen);
+ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_cur_scope->__pyx_v_pathlen);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pathlen);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_fwords);
- PyTuple_SET_ITEM(__pyx_t_15, 4, __pyx_cur_scope->__pyx_v_fwords);
+ PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_cur_scope->__pyx_v_fwords);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fwords);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_next_states));
- PyTuple_SET_ITEM(__pyx_t_15, 5, ((PyObject *)__pyx_cur_scope->__pyx_v_next_states));
+ PyTuple_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_cur_scope->__pyx_v_next_states));
__Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_next_states));
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_reachable_buffer));
- PyTuple_SET_ITEM(__pyx_t_15, 6, ((PyObject *)__pyx_cur_scope->__pyx_v_reachable_buffer));
+ PyTuple_SET_ITEM(__pyx_t_3, 6, ((PyObject *)__pyx_cur_scope->__pyx_v_reachable_buffer));
__Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_reachable_buffer));
- __pyx_t_9 = 0;
+ __pyx_t_10 = 0;
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_frontier_nodes);
__Pyx_DECREF(__pyx_cur_scope->__pyx_v_frontier_nodes);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_cur_scope->__pyx_v_frontier_nodes = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1114
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1114
* 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 # <<<<<<<<<<<<<<
@@ -49078,9 +48206,9 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
*/
if (PyDict_SetItem(((PyObject *)__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer), ((PyObject *)__pyx_cur_scope->__pyx_v_key), __pyx_cur_scope->__pyx_v_frontier_nodes) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_L63:;
+ __pyx_L69:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1116
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1116
* nodes_isteps_away_buffer[key] = frontier_nodes
*
* for (i, alt, pathlen) in frontier_nodes: # <<<<<<<<<<<<<<
@@ -49088,167 +48216,151 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
* frontier = new_frontier
*/
if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_frontier_nodes) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_frontier_nodes)) {
- __pyx_t_2 = __pyx_cur_scope->__pyx_v_frontier_nodes; __Pyx_INCREF(__pyx_t_2); __pyx_t_21 = 0;
- __pyx_t_31 = NULL;
+ __pyx_t_2 = __pyx_cur_scope->__pyx_v_frontier_nodes; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
+ __pyx_t_21 = NULL;
} else {
- __pyx_t_21 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_frontier_nodes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_frontier_nodes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_31 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ __pyx_t_21 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_31 && PyList_CheckExact(__pyx_t_2)) {
- if (__pyx_t_21 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_15 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_21); __Pyx_INCREF(__pyx_t_15); __pyx_t_21++;
- #else
- __pyx_t_15 = PySequence_ITEM(__pyx_t_2, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
- } else if (!__pyx_t_31 && PyTuple_CheckExact(__pyx_t_2)) {
- if (__pyx_t_21 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_21); __Pyx_INCREF(__pyx_t_15); __pyx_t_21++;
- #else
- __pyx_t_15 = PySequence_ITEM(__pyx_t_2, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
+ if (!__pyx_t_21 && PyList_CheckExact(__pyx_t_2)) {
+ if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
+ } else if (!__pyx_t_21 && PyTuple_CheckExact(__pyx_t_2)) {
+ if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
} else {
- __pyx_t_15 = __pyx_t_31(__pyx_t_2);
- if (unlikely(!__pyx_t_15)) {
+ __pyx_t_3 = __pyx_t_21(__pyx_t_2);
+ if (unlikely(!__pyx_t_3)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_GOTREF(__pyx_t_3);
}
- if ((likely(PyTuple_CheckExact(__pyx_t_15))) || (PyList_CheckExact(__pyx_t_15))) {
- PyObject* sequence = __pyx_t_15;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 3)) {
- if (size > 3) __Pyx_RaiseTooManyValuesError(3);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
+ if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
+ PyObject* sequence = __pyx_t_3;
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) {
+ if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_14 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1);
- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_15 = PyTuple_GET_ITEM(sequence, 2);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 3)) {
+ if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_14 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_9 = PyList_GET_ITEM(sequence, 1);
- __pyx_t_3 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_10 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_15 = PyList_GET_ITEM(sequence, 2);
}
__Pyx_INCREF(__pyx_t_14);
- __Pyx_INCREF(__pyx_t_9);
- __Pyx_INCREF(__pyx_t_3);
- #else
- __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __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 = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- } else
- {
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
Py_ssize_t index = -1;
- __pyx_t_10 = PyObject_GetIter(__pyx_t_15); 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_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_17 = Py_TYPE(__pyx_t_10)->tp_iternext;
- index = 0; __pyx_t_14 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_14)) goto __pyx_L66_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_14);
- index = 1; __pyx_t_9 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L66_unpacking_failed;
+ __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- index = 2; __pyx_t_3 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L66_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_17 = NULL;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- goto __pyx_L67_unpacking_done;
- __pyx_L66_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_17 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_17 = Py_TYPE(__pyx_t_9)->tp_iternext;
+ index = 0; __pyx_t_14 = __pyx_t_17(__pyx_t_9); if (unlikely(!__pyx_t_14)) goto __pyx_L72_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_14);
+ index = 1; __pyx_t_10 = __pyx_t_17(__pyx_t_9); if (unlikely(!__pyx_t_10)) goto __pyx_L72_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_10);
+ index = 2; __pyx_t_15 = __pyx_t_17(__pyx_t_9); if (unlikely(!__pyx_t_15)) goto __pyx_L72_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_15);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_9), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ goto __pyx_L73_unpacking_done;
+ __pyx_L72_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_L67_unpacking_done:;
+ __pyx_L73_unpacking_done:;
}
__pyx_t_18 = __Pyx_PyInt_AsInt(__pyx_t_14); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_cur_scope->__pyx_v_i = __pyx_t_18;
__pyx_cur_scope->__pyx_v_alt = __pyx_t_6;
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_pathlen);
__Pyx_DECREF(__pyx_cur_scope->__pyx_v_pathlen);
- __Pyx_GIVEREF(__pyx_t_3);
- __pyx_cur_scope->__pyx_v_pathlen = __pyx_t_3;
- __pyx_t_3 = 0;
+ __Pyx_GIVEREF(__pyx_t_15);
+ __pyx_cur_scope->__pyx_v_pathlen = __pyx_t_15;
+ __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1117
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1117
*
* for (i, alt, pathlen) in frontier_nodes:
* new_frontier.append((k, i, alt, pathlen, xnode, phrase +(xcat,), is_shadow_path)) # <<<<<<<<<<<<<<
* frontier = new_frontier
*
*/
- __pyx_t_15 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_9 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_15 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
__pyx_t_14 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_xcat); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_14);
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14);
__Pyx_GIVEREF(__pyx_t_14);
__pyx_t_14 = 0;
- __pyx_t_14 = PyNumber_Add(__pyx_cur_scope->__pyx_v_phrase, ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyNumber_Add(__pyx_cur_scope->__pyx_v_phrase, ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
- __pyx_t_10 = PyTuple_New(7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3);
+ __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+ __pyx_t_9 = PyTuple_New(7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_10);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_pathlen);
- PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_cur_scope->__pyx_v_pathlen);
+ PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_cur_scope->__pyx_v_pathlen);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pathlen);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_xnode);
- PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_cur_scope->__pyx_v_xnode);
+ PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_cur_scope->__pyx_v_xnode);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_xnode);
- PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_14);
__Pyx_GIVEREF(__pyx_t_14);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_is_shadow_path);
- PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_cur_scope->__pyx_v_is_shadow_path);
+ PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_cur_scope->__pyx_v_is_shadow_path);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_is_shadow_path);
- __pyx_t_15 = 0;
__pyx_t_3 = 0;
- __pyx_t_9 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_10 = 0;
__pyx_t_14 = 0;
- __pyx_t_11 = PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, ((PyObject *)__pyx_t_10)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+ __pyx_t_11 = PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, ((PyObject *)__pyx_t_9)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- goto __pyx_L62;
+ goto __pyx_L68;
}
- __pyx_L62:;
- goto __pyx_L58;
+ __pyx_L68:;
+ goto __pyx_L64;
}
- __pyx_L58:;
+ __pyx_L64:;
__pyx_L19_continue:;
}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1118
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1118
* for (i, alt, pathlen) in frontier_nodes:
* new_frontier.append((k, i, alt, pathlen, xnode, phrase +(xcat,), is_shadow_path))
* frontier = new_frontier # <<<<<<<<<<<<<<
@@ -49262,7 +48374,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_frontier = __pyx_cur_scope->__pyx_v_new_frontier;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1120
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1120
* frontier = new_frontier
*
* stop_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -49275,7 +48387,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_cur_scope->__pyx_v_stop_time = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1121
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1121
*
* stop_time = monitor_cpu()
* logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time)) # <<<<<<<<<<<<<<
@@ -49289,67 +48401,67 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_12 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_start_time); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_10 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_stop_time, __pyx_t_12); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_9 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_stop_time, __pyx_t_12); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_126));
- PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_kp_s_126));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_126));
- PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_10);
- __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_125));
+ PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_kp_s_125));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_125));
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1122
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1122
* 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_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__gc); 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_12 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__collect); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__gc); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_12 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__collect); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); 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_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1123
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1123
* 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_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_12 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__info); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_12 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__info); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_127));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_127));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_127));
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_10);
- __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_126));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_126));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_126));
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
PyErr_SetNone(PyExc_StopIteration);
goto __pyx_L0;
__pyx_L1_error:;
@@ -49367,12 +48479,11 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator5(__pyx_Gene
__pyx_L0:;
__Pyx_XDECREF(__pyx_r);
__pyx_generator->resume_label = -1;
- __Pyx_Generator_clear((PyObject*)__pyx_generator);
__Pyx_RefNannyFinishContext();
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1126
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1126
*
*
* cdef int find_fixpoint(self, # <<<<<<<<<<<<<<
@@ -49402,7 +48513,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("find_fixpoint", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1141
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1141
* 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 # <<<<<<<<<<<<<<
@@ -49411,7 +48522,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
(__pyx_v_e_low[0]) = __pyx_v_e_in_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1142
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1142
*
* e_low[0] = e_in_low
* e_high[0] = e_in_high # <<<<<<<<<<<<<<
@@ -49420,7 +48531,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
(__pyx_v_e_high[0]) = __pyx_v_e_in_high;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1143
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1143
* 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) # <<<<<<<<<<<<<<
@@ -49432,7 +48543,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1144
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1144
* 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: # <<<<<<<<<<<<<<
@@ -49442,7 +48553,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_3 = ((__pyx_v_e_low[0]) == -1);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1150
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1150
* # rule X -> X_1 w X_2 / X_1 X_2. This is probably
* # not worth the bother, though.
* return 0 # <<<<<<<<<<<<<<
@@ -49454,7 +48565,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
goto __pyx_L3;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1151
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1151
* # not worth the bother, though.
* return 0
* elif e_in_low != -1 and e_low[0] != e_in_low: # <<<<<<<<<<<<<<
@@ -49470,7 +48581,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1152
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1152
* return 0
* elif e_in_low != -1 and e_low[0] != e_in_low:
* if e_in_low - e_low[0] < min_ex_size: # <<<<<<<<<<<<<<
@@ -49480,7 +48591,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_5 = ((__pyx_v_e_in_low - (__pyx_v_e_low[0])) < __pyx_v_min_ex_size);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1153
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1153
* 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 # <<<<<<<<<<<<<<
@@ -49489,7 +48600,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
(__pyx_v_e_low[0]) = (__pyx_v_e_in_low - __pyx_v_min_ex_size);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1154
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1154
* if e_in_low - e_low[0] < min_ex_size:
* e_low[0] = e_in_low - min_ex_size
* if e_low[0] < 0: # <<<<<<<<<<<<<<
@@ -49499,7 +48610,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_5 = ((__pyx_v_e_low[0]) < 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1155
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1155
* e_low[0] = e_in_low - min_ex_size
* if e_low[0] < 0:
* return 0 # <<<<<<<<<<<<<<
@@ -49518,7 +48629,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1157
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1157
* return 0
*
* if e_high[0] - e_low[0] > max_e_len: # <<<<<<<<<<<<<<
@@ -49528,7 +48639,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_5 = (((__pyx_v_e_high[0]) - (__pyx_v_e_low[0])) > __pyx_v_max_e_len);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1158
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1158
*
* if e_high[0] - e_low[0] > max_e_len:
* return 0 # <<<<<<<<<<<<<<
@@ -49540,7 +48651,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
goto __pyx_L6;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1159
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1159
* if e_high[0] - e_low[0] > max_e_len:
* return 0
* elif e_in_high != -1 and e_high[0] != e_in_high: # <<<<<<<<<<<<<<
@@ -49556,7 +48667,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1160
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1160
* return 0
* elif e_in_high != -1 and e_high[0] != e_in_high:
* if e_high[0] - e_in_high < min_ex_size: # <<<<<<<<<<<<<<
@@ -49566,7 +48677,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = (((__pyx_v_e_high[0]) - __pyx_v_e_in_high) < __pyx_v_min_ex_size);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1161
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1161
* 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 # <<<<<<<<<<<<<<
@@ -49575,7 +48686,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
(__pyx_v_e_high[0]) = (__pyx_v_e_in_high + __pyx_v_min_ex_size);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1162
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1162
* 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: # <<<<<<<<<<<<<<
@@ -49585,7 +48696,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = ((__pyx_v_e_high[0]) > __pyx_v_e_sent_len);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1163
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1163
* e_high[0] = e_in_high + min_ex_size
* if e_high[0] > e_sent_len:
* return 0 # <<<<<<<<<<<<<<
@@ -49604,7 +48715,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1165
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1165
* return 0
*
* f_back_low[0] = -1 # <<<<<<<<<<<<<<
@@ -49613,7 +48724,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
(__pyx_v_f_back_low[0]) = -1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1166
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1166
*
* f_back_low[0] = -1
* f_back_high[0] = -1 # <<<<<<<<<<<<<<
@@ -49622,7 +48733,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
(__pyx_v_f_back_high[0]) = -1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1167
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1167
* f_back_low[0] = -1
* f_back_high[0] = -1
* f_low_prev = f_low # <<<<<<<<<<<<<<
@@ -49631,7 +48742,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
__pyx_v_f_low_prev = __pyx_v_f_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1168
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1168
* f_back_high[0] = -1
* f_low_prev = f_low
* f_high_prev = f_high # <<<<<<<<<<<<<<
@@ -49641,7 +48752,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_f_high_prev = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1169
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1169
* f_low_prev = f_low
* f_high_prev = f_high
* new_x = 0 # <<<<<<<<<<<<<<
@@ -49650,7 +48761,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
__pyx_v_new_x = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1170
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1170
* f_high_prev = f_high
* new_x = 0
* new_low_x = 0 # <<<<<<<<<<<<<<
@@ -49659,7 +48770,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
__pyx_v_new_low_x = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1171
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1171
* new_x = 0
* new_low_x = 0
* new_high_x = 0 # <<<<<<<<<<<<<<
@@ -49668,7 +48779,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
__pyx_v_new_high_x = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1173
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1173
* new_high_x = 0
*
* while True: # <<<<<<<<<<<<<<
@@ -49678,7 +48789,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
while (1) {
if (!1) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1175
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1175
* while True:
*
* if f_back_low[0] == -1: # <<<<<<<<<<<<<<
@@ -49688,7 +48799,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = ((__pyx_v_f_back_low[0]) == -1);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1176
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1176
*
* 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) # <<<<<<<<<<<<<<
@@ -49702,7 +48813,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1178
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1178
* 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) # <<<<<<<<<<<<<<
@@ -49713,7 +48824,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1179
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1179
* 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) # <<<<<<<<<<<<<<
@@ -49726,7 +48837,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1181
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1181
* 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: # <<<<<<<<<<<<<<
@@ -49736,7 +48847,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = ((__pyx_v_f_back_low[0]) > __pyx_v_f_low);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1182
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1182
*
* if f_back_low[0] > f_low:
* f_back_low[0] = f_low # <<<<<<<<<<<<<<
@@ -49748,7 +48859,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1184
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1184
* f_back_low[0] = f_low
*
* if f_back_high[0] < f_high: # <<<<<<<<<<<<<<
@@ -49764,7 +48875,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1185
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1185
*
* if f_back_high[0] < f_high:
* f_back_high[0] = f_high # <<<<<<<<<<<<<<
@@ -49777,7 +48888,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L13:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1187
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1187
* f_back_high[0] = f_high
*
* if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev: # <<<<<<<<<<<<<<
@@ -49793,7 +48904,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1188
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1188
*
* if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev:
* return 1 # <<<<<<<<<<<<<<
@@ -49806,7 +48917,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L14:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1190
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1190
* return 1
*
* if allow_low_x == 0 and f_back_low[0] < f_low: # <<<<<<<<<<<<<<
@@ -49822,7 +48933,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1192
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1192
* if allow_low_x == 0 and f_back_low[0] < f_low:
* # FAIL: f phrase is not tight
* return 0 # <<<<<<<<<<<<<<
@@ -49835,7 +48946,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1194
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1194
* return 0
*
* if f_back_high[0] - f_back_low[0] > max_f_len: # <<<<<<<<<<<<<<
@@ -49845,7 +48956,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_5 = (((__pyx_v_f_back_high[0]) - (__pyx_v_f_back_low[0])) > __pyx_v_max_f_len);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1196
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1196
* if f_back_high[0] - f_back_low[0] > max_f_len:
* # FAIL: f back projection is too wide
* return 0 # <<<<<<<<<<<<<<
@@ -49858,7 +48969,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L16:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1198
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1198
* return 0
*
* if allow_high_x == 0 and f_back_high[0] > f_high: # <<<<<<<<<<<<<<
@@ -49880,7 +48991,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1200
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1200
* if allow_high_x == 0 and f_back_high[0] > f_high:
* # FAIL: extension on high side not allowed
* return 0 # <<<<<<<<<<<<<<
@@ -49893,7 +49004,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1202
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1202
* return 0
*
* if f_low != f_back_low[0]: # <<<<<<<<<<<<<<
@@ -49903,7 +49014,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = (__pyx_v_f_low != (__pyx_v_f_back_low[0]));
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1203
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1203
*
* if f_low != f_back_low[0]:
* if new_low_x == 0: # <<<<<<<<<<<<<<
@@ -49913,7 +49024,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = (__pyx_v_new_low_x == 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1204
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1204
* if f_low != f_back_low[0]:
* if new_low_x == 0:
* if new_x >= max_new_x: # <<<<<<<<<<<<<<
@@ -49923,7 +49034,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = (__pyx_v_new_x >= __pyx_v_max_new_x);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1206
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1206
* if new_x >= max_new_x:
* # FAIL: extension required on low side violates max # of gaps
* return 0 # <<<<<<<<<<<<<<
@@ -49936,7 +49047,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1208
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1208
* return 0
* else:
* new_x = new_x + 1 # <<<<<<<<<<<<<<
@@ -49945,7 +49056,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
__pyx_v_new_x = (__pyx_v_new_x + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1209
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1209
* else:
* new_x = new_x + 1
* new_low_x = 1 # <<<<<<<<<<<<<<
@@ -49959,7 +49070,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L19:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1210
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1210
* new_x = new_x + 1
* new_low_x = 1
* if f_low - f_back_low[0] < min_fx_size: # <<<<<<<<<<<<<<
@@ -49969,7 +49080,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = ((__pyx_v_f_low - (__pyx_v_f_back_low[0])) < __pyx_v_min_fx_size);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1211
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1211
* new_low_x = 1
* if f_low - f_back_low[0] < min_fx_size:
* f_back_low[0] = f_low - min_fx_size # <<<<<<<<<<<<<<
@@ -49978,7 +49089,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
(__pyx_v_f_back_low[0]) = (__pyx_v_f_low - __pyx_v_min_fx_size);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1212
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1212
* 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: # <<<<<<<<<<<<<<
@@ -49988,7 +49099,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = (((__pyx_v_f_back_high[0]) - (__pyx_v_f_back_low[0])) > __pyx_v_max_f_len);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1214
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1214
* if f_back_high[0] - f_back_low[0] > max_f_len:
* # FAIL: extension required on low side violates max initial length
* return 0 # <<<<<<<<<<<<<<
@@ -50001,7 +49112,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L22:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1215
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1215
* # FAIL: extension required on low side violates max initial length
* return 0
* if f_back_low[0] < 0: # <<<<<<<<<<<<<<
@@ -50011,7 +49122,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = ((__pyx_v_f_back_low[0]) < 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1217
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1217
* if f_back_low[0] < 0:
* # FAIL: extension required on low side violates sentence boundary
* return 0 # <<<<<<<<<<<<<<
@@ -50030,7 +49141,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L18:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1219
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1219
* return 0
*
* if f_high != f_back_high[0]: # <<<<<<<<<<<<<<
@@ -50046,7 +49157,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1220
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1220
*
* if f_high != f_back_high[0]:
* if new_high_x == 0: # <<<<<<<<<<<<<<
@@ -50056,7 +49167,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = (__pyx_v_new_high_x == 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1221
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1221
* if f_high != f_back_high[0]:
* if new_high_x == 0:
* if new_x >= max_new_x: # <<<<<<<<<<<<<<
@@ -50066,7 +49177,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = (__pyx_v_new_x >= __pyx_v_max_new_x);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1223
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1223
* if new_x >= max_new_x:
* # FAIL: extension required on high side violates max # of gaps
* return 0 # <<<<<<<<<<<<<<
@@ -50079,7 +49190,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1225
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1225
* return 0
* else:
* new_x = new_x + 1 # <<<<<<<<<<<<<<
@@ -50088,7 +49199,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
__pyx_v_new_x = (__pyx_v_new_x + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1226
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1226
* else:
* new_x = new_x + 1
* new_high_x = 1 # <<<<<<<<<<<<<<
@@ -50102,7 +49213,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L25:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1227
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1227
* new_x = new_x + 1
* new_high_x = 1
* if f_back_high[0] - f_high < min_fx_size: # <<<<<<<<<<<<<<
@@ -50124,7 +49235,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1228
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1228
* new_high_x = 1
* if f_back_high[0] - f_high < min_fx_size:
* f_back_high[0] = f_high + min_fx_size # <<<<<<<<<<<<<<
@@ -50140,7 +49251,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
(__pyx_v_f_back_high[0]) = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1229
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1229
* 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: # <<<<<<<<<<<<<<
@@ -50150,7 +49261,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = (((__pyx_v_f_back_high[0]) - (__pyx_v_f_back_low[0])) > __pyx_v_max_f_len);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1231
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1231
* if f_back_high[0] - f_back_low[0] > max_f_len:
* # FAIL: extension required on high side violates max initial length
* return 0 # <<<<<<<<<<<<<<
@@ -50163,7 +49274,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L28:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1232
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1232
* # FAIL: extension required on high side violates max initial length
* return 0
* if f_back_high[0] > f_sent_len: # <<<<<<<<<<<<<<
@@ -50173,7 +49284,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = ((__pyx_v_f_back_high[0]) > __pyx_v_f_sent_len);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1234
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1234
* if f_back_high[0] > f_sent_len:
* # FAIL: extension required on high side violates sentence boundary
* return 0 # <<<<<<<<<<<<<<
@@ -50192,7 +49303,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1236
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1236
* return 0
*
* e_low_prev = e_low[0] # <<<<<<<<<<<<<<
@@ -50201,7 +49312,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
__pyx_v_e_low_prev = (__pyx_v_e_low[0]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1237
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1237
*
* e_low_prev = e_low[0]
* e_high_prev = e_high[0] # <<<<<<<<<<<<<<
@@ -50210,7 +49321,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
__pyx_v_e_high_prev = (__pyx_v_e_high[0]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1239
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1239
* 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) # <<<<<<<<<<<<<<
@@ -50221,7 +49332,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1240
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1240
*
* 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) # <<<<<<<<<<<<<<
@@ -50232,7 +49343,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1241
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1241
* 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: # <<<<<<<<<<<<<<
@@ -50248,7 +49359,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1242
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1242
* 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 # <<<<<<<<<<<<<<
@@ -50261,7 +49372,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L30:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1243
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1243
* if e_low[0] == e_low_prev and e_high[0] == e_high_prev:
* return 1
* if allow_arbitrary_x == 0: # <<<<<<<<<<<<<<
@@ -50271,7 +49382,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_3 = (__pyx_v_allow_arbitrary_x == 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1245
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1245
* if allow_arbitrary_x == 0:
* # FAIL: arbitrary expansion not permitted
* return 0 # <<<<<<<<<<<<<<
@@ -50284,7 +49395,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L31:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1246
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1246
* # FAIL: arbitrary expansion not permitted
* return 0
* if e_high[0] - e_low[0] > max_e_len: # <<<<<<<<<<<<<<
@@ -50294,7 +49405,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_3 = (((__pyx_v_e_high[0]) - (__pyx_v_e_low[0])) > __pyx_v_max_e_len);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1248
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1248
* if e_high[0] - e_low[0] > max_e_len:
* # FAIL: re-projection violates sentence max phrase length
* return 0 # <<<<<<<<<<<<<<
@@ -50307,7 +49418,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L32:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1249
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1249
* # FAIL: re-projection violates sentence max phrase length
* return 0
* f_low_prev = f_back_low[0] # <<<<<<<<<<<<<<
@@ -50316,7 +49427,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
__pyx_v_f_low_prev = (__pyx_v_f_back_low[0]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1250
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1250
* return 0
* f_low_prev = f_back_low[0]
* f_high_prev = f_back_high[0] # <<<<<<<<<<<<<<
@@ -50339,7 +49450,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1253
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1253
*
*
* cdef find_projection(self, int in_low, int in_high, int* in_links_low, int* in_links_high, # <<<<<<<<<<<<<<
@@ -50357,7 +49468,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
int __pyx_t_4;
__Pyx_RefNannySetupContext("find_projection", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1256
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1256
* int* out_low, int* out_high):
* cdef int i
* for i from in_low <= i < in_high: # <<<<<<<<<<<<<<
@@ -50367,7 +49478,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
__pyx_t_1 = __pyx_v_in_high;
for (__pyx_v_i = __pyx_v_in_low; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1257
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1257
* cdef int i
* for i from in_low <= i < in_high:
* if in_links_low[i] != -1: # <<<<<<<<<<<<<<
@@ -50377,7 +49488,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
__pyx_t_2 = ((__pyx_v_in_links_low[__pyx_v_i]) != -1);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1258
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1258
* 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]: # <<<<<<<<<<<<<<
@@ -50393,7 +49504,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
}
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1259
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1259
* 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] # <<<<<<<<<<<<<<
@@ -50405,7 +49516,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1260
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1260
* 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]: # <<<<<<<<<<<<<<
@@ -50421,7 +49532,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1261
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1261
* 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] # <<<<<<<<<<<<<<
@@ -50443,7 +49554,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1264
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1264
*
*
* cdef int* int_arr_extend(self, int* arr, int* arr_len, int* data, int data_len): # <<<<<<<<<<<<<<
@@ -50457,7 +49568,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTHON_UNUSED
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("int_arr_extend", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1266
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1266
* 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 # <<<<<<<<<<<<<<
@@ -50466,7 +49577,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTHON_UNUSED
*/
__pyx_v_new_len = ((__pyx_v_arr_len[0]) + __pyx_v_data_len);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1267
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1267
* cdef int new_len
* new_len = arr_len[0] + data_len
* arr = <int*> realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -50475,7 +49586,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTHON_UNUSED
*/
__pyx_v_arr = ((int *)realloc(__pyx_v_arr, (__pyx_v_new_len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1268
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1268
* new_len = arr_len[0] + data_len
* arr = <int*> realloc(arr, new_len*sizeof(int))
* memcpy(arr+arr_len[0], data, data_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -50484,7 +49595,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTHON_UNUSED
*/
memcpy((__pyx_v_arr + (__pyx_v_arr_len[0])), __pyx_v_data, (__pyx_v_data_len * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1269
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1269
* arr = <int*> realloc(arr, new_len*sizeof(int))
* memcpy(arr+arr_len[0], data, data_len*sizeof(int))
* arr_len[0] = new_len # <<<<<<<<<<<<<<
@@ -50493,7 +49604,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTHON_UNUSED
*/
(__pyx_v_arr_len[0]) = __pyx_v_new_len;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1270
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1270
* memcpy(arr+arr_len[0], data, data_len*sizeof(int))
* arr_len[0] = new_len
* return arr # <<<<<<<<<<<<<<
@@ -50509,7 +49620,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTHON_UNUSED
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1273
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1273
*
*
* 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, # <<<<<<<<<<<<<<
@@ -50555,7 +49666,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("extract_phrases", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1281
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1281
* cdef result
*
* result = [] # <<<<<<<<<<<<<<
@@ -50567,7 +49678,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_v_result = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1282
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1282
*
* result = []
* len1 = 0 # <<<<<<<<<<<<<<
@@ -50576,7 +49687,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_len1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1283
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1283
* result = []
* len1 = 0
* e_gaps1 = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -50585,7 +49696,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_gaps1 = ((int *)malloc(0));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1284
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1284
* len1 = 0
* e_gaps1 = <int*> malloc(0)
* ephr_arr = IntList() # <<<<<<<<<<<<<<
@@ -50597,7 +49708,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_v_ephr_arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1286
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1286
* ephr_arr = IntList()
*
* e_gap_order = <int*> malloc(num_gaps*sizeof(int)) # <<<<<<<<<<<<<<
@@ -50606,7 +49717,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_gap_order = ((int *)malloc((__pyx_v_num_gaps * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1287
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1287
*
* e_gap_order = <int*> malloc(num_gaps*sizeof(int))
* if num_gaps > 0: # <<<<<<<<<<<<<<
@@ -50616,7 +49727,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = (__pyx_v_num_gaps > 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1288
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1288
* e_gap_order = <int*> malloc(num_gaps*sizeof(int))
* if num_gaps > 0:
* e_gap_order[0] = 0 # <<<<<<<<<<<<<<
@@ -50625,7 +49736,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
(__pyx_v_e_gap_order[0]) = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1289
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1289
* if num_gaps > 0:
* e_gap_order[0] = 0
* for i from 1 <= i < num_gaps: # <<<<<<<<<<<<<<
@@ -50635,7 +49746,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_3 = __pyx_v_num_gaps;
for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1290
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1290
* e_gap_order[0] = 0
* for i from 1 <= i < num_gaps:
* for j from 0 <= j < i: # <<<<<<<<<<<<<<
@@ -50645,7 +49756,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_4 = __pyx_v_i;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1291
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1291
* for i from 1 <= i < num_gaps:
* for j from 0 <= j < i:
* if e_gap_low[i] < e_gap_low[j]: # <<<<<<<<<<<<<<
@@ -50655,7 +49766,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = ((__pyx_v_e_gap_low[__pyx_v_i]) < (__pyx_v_e_gap_low[__pyx_v_j]));
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1292
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1292
* for j from 0 <= j < i:
* if e_gap_low[i] < e_gap_low[j]:
* for k from j <= k < i: # <<<<<<<<<<<<<<
@@ -50665,7 +49776,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_5 = __pyx_v_i;
for (__pyx_v_k = __pyx_v_j; __pyx_v_k < __pyx_t_5; __pyx_v_k++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1293
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1293
* if e_gap_low[i] < e_gap_low[j]:
* for k from j <= k < i:
* e_gap_order[k+1] = e_gap_order[k] # <<<<<<<<<<<<<<
@@ -50675,7 +49786,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
(__pyx_v_e_gap_order[(__pyx_v_k + 1)]) = (__pyx_v_e_gap_order[__pyx_v_k]);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1294
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1294
* for k from j <= k < i:
* e_gap_order[k+1] = e_gap_order[k]
* e_gap_order[j] = i # <<<<<<<<<<<<<<
@@ -50684,7 +49795,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
(__pyx_v_e_gap_order[__pyx_v_j]) = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1295
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1295
* e_gap_order[k+1] = e_gap_order[k]
* e_gap_order[j] = i
* break # <<<<<<<<<<<<<<
@@ -50698,7 +49809,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1297
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1297
* break
* else:
* e_gap_order[i] = i # <<<<<<<<<<<<<<
@@ -50713,7 +49824,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1299
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1299
* e_gap_order[i] = i
*
* e_x_low = e_low # <<<<<<<<<<<<<<
@@ -50722,7 +49833,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_x_low = __pyx_v_e_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1300
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1300
*
* e_x_low = e_low
* e_x_high = e_high # <<<<<<<<<<<<<<
@@ -50731,7 +49842,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_x_high = __pyx_v_e_high;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1301
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1301
* e_x_low = e_low
* e_x_high = e_high
* if self.tight_phrases == 0: # <<<<<<<<<<<<<<
@@ -50741,7 +49852,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = (__pyx_v_self->tight_phrases == 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1302
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1302
* e_x_high = e_high
* if self.tight_phrases == 0:
* 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: # <<<<<<<<<<<<<<
@@ -50764,7 +49875,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
if (!__pyx_t_6) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1303
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1303
* if self.tight_phrases == 0:
* 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 # <<<<<<<<<<<<<<
@@ -50774,7 +49885,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_v_e_x_low = (__pyx_v_e_x_low - 1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1304
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1304
* 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: # <<<<<<<<<<<<<<
@@ -50797,7 +49908,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1305
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1305
* 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 # <<<<<<<<<<<<<<
@@ -50810,7 +49921,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1307
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1307
* e_x_high = e_x_high + 1
*
* for i from e_x_low <= i <= e_low: # <<<<<<<<<<<<<<
@@ -50820,7 +49931,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__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++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1308
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1308
*
* for i from e_x_low <= i <= e_low:
* e_gaps1 = self.int_arr_extend(e_gaps1, &len1, &i, 1) # <<<<<<<<<<<<<<
@@ -50830,7 +49941,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_v_e_gaps1 = ((struct __pyx_vtabstruct_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);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1310
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1310
* e_gaps1 = self.int_arr_extend(e_gaps1, &len1, &i, 1)
*
* for i from 0 <= i < num_gaps: # <<<<<<<<<<<<<<
@@ -50840,7 +49951,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_3 = __pyx_v_num_gaps;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1311
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1311
*
* for i from 0 <= i < num_gaps:
* e_gaps2 = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -50849,7 +49960,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_gaps2 = ((int *)malloc(0));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1312
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1312
* for i from 0 <= i < num_gaps:
* e_gaps2 = <int*> malloc(0)
* len2 = 0 # <<<<<<<<<<<<<<
@@ -50858,7 +49969,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_len2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1314
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1314
* len2 = 0
*
* j = e_gap_order[i] # <<<<<<<<<<<<<<
@@ -50867,7 +49978,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_j = (__pyx_v_e_gap_order[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1315
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1315
*
* j = e_gap_order[i]
* e_x_gap_low = e_gap_low[j] # <<<<<<<<<<<<<<
@@ -50876,7 +49987,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_x_gap_low = (__pyx_v_e_gap_low[__pyx_v_j]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1316
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1316
* j = e_gap_order[i]
* e_x_gap_low = e_gap_low[j]
* e_x_gap_high = e_gap_high[j] # <<<<<<<<<<<<<<
@@ -50885,7 +49996,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_x_gap_high = (__pyx_v_e_gap_high[__pyx_v_j]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1317
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1317
* e_x_gap_low = e_gap_low[j]
* e_x_gap_high = e_gap_high[j]
* if self.tight_phrases == 0: # <<<<<<<<<<<<<<
@@ -50895,7 +50006,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = (__pyx_v_self->tight_phrases == 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1318
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1318
* e_x_gap_high = e_gap_high[j]
* if self.tight_phrases == 0:
* while e_x_gap_low > e_x_low and e_links_low[e_x_gap_low-1] == -1: # <<<<<<<<<<<<<<
@@ -50912,7 +50023,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
if (!__pyx_t_7) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1319
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1319
* if self.tight_phrases == 0:
* 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 # <<<<<<<<<<<<<<
@@ -50922,7 +50033,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_v_e_x_gap_low = (__pyx_v_e_x_gap_low - 1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1320
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1320
* 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: # <<<<<<<<<<<<<<
@@ -50939,7 +50050,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
if (!__pyx_t_6) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1321
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1321
* 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 # <<<<<<<<<<<<<<
@@ -50952,7 +50063,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L20:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1323
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1323
* e_x_gap_high = e_x_gap_high + 1
*
* k = 0 # <<<<<<<<<<<<<<
@@ -50961,7 +50072,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_k = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1324
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1324
*
* k = 0
* step = 1+(i*2) # <<<<<<<<<<<<<<
@@ -50970,7 +50081,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_step = (1 + (__pyx_v_i * 2));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1325
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1325
* k = 0
* step = 1+(i*2)
* while k < len1: # <<<<<<<<<<<<<<
@@ -50981,7 +50092,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_6 = (__pyx_v_k < __pyx_v_len1);
if (!__pyx_t_6) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1326
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1326
* step = 1+(i*2)
* while k < len1:
* for m from e_x_gap_low <= m <= e_gap_low[j]: # <<<<<<<<<<<<<<
@@ -50991,7 +50102,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__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++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1327
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1327
* while k < len1:
* for m from e_x_gap_low <= m <= e_gap_low[j]:
* if m >= e_gaps1[k+step-1]: # <<<<<<<<<<<<<<
@@ -51001,7 +50112,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_6 = (__pyx_v_m >= (__pyx_v_e_gaps1[((__pyx_v_k + __pyx_v_step) - 1)]));
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1328
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1328
* 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: # <<<<<<<<<<<<<<
@@ -51011,7 +50122,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__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++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1329
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1329
* 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 # <<<<<<<<<<<<<<
@@ -51021,7 +50132,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_6 = ((__pyx_v_n - __pyx_v_m) >= 1);
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1330
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1330
* 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) # <<<<<<<<<<<<<<
@@ -51030,7 +50141,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1331
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1331
* 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) # <<<<<<<<<<<<<<
@@ -51039,7 +50150,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1332
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1332
* 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) # <<<<<<<<<<<<<<
@@ -51056,7 +50167,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_L29:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1333
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1333
* 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 # <<<<<<<<<<<<<<
@@ -51066,7 +50177,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_v_k = (__pyx_v_k + __pyx_v_step);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1334
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1334
* e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1)
* k = k + step
* free(e_gaps1) # <<<<<<<<<<<<<<
@@ -51075,7 +50186,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
free(__pyx_v_e_gaps1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1335
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1335
* k = k + step
* free(e_gaps1)
* e_gaps1 = e_gaps2 # <<<<<<<<<<<<<<
@@ -51084,7 +50195,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_gaps1 = __pyx_v_e_gaps2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1336
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1336
* free(e_gaps1)
* e_gaps1 = e_gaps2
* len1 = len2 # <<<<<<<<<<<<<<
@@ -51094,7 +50205,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_v_len1 = __pyx_v_len2;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1338
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1338
* len1 = len2
*
* step = 1+(num_gaps*2) # <<<<<<<<<<<<<<
@@ -51103,7 +50214,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_step = (1 + (__pyx_v_num_gaps * 2));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1339
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1339
*
* step = 1+(num_gaps*2)
* e_gaps2 = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -51112,7 +50223,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_gaps2 = ((int *)malloc(0));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1340
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1340
* step = 1+(num_gaps*2)
* e_gaps2 = <int*> malloc(0)
* len2 = 0 # <<<<<<<<<<<<<<
@@ -51121,7 +50232,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_len2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1341
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1341
* e_gaps2 = <int*> malloc(0)
* len2 = 0
* for i from e_high <= i <= e_x_high: # <<<<<<<<<<<<<<
@@ -51131,7 +50242,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__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++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1342
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1342
* len2 = 0
* for i from e_high <= i <= e_x_high:
* j = 0 # <<<<<<<<<<<<<<
@@ -51140,7 +50251,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_j = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1343
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1343
* for i from e_high <= i <= e_x_high:
* j = 0
* while j < len1: # <<<<<<<<<<<<<<
@@ -51151,7 +50262,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_6 = (__pyx_v_j < __pyx_v_len1);
if (!__pyx_t_6) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1344
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1344
* j = 0
* while j < len1:
* if i - e_gaps1[j] <= self.train_max_initial_size and i >= e_gaps1[j+step-1]: # <<<<<<<<<<<<<<
@@ -51167,7 +50278,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1345
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1345
* 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) # <<<<<<<<<<<<<<
@@ -51176,7 +50287,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1346
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1346
* 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) # <<<<<<<<<<<<<<
@@ -51188,7 +50299,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L37:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1347
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1347
* 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 # <<<<<<<<<<<<<<
@@ -51199,7 +50310,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1348
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1348
* e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &i, 1)
* j = j + step
* free(e_gaps1) # <<<<<<<<<<<<<<
@@ -51208,7 +50319,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
free(__pyx_v_e_gaps1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1349
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1349
* j = j + step
* free(e_gaps1)
* e_gaps1 = e_gaps2 # <<<<<<<<<<<<<<
@@ -51217,7 +50328,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_e_gaps1 = __pyx_v_e_gaps2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1350
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1350
* free(e_gaps1)
* e_gaps1 = e_gaps2
* len1 = len2 # <<<<<<<<<<<<<<
@@ -51226,7 +50337,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_len1 = __pyx_v_len2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1352
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1352
* len1 = len2
*
* step = (num_gaps+1)*2 # <<<<<<<<<<<<<<
@@ -51235,7 +50346,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_step = ((__pyx_v_num_gaps + 1) * 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1353
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1353
*
* step = (num_gaps+1)*2
* i = 0 # <<<<<<<<<<<<<<
@@ -51244,7 +50355,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_i = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1355
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1355
* i = 0
*
* while i < len1: # <<<<<<<<<<<<<<
@@ -51255,7 +50366,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = (__pyx_v_i < __pyx_v_len1);
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1356
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1356
*
* while i < len1:
* ephr_arr._clear() # <<<<<<<<<<<<<<
@@ -51264,7 +50375,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_clear(__pyx_v_ephr_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1357
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1357
* while i < len1:
* ephr_arr._clear()
* num_chunks = 0 # <<<<<<<<<<<<<<
@@ -51273,7 +50384,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_num_chunks = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1358
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1358
* ephr_arr._clear()
* num_chunks = 0
* indexes = [] # <<<<<<<<<<<<<<
@@ -51286,7 +50397,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_v_indexes = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1359
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1359
* num_chunks = 0
* indexes = []
* for j from 0 <= j < num_gaps+1: # <<<<<<<<<<<<<<
@@ -51296,7 +50407,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_9 = (__pyx_v_num_gaps + 1);
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_9; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1360
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1360
* indexes = []
* for j from 0 <= j < num_gaps+1:
* if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]: # <<<<<<<<<<<<<<
@@ -51306,7 +50417,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__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)]));
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1361
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1361
* 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 # <<<<<<<<<<<<<<
@@ -51318,7 +50429,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L42:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1362
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1362
* 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]: # <<<<<<<<<<<<<<
@@ -51328,7 +50439,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__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++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1363
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1363
* num_chunks = num_chunks + 1
* for k from e_gaps1[i+2*j] <= k < e_gaps1[i+(2*j)+1]:
* indexes.append(k) # <<<<<<<<<<<<<<
@@ -51340,7 +50451,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_10 = PyList_Append(__pyx_v_indexes, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1364
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1364
* 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]]) # <<<<<<<<<<<<<<
@@ -51355,7 +50466,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_append(__pyx_v_ephr_arr, __pyx_t_4);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1365
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1365
* indexes.append(k)
* ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]])
* if j < num_gaps: # <<<<<<<<<<<<<<
@@ -51365,7 +50476,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = (__pyx_v_j < __pyx_v_num_gaps);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1366
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1366
* 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)) # <<<<<<<<<<<<<<
@@ -51377,7 +50488,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_10 = PyList_Append(__pyx_v_indexes, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1367
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1367
* 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)) # <<<<<<<<<<<<<<
@@ -51390,7 +50501,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_L45:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1368
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1368
* 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 # <<<<<<<<<<<<<<
@@ -51399,7 +50510,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_i = (__pyx_v_i + __pyx_v_step);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1369
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1369
* 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: # <<<<<<<<<<<<<<
@@ -51415,7 +50526,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1370
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1370
* i = i + step
* if ephr_arr.len <= self.max_target_length and num_chunks <= self.max_target_chunks:
* result.append((Phrase(ephr_arr),indexes)) # <<<<<<<<<<<<<<
@@ -51447,7 +50558,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_L46:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1372
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1372
* result.append((Phrase(ephr_arr),indexes))
*
* free(e_gaps1) # <<<<<<<<<<<<<<
@@ -51456,7 +50567,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
free(__pyx_v_e_gaps1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1373
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1373
*
* free(e_gaps1)
* free(e_gap_order) # <<<<<<<<<<<<<<
@@ -51465,7 +50576,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
free(__pyx_v_e_gap_order);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1374
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1374
* free(e_gaps1)
* free(e_gap_order)
* return result # <<<<<<<<<<<<<<
@@ -51493,7 +50604,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1376
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1376
* return result
*
* cdef IntList create_alignments(self, int* sent_links, int num_links, findexes, eindexes): # <<<<<<<<<<<<<<
@@ -51521,7 +50632,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("create_alignments", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1378
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1378
* cdef IntList create_alignments(self, int* sent_links, int num_links, findexes, eindexes):
* cdef unsigned i
* cdef IntList ret = IntList() # <<<<<<<<<<<<<<
@@ -51533,7 +50644,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
__pyx_v_ret = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1379
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1379
* cdef unsigned i
* cdef IntList ret = IntList()
* for i in range(len(findexes)): # <<<<<<<<<<<<<<
@@ -51544,7 +50655,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1380
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1380
* cdef IntList ret = IntList()
* for i in range(len(findexes)):
* s = findexes[i] # <<<<<<<<<<<<<<
@@ -51557,7 +50668,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
__pyx_v_s = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1381
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1381
* for i in range(len(findexes)):
* s = findexes[i]
* if (s<0): # <<<<<<<<<<<<<<
@@ -51570,7 +50681,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1382
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1382
* s = findexes[i]
* if (s<0):
* continue # <<<<<<<<<<<<<<
@@ -51582,7 +50693,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1383
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1383
* if (s<0):
* continue
* idx = 0 # <<<<<<<<<<<<<<
@@ -51593,7 +50704,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
__Pyx_XDECREF(__pyx_v_idx);
__pyx_v_idx = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1384
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1384
* continue
* idx = 0
* while (idx < num_links*2): # <<<<<<<<<<<<<<
@@ -51610,7 +50721,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (!__pyx_t_4) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1385
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1385
* idx = 0
* while (idx < num_links*2):
* if (sent_links[idx] == s): # <<<<<<<<<<<<<<
@@ -51627,7 +50738,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1386
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1386
* while (idx < num_links*2):
* if (sent_links[idx] == s):
* j = eindexes.index(sent_links[idx+1]) # <<<<<<<<<<<<<<
@@ -51655,7 +50766,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
__pyx_v_j = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1387
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1387
* if (sent_links[idx] == s):
* j = eindexes.index(sent_links[idx+1])
* ret.append(i*65536+j) # <<<<<<<<<<<<<<
@@ -51675,7 +50786,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1388
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1388
* j = eindexes.index(sent_links[idx+1])
* ret.append(i*65536+j)
* idx += 2 # <<<<<<<<<<<<<<
@@ -51691,7 +50802,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
__pyx_L3_continue:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1389
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1389
* ret.append(i*65536+j)
* idx += 2
* return ret # <<<<<<<<<<<<<<
@@ -51721,7 +50832,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1391
+/* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1391
* return ret
*
* cdef extract(self, Phrase phrase, Matching* matching, int* chunklen, int num_chunks): # <<<<<<<<<<<<<<
@@ -51815,7 +50926,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("extract", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1404
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1404
* cdef reason_for_failure
*
* fphr_arr = IntList() # <<<<<<<<<<<<<<
@@ -51827,7 +50938,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_fphr_arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1405
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1405
*
* fphr_arr = IntList()
* phrase_len = phrase.n # <<<<<<<<<<<<<<
@@ -51836,7 +50947,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_phrase_len = __pyx_v_phrase->n;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1406
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1406
* fphr_arr = IntList()
* phrase_len = phrase.n
* extracts = [] # <<<<<<<<<<<<<<
@@ -51848,7 +50959,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_extracts = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1407
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1407
* phrase_len = phrase.n
* extracts = []
* sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links) # <<<<<<<<<<<<<<
@@ -51857,7 +50968,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_sent_links = ((struct __pyx_vtabstruct_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));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1409
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1409
* sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links)
*
* e_sent_start = self.eda.sent_index.arr[matching.sent_id] # <<<<<<<<<<<<<<
@@ -51866,7 +50977,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_e_sent_start = (__pyx_v_self->eda->sent_index->arr[__pyx_v_matching->sent_id]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1410
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1410
*
* e_sent_start = self.eda.sent_index.arr[matching.sent_id]
* e_sent_end = self.eda.sent_index.arr[matching.sent_id+1] # <<<<<<<<<<<<<<
@@ -51875,7 +50986,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_e_sent_end = (__pyx_v_self->eda->sent_index->arr[(__pyx_v_matching->sent_id + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1411
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1411
* 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 # <<<<<<<<<<<<<<
@@ -51884,7 +50995,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_e_sent_len = ((__pyx_v_e_sent_end - __pyx_v_e_sent_start) - 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1412
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1412
* 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] # <<<<<<<<<<<<<<
@@ -51893,7 +51004,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_sent_start = (__pyx_v_self->fda->sent_index->arr[__pyx_v_matching->sent_id]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1413
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1413
* 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] # <<<<<<<<<<<<<<
@@ -51902,7 +51013,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_sent_end = (__pyx_v_self->fda->sent_index->arr[(__pyx_v_matching->sent_id + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1414
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1414
* 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 # <<<<<<<<<<<<<<
@@ -51911,7 +51022,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_sent_len = ((__pyx_v_f_sent_end - __pyx_v_f_sent_start) - 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1416
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1416
* f_sent_len = f_sent_end - f_sent_start - 1
*
* self.findexes1.reset() # <<<<<<<<<<<<<<
@@ -51925,7 +51036,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1417
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1417
*
* self.findexes1.reset()
* sofar = 0 # <<<<<<<<<<<<<<
@@ -51935,7 +51046,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_INCREF(__pyx_int_0);
__pyx_v_sofar = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1418
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1418
* self.findexes1.reset()
* sofar = 0
* for i in range(num_chunks): # <<<<<<<<<<<<<<
@@ -51946,7 +51057,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1419
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1419
* sofar = 0
* for i in range(num_chunks):
* for j in range(chunklen[i]): # <<<<<<<<<<<<<<
@@ -51957,7 +51068,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_j = __pyx_t_6;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1420
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1420
* for i in range(num_chunks):
* for j in range(chunklen[i]):
* self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start); # <<<<<<<<<<<<<<
@@ -51971,7 +51082,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1421
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1421
* for j in range(chunklen[i]):
* self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start);
* sofar += 1 # <<<<<<<<<<<<<<
@@ -51985,7 +51096,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1422
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1422
* self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start);
* sofar += 1
* if (i+1<num_chunks): # <<<<<<<<<<<<<<
@@ -51995,7 +51106,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__pyx_v_i + 1) < __pyx_v_num_chunks);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1423
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1423
* sofar += 1
* if (i+1<num_chunks):
* self.findexes1.append(phrase[sofar]) # <<<<<<<<<<<<<<
@@ -52009,7 +51120,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1424
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1424
* if (i+1<num_chunks):
* self.findexes1.append(phrase[sofar])
* sofar += 1 # <<<<<<<<<<<<<<
@@ -52026,7 +51137,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L7:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1427
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1427
*
*
* e_links_low = <int*> malloc(e_sent_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -52035,7 +51146,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_e_links_low = ((int *)malloc((__pyx_v_e_sent_len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1428
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1428
*
* e_links_low = <int*> malloc(e_sent_len*sizeof(int))
* e_links_high = <int*> malloc(e_sent_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -52044,7 +51155,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_e_links_high = ((int *)malloc((__pyx_v_e_sent_len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1429
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1429
* e_links_low = <int*> malloc(e_sent_len*sizeof(int))
* e_links_high = <int*> malloc(e_sent_len*sizeof(int))
* f_links_low = <int*> malloc(f_sent_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -52053,7 +51164,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_links_low = ((int *)malloc((__pyx_v_f_sent_len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1430
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1430
* e_links_high = <int*> malloc(e_sent_len*sizeof(int))
* f_links_low = <int*> malloc(f_sent_len*sizeof(int))
* f_links_high = <int*> malloc(f_sent_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -52062,7 +51173,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_links_high = ((int *)malloc((__pyx_v_f_sent_len * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1431
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1431
* f_links_low = <int*> malloc(f_sent_len*sizeof(int))
* f_links_high = <int*> malloc(f_sent_len*sizeof(int))
* f_gap_low = <int*> malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<<
@@ -52071,7 +51182,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_gap_low = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1432
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1432
* f_links_high = <int*> malloc(f_sent_len*sizeof(int))
* f_gap_low = <int*> malloc((num_chunks+1)*sizeof(int))
* f_gap_high = <int*> malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<<
@@ -52080,7 +51191,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_gap_high = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1433
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1433
* f_gap_low = <int*> malloc((num_chunks+1)*sizeof(int))
* f_gap_high = <int*> malloc((num_chunks+1)*sizeof(int))
* e_gap_low = <int*> malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<<
@@ -52089,7 +51200,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_e_gap_low = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1434
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1434
* f_gap_high = <int*> malloc((num_chunks+1)*sizeof(int))
* e_gap_low = <int*> malloc((num_chunks+1)*sizeof(int))
* e_gap_high = <int*> malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<<
@@ -52098,7 +51209,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_e_gap_high = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1435
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1435
* e_gap_low = <int*> malloc((num_chunks+1)*sizeof(int))
* e_gap_high = <int*> malloc((num_chunks+1)*sizeof(int))
* memset(f_gap_low, 0, (num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<<
@@ -52107,7 +51218,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
memset(__pyx_v_f_gap_low, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1436
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1436
* e_gap_high = <int*> 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)) # <<<<<<<<<<<<<<
@@ -52116,7 +51227,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
memset(__pyx_v_f_gap_high, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1437
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1437
* 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)) # <<<<<<<<<<<<<<
@@ -52125,7 +51236,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
memset(__pyx_v_e_gap_low, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1438
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1438
* 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)) # <<<<<<<<<<<<<<
@@ -52134,7 +51245,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
memset(__pyx_v_e_gap_high, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1440
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1440
* memset(e_gap_high, 0, (num_chunks+1)*sizeof(int))
*
* reason_for_failure = "" # <<<<<<<<<<<<<<
@@ -52144,7 +51255,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_INCREF(((PyObject *)__pyx_kp_s_45));
__pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_45);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1442
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1442
* reason_for_failure = ""
*
* for i from 0 <= i < e_sent_len: # <<<<<<<<<<<<<<
@@ -52154,7 +51265,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_3 = __pyx_v_e_sent_len;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1443
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1443
*
* for i from 0 <= i < e_sent_len:
* e_links_low[i] = -1 # <<<<<<<<<<<<<<
@@ -52163,7 +51274,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
(__pyx_v_e_links_low[__pyx_v_i]) = -1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1444
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1444
* for i from 0 <= i < e_sent_len:
* e_links_low[i] = -1
* e_links_high[i] = -1 # <<<<<<<<<<<<<<
@@ -52173,7 +51284,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
(__pyx_v_e_links_high[__pyx_v_i]) = -1;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1445
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1445
* e_links_low[i] = -1
* e_links_high[i] = -1
* for i from 0 <= i < f_sent_len: # <<<<<<<<<<<<<<
@@ -52183,7 +51294,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_3 = __pyx_v_f_sent_len;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1446
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1446
* e_links_high[i] = -1
* for i from 0 <= i < f_sent_len:
* f_links_low[i] = -1 # <<<<<<<<<<<<<<
@@ -52192,7 +51303,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
(__pyx_v_f_links_low[__pyx_v_i]) = -1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1447
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1447
* for i from 0 <= i < f_sent_len:
* f_links_low[i] = -1
* f_links_high[i] = -1 # <<<<<<<<<<<<<<
@@ -52202,7 +51313,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
(__pyx_v_f_links_high[__pyx_v_i]) = -1;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1453
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1453
* # links that we care about (but then how to look up
* # when we want to check something on the e side?)
* i = 0 # <<<<<<<<<<<<<<
@@ -52211,7 +51322,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1454
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1454
* # when we want to check something on the e side?)
* i = 0
* while i < num_links*2: # <<<<<<<<<<<<<<
@@ -52222,7 +51333,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_i < (__pyx_v_num_links * 2));
if (!__pyx_t_7) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1455
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1455
* i = 0
* while i < num_links*2:
* f_i = sent_links[i] # <<<<<<<<<<<<<<
@@ -52231,7 +51342,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_i = (__pyx_v_sent_links[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1456
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1456
* while i < num_links*2:
* f_i = sent_links[i]
* e_i = sent_links[i+1] # <<<<<<<<<<<<<<
@@ -52240,7 +51351,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_e_i = (__pyx_v_sent_links[(__pyx_v_i + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1457
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1457
* 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: # <<<<<<<<<<<<<<
@@ -52256,7 +51367,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1458
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1458
* 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 # <<<<<<<<<<<<<<
@@ -52268,7 +51379,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L14:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1459
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1459
* 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: # <<<<<<<<<<<<<<
@@ -52284,7 +51395,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1460
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1460
* 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 # <<<<<<<<<<<<<<
@@ -52296,7 +51407,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1461
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1461
* 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: # <<<<<<<<<<<<<<
@@ -52312,7 +51423,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1462
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1462
* 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 # <<<<<<<<<<<<<<
@@ -52324,7 +51435,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L16:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1463
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1463
* 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: # <<<<<<<<<<<<<<
@@ -52340,7 +51451,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1464
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1464
* 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 # <<<<<<<<<<<<<<
@@ -52352,7 +51463,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1465
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1465
* 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 # <<<<<<<<<<<<<<
@@ -52362,7 +51473,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_i = (__pyx_v_i + 2);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1467
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1467
* i = i + 2
*
* als = [] # <<<<<<<<<<<<<<
@@ -52374,7 +51485,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_als = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1468
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1468
*
* als = []
* for x in range(matching.start,matching.end): # <<<<<<<<<<<<<<
@@ -52385,7 +51496,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
for (__pyx_t_4 = __pyx_v_matching->start; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_x = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1469
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1469
* 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]) # <<<<<<<<<<<<<<
@@ -52408,7 +51519,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_al = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1470
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1470
* 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) # <<<<<<<<<<<<<<
@@ -52418,7 +51529,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_11 = PyList_Append(__pyx_v_als, ((PyObject *)__pyx_v_al)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1472
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1472
* als.append(al)
* # check all source-side alignment constraints
* met_constraints = 1 # <<<<<<<<<<<<<<
@@ -52427,7 +51538,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_met_constraints = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1473
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1473
* # check all source-side alignment constraints
* met_constraints = 1
* if self.require_aligned_terminal: # <<<<<<<<<<<<<<
@@ -52436,7 +51547,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_self->require_aligned_terminal) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1474
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1474
* met_constraints = 1
* if self.require_aligned_terminal:
* num_aligned_chunks = 0 # <<<<<<<<<<<<<<
@@ -52445,7 +51556,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_num_aligned_chunks = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1475
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1475
* if self.require_aligned_terminal:
* num_aligned_chunks = 0
* for i from 0 <= i < num_chunks: # <<<<<<<<<<<<<<
@@ -52455,7 +51566,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_3 = __pyx_v_num_chunks;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1476
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1476
* num_aligned_chunks = 0
* for i from 0 <= i < num_chunks:
* for j from 0 <= j < chunklen[i]: # <<<<<<<<<<<<<<
@@ -52465,7 +51576,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_4 = (__pyx_v_chunklen[__pyx_v_i]);
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1477
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1477
* 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: # <<<<<<<<<<<<<<
@@ -52475,7 +51586,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__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);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1478
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1478
* 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 # <<<<<<<<<<<<<<
@@ -52484,7 +51595,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_num_aligned_chunks = (__pyx_v_num_aligned_chunks + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1479
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1479
* if f_links_low[matching.arr[matching.start+i]+j-f_sent_start] > -1:
* num_aligned_chunks = num_aligned_chunks + 1
* break # <<<<<<<<<<<<<<
@@ -52499,7 +51610,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L24_break:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1480
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1480
* num_aligned_chunks = num_aligned_chunks + 1
* break
* if num_aligned_chunks == 0: # <<<<<<<<<<<<<<
@@ -52509,18 +51620,18 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_num_aligned_chunks == 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1481
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1481
* break
* if num_aligned_chunks == 0:
* reason_for_failure = "No aligned terminals" # <<<<<<<<<<<<<<
* met_constraints = 0
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks:
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_128));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_127));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_128);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_127);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1482
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1482
* if num_aligned_chunks == 0:
* reason_for_failure = "No aligned terminals"
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -52532,7 +51643,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L26:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1483
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1483
* reason_for_failure = "No aligned terminals"
* met_constraints = 0
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks: # <<<<<<<<<<<<<<
@@ -52547,18 +51658,18 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1484
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1484
* met_constraints = 0
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks:
* reason_for_failure = "Unaligned chunk" # <<<<<<<<<<<<<<
* met_constraints = 0
*
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_129));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_128));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_129);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_128);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1485
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1485
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks:
* reason_for_failure = "Unaligned chunk"
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -52573,7 +51684,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L20:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1487
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1487
* met_constraints = 0
*
* if met_constraints and self.tight_phrases: # <<<<<<<<<<<<<<
@@ -52587,7 +51698,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1489
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1489
* if met_constraints and self.tight_phrases:
* # outside edge constraints are checked later
* for i from 0 <= i < num_chunks-1: # <<<<<<<<<<<<<<
@@ -52597,7 +51708,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_12 = (__pyx_v_num_chunks - 1);
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1490
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1490
* # 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: # <<<<<<<<<<<<<<
@@ -52607,18 +51718,18 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__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);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1491
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1491
* 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" # <<<<<<<<<<<<<<
* met_constraints = 0
* break
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_130));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_129));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_130);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_129);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1492
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1492
* 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 # <<<<<<<<<<<<<<
@@ -52627,7 +51738,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_met_constraints = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1493
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1493
* reason_for_failure = "Gaps are not tight phrases"
* met_constraints = 0
* break # <<<<<<<<<<<<<<
@@ -52639,7 +51750,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L31:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1494
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1494
* met_constraints = 0
* break
* if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1: # <<<<<<<<<<<<<<
@@ -52649,18 +51760,18 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__pyx_v_f_links_low[(((__pyx_v_matching->arr[((__pyx_v_matching->start + __pyx_v_i) + 1)]) - 1) - __pyx_v_f_sent_start)]) == -1);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1495
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1495
* break
* 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
* break
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_130));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_129));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_130);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_129);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1496
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1496
* 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 # <<<<<<<<<<<<<<
@@ -52669,7 +51780,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_met_constraints = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1497
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1497
* reason_for_failure = "Gaps are not tight phrases"
* met_constraints = 0
* break # <<<<<<<<<<<<<<
@@ -52686,7 +51797,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L28:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1499
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1499
* break
*
* f_low = matching.arr[matching.start] - f_sent_start # <<<<<<<<<<<<<<
@@ -52695,7 +51806,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_low = ((__pyx_v_matching->arr[__pyx_v_matching->start]) - __pyx_v_f_sent_start);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1500
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1500
*
* 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 # <<<<<<<<<<<<<<
@@ -52704,7 +51815,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1501
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1501
* 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: # <<<<<<<<<<<<<<
@@ -52713,7 +51824,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_met_constraints) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1503
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1503
* if met_constraints:
*
* if self.find_fixpoint(f_low, f_high, f_links_low, f_links_high, e_links_low, e_links_high, # <<<<<<<<<<<<<<
@@ -52723,7 +51834,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_10 = PyInt_FromLong(__pyx_v_f_high); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1507
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1507
* 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): # <<<<<<<<<<<<<<
@@ -52734,7 +51845,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1508
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1508
* self.train_min_gap_size, 0,
* self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0):
* gap_error = 0 # <<<<<<<<<<<<<<
@@ -52743,7 +51854,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_gap_error = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1509
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1509
* self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0):
* gap_error = 0
* num_gaps = 0 # <<<<<<<<<<<<<<
@@ -52752,7 +51863,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_num_gaps = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1511
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1511
* num_gaps = 0
*
* if f_back_low < f_low: # <<<<<<<<<<<<<<
@@ -52762,7 +51873,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_f_back_low < __pyx_v_f_low);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1512
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1512
*
* if f_back_low < f_low:
* f_gap_low[0] = f_back_low # <<<<<<<<<<<<<<
@@ -52771,7 +51882,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
(__pyx_v_f_gap_low[0]) = __pyx_v_f_back_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1513
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1513
* if f_back_low < f_low:
* f_gap_low[0] = f_back_low
* f_gap_high[0] = f_low # <<<<<<<<<<<<<<
@@ -52780,7 +51891,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
(__pyx_v_f_gap_high[0]) = __pyx_v_f_low;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1514
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1514
* f_gap_low[0] = f_back_low
* f_gap_high[0] = f_low
* num_gaps = 1 # <<<<<<<<<<<<<<
@@ -52789,7 +51900,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_num_gaps = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1515
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1515
* f_gap_high[0] = f_low
* num_gaps = 1
* gap_start = 0 # <<<<<<<<<<<<<<
@@ -52798,7 +51909,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_gap_start = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1516
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1516
* num_gaps = 1
* gap_start = 0
* phrase_len = phrase_len+1 # <<<<<<<<<<<<<<
@@ -52807,7 +51918,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_phrase_len = (__pyx_v_phrase_len + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1517
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1517
* gap_start = 0
* phrase_len = phrase_len+1
* if phrase_len > self.max_length: # <<<<<<<<<<<<<<
@@ -52817,7 +51928,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_phrase_len > __pyx_v_self->max_length);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1518
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1518
* phrase_len = phrase_len+1
* if phrase_len > self.max_length:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -52829,7 +51940,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L36:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1519
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1519
* if phrase_len > self.max_length:
* gap_error = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -52838,7 +51949,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_self->tight_phrases) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1520
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1520
* gap_error = 1
* if self.tight_phrases:
* if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1: # <<<<<<<<<<<<<<
@@ -52854,7 +51965,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1521
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1521
* if self.tight_phrases:
* if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -52863,16 +51974,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_gap_error = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1522
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1522
* 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" # <<<<<<<<<<<<<<
* else:
* gap_start = 1
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_131));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_130));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_131);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_130);
goto __pyx_L38;
}
__pyx_L38:;
@@ -52883,7 +51994,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1524
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1524
* reason_for_failure = "Inside edges of preceding subphrase are not tight"
* else:
* gap_start = 1 # <<<<<<<<<<<<<<
@@ -52892,7 +52003,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_gap_start = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1525
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1525
* else:
* gap_start = 1
* if self.tight_phrases and f_links_low[f_low] == -1: # <<<<<<<<<<<<<<
@@ -52907,7 +52018,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1528
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1528
* # 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 # <<<<<<<<<<<<<<
@@ -52921,7 +52032,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L35:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1530
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1530
* met_constraints = 0
*
* for i from 0 <= i < matching.size - 1: # <<<<<<<<<<<<<<
@@ -52931,7 +52042,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_12 = (__pyx_v_matching->size - 1);
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1531
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1531
*
* for i from 0 <= i < matching.size - 1:
* f_gap_low[1+i] = matching.arr[matching.start+i] + chunklen[i] - f_sent_start # <<<<<<<<<<<<<<
@@ -52940,7 +52051,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
(__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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1532
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1532
* 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 # <<<<<<<<<<<<<<
@@ -52949,7 +52060,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
(__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);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1533
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1533
* 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 # <<<<<<<<<<<<<<
@@ -52959,7 +52070,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_num_gaps = (__pyx_v_num_gaps + 1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1535
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1535
* num_gaps = num_gaps + 1
*
* if f_high < f_back_high: # <<<<<<<<<<<<<<
@@ -52969,7 +52080,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_f_high < __pyx_v_f_back_high);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1536
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1536
*
* if f_high < f_back_high:
* f_gap_low[gap_start+num_gaps] = f_high # <<<<<<<<<<<<<<
@@ -52978,7 +52089,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
(__pyx_v_f_gap_low[(__pyx_v_gap_start + __pyx_v_num_gaps)]) = __pyx_v_f_high;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1537
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1537
* 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 # <<<<<<<<<<<<<<
@@ -52987,7 +52098,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
(__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_num_gaps)]) = __pyx_v_f_back_high;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1538
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1538
* f_gap_low[gap_start+num_gaps] = f_high
* f_gap_high[gap_start+num_gaps] = f_back_high
* num_gaps = num_gaps + 1 # <<<<<<<<<<<<<<
@@ -52996,7 +52107,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_num_gaps = (__pyx_v_num_gaps + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1539
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1539
* f_gap_high[gap_start+num_gaps] = f_back_high
* num_gaps = num_gaps + 1
* phrase_len = phrase_len+1 # <<<<<<<<<<<<<<
@@ -53005,7 +52116,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_phrase_len = (__pyx_v_phrase_len + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1540
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1540
* num_gaps = num_gaps + 1
* phrase_len = phrase_len+1
* if phrase_len > self.max_length: # <<<<<<<<<<<<<<
@@ -53015,7 +52126,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_phrase_len > __pyx_v_self->max_length);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1541
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1541
* phrase_len = phrase_len+1
* if phrase_len > self.max_length:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -53027,7 +52138,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L43:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1542
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1542
* if phrase_len > self.max_length:
* gap_error = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -53036,7 +52147,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_self->tight_phrases) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1543
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1543
* gap_error = 1
* if self.tight_phrases:
* if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1: # <<<<<<<<<<<<<<
@@ -53052,7 +52163,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1544
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1544
* if self.tight_phrases:
* if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -53061,16 +52172,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_gap_error = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1545
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1545
* 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" # <<<<<<<<<<<<<<
* else:
* if self.tight_phrases and f_links_low[f_high-1] == -1:
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_132));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_131));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_132);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_131);
goto __pyx_L45;
}
__pyx_L45:;
@@ -53081,7 +52192,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1547
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1547
* reason_for_failure = "Inside edges of following subphrase are not tight"
* else:
* if self.tight_phrases and f_links_low[f_high-1] == -1: # <<<<<<<<<<<<<<
@@ -53096,7 +52207,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1548
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1548
* else:
* if self.tight_phrases and f_links_low[f_high-1] == -1:
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -53110,7 +52221,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L42:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1550
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1550
* met_constraints = 0
*
* if gap_error == 0: # <<<<<<<<<<<<<<
@@ -53120,7 +52231,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_gap_error == 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1551
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1551
*
* if gap_error == 0:
* e_word_count = e_high - e_low # <<<<<<<<<<<<<<
@@ -53129,7 +52240,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_e_word_count = (__pyx_v_e_high - __pyx_v_e_low);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1552
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1552
* if gap_error == 0:
* e_word_count = e_high - e_low
* for i from 0 <= i < num_gaps: # check integrity of subphrases # <<<<<<<<<<<<<<
@@ -53139,7 +52250,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_3 = __pyx_v_num_gaps;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1553
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1553
* 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], # <<<<<<<<<<<<<<
@@ -53149,7 +52260,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_10 = PyInt_FromLong((__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1558
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1558
* f_gap_low+gap_start+i, f_gap_high+gap_start+i,
* f_sent_len, e_sent_len,
* self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<<
@@ -53160,7 +52271,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1560
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1560
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0) == 0:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -53169,7 +52280,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_gap_error = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1561
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1561
* 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]) # <<<<<<<<<<<<<<
@@ -53188,14 +52299,14 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_10 = 0;
__pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_133), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_132), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_reason_for_failure);
__pyx_v_reason_for_failure = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1562
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1562
* 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 # <<<<<<<<<<<<<<
@@ -53212,7 +52323,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L47:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1564
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1564
* break
*
* if gap_error == 0: # <<<<<<<<<<<<<<
@@ -53222,7 +52333,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_gap_error == 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1565
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1565
*
* if gap_error == 0:
* i = 1 # <<<<<<<<<<<<<<
@@ -53231,7 +52342,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1566
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1566
* if gap_error == 0:
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
@@ -53245,7 +52356,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1567
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1567
* i = 1
* self.findexes.reset()
* if f_back_low < f_low: # <<<<<<<<<<<<<<
@@ -53255,7 +52366,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_f_back_low < __pyx_v_f_low);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1568
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1568
* self.findexes.reset()
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53264,7 +52375,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1569
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1569
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -53273,7 +52384,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = (__pyx_v_i + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1570
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1570
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53290,7 +52401,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L52:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1571
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1571
* i = i+1
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
@@ -53310,7 +52421,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1572
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1572
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -53320,7 +52431,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_3 = __pyx_v_phrase->n;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1573
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1573
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
@@ -53330,7 +52441,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_4 = __pyx_f_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j]));
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1574
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1574
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53339,7 +52450,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1575
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1575
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -53351,7 +52462,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1577
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1577
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
@@ -53363,7 +52474,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L55:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1578
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1578
* else:
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high: # <<<<<<<<<<<<<<
@@ -53373,7 +52484,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_f_back_high > __pyx_v_f_high);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1579
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1579
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53382,7 +52493,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1580
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1580
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53399,7 +52510,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L56:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1582
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1582
* self.findexes.append(sym_setindex(self.category, i))
*
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
@@ -53417,7 +52528,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_fphr = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_10);
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1583
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1583
*
* fphr = Phrase(fphr_arr)
* if met_constraints: # <<<<<<<<<<<<<<
@@ -53426,7 +52537,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_met_constraints) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1586
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1586
* 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) # <<<<<<<<<<<<<<
@@ -53438,7 +52549,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_phrase_list = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1587
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1587
* 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: # <<<<<<<<<<<<<<
@@ -53449,7 +52560,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_t_13 > 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1588
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1588
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
@@ -53466,7 +52577,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1590
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1590
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -53475,7 +52586,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_pair_count = 0.0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1591
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1591
* 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) # <<<<<<<<<<<<<<
@@ -53504,7 +52615,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_2 = 0;
__pyx_t_1 = 0;
__pyx_t_14 = 0;
- __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_134), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_133), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_14));
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_v_reason_for_failure);
@@ -53513,7 +52624,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L58:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1592
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1592
* 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: # <<<<<<<<<<<<<<
@@ -53531,18 +52642,10 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
for (;;) {
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++;
- #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 = 1592; __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++;
- #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 = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_15 = __pyx_t_16(__pyx_t_14);
if (unlikely(!__pyx_t_15)) {
@@ -53556,33 +52659,27 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if ((likely(PyTuple_CheckExact(__pyx_t_15))) || (PyList_CheckExact(__pyx_t_15))) {
PyObject* sequence = __pyx_t_15;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_1 = PyList_GET_ITEM(sequence, 0);
__pyx_t_2 = PyList_GET_ITEM(sequence, 1);
}
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_2);
- #else
- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- } else
- {
+ } else {
Py_ssize_t index = -1;
__pyx_t_10 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
@@ -53593,13 +52690,12 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
index = 1; __pyx_t_2 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L61_unpacking_failed;
__Pyx_GOTREF(__pyx_t_2);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_17 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L62_unpacking_done;
__pyx_L61_unpacking_failed:;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_17 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[8]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L62_unpacking_done:;
}
@@ -53610,7 +52706,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_eindexes = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1593
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1593
* 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) # <<<<<<<<<<<<<<
@@ -53626,7 +52722,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_als1 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1594
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1594
* 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))) # <<<<<<<<<<<<<<
@@ -53667,7 +52763,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L57:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1596
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1596
* extracts.append((fphr, phrase2, pair_count, tuple(als1)))
*
* if (num_gaps < self.max_nonterminals and # <<<<<<<<<<<<<<
@@ -53677,7 +52773,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_num_gaps < __pyx_v_self->max_nonterminals);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1597
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1597
*
* if (num_gaps < self.max_nonterminals and
* phrase_len < self.max_length and # <<<<<<<<<<<<<<
@@ -53687,7 +52783,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_phrase_len < __pyx_v_self->max_length);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1598
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1598
* 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): # <<<<<<<<<<<<<<
@@ -53705,7 +52801,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1599
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1599
* 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 # <<<<<<<<<<<<<<
@@ -53715,7 +52811,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_f_back_low == __pyx_v_f_low);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1600
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1600
* 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 # <<<<<<<<<<<<<<
@@ -53725,7 +52821,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_f_low >= __pyx_v_self->train_min_gap_size);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1601
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1601
* 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))): # <<<<<<<<<<<<<<
@@ -53755,7 +52851,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1602
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1602
* 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 # <<<<<<<<<<<<<<
@@ -53764,7 +52860,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_x_low = (__pyx_v_f_low - __pyx_v_self->train_min_gap_size);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1603
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1603
* ((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 # <<<<<<<<<<<<<<
@@ -53773,7 +52869,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_met_constraints = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1604
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1604
* f_x_low = f_low-self.train_min_gap_size
* met_constraints = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -53782,7 +52878,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_self->tight_phrases) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1605
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1605
* met_constraints = 1
* if self.tight_phrases:
* while f_x_low >= 0 and f_links_low[f_x_low] == -1: # <<<<<<<<<<<<<<
@@ -53799,7 +52895,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (!__pyx_t_18) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1606
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1606
* if self.tight_phrases:
* while f_x_low >= 0 and f_links_low[f_x_low] == -1:
* f_x_low = f_x_low - 1 # <<<<<<<<<<<<<<
@@ -53812,7 +52908,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L65:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1607
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1607
* 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: # <<<<<<<<<<<<<<
@@ -53828,7 +52924,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1608
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1608
* 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 # <<<<<<<<<<<<<<
@@ -53840,7 +52936,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L68:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1610
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1610
* met_constraints = 0
*
* if (met_constraints and # <<<<<<<<<<<<<<
@@ -53849,7 +52945,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_met_constraints) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1611
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1611
*
* if (met_constraints and
* self.find_fixpoint(f_x_low, f_back_high, # <<<<<<<<<<<<<<
@@ -53859,7 +52955,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_14 = PyInt_FromLong(__pyx_v_f_back_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1615
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1615
* 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, # <<<<<<<<<<<<<<
@@ -53869,7 +52965,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_x_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, 1, 0, 1, 0)) {
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1617
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1617
* self.train_max_initial_size, self.train_max_initial_size,
* 1, 1, 1, 1, 0, 1, 0) and
* ((not self.tight_phrases) or f_links_low[f_x_low] != -1) and # <<<<<<<<<<<<<<
@@ -53885,7 +52981,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1618
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1618
* 1, 1, 1, 1, 0, 1, 0) 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 # <<<<<<<<<<<<<<
@@ -53895,7 +52991,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_1 = PyInt_FromLong(__pyx_v_f_low); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1622
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1622
* -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, # <<<<<<<<<<<<<<
@@ -53918,7 +53014,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1624
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1624
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear() # <<<<<<<<<<<<<<
@@ -53927,7 +53023,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1625
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1625
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
* i = 1 # <<<<<<<<<<<<<<
@@ -53936,7 +53032,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1626
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1626
* fphr_arr._clear()
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
@@ -53950,7 +53046,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1627
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1627
* i = 1
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53964,7 +53060,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1628
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1628
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53973,7 +53069,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1629
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1629
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -53982,7 +53078,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = (__pyx_v_i + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1630
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1630
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
@@ -54002,7 +53098,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1631
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1631
* i = i+1
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -54012,7 +53108,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_3 = __pyx_v_phrase->n;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1632
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1632
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
@@ -54022,7 +53118,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_4 = __pyx_f_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j]));
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1633
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1633
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54031,7 +53127,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1634
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1634
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -54043,7 +53139,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1636
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1636
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
@@ -54055,7 +53151,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L72:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1637
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1637
* else:
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high: # <<<<<<<<<<<<<<
@@ -54065,7 +53161,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_f_back_high > __pyx_v_f_high);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1638
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1638
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54074,7 +53170,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1639
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1639
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54091,7 +53187,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L73:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1640
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1640
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
@@ -54110,7 +53206,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_fphr = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_15);
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1643
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1643
* 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) # <<<<<<<<<<<<<<
@@ -54123,7 +53219,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_phrase_list = __pyx_t_15;
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1644
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1644
* 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: # <<<<<<<<<<<<<<
@@ -54134,7 +53230,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_t_13 > 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1645
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1645
* e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
@@ -54151,7 +53247,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1647
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1647
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -54162,7 +53258,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L74:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1648
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1648
* else:
* pair_count = 0
* for phrase2,eindexes in phrase_list: # <<<<<<<<<<<<<<
@@ -54180,18 +53276,10 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
for (;;) {
if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_15)) {
if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_15)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_15)) {
if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++;
- #else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_1 = __pyx_t_16(__pyx_t_15);
if (unlikely(!__pyx_t_1)) {
@@ -54205,33 +53293,27 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_14 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_14 = PyList_GET_ITEM(sequence, 0);
__pyx_t_2 = PyList_GET_ITEM(sequence, 1);
}
__Pyx_INCREF(__pyx_t_14);
__Pyx_INCREF(__pyx_t_2);
- #else
- __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else
- {
+ } else {
Py_ssize_t index = -1;
__pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
@@ -54242,13 +53324,12 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
index = 1; __pyx_t_2 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L77_unpacking_failed;
__Pyx_GOTREF(__pyx_t_2);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_17 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L78_unpacking_done;
__pyx_L77_unpacking_failed:;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_17 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[8]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L78_unpacking_done:;
}
@@ -54259,7 +53340,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_eindexes = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1649
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1649
* pair_count = 0
* for phrase2,eindexes in phrase_list:
* als2 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<<
@@ -54275,7 +53356,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_als2 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1650
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1650
* 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))) # <<<<<<<<<<<<<<
@@ -54319,7 +53400,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L64:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1652
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1652
* extracts.append((fphr, phrase2, pair_count, tuple(als2)))
*
* if (f_back_high == f_high and # <<<<<<<<<<<<<<
@@ -54329,7 +53410,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_f_back_high == __pyx_v_f_high);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1653
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1653
*
* if (f_back_high == f_high and
* f_sent_len - f_high >= self.train_min_gap_size and # <<<<<<<<<<<<<<
@@ -54339,7 +53420,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__pyx_v_f_sent_len - __pyx_v_f_high) >= __pyx_v_self->train_min_gap_size);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1654
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1654
* 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))): # <<<<<<<<<<<<<<
@@ -54369,7 +53450,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1655
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1655
* 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 # <<<<<<<<<<<<<<
@@ -54378,7 +53459,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_x_high = (__pyx_v_f_high + __pyx_v_self->train_min_gap_size);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1656
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1656
* ((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 # <<<<<<<<<<<<<<
@@ -54387,7 +53468,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_met_constraints = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1657
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1657
* f_x_high = f_high+self.train_min_gap_size
* met_constraints = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -54396,7 +53477,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_self->tight_phrases) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1658
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1658
* met_constraints = 1
* if self.tight_phrases:
* while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: # <<<<<<<<<<<<<<
@@ -54413,7 +53494,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (!__pyx_t_18) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1659
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1659
* 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 # <<<<<<<<<<<<<<
@@ -54426,7 +53507,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L80:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1660
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1660
* 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: # <<<<<<<<<<<<<<
@@ -54442,7 +53523,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1661
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1661
* 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 # <<<<<<<<<<<<<<
@@ -54454,7 +53535,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L83:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1663
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1663
* met_constraints = 0
*
* if (met_constraints and # <<<<<<<<<<<<<<
@@ -54463,7 +53544,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_met_constraints) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1664
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1664
*
* if (met_constraints and
* self.find_fixpoint(f_back_low, f_x_high, # <<<<<<<<<<<<<<
@@ -54473,7 +53554,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_15 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1668
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1668
* 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, # <<<<<<<<<<<<<<
@@ -54483,7 +53564,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_back_low, __pyx_t_15, __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)) {
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1670
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1670
* 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 # <<<<<<<<<<<<<<
@@ -54499,7 +53580,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1671
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1671
* 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, # <<<<<<<<<<<<<<
@@ -54509,7 +53590,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_14 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1676
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1676
* 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, # <<<<<<<<<<<<<<
@@ -54532,7 +53613,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1678
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1678
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear() # <<<<<<<<<<<<<<
@@ -54541,7 +53622,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1679
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1679
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
* i = 1 # <<<<<<<<<<<<<<
@@ -54550,7 +53631,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1680
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1680
* fphr_arr._clear()
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
@@ -54564,7 +53645,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1681
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1681
* i = 1
* self.findexes.reset()
* if f_back_low < f_low: # <<<<<<<<<<<<<<
@@ -54574,7 +53655,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_f_back_low < __pyx_v_f_low);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1682
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1682
* self.findexes.reset()
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54583,7 +53664,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1683
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1683
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -54592,7 +53673,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = (__pyx_v_i + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1684
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1684
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54609,7 +53690,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L85:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1685
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1685
* i = i+1
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
@@ -54629,7 +53710,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1686
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1686
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -54639,7 +53720,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_3 = __pyx_v_phrase->n;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1687
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1687
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
@@ -54649,7 +53730,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_4 = __pyx_f_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j]));
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1688
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1688
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54658,7 +53739,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1689
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1689
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -54670,7 +53751,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1691
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1691
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
@@ -54682,7 +53763,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L88:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1692
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1692
* else:
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54691,7 +53772,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1693
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1693
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54705,7 +53786,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1694
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1694
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
@@ -54724,7 +53805,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_fphr = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1697
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1697
* 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) # <<<<<<<<<<<<<<
@@ -54737,7 +53818,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_phrase_list = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1698
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1698
* 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: # <<<<<<<<<<<<<<
@@ -54748,7 +53829,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_t_13 > 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1699
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1699
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
@@ -54765,7 +53846,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1701
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1701
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -54776,7 +53857,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L89:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1702
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1702
* else:
* pair_count = 0
* for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<<
@@ -54794,18 +53875,10 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
for (;;) {
if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_14 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_14); __pyx_t_13++;
- #else
- __pyx_t_14 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_14); __pyx_t_13++;
- #else
- __pyx_t_14 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_14 = __pyx_t_16(__pyx_t_1);
if (unlikely(!__pyx_t_14)) {
@@ -54819,33 +53892,27 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) {
PyObject* sequence = __pyx_t_14;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_15 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_15 = PyList_GET_ITEM(sequence, 0);
__pyx_t_2 = PyList_GET_ITEM(sequence, 1);
}
__Pyx_INCREF(__pyx_t_15);
__Pyx_INCREF(__pyx_t_2);
- #else
- __pyx_t_15 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- } else
- {
+ } else {
Py_ssize_t index = -1;
__pyx_t_10 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
@@ -54856,13 +53923,12 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
index = 1; __pyx_t_2 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L92_unpacking_failed;
__Pyx_GOTREF(__pyx_t_2);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_17 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L93_unpacking_done;
__pyx_L92_unpacking_failed:;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_17 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L93_unpacking_done:;
}
@@ -54873,7 +53939,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_eindexes = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1703
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1703
* pair_count = 0
* for phrase2, eindexes in phrase_list:
* als3 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<<
@@ -54889,7 +53955,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_als3 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1704
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1704
* 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))) # <<<<<<<<<<<<<<
@@ -54933,7 +53999,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L79:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1705
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1705
* 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 # <<<<<<<<<<<<<<
@@ -54943,7 +54009,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_num_gaps < (__pyx_v_self->max_nonterminals - 1));
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1706
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1706
* extracts.append((fphr, phrase2, pair_count, tuple(als3)))
* if (num_gaps < self.max_nonterminals - 1 and
* phrase_len+1 < self.max_length and # <<<<<<<<<<<<<<
@@ -54953,7 +54019,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__pyx_v_phrase_len + 1) < __pyx_v_self->max_length);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1707
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1707
* if (num_gaps < self.max_nonterminals - 1 and
* phrase_len+1 < self.max_length and
* f_back_high == f_high and # <<<<<<<<<<<<<<
@@ -54963,7 +54029,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_18 = (__pyx_v_f_back_high == __pyx_v_f_high);
if (__pyx_t_18) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1708
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1708
* phrase_len+1 < self.max_length and
* f_back_high == f_high and
* f_back_low == f_low and # <<<<<<<<<<<<<<
@@ -54973,7 +54039,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_8 = (__pyx_v_f_back_low == __pyx_v_f_low);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1709
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1709
* 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 # <<<<<<<<<<<<<<
@@ -54983,7 +54049,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__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);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1710
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1710
* 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 # <<<<<<<<<<<<<<
@@ -54993,7 +54059,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_20 = (__pyx_v_f_low >= __pyx_v_self->train_min_gap_size);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1711
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1711
* 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 # <<<<<<<<<<<<<<
@@ -55003,7 +54069,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_21 = (__pyx_v_f_high <= (__pyx_v_f_sent_len - __pyx_v_self->train_min_gap_size));
if (__pyx_t_21) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1712
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1712
* 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))): # <<<<<<<<<<<<<<
@@ -55053,7 +54119,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1714
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1714
* ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_high] != -1))):
*
* met_constraints = 1 # <<<<<<<<<<<<<<
@@ -55062,7 +54128,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_met_constraints = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1715
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1715
*
* met_constraints = 1
* f_x_low = f_low-self.train_min_gap_size # <<<<<<<<<<<<<<
@@ -55071,7 +54137,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_x_low = (__pyx_v_f_low - __pyx_v_self->train_min_gap_size);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1716
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1716
* met_constraints = 1
* f_x_low = f_low-self.train_min_gap_size
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -55080,7 +54146,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_self->tight_phrases) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1717
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1717
* 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: # <<<<<<<<<<<<<<
@@ -55097,7 +54163,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (!__pyx_t_18) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1718
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1718
* if self.tight_phrases:
* while f_x_low >= 0 and f_links_low[f_x_low] == -1:
* f_x_low = f_x_low - 1 # <<<<<<<<<<<<<<
@@ -55110,7 +54176,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L95:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1719
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1719
* 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: # <<<<<<<<<<<<<<
@@ -55120,7 +54186,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_18 = (__pyx_v_f_x_low < 0);
if (__pyx_t_18) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1720
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1720
* f_x_low = f_x_low - 1
* if f_x_low < 0:
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -55132,7 +54198,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L98:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1722
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1722
* met_constraints = 0
*
* f_x_high = f_high+self.train_min_gap_size # <<<<<<<<<<<<<<
@@ -55141,7 +54207,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_f_x_high = (__pyx_v_f_high + __pyx_v_self->train_min_gap_size);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1723
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1723
*
* f_x_high = f_high+self.train_min_gap_size
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -55150,7 +54216,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_self->tight_phrases) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1724
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1724
* 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: # <<<<<<<<<<<<<<
@@ -55167,7 +54233,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (!__pyx_t_9) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1725
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1725
* 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 # <<<<<<<<<<<<<<
@@ -55180,7 +54246,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L99:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1726
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1726
* 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: # <<<<<<<<<<<<<<
@@ -55196,7 +54262,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1727
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1727
* 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 # <<<<<<<<<<<<<<
@@ -55208,7 +54274,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L102:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1729
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1729
* met_constraints = 0
*
* if (met_constraints and # <<<<<<<<<<<<<<
@@ -55217,7 +54283,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if (__pyx_v_met_constraints) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1730
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1730
*
* if (met_constraints and
* self.find_fixpoint(f_x_low, f_x_high, # <<<<<<<<<<<<<<
@@ -55227,7 +54293,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_1 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1734
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1734
* 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, # <<<<<<<<<<<<<<
@@ -55237,7 +54303,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_x_low, __pyx_t_1, __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, 2, 1, 1, 1, 1)) {
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1736
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1736
* self.train_max_initial_size, self.train_max_initial_size,
* 1, 1, 2, 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 # <<<<<<<<<<<<<<
@@ -55259,7 +54325,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1737
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1737
* 1, 1, 2, 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, # <<<<<<<<<<<<<<
@@ -55269,7 +54335,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_15 = PyInt_FromLong(__pyx_v_f_low); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1741
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1741
* -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, # <<<<<<<<<<<<<<
@@ -55280,7 +54346,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1743
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1743
* 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, # <<<<<<<<<<<<<<
@@ -55290,7 +54356,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_15 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1748
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1748
* 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, # <<<<<<<<<<<<<<
@@ -55318,7 +54384,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1750
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1750
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear() # <<<<<<<<<<<<<<
@@ -55327,7 +54393,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1751
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1751
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
* i = 1 # <<<<<<<<<<<<<<
@@ -55336,7 +54402,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1752
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1752
* fphr_arr._clear()
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
@@ -55350,7 +54416,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1753
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1753
* i = 1
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -55364,7 +54430,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1754
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1754
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -55373,7 +54439,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1755
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1755
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -55382,7 +54448,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = (__pyx_v_i + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1756
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1756
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
@@ -55402,7 +54468,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1757
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1757
* i = i+1
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -55412,7 +54478,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_3 = __pyx_v_phrase->n;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1758
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1758
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
@@ -55422,7 +54488,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_4 = __pyx_f_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j]));
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1759
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1759
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -55431,7 +54497,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1760
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1760
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -55443,7 +54509,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1762
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1762
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
@@ -55455,7 +54521,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L106:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1763
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1763
* else:
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -55464,7 +54530,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1764
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1764
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -55478,7 +54544,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1765
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1765
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
@@ -55497,7 +54563,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_fphr = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_14);
__pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1768
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1768
* 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) # <<<<<<<<<<<<<<
@@ -55510,7 +54576,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_phrase_list = __pyx_t_14;
__pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1769
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1769
* 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: # <<<<<<<<<<<<<<
@@ -55521,7 +54587,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_8 = (__pyx_t_13 > 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1770
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1770
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
@@ -55538,7 +54604,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1772
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1772
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -55549,7 +54615,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L107:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1773
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1773
* else:
* pair_count = 0
* for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<<
@@ -55567,18 +54633,10 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
for (;;) {
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++;
- #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 = 1773; __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++;
- #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 = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #endif
} else {
__pyx_t_15 = __pyx_t_16(__pyx_t_14);
if (unlikely(!__pyx_t_15)) {
@@ -55592,33 +54650,27 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if ((likely(PyTuple_CheckExact(__pyx_t_15))) || (PyList_CheckExact(__pyx_t_15))) {
PyObject* sequence = __pyx_t_15;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
+ if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
+ if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
} else {
+ if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
+ if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
+ else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_1 = PyList_GET_ITEM(sequence, 0);
__pyx_t_2 = PyList_GET_ITEM(sequence, 1);
}
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_2);
- #else
- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- } else
- {
+ } else {
Py_ssize_t index = -1;
__pyx_t_10 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
@@ -55629,13 +54681,12 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
index = 1; __pyx_t_2 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L110_unpacking_failed;
__Pyx_GOTREF(__pyx_t_2);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_17 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L111_unpacking_done;
__pyx_L110_unpacking_failed:;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_17 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
+ if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L111_unpacking_done:;
}
@@ -55646,7 +54697,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_eindexes = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1774
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1774
* pair_count = 0
* for phrase2, eindexes in phrase_list:
* als4 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<<
@@ -55662,7 +54713,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_als4 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1775
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1775
* 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))) # <<<<<<<<<<<<<<
@@ -55715,23 +54766,23 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1777
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1777
* extracts.append((fphr, phrase2, pair_count, tuple(als4)))
* else:
* reason_for_failure = "Unable to extract basic phrase" # <<<<<<<<<<<<<<
*
* free(sent_links)
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_135));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_134));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_135);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_134);
}
__pyx_L34:;
goto __pyx_L33;
}
__pyx_L33:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1779
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1779
* reason_for_failure = "Unable to extract basic phrase"
*
* free(sent_links) # <<<<<<<<<<<<<<
@@ -55740,7 +54791,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
free(__pyx_v_sent_links);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1780
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1780
*
* free(sent_links)
* free(f_links_low) # <<<<<<<<<<<<<<
@@ -55749,7 +54800,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
free(__pyx_v_f_links_low);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1781
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1781
* free(sent_links)
* free(f_links_low)
* free(f_links_high) # <<<<<<<<<<<<<<
@@ -55758,7 +54809,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
free(__pyx_v_f_links_high);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1782
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1782
* free(f_links_low)
* free(f_links_high)
* free(e_links_low) # <<<<<<<<<<<<<<
@@ -55767,7 +54818,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
free(__pyx_v_e_links_low);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1783
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1783
* free(f_links_high)
* free(e_links_low)
* free(e_links_high) # <<<<<<<<<<<<<<
@@ -55776,7 +54827,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
free(__pyx_v_e_links_high);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1784
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1784
* free(e_links_low)
* free(e_links_high)
* free(f_gap_low) # <<<<<<<<<<<<<<
@@ -55785,7 +54836,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
free(__pyx_v_f_gap_low);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1785
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1785
* free(e_links_high)
* free(f_gap_low)
* free(f_gap_high) # <<<<<<<<<<<<<<
@@ -55794,7 +54845,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
free(__pyx_v_f_gap_high);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1786
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1786
* free(f_gap_low)
* free(f_gap_high)
* free(e_gap_low) # <<<<<<<<<<<<<<
@@ -55803,7 +54854,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
free(__pyx_v_e_gap_low);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1787
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1787
* free(f_gap_high)
* free(e_gap_low)
* free(e_gap_high) # <<<<<<<<<<<<<<
@@ -55812,7 +54863,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
free(__pyx_v_e_gap_high);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1789
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1789
* free(e_gap_high)
*
* return extracts # <<<<<<<<<<<<<<
@@ -56269,7 +55320,7 @@ static PyTypeObject __pyx_type_3_sa_IntList = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa_FeatureVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa_FeatureVector(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa_FeatureVector *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -56505,7 +55556,7 @@ static PyObject *__pyx_sq_item_3_sa_Phrase(PyObject *o, Py_ssize_t i) {
return r;
}
-static PyObject *__pyx_getprop_3_sa_6Phrase_words(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_6Phrase_words(PyObject *o, void *x) {
return __pyx_pw_3_sa_6Phrase_5words_1__get__(o);
}
@@ -56740,11 +55791,11 @@ static int __pyx_tp_clear_3_sa_Rule(PyObject *o) {
return 0;
}
-static PyObject *__pyx_getprop_3_sa_4Rule_f(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_4Rule_f(PyObject *o, void *x) {
return __pyx_pw_3_sa_4Rule_1f_1__get__(o);
}
-static PyObject *__pyx_getprop_3_sa_4Rule_e(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_4Rule_e(PyObject *o, void *x) {
return __pyx_pw_3_sa_4Rule_1e_1__get__(o);
}
@@ -56916,7 +55967,7 @@ static PyTypeObject __pyx_type_3_sa_Rule = {
};
static struct __pyx_vtabstruct_3_sa_StringMap __pyx_vtable_3_sa_StringMap;
-static PyObject *__pyx_tp_new_3_sa_StringMap(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa_StringMap(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa_StringMap *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -57812,7 +56863,7 @@ static PyTypeObject __pyx_type_3_sa_BiLex = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa_BitSetIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa_BitSetIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
return o;
@@ -57981,7 +57032,7 @@ static PyTypeObject __pyx_type_3_sa_BitSetIterator = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa_BitSet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa_BitSet(PyTypeObject *t, PyObject *a, PyObject *k) {
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
if (__pyx_pw_3_sa_6BitSet_1__cinit__(o, __pyx_empty_tuple, NULL) < 0) {
@@ -58165,7 +57216,7 @@ static PyTypeObject __pyx_type_3_sa_BitSet = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa_VEBIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa_VEBIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
return o;
@@ -58724,7 +57775,7 @@ static PyTypeObject __pyx_type_3_sa_LCP = {
};
static struct __pyx_vtabstruct_3_sa_Alphabet __pyx_vtable_3_sa_Alphabet;
-static PyObject *__pyx_tp_new_3_sa_Alphabet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa_Alphabet(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa_Alphabet *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -58786,11 +57837,11 @@ static int __pyx_tp_clear_3_sa_Alphabet(PyObject *o) {
return 0;
}
-static PyObject *__pyx_getprop_3_sa_8Alphabet_terminals(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_8Alphabet_terminals(PyObject *o, void *x) {
return __pyx_pw_3_sa_8Alphabet_9terminals_1__get__(o);
}
-static PyObject *__pyx_getprop_3_sa_8Alphabet_nonterminals(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_8Alphabet_nonterminals(PyObject *o, void *x) {
return __pyx_pw_3_sa_8Alphabet_12nonterminals_1__get__(o);
}
@@ -59582,7 +58633,7 @@ static PyTypeObject __pyx_type_3_sa_SuffixArray = {
};
static struct __pyx_vtabstruct_3_sa_Scorer __pyx_vtable_3_sa_Scorer;
-static PyObject *__pyx_tp_new_3_sa_Scorer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa_Scorer(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa_Scorer *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -59773,212 +58824,8 @@ static PyTypeObject __pyx_type_3_sa_Scorer = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_DefaultScorer __pyx_vtable_3_sa_DefaultScorer;
-
-static PyObject *__pyx_tp_new_3_sa_DefaultScorer(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_DefaultScorer *p;
- PyObject *o = __pyx_tp_new_3_sa_Scorer(t, a, k);
- if (!o) return 0;
- p = ((struct __pyx_obj_3_sa_DefaultScorer *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_3_sa_Scorer*)__pyx_vtabptr_3_sa_DefaultScorer;
- p->ttable = ((struct __pyx_obj_3_sa_BiLex *)Py_None); Py_INCREF(Py_None);
- return o;
-}
-
-static void __pyx_tp_dealloc_3_sa_DefaultScorer(PyObject *o) {
- struct __pyx_obj_3_sa_DefaultScorer *p = (struct __pyx_obj_3_sa_DefaultScorer *)o;
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_3_sa_13DefaultScorer_1__dealloc__(o);
- if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
- Py_XDECREF(((PyObject *)p->ttable));
- __pyx_tp_dealloc_3_sa_Scorer(o);
-}
-
-static int __pyx_tp_traverse_3_sa_DefaultScorer(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_3_sa_DefaultScorer *p = (struct __pyx_obj_3_sa_DefaultScorer *)o;
- e = __pyx_tp_traverse_3_sa_Scorer(o, v, a); if (e) return e;
- if (p->ttable) {
- e = (*v)(((PyObject*)p->ttable), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_3_sa_DefaultScorer(PyObject *o) {
- struct __pyx_obj_3_sa_DefaultScorer *p = (struct __pyx_obj_3_sa_DefaultScorer *)o;
- PyObject* tmp;
- __pyx_tp_clear_3_sa_Scorer(o);
- tmp = ((PyObject*)p->ttable);
- p->ttable = ((struct __pyx_obj_3_sa_BiLex *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- return 0;
-}
-
-static PyMethodDef __pyx_methods_3_sa_DefaultScorer[] = {
- {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number_DefaultScorer = {
- 0, /*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
- 0, /*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_DefaultScorer = {
- 0, /*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_DefaultScorer = {
- 0, /*mp_length*/
- 0, /*mp_subscript*/
- 0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_DefaultScorer = {
- #if PY_MAJOR_VERSION < 3
- 0, /*bf_getreadbuffer*/
- #endif
- #if PY_MAJOR_VERSION < 3
- 0, /*bf_getwritebuffer*/
- #endif
- #if PY_MAJOR_VERSION < 3
- 0, /*bf_getsegcount*/
- #endif
- #if PY_MAJOR_VERSION < 3
- 0, /*bf_getcharbuffer*/
- #endif
- #if PY_VERSION_HEX >= 0x02060000
- 0, /*bf_getbuffer*/
- #endif
- #if PY_VERSION_HEX >= 0x02060000
- 0, /*bf_releasebuffer*/
- #endif
-};
-
-static PyTypeObject __pyx_type_3_sa_DefaultScorer = {
- PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.DefaultScorer"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_DefaultScorer), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_DefaultScorer, /*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_DefaultScorer, /*tp_as_number*/
- &__pyx_tp_as_sequence_DefaultScorer, /*tp_as_sequence*/
- &__pyx_tp_as_mapping_DefaultScorer, /*tp_as_mapping*/
- 0, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- &__pyx_tp_as_buffer_DefaultScorer, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_DefaultScorer, /*tp_traverse*/
- __pyx_tp_clear_3_sa_DefaultScorer, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_3_sa_DefaultScorer, /*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_3_sa_13DefaultScorer_3__init__, /*tp_init*/
- 0, /*tp_alloc*/
- __pyx_tp_new_3_sa_DefaultScorer, /*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_3_sa_TrieNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa_TrieNode(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa_TrieNode *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -60014,11 +58861,11 @@ static int __pyx_tp_clear_3_sa_TrieNode(PyObject *o) {
return 0;
}
-static PyObject *__pyx_getprop_3_sa_8TrieNode_children(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_8TrieNode_children(PyObject *o, void *x) {
return __pyx_pw_3_sa_8TrieNode_8children_1__get__(o);
}
-static int __pyx_setprop_3_sa_8TrieNode_children(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_3_sa_8TrieNode_children(PyObject *o, PyObject *v, void *x) {
if (v) {
return __pyx_pw_3_sa_8TrieNode_8children_3__set__(o, v);
}
@@ -60244,11 +59091,11 @@ static int __pyx_tp_clear_3_sa_ExtendedTrieNode(PyObject *o) {
return 0;
}
-static PyObject *__pyx_getprop_3_sa_16ExtendedTrieNode_phrase(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_16ExtendedTrieNode_phrase(PyObject *o, void *x) {
return __pyx_pw_3_sa_16ExtendedTrieNode_6phrase_1__get__(o);
}
-static int __pyx_setprop_3_sa_16ExtendedTrieNode_phrase(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_3_sa_16ExtendedTrieNode_phrase(PyObject *o, PyObject *v, void *x) {
if (v) {
return __pyx_pw_3_sa_16ExtendedTrieNode_6phrase_3__set__(o, v);
}
@@ -60257,11 +59104,11 @@ static int __pyx_setprop_3_sa_16ExtendedTrieNode_phrase(PyObject *o, PyObject *v
}
}
-static PyObject *__pyx_getprop_3_sa_16ExtendedTrieNode_phrase_location(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_16ExtendedTrieNode_phrase_location(PyObject *o, void *x) {
return __pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_1__get__(o);
}
-static int __pyx_setprop_3_sa_16ExtendedTrieNode_phrase_location(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_3_sa_16ExtendedTrieNode_phrase_location(PyObject *o, PyObject *v, void *x) {
if (v) {
return __pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_3__set__(o, v);
}
@@ -60270,11 +59117,11 @@ static int __pyx_setprop_3_sa_16ExtendedTrieNode_phrase_location(PyObject *o, Py
}
}
-static PyObject *__pyx_getprop_3_sa_16ExtendedTrieNode_suffix_link(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_16ExtendedTrieNode_suffix_link(PyObject *o, void *x) {
return __pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_1__get__(o);
}
-static int __pyx_setprop_3_sa_16ExtendedTrieNode_suffix_link(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_3_sa_16ExtendedTrieNode_suffix_link(PyObject *o, PyObject *v, void *x) {
if (v) {
return __pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_3__set__(o, v);
}
@@ -60484,11 +59331,11 @@ static int __pyx_tp_clear_3_sa_TrieTable(PyObject *o) {
return 0;
}
-static PyObject *__pyx_getprop_3_sa_9TrieTable_extended(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_9TrieTable_extended(PyObject *o, void *x) {
return __pyx_pw_3_sa_9TrieTable_8extended_1__get__(o);
}
-static int __pyx_setprop_3_sa_9TrieTable_extended(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_3_sa_9TrieTable_extended(PyObject *o, PyObject *v, void *x) {
if (v) {
return __pyx_pw_3_sa_9TrieTable_8extended_3__set__(o, v);
}
@@ -60498,11 +59345,11 @@ static int __pyx_setprop_3_sa_9TrieTable_extended(PyObject *o, PyObject *v, CYTH
}
}
-static PyObject *__pyx_getprop_3_sa_9TrieTable_count(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_9TrieTable_count(PyObject *o, void *x) {
return __pyx_pw_3_sa_9TrieTable_5count_1__get__(o);
}
-static int __pyx_setprop_3_sa_9TrieTable_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_3_sa_9TrieTable_count(PyObject *o, PyObject *v, void *x) {
if (v) {
return __pyx_pw_3_sa_9TrieTable_5count_3__set__(o, v);
}
@@ -60512,11 +59359,11 @@ static int __pyx_setprop_3_sa_9TrieTable_count(PyObject *o, PyObject *v, CYTHON_
}
}
-static PyObject *__pyx_getprop_3_sa_9TrieTable_root(PyObject *o, CYTHON_UNUSED void *x) {
+static PyObject *__pyx_getprop_3_sa_9TrieTable_root(PyObject *o, void *x) {
return __pyx_pw_3_sa_9TrieTable_4root_1__get__(o);
}
-static int __pyx_setprop_3_sa_9TrieTable_root(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_3_sa_9TrieTable_root(PyObject *o, PyObject *v, void *x) {
if (v) {
return __pyx_pw_3_sa_9TrieTable_4root_3__set__(o, v);
}
@@ -61408,7 +60255,7 @@ static PyTypeObject __pyx_type_3_sa_HieroCachingRuleFactory = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -61599,7 +60446,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct____iter__ = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_1_read_bitext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_1_read_bitext(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -61790,7 +60637,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_1_read_bitext = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -61997,7 +60844,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_2_genexpr = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_3_compute_stats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_3_compute_stats(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -62228,7 +61075,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_3_compute_stats = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_4___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_4___iter__(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_4___iter__ *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -62419,7 +61266,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_4___iter__ = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_5___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_5___str__(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_5___str__ *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -62610,7 +61457,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_5___str__ = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -62817,7 +61664,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_6_genexpr = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_7_alignments(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_7_alignments(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_7_alignments *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -63024,7 +61871,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_7_alignments = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_8___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_8___iter__(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_8___iter__ *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -63215,7 +62062,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_8___iter__ = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_9___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_9___str__(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_9___str__ *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -63406,7 +62253,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_9___str__ = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_10_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_10_genexpr(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -63613,7 +62460,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_10_genexpr = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_11_input(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_11_input(PyTypeObject *t, PyObject *a, PyObject *k) {
struct __pyx_obj_3_sa___pyx_scope_struct_11_input *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
@@ -63661,9 +62508,9 @@ static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_11_input(PyTypeObject *t,
p->__pyx_v_xcat_index = 0;
p->__pyx_v_xnode = 0;
p->__pyx_v_xroot = 0;
- p->__pyx_t_1 = 0;
+ p->__pyx_t_2 = 0;
+ p->__pyx_t_3 = 0;
p->__pyx_t_4 = 0;
- p->__pyx_t_5 = 0;
return o;
}
@@ -63712,9 +62559,9 @@ static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_11_input(PyObject *o) {
Py_XDECREF(p->__pyx_v_xcat_index);
Py_XDECREF(p->__pyx_v_xnode);
Py_XDECREF(p->__pyx_v_xroot);
- Py_XDECREF(p->__pyx_t_1);
+ Py_XDECREF(p->__pyx_t_2);
+ Py_XDECREF(p->__pyx_t_3);
Py_XDECREF(p->__pyx_t_4);
- Py_XDECREF(p->__pyx_t_5);
(*Py_TYPE(o)->tp_free)(o);
}
@@ -63850,15 +62697,15 @@ static int __pyx_tp_traverse_3_sa___pyx_scope_struct_11_input(PyObject *o, visit
if (p->__pyx_v_xroot) {
e = (*v)(p->__pyx_v_xroot, 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_2) {
+ e = (*v)(p->__pyx_t_2, a); if (e) return e;
+ }
+ if (p->__pyx_t_3) {
+ e = (*v)(p->__pyx_t_3, a); if (e) return e;
}
if (p->__pyx_t_4) {
e = (*v)(p->__pyx_t_4, a); if (e) return e;
}
- if (p->__pyx_t_5) {
- e = (*v)(p->__pyx_t_5, a); if (e) return e;
- }
return 0;
}
@@ -63994,15 +62841,15 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_11_input(PyObject *o) {
tmp = ((PyObject*)p->__pyx_v_xroot);
p->__pyx_v_xroot = 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_t_2);
+ p->__pyx_t_2 = 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);
tmp = ((PyObject*)p->__pyx_t_4);
p->__pyx_t_4 = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_5);
- p->__pyx_t_5 = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
return 0;
}
@@ -64184,11 +63031,12 @@ static struct PyModuleDef __pyx_moduledef = {
static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
+ {&__pyx_kp_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 0},
{&__pyx_kp_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 0},
- {&__pyx_kp_s_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 1, 0},
+ {&__pyx_n_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 1},
{&__pyx_n_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 1},
- {&__pyx_n_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 1},
- {&__pyx_kp_s_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 0, 1, 0},
+ {&__pyx_kp_s_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 1, 0},
+ {&__pyx_kp_s_109, __pyx_k_109, sizeof(__pyx_k_109), 0, 0, 1, 0},
{&__pyx_kp_s_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 1, 0},
{&__pyx_kp_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 0},
{&__pyx_kp_s_112, __pyx_k_112, sizeof(__pyx_k_112), 0, 0, 1, 0},
@@ -64199,11 +63047,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 0, 1, 0},
{&__pyx_kp_s_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 0, 1, 0},
{&__pyx_kp_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 0},
- {&__pyx_kp_s_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 1, 0},
- {&__pyx_n_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 1},
+ {&__pyx_n_s_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 1, 1},
+ {&__pyx_kp_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 0},
{&__pyx_kp_s_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 0, 1, 0},
- {&__pyx_kp_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 0},
- {&__pyx_n_s_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 1, 1},
+ {&__pyx_n_s_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 0, 1, 1},
+ {&__pyx_kp_s_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 1, 0},
{&__pyx_kp_s_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 0, 1, 0},
{&__pyx_kp_s_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 0, 1, 0},
{&__pyx_kp_s_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 1, 0},
@@ -64214,12 +63062,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_132, __pyx_k_132, sizeof(__pyx_k_132), 0, 0, 1, 0},
{&__pyx_kp_s_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 1, 0},
{&__pyx_kp_s_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 1, 0},
- {&__pyx_kp_s_135, __pyx_k_135, sizeof(__pyx_k_135), 0, 0, 1, 0},
+ {&__pyx_kp_s_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 1, 0},
{&__pyx_kp_s_138, __pyx_k_138, sizeof(__pyx_k_138), 0, 0, 1, 0},
- {&__pyx_kp_s_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 1, 0},
{&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
+ {&__pyx_kp_s_142, __pyx_k_142, sizeof(__pyx_k_142), 0, 0, 1, 0},
{&__pyx_kp_s_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 0, 1, 0},
- {&__pyx_kp_s_144, __pyx_k_144, sizeof(__pyx_k_144), 0, 0, 1, 0},
{&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
{&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
{&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
@@ -64272,25 +63119,15 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 0, 1, 0},
{&__pyx_kp_s__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 1, 0},
{&__pyx_kp_s__1, __pyx_k__1, sizeof(__pyx_k__1), 0, 0, 1, 0},
- {&__pyx_n_s__CountEF, __pyx_k__CountEF, sizeof(__pyx_k__CountEF), 0, 0, 1, 1},
- {&__pyx_n_s__Counter, __pyx_k__Counter, sizeof(__pyx_k__Counter), 0, 0, 1, 1},
{&__pyx_n_s__END_OF_FILE, __pyx_k__END_OF_FILE, sizeof(__pyx_k__END_OF_FILE), 0, 0, 1, 1},
{&__pyx_n_s__END_OF_LINE, __pyx_k__END_OF_LINE, sizeof(__pyx_k__END_OF_LINE), 0, 0, 1, 1},
- {&__pyx_n_s__EgivenFCoherent, __pyx_k__EgivenFCoherent, sizeof(__pyx_k__EgivenFCoherent), 0, 0, 1, 1},
{&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1},
{&__pyx_n_s__GzipFile, __pyx_k__GzipFile, sizeof(__pyx_k__GzipFile), 0, 0, 1, 1},
{&__pyx_n_s__INCREMENT, __pyx_k__INCREMENT, sizeof(__pyx_k__INCREMENT), 0, 0, 1, 1},
{&__pyx_n_s__INITIAL_CAPACITY, __pyx_k__INITIAL_CAPACITY, sizeof(__pyx_k__INITIAL_CAPACITY), 0, 0, 1, 1},
{&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
- {&__pyx_n_s__IsSingletonF, __pyx_k__IsSingletonF, sizeof(__pyx_k__IsSingletonF), 0, 0, 1, 1},
- {&__pyx_n_s__IsSingletonFE, __pyx_k__IsSingletonFE, sizeof(__pyx_k__IsSingletonFE), 0, 0, 1, 1},
- {&__pyx_n_s__MAXSCORE, __pyx_k__MAXSCORE, sizeof(__pyx_k__MAXSCORE), 0, 0, 1, 1},
- {&__pyx_n_s__MaxLexEgivenF, __pyx_k__MaxLexEgivenF, sizeof(__pyx_k__MaxLexEgivenF), 0, 0, 1, 1},
- {&__pyx_n_s__MaxLexFgivenE, __pyx_k__MaxLexFgivenE, sizeof(__pyx_k__MaxLexFgivenE), 0, 0, 1, 1},
- {&__pyx_n_s__NFEATURES, __pyx_k__NFEATURES, sizeof(__pyx_k__NFEATURES), 0, 0, 1, 1},
{&__pyx_n_s__NULL, __pyx_k__NULL, sizeof(__pyx_k__NULL), 0, 0, 1, 1},
{&__pyx_n_s__RUSAGE_SELF, __pyx_k__RUSAGE_SELF, sizeof(__pyx_k__RUSAGE_SELF), 0, 0, 1, 1},
- {&__pyx_n_s__SampleCountF, __pyx_k__SampleCountF, sizeof(__pyx_k__SampleCountF), 0, 0, 1, 1},
{&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
{&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
{&__pyx_n_s____enter__, __pyx_k____enter__, sizeof(__pyx_k____enter__), 0, 0, 1, 1},
@@ -64347,7 +63184,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s__get_f_id, __pyx_k__get_f_id, sizeof(__pyx_k__get_f_id), 0, 0, 1, 1},
{&__pyx_n_s__get_id, __pyx_k__get_id, sizeof(__pyx_k__get_id), 0, 0, 1, 1},
{&__pyx_n_s__get_next_states, __pyx_k__get_next_states, sizeof(__pyx_k__get_next_states), 0, 0, 1, 1},
- {&__pyx_n_s__get_score, __pyx_k__get_score, sizeof(__pyx_k__get_score), 0, 0, 1, 1},
{&__pyx_n_s__get_word, __pyx_k__get_word, sizeof(__pyx_k__get_word), 0, 0, 1, 1},
{&__pyx_n_s__getchunk, __pyx_k__getchunk, sizeof(__pyx_k__getchunk), 0, 0, 1, 1},
{&__pyx_n_s__getrusage, __pyx_k__getrusage, sizeof(__pyx_k__getrusage), 0, 0, 1, 1},
@@ -64440,7 +63276,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s__tight_phrases, __pyx_k__tight_phrases, sizeof(__pyx_k__tight_phrases), 0, 0, 1, 1},
{&__pyx_n_s__toMap, __pyx_k__toMap, sizeof(__pyx_k__toMap), 0, 0, 1, 1},
{&__pyx_n_s__train_min_gap_size, __pyx_k__train_min_gap_size, sizeof(__pyx_k__train_min_gap_size), 0, 0, 1, 1},
- {&__pyx_n_s__ttable, __pyx_k__ttable, sizeof(__pyx_k__ttable), 0, 0, 1, 1},
{&__pyx_n_s__unlink, __pyx_k__unlink, sizeof(__pyx_k__unlink), 0, 0, 1, 1},
{&__pyx_n_s__use_baeza_yates, __pyx_k__use_baeza_yates, sizeof(__pyx_k__use_baeza_yates), 0, 0, 1, 1},
{&__pyx_n_s__use_collocations, __pyx_k__use_collocations, sizeof(__pyx_k__use_collocations), 0, 0, 1, 1},
@@ -64478,7 +63313,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":20
+ /* "/home/vchahune/tools/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -64495,7 +63330,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_int_1000);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":21
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":21
* self.id2word = ["END_OF_FILE", "END_OF_LINE"]
* self.data = IntList(1000,1000)
* self.sent_id = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -64512,7 +63347,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_int_1000);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":22
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":22
* self.data = IntList(1000,1000)
* self.sent_id = IntList(1000,1000)
* self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -64529,7 +63364,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_int_1000);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":65
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":65
* f.write("%s " % self.get_word(w_id))
* if w_id == 1:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64543,7 +63378,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":60
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":60
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -64563,7 +63398,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":68
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":68
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -64583,7 +63418,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":73
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":73
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
@@ -64597,7 +63432,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":72
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":72
*
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -64617,7 +63452,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":145
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":145
* for i in self.data:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64631,7 +63466,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":148
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":148
* for i in self.sent_index:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64645,7 +63480,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":151
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":151
* for i in self.sent_id:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64659,7 +63494,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":154
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":154
* for word in self.id2word:
* f.write("%s %d " % (word, self.word2id[word]))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64673,7 +63508,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":157
+ /* "/home/vchahune/tools/cdec/python/src/sa/data_array.pxi":157
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -64692,7 +63527,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":46
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":46
*
* def __cinit__(self, from_binary=None, from_text=None):
* self.links = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -64709,7 +63544,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_int_1000);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":47
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":47
* def __cinit__(self, from_binary=None, from_text=None):
* self.links = IntList(1000,1000)
* self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -64726,7 +63561,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_int_1000);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":59
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":59
* pairs = line.split()
* for pair in pairs:
* (i, j) = map(int, pair.split('-')) # <<<<<<<<<<<<<<
@@ -64740,7 +63575,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":54
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -64760,7 +63595,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":75
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":75
* for i, link in enumerate(self.links):
* while i >= self.sent_index[sent_num]:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64774,7 +63609,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":78
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":78
* sent_num = sent_num + 1
* f.write("%d-%d " % self.unlink(link))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64788,7 +63623,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":71
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":71
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -64808,7 +63643,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":92
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":92
* for link in self.links:
* f.write("%d " % link)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64822,7 +63657,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":95
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":95
* for i in self.sent_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64836,7 +63671,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":88
+ /* "/home/vchahune/tools/cdec/python/src/sa/alignment.pxi":88
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -64856,7 +63691,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_40));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":302
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":302
*
* # Re-read file, placing words into buckets
* f.seek(0) # <<<<<<<<<<<<<<
@@ -64870,7 +63705,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_int_0);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":278
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":278
*
* fcount = IntList()
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -64890,7 +63725,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":344
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":344
*
* if i > j:
* raise Exception("Sort error in CLex") # <<<<<<<<<<<<<<
@@ -64904,7 +63739,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_46));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":367
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":367
* for i in self.f_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64918,7 +63753,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":370
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":370
* for i, s1, s2 in zip(self.e_index, self.col1, self.col2):
* f.write("%d %f %f " % (i, s1, s2))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64932,7 +63767,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":373
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":373
* for i, w in enumerate(self.id2fword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64946,7 +63781,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":376
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":376
* for i, w in enumerate(self.id2eword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -64960,7 +63795,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":364
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":364
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -64980,7 +63815,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":409
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":409
* cdef i, N, e_id, f_id
*
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -65000,7 +63835,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":13
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":13
* cdef IntList rank
*
* logger.info("Constructing LCP array") # <<<<<<<<<<<<<<
@@ -65014,7 +63849,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":34
+ /* "/home/vchahune/tools/cdec/python/src/sa/lcp.pxi":34
* if h > 0:
* h = h-1
* logger.info("LCP array completed") # <<<<<<<<<<<<<<
@@ -65028,7 +63863,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_62));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":297
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":297
* pattern_rank = {}
*
* logger.info("Precomputing frequent intersections") # <<<<<<<<<<<<<<
@@ -65042,7 +63877,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_72));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":314
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":314
* queue = IntList(increment=1000)
*
* logger.info(" Computing inverted indexes...") # <<<<<<<<<<<<<<
@@ -65056,7 +63891,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_74));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":329
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":329
* trie_node_data_append(node, i)
*
* logger.info(" Computing collocations...") # <<<<<<<<<<<<<<
@@ -65070,7 +63905,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_76));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":393
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":393
* for pattern2 in J_set:
* if len(pattern1) + len(pattern2) + 1 < self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -65084,7 +63919,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_int_neg_1);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":400
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":400
* x = x+1
* if len(pattern1) + len(pattern2) + 1 <= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -65098,7 +63933,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_int_neg_1);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":407
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":407
* x = x+2
* if len(pattern1) + len(pattern2) + 1<= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -65112,7 +63947,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_int_neg_1);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":409
+ /* "/home/vchahune/tools/cdec/python/src/sa/precomputation.pxi":409
* combined_pattern = pattern1 + (-1,) + pattern2
* IJ_set.add(combined_pattern)
* combined_pattern = pattern2 + (-1,) + pattern1 # <<<<<<<<<<<<<<
@@ -65126,7 +63961,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_int_neg_1);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":103
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":103
*
* '''Step 3: read off suffix array from inverse suffix array'''
* logger.info(" Finalizing sort...") # <<<<<<<<<<<<<<
@@ -65140,7 +63975,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_92));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_93));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":202
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":202
* for a_i in self.sa:
* f.write("%d " % a_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -65154,7 +63989,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_96));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":205
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":205
* for w_i in self.ha:
* f.write("%d " % w_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -65168,7 +64003,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_97));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":198
+ /* "/home/vchahune/tools/cdec/python/src/sa/suffix_array.pxi":198
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -65188,79 +64023,47 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":60
- * self.fid = <int*> malloc(NFEATURES*sizeof(int))
- * cdef unsigned i
- * for i, fnames in enumerate(('EgivenFCoherent', 'SampleCountF', 'CountEF', # <<<<<<<<<<<<<<
- * 'MaxLexFgivenE', 'MaxLexEgivenF', 'IsSingletonF', 'IsSingletonFE')):
- * self.fid[i] = FD.index(fnames)
- */
- __pyx_k_tuple_100 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_100);
- __Pyx_INCREF(((PyObject *)__pyx_n_s__EgivenFCoherent));
- PyTuple_SET_ITEM(__pyx_k_tuple_100, 0, ((PyObject *)__pyx_n_s__EgivenFCoherent));
- __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EgivenFCoherent));
- __Pyx_INCREF(((PyObject *)__pyx_n_s__SampleCountF));
- PyTuple_SET_ITEM(__pyx_k_tuple_100, 1, ((PyObject *)__pyx_n_s__SampleCountF));
- __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SampleCountF));
- __Pyx_INCREF(((PyObject *)__pyx_n_s__CountEF));
- PyTuple_SET_ITEM(__pyx_k_tuple_100, 2, ((PyObject *)__pyx_n_s__CountEF));
- __Pyx_GIVEREF(((PyObject *)__pyx_n_s__CountEF));
- __Pyx_INCREF(((PyObject *)__pyx_n_s__MaxLexFgivenE));
- PyTuple_SET_ITEM(__pyx_k_tuple_100, 3, ((PyObject *)__pyx_n_s__MaxLexFgivenE));
- __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MaxLexFgivenE));
- __Pyx_INCREF(((PyObject *)__pyx_n_s__MaxLexEgivenF));
- PyTuple_SET_ITEM(__pyx_k_tuple_100, 4, ((PyObject *)__pyx_n_s__MaxLexEgivenF));
- __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MaxLexEgivenF));
- __Pyx_INCREF(((PyObject *)__pyx_n_s__IsSingletonF));
- PyTuple_SET_ITEM(__pyx_k_tuple_100, 5, ((PyObject *)__pyx_n_s__IsSingletonF));
- __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IsSingletonF));
- __Pyx_INCREF(((PyObject *)__pyx_n_s__IsSingletonFE));
- PyTuple_SET_ITEM(__pyx_k_tuple_100, 6, ((PyObject *)__pyx_n_s__IsSingletonFE));
- __Pyx_GIVEREF(((PyObject *)__pyx_n_s__IsSingletonFE));
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":93
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":93
* 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_k_tuple_104 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_104);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_103));
- PyTuple_SET_ITEM(__pyx_k_tuple_104, 0, ((PyObject *)__pyx_kp_s_103));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_103));
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104));
+ __pyx_k_tuple_103 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_103);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_102));
+ PyTuple_SET_ITEM(__pyx_k_tuple_103, 0, ((PyObject *)__pyx_kp_s_102));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_102));
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":302
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":302
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
* if alignment is None:
* raise Exception("Must specify an alignment object") # <<<<<<<<<<<<<<
* self.alignment = alignment
*
*/
- __pyx_k_tuple_109 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_109);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_108));
- PyTuple_SET_ITEM(__pyx_k_tuple_109, 0, ((PyObject *)__pyx_kp_s_108));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_108));
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
+ __pyx_k_tuple_108 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_108);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_107));
+ PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_kp_s_107));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_107));
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_108));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1008
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":1008
* else:
* #ERROR: We never get here
* raise Exception("Keyword trie error") # <<<<<<<<<<<<<<
* # checking whether lookup_required
* if lookup_required:
*/
- __pyx_k_tuple_124 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_124);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_123));
- PyTuple_SET_ITEM(__pyx_k_tuple_124, 0, ((PyObject *)__pyx_kp_s_123));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_123));
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));
+ __pyx_k_tuple_123 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_123)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_123);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_122));
+ PyTuple_SET_ITEM(__pyx_k_tuple_123, 0, ((PyObject *)__pyx_kp_s_122));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_122));
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_123));
/* "_sa.pyx":9
* resource.getrusage(resource.RUSAGE_SELF).ru_stime)
@@ -65269,16 +64072,16 @@ static int __Pyx_InitCachedConstants(void) {
* if filename.endswith('.gz'):
* return gzip.GzipFile(filename)
*/
- __pyx_k_tuple_136 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_136);
+ __pyx_k_tuple_135 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_135);
__Pyx_INCREF(((PyObject *)__pyx_n_s__filename));
- PyTuple_SET_ITEM(__pyx_k_tuple_136, 0, ((PyObject *)__pyx_n_s__filename));
+ PyTuple_SET_ITEM(__pyx_k_tuple_135, 0, ((PyObject *)__pyx_n_s__filename));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__filename));
__Pyx_INCREF(((PyObject *)__pyx_n_s__filename));
- PyTuple_SET_ITEM(__pyx_k_tuple_136, 1, ((PyObject *)__pyx_n_s__filename));
+ PyTuple_SET_ITEM(__pyx_k_tuple_135, 1, ((PyObject *)__pyx_n_s__filename));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__filename));
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_136));
- __pyx_k_codeobj_137 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__gzip_or_text, 9, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));
+ __pyx_k_codeobj_136 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_137, __pyx_n_s__gzip_or_text, 9, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "_sa.pyx":15
* return open(filename)
@@ -65287,29 +64090,29 @@ static int __Pyx_InitCachedConstants(void) {
*
* include "float_list.pxi"
*/
- __pyx_k_tuple_140 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_140);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_139));
- PyTuple_SET_ITEM(__pyx_k_tuple_140, 0, ((PyObject *)__pyx_kp_s_139));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_139));
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_140));
+ __pyx_k_tuple_139 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_139);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_138));
+ PyTuple_SET_ITEM(__pyx_k_tuple_139, 0, ((PyObject *)__pyx_kp_s_138));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_138));
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_139));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":104
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":104
* return ALPHABET.setindex(sym, id)
*
* def sym_fromstring(char* string, bint terminal): # <<<<<<<<<<<<<<
* return ALPHABET.fromstring(string, terminal)
*/
- __pyx_k_tuple_141 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_141);
+ __pyx_k_tuple_140 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_140)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_140);
__Pyx_INCREF(((PyObject *)__pyx_n_s__string));
- PyTuple_SET_ITEM(__pyx_k_tuple_141, 0, ((PyObject *)__pyx_n_s__string));
+ PyTuple_SET_ITEM(__pyx_k_tuple_140, 0, ((PyObject *)__pyx_n_s__string));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__string));
__Pyx_INCREF(((PyObject *)__pyx_n_s__terminal));
- PyTuple_SET_ITEM(__pyx_k_tuple_141, 1, ((PyObject *)__pyx_n_s__terminal));
+ PyTuple_SET_ITEM(__pyx_k_tuple_140, 1, ((PyObject *)__pyx_n_s__terminal));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__terminal));
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141));
- __pyx_k_codeobj_142 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_143, __pyx_n_s__sym_fromstring, 104, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_142)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_140));
+ __pyx_k_codeobj_141 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_142, __pyx_n_s__sym_fromstring, 104, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_141)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
@@ -65322,15 +64125,11 @@ static int __Pyx_InitGlobals(void) {
__pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- __pyx_int_neg_99 = PyInt_FromLong(-99); if (unlikely(!__pyx_int_neg_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__pyx_int_65536 = PyInt_FromLong(65536); if (unlikely(!__pyx_int_65536)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
return 0;
@@ -65392,9 +64191,6 @@ PyMODINIT_FUNC PyInit__sa(void)
#endif
__pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- #if CYTHON_COMPILING_IN_PYPY
- Py_INCREF(__pyx_b);
- #endif
if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
/*--- Initialize various global constants etc. ---*/
if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -65545,14 +64341,6 @@ PyMODINIT_FUNC PyInit__sa(void)
if (__Pyx_SetVtable(__pyx_type_3_sa_Scorer.tp_dict, __pyx_vtabptr_3_sa_Scorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_SetAttrString(__pyx_m, "Scorer", (PyObject *)&__pyx_type_3_sa_Scorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_3_sa_Scorer = &__pyx_type_3_sa_Scorer;
- __pyx_vtabptr_3_sa_DefaultScorer = &__pyx_vtable_3_sa_DefaultScorer;
- __pyx_vtable_3_sa_DefaultScorer.__pyx_base = *__pyx_vtabptr_3_sa_Scorer;
- __pyx_vtable_3_sa_DefaultScorer.__pyx_base.score = (struct __pyx_obj_3_sa_FeatureVector *(*)(struct __pyx_obj_3_sa_Scorer *, struct __pyx_obj_3_sa_Phrase *, struct __pyx_obj_3_sa_Phrase *, unsigned int, unsigned int, unsigned int))__pyx_f_3_sa_13DefaultScorer_score;
- __pyx_type_3_sa_DefaultScorer.tp_base = __pyx_ptype_3_sa_Scorer;
- if (PyType_Ready(&__pyx_type_3_sa_DefaultScorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_DefaultScorer.tp_dict, __pyx_vtabptr_3_sa_DefaultScorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "DefaultScorer", (PyObject *)&__pyx_type_3_sa_DefaultScorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_DefaultScorer = &__pyx_type_3_sa_DefaultScorer;
if (PyType_Ready(&__pyx_type_3_sa_TrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_SetAttrString(__pyx_m, "TrieNode", (PyObject *)&__pyx_type_3_sa_TrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_3_sa_TrieNode = &__pyx_type_3_sa_TrieNode;
@@ -65678,13 +64466,13 @@ PyMODINIT_FUNC PyInit__sa(void)
__pyx_t_2 = PyObject_GetAttr(__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 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_140), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_139), 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 (PyObject_SetAttr(__pyx_m, __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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":54
+ /* "/home/vchahune/tools/cdec/python/src/sa/bilex.pxi":54
* cdef id2eword, id2fword, eword2id, fword2id
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<<
@@ -65697,7 +64485,7 @@ PyMODINIT_FUNC PyInit__sa(void)
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":17
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":17
* from libc.string cimport memset
*
* cdef int MIN_BOTTOM_SIZE = 32 # <<<<<<<<<<<<<<
@@ -65706,7 +64494,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_MIN_BOTTOM_SIZE = 32;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":18
*
* cdef int MIN_BOTTOM_SIZE = 32
* cdef int MIN_BOTTOM_BITS = 5 # <<<<<<<<<<<<<<
@@ -65715,7 +64503,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_MIN_BOTTOM_BITS = 5;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":28
+ /* "/home/vchahune/tools/cdec/python/src/sa/veb.pxi":28
* LOWER_MASK[i] = mask
*
* _init_lower_mask() # <<<<<<<<<<<<<<
@@ -65724,7 +64512,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_f_3_sa__init_lower_mask();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":4
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":4
* from libc.stdlib cimport malloc, realloc, strtol
*
* cdef int INDEX_SHIFT = 3 # <<<<<<<<<<<<<<
@@ -65733,7 +64521,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_INDEX_SHIFT = 3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":5
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":5
*
* cdef int INDEX_SHIFT = 3
* cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1 # <<<<<<<<<<<<<<
@@ -65742,7 +64530,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_INDEX_MASK = ((1 << __pyx_v_3_sa_INDEX_SHIFT) - 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":87
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":87
* return self.terminals.index(s)
*
* cdef Alphabet ALPHABET = Alphabet() # <<<<<<<<<<<<<<
@@ -65757,7 +64545,7 @@ PyMODINIT_FUNC PyInit__sa(void)
__pyx_v_3_sa_ALPHABET = ((struct __pyx_obj_3_sa_Alphabet *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":104
+ /* "/home/vchahune/tools/cdec/python/src/sa/sym.pxi":104
* return ALPHABET.setindex(sym, id)
*
* def sym_fromstring(char* string, bint terminal): # <<<<<<<<<<<<<<
@@ -65768,7 +64556,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sym_fromstring, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":1
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":1
* cdef StringMap FD = StringMap() # <<<<<<<<<<<<<<
*
* INITIAL_CAPACITY = 7 # default number of features
@@ -65781,7 +64569,7 @@ PyMODINIT_FUNC PyInit__sa(void)
__pyx_v_3_sa_FD = ((struct __pyx_obj_3_sa_StringMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":3
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":3
* cdef StringMap FD = StringMap()
*
* INITIAL_CAPACITY = 7 # default number of features # <<<<<<<<<<<<<<
@@ -65790,7 +64578,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__INITIAL_CAPACITY, __pyx_int_7) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":4
+ /* "/home/vchahune/tools/cdec/python/src/sa/features.pxi":4
*
* INITIAL_CAPACITY = 7 # default number of features
* INCREMENT = INITIAL_CAPACITY # double size # <<<<<<<<<<<<<<
@@ -65802,88 +64590,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__INCREMENT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":39
- * from libc.math cimport log10
- *
- * MAXSCORE = -99 # <<<<<<<<<<<<<<
- * EgivenFCoherent = 0
- * SampleCountF = 1
- */
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__MAXSCORE, __pyx_int_neg_99) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":40
- *
- * MAXSCORE = -99
- * EgivenFCoherent = 0 # <<<<<<<<<<<<<<
- * SampleCountF = 1
- * CountEF = 2
- */
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EgivenFCoherent, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":41
- * MAXSCORE = -99
- * EgivenFCoherent = 0
- * SampleCountF = 1 # <<<<<<<<<<<<<<
- * CountEF = 2
- * MaxLexFgivenE = 3
- */
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SampleCountF, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":42
- * EgivenFCoherent = 0
- * SampleCountF = 1
- * CountEF = 2 # <<<<<<<<<<<<<<
- * MaxLexFgivenE = 3
- * MaxLexEgivenF = 4
- */
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__CountEF, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":43
- * SampleCountF = 1
- * CountEF = 2
- * MaxLexFgivenE = 3 # <<<<<<<<<<<<<<
- * MaxLexEgivenF = 4
- * IsSingletonF = 5
- */
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__MaxLexFgivenE, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":44
- * CountEF = 2
- * MaxLexFgivenE = 3
- * MaxLexEgivenF = 4 # <<<<<<<<<<<<<<
- * IsSingletonF = 5
- * IsSingletonFE = 6
- */
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__MaxLexEgivenF, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":45
- * MaxLexFgivenE = 3
- * MaxLexEgivenF = 4
- * IsSingletonF = 5 # <<<<<<<<<<<<<<
- * IsSingletonFE = 6
- * NFEATURES = 7
- */
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__IsSingletonF, __pyx_int_5) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":46
- * MaxLexEgivenF = 4
- * IsSingletonF = 5
- * IsSingletonFE = 6 # <<<<<<<<<<<<<<
- * NFEATURES = 7
- *
- */
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__IsSingletonFE, __pyx_int_6) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":47
- * IsSingletonF = 5
- * IsSingletonFE = 6
- * NFEATURES = 7 # <<<<<<<<<<<<<<
- *
- * cdef class DefaultScorer(Scorer):
- */
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NFEATURES, __pyx_int_7) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":5
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":5
* # Much faster than the Python numbers reported there.
* # Note to reader: this code is closer to C than Python
* import gc # <<<<<<<<<<<<<<
@@ -65895,21 +64602,18 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__gc, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":11
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":11
* from libc.math cimport fmod, ceil, floor, log
*
- * from collections import defaultdict, Counter # <<<<<<<<<<<<<<
+ * from collections import defaultdict # <<<<<<<<<<<<<<
*
* cdef int PRECOMPUTE = 0
*/
- __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 11; __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 = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_n_s__defaultdict));
PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__defaultdict));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__defaultdict));
- __Pyx_INCREF(((PyObject *)__pyx_n_s__Counter));
- PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__Counter));
- __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Counter));
__pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__collections), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
@@ -65921,18 +64625,10 @@ PyMODINIT_FUNC PyInit__sa(void)
__Pyx_GOTREF(__pyx_t_1);
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__defaultdict, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__Counter);
- if (__pyx_t_1 == NULL) {
- if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__Counter);
- if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- __Pyx_GOTREF(__pyx_t_1);
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Counter, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 11; __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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":13
- * from collections import defaultdict, Counter
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":13
+ * from collections import defaultdict
*
* cdef int PRECOMPUTE = 0 # <<<<<<<<<<<<<<
* cdef int MERGE = 1
@@ -65940,7 +64636,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_PRECOMPUTE = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":14
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":14
*
* cdef int PRECOMPUTE = 0
* cdef int MERGE = 1 # <<<<<<<<<<<<<<
@@ -65949,7 +64645,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_MERGE = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":15
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":15
* cdef int PRECOMPUTE = 0
* cdef int MERGE = 1
* cdef int BAEZA_YATES = 2 # <<<<<<<<<<<<<<
@@ -65958,7 +64654,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_BAEZA_YATES = 2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":18
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":18
*
* # NOTE: was encoded as a non-terminal in the previous version
* cdef int EPSILON = sym_fromstring('*EPS*', True) # <<<<<<<<<<<<<<
@@ -65971,9 +64667,9 @@ PyMODINIT_FUNC PyInit__sa(void)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_144));
- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_144));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_144));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_143));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_143));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_143));
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
@@ -65985,7 +64681,7 @@ PyMODINIT_FUNC PyInit__sa(void)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_3_sa_EPSILON = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":41
+ /* "/home/vchahune/tools/cdec/python/src/sa/rulefactory.pxi":41
* cdef public int count
* cdef public root
* def __cinit__(self, extended=False): # <<<<<<<<<<<<<<
@@ -65994,7 +64690,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_k_101 = __pyx_t_1;
+ __pyx_k_100 = __pyx_t_1;
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
@@ -66169,7 +64865,7 @@ static void __Pyx_RaiseArgtupleInvalid(
more_or_less = "exactly";
}
PyErr_Format(PyExc_TypeError,
- "%s() takes %s %" PY_FORMAT_SIZE_T "d positional argument%s (%" PY_FORMAT_SIZE_T "d given)",
+ "%s() takes %s %"PY_FORMAT_SIZE_T"d positional argument%s (%"PY_FORMAT_SIZE_T"d given)",
func_name, more_or_less, num_expected,
(num_expected == 1) ? "" : "s", num_found);
}
@@ -66346,11 +65042,6 @@ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
{
PyObject* key = 0;
Py_ssize_t pos = 0;
-#if CPYTHON_COMPILING_IN_PYPY
- if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
- goto invalid_keyword;
- return 1;
-#else
while (PyDict_Next(kwdict, &pos, &key, 0)) {
#if PY_MAJOR_VERSION < 3
if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
@@ -66366,7 +65057,6 @@ invalid_keyword_type:
PyErr_Format(PyExc_TypeError,
"%s() keywords must be strings", function_name);
return 0;
-#endif
invalid_keyword:
PyErr_Format(PyExc_TypeError,
#if PY_MAJOR_VERSION < 3
@@ -66379,9 +65069,10 @@ invalid_keyword:
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;
@@ -66390,27 +65081,19 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
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
+ Py_INCREF(local_type);
+ Py_INCREF(local_value);
+ Py_INCREF(local_tb);
tmp_type = tstate->exc_type;
tmp_value = tstate->exc_value;
tmp_tb = tstate->exc_traceback;
@@ -66418,13 +65101,10 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
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). */
+ these objects (XDECREF 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;
@@ -66453,40 +65133,23 @@ static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
return r;
}
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
PyErr_Format(PyExc_ValueError,
- "too many values to unpack (expected %" PY_FORMAT_SIZE_T "d)", expected);
+ "need more than %"PY_FORMAT_SIZE_T"d value%s to unpack",
+ index, (index == 1) ? "" : "s");
}
-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
PyErr_Format(PyExc_ValueError,
- "need more than %" PY_FORMAT_SIZE_T "d value%s to unpack",
- index, (index == 1) ? "" : "s");
+ "too many values to unpack (expected %"PY_FORMAT_SIZE_T"d)", expected);
}
-static CYTHON_INLINE int __Pyx_IterFinish(void) {
-#if CYTHON_COMPILING_IN_CPYTHON
- PyThreadState *tstate = PyThreadState_GET();
- PyObject* exc_type = tstate->curexc_type;
- if (unlikely(exc_type)) {
- if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
- PyObject *exc_value, *exc_tb;
- exc_value = tstate->curexc_value;
- exc_tb = tstate->curexc_traceback;
- tstate->curexc_type = 0;
- tstate->curexc_value = 0;
- tstate->curexc_traceback = 0;
- Py_DECREF(exc_type);
- Py_XDECREF(exc_value);
- Py_XDECREF(exc_tb);
- return 0;
- } else {
- return -1;
- }
- }
- return 0;
-#else
- if (unlikely(PyErr_Occurred())) {
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+ if (unlikely(retval)) {
+ Py_DECREF(retval);
+ __Pyx_RaiseTooManyValuesError(expected);
+ return -1;
+ } else if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
PyErr_Clear();
return 0;
@@ -66495,25 +65158,12 @@ static CYTHON_INLINE int __Pyx_IterFinish(void) {
}
}
return 0;
-#endif
}
-static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
- if (unlikely(retval)) {
- Py_DECREF(retval);
- __Pyx_RaiseTooManyValuesError(expected);
- return -1;
- } else {
- return __Pyx_IterFinish();
- }
- return 0;
-}
+
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
PyObject* float_value;
-#if CYTHON_COMPILING_IN_PYPY
- float_value = PyNumber_Float(obj);
-#else
if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
return PyFloat_AsDouble(obj);
} else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
@@ -66530,7 +65180,6 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj) {
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);
@@ -66564,158 +65213,8 @@ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed
return 0;
}
-static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
-}
-
-static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
- if (t == Py_None) {
- __Pyx_RaiseNoneNotIterableError();
- } else if (PyTuple_GET_SIZE(t) < index) {
- __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
- } else {
- __Pyx_RaiseTooManyValuesError(index);
- }
-}
-
-static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
- int is_tuple, int has_known_size, int decref_tuple) {
- Py_ssize_t index;
- PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
- if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
- iternextfunc iternext;
- iter = PyObject_GetIter(tuple);
- if (unlikely(!iter)) goto bad;
- if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
- iternext = Py_TYPE(iter)->tp_iternext;
- value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
- value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
- if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
- Py_DECREF(iter);
- } else {
- if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
- __Pyx_UnpackTupleError(tuple, 2);
- goto bad;
- }
-#if CYTHON_COMPILING_IN_PYPY
- value1 = PySequence_ITEM(tuple, 0);
- if (unlikely(!value1)) goto bad;
- value2 = PySequence_ITEM(tuple, 1);
- if (unlikely(!value2)) goto bad;
-#else
- value1 = PyTuple_GET_ITEM(tuple, 0);
- value2 = PyTuple_GET_ITEM(tuple, 1);
- Py_INCREF(value1);
- Py_INCREF(value2);
-#endif
- if (decref_tuple) { Py_DECREF(tuple); }
- }
- *pvalue1 = value1;
- *pvalue2 = value2;
- return 0;
-unpacking_failed:
- if (!has_known_size && __Pyx_IterFinish() == 0)
- __Pyx_RaiseNeedMoreValuesError(index);
-bad:
- Py_XDECREF(iter);
- Py_XDECREF(value1);
- Py_XDECREF(value2);
- if (decref_tuple) { Py_XDECREF(tuple); }
- return -1;
-}
-
-static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
- Py_ssize_t* p_orig_length, int* p_source_is_dict) {
- is_dict = is_dict || likely(PyDict_CheckExact(iterable));
- *p_source_is_dict = is_dict;
-#if !CYTHON_COMPILING_IN_PYPY
- if (is_dict) {
- *p_orig_length = PyDict_Size(iterable);
- Py_INCREF(iterable);
- return iterable;
- }
-#endif
- *p_orig_length = 0;
- if (method_name) {
- PyObject* iter;
- iterable = PyObject_CallMethodObjArgs(iterable, method_name, NULL);
- if (!iterable)
- return NULL;
-#if !CYTHON_COMPILING_IN_PYPY
- if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
- return iterable;
-#endif
- iter = PyObject_GetIter(iterable);
- Py_DECREF(iterable);
- return iter;
- }
- return PyObject_GetIter(iterable);
-}
-static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos,
- PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
- PyObject* next_item;
-#if !CYTHON_COMPILING_IN_PYPY
- if (source_is_dict) {
- PyObject *key, *value;
- if (unlikely(orig_length != PyDict_Size(iter_obj))) {
- PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
- return -1;
- }
- if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
- return 0;
- }
- if (pitem) {
- PyObject* tuple = PyTuple_New(2);
- if (unlikely(!tuple)) {
- return -1;
- }
- Py_INCREF(key);
- Py_INCREF(value);
- PyTuple_SET_ITEM(tuple, 0, key);
- PyTuple_SET_ITEM(tuple, 1, value);
- *pitem = tuple;
- } else {
- if (pkey) {
- Py_INCREF(key);
- *pkey = key;
- }
- if (pvalue) {
- Py_INCREF(value);
- *pvalue = value;
- }
- }
- return 1;
- } else if (PyTuple_CheckExact(iter_obj)) {
- Py_ssize_t pos = *ppos;
- if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
- *ppos = pos + 1;
- next_item = PyTuple_GET_ITEM(iter_obj, pos);
- Py_INCREF(next_item);
- } else if (PyList_CheckExact(iter_obj)) {
- Py_ssize_t pos = *ppos;
- if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
- *ppos = pos + 1;
- next_item = PyList_GET_ITEM(iter_obj, pos);
- Py_INCREF(next_item);
- } else
-#endif
- {
- next_item = PyIter_Next(iter_obj);
- if (unlikely(!next_item)) {
- return __Pyx_IterFinish();
- }
- }
- if (pitem) {
- *pitem = next_item;
- } else if (pkey && pvalue) {
- if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
- return -1;
- } else if (pkey) {
- *pkey = next_item;
- } else {
- *pvalue = next_item;
- }
- return 1;
+static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is unsubscriptable");
}
static CYTHON_INLINE int __Pyx_div_int(int a, int b) {
@@ -66726,7 +65225,6 @@ static CYTHON_INLINE int __Pyx_div_int(int a, int b) {
}
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;
@@ -66734,12 +65232,8 @@ static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value,
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;
@@ -66751,9 +65245,6 @@ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *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, long level) {
@@ -66835,9 +65326,6 @@ static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) {
}
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)) {
@@ -66865,13 +65353,9 @@ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int eq
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 (s1 == s2) {
return (equals == Py_EQ);
} else if (PyUnicode_CheckExact(s1) & PyUnicode_CheckExact(s2)) {
@@ -66911,7 +65395,6 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int
Py_DECREF(py_result);
return result;
}
-#endif
}
static PyObject *
@@ -67194,56 +65677,6 @@ __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
PyString_AsString(func_name), (void *)op);
#endif
}
-#if CYTHON_COMPILING_IN_PYPY
-static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
- PyCFunctionObject* f = (PyCFunctionObject*)func;
- PyCFunction meth = PyCFunction_GET_FUNCTION(func);
- PyObject *self = PyCFunction_GET_SELF(func);
- Py_ssize_t size;
- switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
- case METH_VARARGS:
- if (likely(kw == NULL) || PyDict_Size(kw) == 0)
- return (*meth)(self, arg);
- break;
- case METH_VARARGS | METH_KEYWORDS:
- return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
- case METH_NOARGS:
- if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
- size = PyTuple_GET_SIZE(arg);
- if (size == 0)
- return (*meth)(self, NULL);
- PyErr_Format(PyExc_TypeError,
- "%.200s() takes no arguments (%zd given)",
- f->m_ml->ml_name, size);
- return NULL;
- }
- break;
- case METH_O:
- if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
- size = PyTuple_GET_SIZE(arg);
- if (size == 1)
- return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
- PyErr_Format(PyExc_TypeError,
- "%.200s() takes exactly one argument (%zd given)",
- f->m_ml->ml_name, size);
- return NULL;
- }
- break;
- default:
- PyErr_SetString(PyExc_SystemError, "Bad call flags in "
- "__Pyx_CyFunction_Call. METH_OLDARGS is no "
- "longer supported!");
- return NULL;
- }
- PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
- f->m_ml->ml_name);
- return NULL;
-}
-#else
-static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
- return PyCFunction_Call(func, arg, kw);
-}
-#endif
static PyTypeObject __pyx_CyFunctionType_type = {
PyVarObject_HEAD_INIT(0, 0)
__Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
@@ -67263,7 +65696,7 @@ static PyTypeObject __pyx_CyFunctionType_type = {
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- __Pyx_CyFunction_Call, /*tp_call*/
+ __Pyx_PyCFunction_Call, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
@@ -67299,16 +65732,15 @@ static PyTypeObject __pyx_CyFunctionType_type = {
0, /*tp_version_tag*/
#endif
};
-static int __Pyx_CyFunction_init(void) {
-#if !CYTHON_COMPILING_IN_PYPY
- __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
-#endif
+static int __Pyx_CyFunction_init(void)
+{
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) {
+void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects)
+{
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
m->defaults = PyMem_Malloc(size);
if (!m->defaults)
@@ -67317,7 +65749,8 @@ static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t
m->defaults_pyobjects = pyobjects;
return m->defaults;
}
-static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
+static void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple)
+{
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
m->defaults_tuple = tuple;
Py_INCREF(tuple);
@@ -67723,8 +66156,8 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject*
}
}
-static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
- CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) {
+static void __Pyx_WriteUnraisable(const char *name, int clineno,
+ int lineno, const char *filename) {
PyObject *old_exc, *old_val, *old_tb;
PyObject *ctx;
__Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
@@ -67744,7 +66177,6 @@ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
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;
@@ -67752,10 +66184,6 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value,
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;
@@ -67765,70 +66193,9 @@ static PyObject *__Pyx_Generator_Next(PyObject *self);
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Generator_Close(PyObject *self);
static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
-static PyTypeObject *__pyx_GeneratorType = 0;
-#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
-#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
-#if 1 || PY_VERSION_HEX < 0x030300B0
-static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
- PyObject *et, *ev, *tb;
- PyObject *value = NULL;
- __Pyx_ErrFetch(&et, &ev, &tb);
- if (!et) {
- Py_XDECREF(tb);
- Py_XDECREF(ev);
- Py_INCREF(Py_None);
- *pvalue = Py_None;
- return 0;
- }
- if (unlikely(et != PyExc_StopIteration) &&
- unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
- __Pyx_ErrRestore(et, ev, tb);
- return -1;
- }
- if (likely(et == PyExc_StopIteration)) {
- if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
- if (!ev) {
- Py_INCREF(Py_None);
- ev = Py_None;
- }
- Py_XDECREF(tb);
- Py_DECREF(et);
- *pvalue = ev;
- return 0;
- }
- }
- PyErr_NormalizeException(&et, &ev, &tb);
- if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
- __Pyx_ErrRestore(et, ev, tb);
- return -1;
- }
- Py_XDECREF(tb);
- Py_DECREF(et);
-#if PY_VERSION_HEX >= 0x030300A0
- value = ((PyStopIterationObject *)ev)->value;
- Py_INCREF(value);
- Py_DECREF(ev);
-#else
- {
- PyObject* args = PyObject_GetAttrString(ev, "args");
- Py_DECREF(ev);
- if (likely(args)) {
- value = PyObject_GetItem(args, 0);
- Py_DECREF(args);
- }
- if (unlikely(!value)) {
- __Pyx_ErrRestore(NULL, NULL, NULL);
- Py_INCREF(Py_None);
- value = Py_None;
- }
- }
-#endif
- *pvalue = value;
- return 0;
-}
-#endif
static CYTHON_INLINE
-void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
+void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self)
+{
PyObject *exc_type = self->exc_type;
PyObject *exc_value = self->exc_value;
PyObject *exc_traceback = self->exc_traceback;
@@ -67840,18 +66207,14 @@ void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
Py_XDECREF(exc_traceback);
}
static CYTHON_INLINE
-int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
- if (unlikely(gen->is_running)) {
+PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value)
+{
+ PyObject *retval;
+ if (unlikely(self->is_running)) {
PyErr_SetString(PyExc_ValueError,
"generator already executing");
- return 1;
+ return NULL;
}
- return 0;
-}
-static CYTHON_INLINE
-PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
- PyObject *retval;
- assert(!self->is_running);
if (unlikely(self->resume_label == 0)) {
if (unlikely(value && value != Py_None)) {
PyErr_SetString(PyExc_TypeError,
@@ -67864,240 +66227,81 @@ PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
PyErr_SetNone(PyExc_StopIteration);
return NULL;
}
- if (value) {
-#if CYTHON_COMPILING_IN_PYPY
-#else
- /* Generators always return to their most recent caller, not
- * necessarily their creator. */
- if (self->exc_traceback) {
- PyThreadState *tstate = PyThreadState_GET();
- PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
- PyFrameObject *f = tb->tb_frame;
- Py_XINCREF(tstate->frame);
- assert(f->f_back == NULL);
- f->f_back = tstate->frame;
- }
-#endif
- __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
- &self->exc_traceback);
- } else {
+ if (value)
+ __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback);
+ else
__Pyx_Generator_ExceptionClear(self);
- }
self->is_running = 1;
retval = self->body((PyObject *) self, value);
self->is_running = 0;
- if (retval) {
- __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
- &self->exc_traceback);
-#if CYTHON_COMPILING_IN_PYPY
-#else
- /* Don't keep the reference to f_back any longer than necessary. It
- * may keep a chain of frames alive or it could create a reference
- * cycle. */
- if (self->exc_traceback) {
- PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
- PyFrameObject *f = tb->tb_frame;
- Py_CLEAR(f->f_back);
- }
-#endif
- } else {
+ if (retval)
+ __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback);
+ else
__Pyx_Generator_ExceptionClear(self);
- }
return retval;
}
-static CYTHON_INLINE
-PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
- PyObject *ret;
- PyObject *val = NULL;
- __Pyx_Generator_Undelegate(gen);
- __Pyx_PyGen_FetchStopIterationValue(&val);
- ret = __Pyx_Generator_SendEx(gen, val);
- Py_XDECREF(val);
- return ret;
-}
-static PyObject *__Pyx_Generator_Next(PyObject *self) {
- __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
- PyObject *yf = gen->yieldfrom;
- if (unlikely(__Pyx_Generator_CheckRunning(gen)))
- return NULL;
- if (yf) {
- PyObject *ret;
- gen->is_running = 1;
- ret = Py_TYPE(yf)->tp_iternext(yf);
- gen->is_running = 0;
- if (likely(ret)) {
- return ret;
- }
- return __Pyx_Generator_FinishDelegation(gen);
- }
- return __Pyx_Generator_SendEx(gen, Py_None);
+static PyObject *__Pyx_Generator_Next(PyObject *self)
+{
+ return __Pyx_Generator_SendEx((__pyx_GeneratorObject *) self, Py_None);
}
-static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
- __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
- PyObject *yf = gen->yieldfrom;
- if (unlikely(__Pyx_Generator_CheckRunning(gen)))
- return NULL;
- if (yf) {
- PyObject *ret;
- gen->is_running = 1;
- if (__Pyx_Generator_CheckExact(yf)) {
- ret = __Pyx_Generator_Send(yf, value);
- } else {
- if (value == Py_None)
- ret = PyIter_Next(yf);
- else
- ret = PyObject_CallMethod(yf, (char*)"send", (char*)"O", value);
- }
- gen->is_running = 0;
- if (likely(ret)) {
- return ret;
- }
- return __Pyx_Generator_FinishDelegation(gen);
- }
- return __Pyx_Generator_SendEx(gen, value);
-}
-static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
- PyObject *retval = NULL;
- int err = 0;
- if (__Pyx_Generator_CheckExact(yf)) {
- retval = __Pyx_Generator_Close(yf);
- if (!retval)
- return -1;
- } else {
- PyObject *meth;
- gen->is_running = 1;
- meth = PyObject_GetAttrString(yf, "close");
- if (unlikely(!meth)) {
- if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
- PyErr_WriteUnraisable(yf);
- }
- PyErr_Clear();
- } else {
- retval = PyObject_CallFunction(meth, NULL);
- Py_DECREF(meth);
- if (!retval)
- err = -1;
- }
- gen->is_running = 0;
- }
- Py_XDECREF(retval);
- return err;
+static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value)
+{
+ return __Pyx_Generator_SendEx((__pyx_GeneratorObject *) self, value);
}
-static PyObject *__Pyx_Generator_Close(PyObject *self) {
- __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
- PyObject *retval, *raised_exception;
- PyObject *yf = gen->yieldfrom;
- int err = 0;
- if (unlikely(__Pyx_Generator_CheckRunning(gen)))
- return NULL;
- if (yf) {
- Py_INCREF(yf);
- err = __Pyx_Generator_CloseIter(gen, yf);
- __Pyx_Generator_Undelegate(gen);
- Py_DECREF(yf);
- }
- if (err == 0)
+static PyObject *__Pyx_Generator_Close(PyObject *self)
+{
+ __pyx_GeneratorObject *generator = (__pyx_GeneratorObject *) self;
+ PyObject *retval;
#if PY_VERSION_HEX < 0x02050000
- PyErr_SetNone(PyExc_StopIteration);
+ PyErr_SetNone(PyExc_StopIteration);
#else
- PyErr_SetNone(PyExc_GeneratorExit);
+ PyErr_SetNone(PyExc_GeneratorExit);
#endif
- retval = __Pyx_Generator_SendEx(gen, NULL);
+ retval = __Pyx_Generator_SendEx(generator, NULL);
if (retval) {
Py_DECREF(retval);
PyErr_SetString(PyExc_RuntimeError,
"generator ignored GeneratorExit");
return NULL;
}
- raised_exception = PyErr_Occurred();
- if (!raised_exception
- || raised_exception == PyExc_StopIteration
-#if PY_VERSION_HEX >= 0x02050000
- || raised_exception == PyExc_GeneratorExit
- || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
+#if PY_VERSION_HEX < 0x02050000
+ if (PyErr_ExceptionMatches(PyExc_StopIteration))
+#else
+ if (PyErr_ExceptionMatches(PyExc_StopIteration)
+ || PyErr_ExceptionMatches(PyExc_GeneratorExit))
#endif
- || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
{
- if (raised_exception) PyErr_Clear(); /* ignore these errors */
+ PyErr_Clear(); /* ignore these errors */
Py_INCREF(Py_None);
return Py_None;
}
return NULL;
}
-static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
- __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
+static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args)
+{
+ __pyx_GeneratorObject *generator = (__pyx_GeneratorObject *) self;
PyObject *typ;
PyObject *tb = NULL;
PyObject *val = NULL;
- PyObject *yf = gen->yieldfrom;
if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
return NULL;
- if (unlikely(__Pyx_Generator_CheckRunning(gen)))
- return NULL;
- if (yf) {
- PyObject *ret;
- Py_INCREF(yf);
-#if PY_VERSION_HEX >= 0x02050000
- if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
- int err = __Pyx_Generator_CloseIter(gen, yf);
- Py_DECREF(yf);
- __Pyx_Generator_Undelegate(gen);
- if (err < 0)
- return __Pyx_Generator_SendEx(gen, NULL);
- goto throw_here;
- }
-#endif
- gen->is_running = 1;
- if (__Pyx_Generator_CheckExact(yf)) {
- ret = __Pyx_Generator_Throw(yf, args);
- } else {
- PyObject *meth = PyObject_GetAttrString(yf, "throw");
- if (unlikely(!meth)) {
- Py_DECREF(yf);
- if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
- gen->is_running = 0;
- return NULL;
- }
- PyErr_Clear();
- __Pyx_Generator_Undelegate(gen);
- gen->is_running = 0;
- goto throw_here;
- }
- ret = PyObject_CallObject(meth, args);
- Py_DECREF(meth);
- }
- gen->is_running = 0;
- Py_DECREF(yf);
- if (!ret) {
- ret = __Pyx_Generator_FinishDelegation(gen);
- }
- return ret;
- }
-throw_here:
__Pyx_Raise(typ, val, tb, NULL);
- return __Pyx_Generator_SendEx(gen, NULL);
+ return __Pyx_Generator_SendEx(generator, NULL);
}
-static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) {
+static int
+__Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg)
+{
__pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
Py_VISIT(gen->closure);
Py_VISIT(gen->classobj);
- Py_VISIT(gen->yieldfrom);
Py_VISIT(gen->exc_type);
Py_VISIT(gen->exc_value);
Py_VISIT(gen->exc_traceback);
return 0;
}
-static int __Pyx_Generator_clear(PyObject *self) {
- __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
- Py_CLEAR(gen->closure);
- Py_CLEAR(gen->classobj);
- Py_CLEAR(gen->yieldfrom);
- Py_CLEAR(gen->exc_type);
- Py_CLEAR(gen->exc_value);
- Py_CLEAR(gen->exc_traceback);
- return 0;
-}
-static void __Pyx_Generator_dealloc(PyObject *self) {
+static void
+__Pyx_Generator_dealloc(PyObject *self)
+{
__pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
PyObject_GC_UnTrack(gen);
if (gen->gi_weakreflist != NULL)
@@ -68109,10 +66313,16 @@ static void __Pyx_Generator_dealloc(PyObject *self) {
return; /* resurrected. :( */
}
PyObject_GC_UnTrack(self);
- __Pyx_Generator_clear(self);
+ Py_CLEAR(gen->closure);
+ Py_CLEAR(gen->classobj);
+ Py_CLEAR(gen->exc_type);
+ Py_CLEAR(gen->exc_value);
+ Py_CLEAR(gen->exc_traceback);
PyObject_GC_Del(gen);
}
-static void __Pyx_Generator_del(PyObject *self) {
+static void
+__Pyx_Generator_del(PyObject *self)
+{
PyObject *res;
PyObject *error_type, *error_value, *error_traceback;
__pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
@@ -68141,13 +66351,11 @@ static void __Pyx_Generator_del(PyObject *self) {
_Py_NewReference(self);
self->ob_refcnt = refcnt;
}
-#if CYTHON_COMPILING_FOR_CPYTHON
assert(PyType_IS_GC(self->ob_type) &&
_Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
/* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so
* we need to undo that. */
_Py_DEC_REFTOTAL;
-#endif
/* If Py_TRACE_REFS, _Py_NewReference re-added self to the object
* chain, so no more to do there.
* If COUNT_ALLOCS, the original decref bumped tp_frees, and
@@ -68155,17 +66363,13 @@ static void __Pyx_Generator_del(PyObject *self) {
* undone.
*/
#ifdef COUNT_ALLOCS
- --Py_TYPE(self)->tp_frees;
- --Py_TYPE(self)->tp_allocs;
+ --self->ob_type->tp_frees;
+ --self->ob_type->tp_allocs;
#endif
}
static PyMemberDef __pyx_Generator_memberlist[] = {
{(char *) "gi_running",
-#if PY_VERSION_HEX >= 0x02060000
- T_BOOL,
-#else
T_INT,
-#endif
offsetof(__pyx_GeneratorObject, is_running),
READONLY,
NULL},
@@ -68177,7 +66381,7 @@ static PyMethodDef __pyx_Generator_methods[] = {
{__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_GeneratorType_type = {
+static PyTypeObject __pyx_GeneratorType = {
PyVarObject_HEAD_INIT(0, 0)
__Pyx_NAMESTR("generator"), /*tp_name*/
sizeof(__pyx_GeneratorObject), /*tp_basicsize*/
@@ -68198,7 +66402,7 @@ static PyTypeObject __pyx_GeneratorType_type = {
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
- 0, /*tp_getattro*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
@@ -68207,7 +66411,7 @@ static PyTypeObject __pyx_GeneratorType_type = {
0, /*tp_clear*/
0, /*tp_richcompare*/
offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */
- 0, /*tp_iter*/
+ PyObject_SelfIter, /*tp_iter*/
(iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/
__pyx_Generator_methods, /*tp_methods*/
__pyx_Generator_memberlist, /*tp_members*/
@@ -68232,10 +66436,12 @@ static PyTypeObject __pyx_GeneratorType_type = {
0, /*tp_version_tag*/
#endif
};
-static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
- PyObject *closure) {
+static
+__pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
+ PyObject *closure)
+{
__pyx_GeneratorObject *gen =
- PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
+ PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType);
if (gen == NULL)
return NULL;
gen->body = body;
@@ -68244,7 +66450,6 @@ static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
gen->is_running = 0;
gen->resume_label = 0;
gen->classobj = NULL;
- gen->yieldfrom = NULL;
gen->exc_type = NULL;
gen->exc_value = NULL;
gen->exc_traceback = NULL;
@@ -68252,14 +66457,9 @@ static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
PyObject_GC_Track(gen);
return gen;
}
-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)) {
- return -1;
- }
- __pyx_GeneratorType = &__pyx_GeneratorType_type;
- return 0;
+static int __pyx_Generator_init(void)
+{
+ return PyType_Ready(&__pyx_GeneratorType);
}
static int __Pyx_check_binary_version(void) {
diff --git a/python/src/sa/rulefactory.pxi b/python/src/sa/rulefactory.pxi
index 34a002c5..afd83785 100644
--- a/python/src/sa/rulefactory.pxi
+++ b/python/src/sa/rulefactory.pxi
@@ -8,7 +8,7 @@ from libc.stdlib cimport malloc, realloc, free
from libc.string cimport memset, memcpy
from libc.math cimport fmod, ceil, floor, log
-from collections import defaultdict, Counter
+from collections import defaultdict
cdef int PRECOMPUTE = 0
cdef int MERGE = 1
@@ -1078,8 +1078,8 @@ cdef class HieroCachingRuleFactory:
extract_stop = monitor_cpu()
self.extract_time = self.extract_time + extract_stop - extract_start
if len(extracts) > 0:
- fcount = Counter()
- fphrases = defaultdict(lambda: defaultdict(Counter))
+ fcount = defaultdict(int)
+ fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(int)))
for f, e, count, als in extracts:
fcount[f] += count
fphrases[f][e][als] += count