summaryrefslogtreecommitdiff
path: root/python/src
diff options
context:
space:
mode:
Diffstat (limited to 'python/src')
-rw-r--r--python/src/sa/_sa.c8654
-rwxr-xr-xpython/src/sa/online_extractor.py337
-rw-r--r--python/src/sa/rulefactory.pxi6
-rw-r--r--python/src/sa/sym.pxi6
4 files changed, 5151 insertions, 3852 deletions
diff --git a/python/src/sa/_sa.c b/python/src/sa/_sa.c
index 9c8dc2cd..d7b9df9d 100644
--- a/python/src/sa/_sa.c
+++ b/python/src/sa/_sa.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.17.1 on Thu Dec 13 00:17:27 2012 */
+/* Generated by Cython 0.17.1 on Thu Dec 27 19:34:12 2012 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@@ -359,47 +359,51 @@ static const char *__pyx_f[] = {
/*--- Type declarations ---*/
struct __pyx_obj_3_sa_HieroCachingRuleFactory;
struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence;
+struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr;
struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats;
-struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr;
+struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr;
+struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr;
struct __pyx_obj_3_sa_IntList;
struct __pyx_obj_3_sa_VEBIterator;
struct __pyx_obj_3_sa_BiLex;
struct __pyx_obj_3_sa_VEB;
+struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words;
struct __pyx_obj_3_sa_LCP;
struct __pyx_obj_3_sa_DataArray;
struct __pyx_obj_3_sa_BitSetIterator;
-struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments;
struct __pyx_obj_3_sa_Precomputation;
+struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments;
+struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr;
struct __pyx_obj_3_sa_SuffixArray;
+struct __pyx_obj_3_sa___pyx_scope_struct_16___str__;
struct __pyx_obj_3_sa_Alphabet;
struct __pyx_obj_3_sa_Rule;
struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr;
+struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__;
struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr;
struct __pyx_obj_3_sa_PhraseLocation;
-struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__;
+struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__;
struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext;
+struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words;
struct __pyx_obj_3_sa_FeatureVector;
struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice;
+struct __pyx_obj_3_sa___pyx_scope_struct_19_input;
struct __pyx_obj_3_sa_Scorer;
struct __pyx_obj_3_sa_Alignment;
struct __pyx_obj_3_sa_BitSet;
struct __pyx_obj_3_sa_Sampler;
struct __pyx_obj_3_sa_StringMap;
-struct __pyx_obj_3_sa___pyx_scope_struct_17___str__;
struct __pyx_obj_3_sa_TrieNode;
struct __pyx_obj_3_sa_ExtendedTrieNode;
struct __pyx_obj_3_sa_TrieMap;
struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr;
struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice;
-struct __pyx_obj_3_sa___pyx_scope_struct_12___str__;
-struct __pyx_obj_3_sa___pyx_scope_struct_15_input;
-struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr;
struct __pyx_obj_3_sa_Phrase;
struct __pyx_obj_3_sa___pyx_scope_struct____iter__;
struct __pyx_obj_3_sa_TrieTable;
-struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__;
struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr;
struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr;
+struct __pyx_obj_3_sa___pyx_scope_struct_21___str__;
struct __pyx_obj_3_sa_FloatList;
struct __pyx_t_3_sa__node;
struct __pyx_t_3_sa__BitSet;
@@ -409,7 +413,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/m/workspace/cdec/python/src/sa/bilex.pxi":9
* from libc.string cimport memset, strcpy
*
* cdef struct _node: # <<<<<<<<<<<<<<
@@ -423,7 +427,7 @@ struct __pyx_t_3_sa__node {
int val;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":30
+/* "/home/m/workspace/cdec/python/src/sa/veb.pxi":30
* _init_lower_mask()
*
* cdef struct _BitSet: # <<<<<<<<<<<<<<
@@ -437,7 +441,7 @@ struct __pyx_t_3_sa__BitSet {
int size;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":168
+/* "/home/m/workspace/cdec/python/src/sa/veb.pxi":168
* return result
*
* cdef struct _VEB: # <<<<<<<<<<<<<<
@@ -454,7 +458,7 @@ struct __pyx_t_3_sa__VEB {
void **bottom;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":10
+/* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":10
* cdef struct _Trie_Node # forward decl
*
* cdef struct _Trie_Edge: # <<<<<<<<<<<<<<
@@ -468,7 +472,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/m/workspace/cdec/python/src/sa/precomputation.pxi":8
* from libc.string cimport memset, memcpy
*
* cdef struct _Trie_Node # forward decl # <<<<<<<<<<<<<<
@@ -481,7 +485,7 @@ struct __pyx_t_3_sa__Trie_Node {
int arr_len;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":66
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":66
*
* # linked list structure for storing matches in BaselineRuleFactory
* cdef struct match_node: # <<<<<<<<<<<<<<
@@ -493,7 +497,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":162
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":162
*
* # struct used to encapsulate a single matching
* cdef struct Matching: # <<<<<<<<<<<<<<
@@ -508,7 +512,7 @@ struct __pyx_t_3_sa_Matching {
int size;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":218
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":218
*
*
* cdef class HieroCachingRuleFactory: # <<<<<<<<<<<<<<
@@ -557,11 +561,12 @@ struct __pyx_obj_3_sa_HieroCachingRuleFactory {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":115
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":115
* for arc in node for node in lattice)
*
* def decode_sentence(lattice): # <<<<<<<<<<<<<<
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+ *
*/
struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence {
PyObject_HEAD
@@ -569,7 +574,24 @@ struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":36
+/* "/home/m/workspace/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())) # <<<<<<<<<<<<<<
+ * return ' ||| '.join(fields)
+ *
+ */
+struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *__pyx_outer_scope;
+ PyObject *__pyx_v_a;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "/home/m/workspace/cdec/python/src/sa/lcp.pxi":36
* logger.info("LCP array completed")
*
* def compute_stats(self, int max_n): # <<<<<<<<<<<<<<
@@ -600,16 +622,33 @@ struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":21
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":119
+ *
+ * def encode_words(words):
+ * return tuple(sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
+ *
+ * def decode_words(syms):
+ */
+struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *__pyx_outer_scope;
+ PyObject *__pyx_v_word;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "/home/m/workspace/cdec/python/src/sa/features.pxi":21
*
* def __str__(self):
* return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<<
*
* cdef class Scorer:
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr {
+struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr {
PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *__pyx_outer_scope;
+ struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *__pyx_outer_scope;
PyObject *__pyx_v_feat;
PyObject *__pyx_t_0;
Py_ssize_t __pyx_t_1;
@@ -634,7 +673,7 @@ struct __pyx_obj_3_sa_IntList {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":340
+/* "/home/m/workspace/cdec/python/src/sa/veb.pxi":340
*
*
* cdef class VEBIterator: # <<<<<<<<<<<<<<
@@ -648,7 +687,7 @@ struct __pyx_obj_3_sa_VEBIterator {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":47
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":47
*
*
* cdef class BiLex: # <<<<<<<<<<<<<<
@@ -669,7 +708,7 @@ struct __pyx_obj_3_sa_BiLex {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":354
+/* "/home/m/workspace/cdec/python/src/sa/veb.pxi":354
*
*
* cdef class VEB: # <<<<<<<<<<<<<<
@@ -683,7 +722,20 @@ struct __pyx_obj_3_sa_VEB {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":5
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":118
+ * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+ *
+ * def encode_words(words): # <<<<<<<<<<<<<<
+ * return tuple(sym_fromstring(word, True) for word in words)
+ *
+ */
+struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words {
+ PyObject_HEAD
+ PyObject *__pyx_v_words;
+};
+
+
+/* "/home/m/workspace/cdec/python/src/sa/lcp.pxi":5
* as k most frequent n-grams"""
*
* cdef class LCP: # <<<<<<<<<<<<<<
@@ -697,7 +749,7 @@ struct __pyx_obj_3_sa_LCP {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":9
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":9
* from libc.string cimport memset, strcpy
*
* cdef class DataArray: # <<<<<<<<<<<<<<
@@ -716,7 +768,7 @@ struct __pyx_obj_3_sa_DataArray {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":100
+/* "/home/m/workspace/cdec/python/src/sa/veb.pxi":100
*
*
* cdef class BitSetIterator: # <<<<<<<<<<<<<<
@@ -730,14 +782,35 @@ struct __pyx_obj_3_sa_BitSetIterator {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":190
+/* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":188
+ *
+ *
+ * cdef class Precomputation: # <<<<<<<<<<<<<<
+ * cdef int precompute_rank
+ * cdef int precompute_secondary_rank
+ */
+struct __pyx_obj_3_sa_Precomputation {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_3_sa_Precomputation *__pyx_vtab;
+ int precompute_rank;
+ int precompute_secondary_rank;
+ int max_length;
+ int max_nonterminals;
+ int train_max_initial_size;
+ int train_min_gap_size;
+ PyObject *precomputed_index;
+ PyObject *precomputed_collocations;
+};
+
+
+/* "/home/m/workspace/cdec/python/src/sa/rule.pxi":190
* return ' ||| '.join(fields)
*
* def alignments(self): # <<<<<<<<<<<<<<
* for point in self.word_alignments:
* yield point/65536, point%65536
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments {
+struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments {
PyObject_HEAD
PyObject *__pyx_v_point;
struct __pyx_obj_3_sa_Rule *__pyx_v_self;
@@ -747,28 +820,22 @@ struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":188
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":122
*
- *
- * cdef class Precomputation: # <<<<<<<<<<<<<<
- * cdef int precompute_rank
- * cdef int precompute_secondary_rank
+ * def decode_words(syms):
+ * return tuple(sym_tostring(sym) for sym in syms) # <<<<<<<<<<<<<<
*/
-struct __pyx_obj_3_sa_Precomputation {
+struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_Precomputation *__pyx_vtab;
- int precompute_rank;
- int precompute_secondary_rank;
- int max_length;
- int max_nonterminals;
- int train_max_initial_size;
- int train_min_gap_size;
- PyObject *precomputed_index;
- PyObject *precomputed_collocations;
+ struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *__pyx_outer_scope;
+ PyObject *__pyx_v_sym;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":6
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":6
* from libc.stdio cimport FILE, fclose, fopen
*
* cdef class SuffixArray: # <<<<<<<<<<<<<<
@@ -784,7 +851,20 @@ struct __pyx_obj_3_sa_SuffixArray {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":7
+/* "/home/m/workspace/cdec/python/src/sa/rule.pxi":183
+ * return self.f.arity()
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * cdef unsigned i
+ * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)]
+ */
+struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ {
+ PyObject_HEAD
+ struct __pyx_obj_3_sa_Rule *__pyx_v_self;
+};
+
+
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":7
* cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1
*
* cdef class Alphabet: # <<<<<<<<<<<<<<
@@ -820,7 +900,7 @@ struct __pyx_obj_3_sa_Rule {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":109
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":109
* def make_lattice(words):
* word_ids = (sym_fromstring(word, True) for word in words)
* return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<<
@@ -837,7 +917,23 @@ struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":74
+/* "/home/m/workspace/cdec/python/src/sa/features.pxi":15
+ * self.values.append(value)
+ *
+ * def __iter__(self): # <<<<<<<<<<<<<<
+ * cdef unsigned i
+ * for i in range(self.names.len):
+ */
+struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ {
+ PyObject_HEAD
+ unsigned int __pyx_v_i;
+ struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self;
+ int __pyx_t_0;
+ unsigned int __pyx_t_1;
+};
+
+
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":74
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
@@ -865,23 +961,22 @@ struct __pyx_obj_3_sa_PhraseLocation {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":15
- * self.values.append(value)
+/* "/home/m/workspace/cdec/python/src/sa/rule.pxi":141
+ * return self.syms[i]
*
* def __iter__(self): # <<<<<<<<<<<<<<
- * cdef unsigned i
- * for i in range(self.names.len):
+ * cdef int i
+ * for i from 0 <= i < self.n:
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ {
+struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ {
PyObject_HEAD
- unsigned int __pyx_v_i;
- struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self;
+ int __pyx_v_i;
+ struct __pyx_obj_3_sa_Phrase *__pyx_v_self;
int __pyx_t_0;
- unsigned int __pyx_t_1;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":72
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":72
* self.read_text_data(fp)
*
* def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<<
@@ -895,6 +990,18 @@ struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext {
};
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":121
+ * return tuple(sym_fromstring(word, True) for word in words)
+ *
+ * def decode_words(syms): # <<<<<<<<<<<<<<
+ * return tuple(sym_tostring(sym) for sym in syms)
+ */
+struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words {
+ PyObject_HEAD
+ PyObject *__pyx_v_syms;
+};
+
+
/* "_sa.pxd":25
* cdef void read_handle(self, FILE* f)
*
@@ -909,7 +1016,7 @@ struct __pyx_obj_3_sa_FeatureVector {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":111
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":111
* return tuple(((word, None, 1), ) for word in word_ids)
*
* def decode_lattice(lattice): # <<<<<<<<<<<<<<
@@ -922,7 +1029,93 @@ struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":23
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":933
+ * return sorted(result);
+ *
+ * def input(self, fwords, meta): # <<<<<<<<<<<<<<
+ * '''When this function is called on the RuleFactory,
+ * it looks up all of the rules that can be used to translate
+ */
+struct __pyx_obj_3_sa___pyx_scope_struct_19_input {
+ PyObject_HEAD
+ PyObject *__pyx_v_alignment;
+ PyObject *__pyx_v_als;
+ PyObject *__pyx_v_alslist;
+ int __pyx_v_alt;
+ int __pyx_v_alt_id;
+ int __pyx_v_arity;
+ struct __pyx_obj_3_sa_IntList *__pyx_v_chunklen;
+ PyObject *__pyx_v_count;
+ PyObject *__pyx_v_e;
+ PyObject *__pyx_v_elist;
+ PyObject *__pyx_v_extract;
+ PyObject *__pyx_v_extract_start;
+ PyObject *__pyx_v_extract_stop;
+ PyObject *__pyx_v_extracts;
+ PyObject *__pyx_v_f;
+ PyObject *__pyx_v_fcount;
+ int __pyx_v_flen;
+ PyObject *__pyx_v_fphrases;
+ PyObject *__pyx_v_frontier;
+ PyObject *__pyx_v_frontier_nodes;
+ PyObject *__pyx_v_fwords;
+ struct __pyx_obj_3_sa_Phrase *__pyx_v_hiero_phrase;
+ long __pyx_v_hit;
+ int __pyx_v_i;
+ PyObject *__pyx_v_input_match;
+ PyObject *__pyx_v_is_shadow_path;
+ int __pyx_v_j;
+ int __pyx_v_k;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_v_loc;
+ PyObject *__pyx_v_locs;
+ int __pyx_v_lookup_required;
+ struct __pyx_t_3_sa_Matching __pyx_v_matching;
+ PyObject *__pyx_v_max_locs;
+ PyObject *__pyx_v_meta;
+ PyObject *__pyx_v_new_frontier;
+ PyObject *__pyx_v_new_node;
+ PyObject *__pyx_v_next_states;
+ PyObject *__pyx_v_node;
+ PyObject *__pyx_v_nodes_isteps_away_buffer;
+ int __pyx_v_nualt;
+ int __pyx_v_num_samples;
+ int __pyx_v_num_subpatterns;
+ PyObject *__pyx_v_pathlen;
+ PyObject *__pyx_v_phrase;
+ struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_phrase_location;
+ PyObject *__pyx_v_prefix;
+ PyObject *__pyx_v_reachable_buffer;
+ PyObject *__pyx_v_sa_range;
+ struct __pyx_obj_3_sa_IntList *__pyx_v_sample;
+ struct __pyx_obj_3_sa_FeatureVector *__pyx_v_scores;
+ struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self;
+ PyObject *__pyx_v_spanlen;
+ float __pyx_v_start_time;
+ PyObject *__pyx_v_stop_time;
+ PyObject *__pyx_v_suffix_link;
+ int __pyx_v_suffix_link_xcat;
+ PyObject *__pyx_v_suffix_link_xcat_index;
+ PyObject *__pyx_v_word_id;
+ int __pyx_v_x1;
+ int __pyx_v_xcat;
+ PyObject *__pyx_v_xcat_index;
+ 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;
+ 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;
+};
+
+
+/* "/home/m/workspace/cdec/python/src/sa/features.pxi":23
* return ' '.join('%s=%s' % feat for feat in self)
*
* cdef class Scorer: # <<<<<<<<<<<<<<
@@ -936,7 +1129,7 @@ struct __pyx_obj_3_sa_Scorer {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":8
+/* "/home/m/workspace/cdec/python/src/sa/alignment.pxi":8
* # May need to revisit if things get really tight, though.
*
* cdef class Alignment: # <<<<<<<<<<<<<<
@@ -951,7 +1144,7 @@ struct __pyx_obj_3_sa_Alignment {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":118
+/* "/home/m/workspace/cdec/python/src/sa/veb.pxi":118
* # (entirely C-implemented) _BitSet struct.
* # Very slow; use only for debugging
* cdef class BitSet: # <<<<<<<<<<<<<<
@@ -964,7 +1157,7 @@ struct __pyx_obj_3_sa_BitSet {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":96
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":96
*
*
* cdef class Sampler: # <<<<<<<<<<<<<<
@@ -978,7 +1171,7 @@ struct __pyx_obj_3_sa_Sampler {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":8
+/* "/home/m/workspace/cdec/python/src/sa/str_map.pxi":8
* char* stringmap_word(StrMap *vocab, int i)
*
* cdef class StringMap: # <<<<<<<<<<<<<<
@@ -992,20 +1185,7 @@ struct __pyx_obj_3_sa_StringMap {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":20
- * yield (FD.word(self.names[i]), self.values[i])
- *
- * def __str__(self): # <<<<<<<<<<<<<<
- * return ' '.join('%s=%s' % feat for feat in self)
- *
- */
-struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ {
- PyObject_HEAD
- struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self;
-};
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":36
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":36
* cdef int EPSILON = sym_fromstring('*EPS*', True)
*
* cdef class TrieNode: # <<<<<<<<<<<<<<
@@ -1018,7 +1198,7 @@ struct __pyx_obj_3_sa_TrieNode {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":42
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":42
* self.children = {}
*
* cdef class ExtendedTrieNode(TrieNode): # <<<<<<<<<<<<<<
@@ -1033,7 +1213,7 @@ struct __pyx_obj_3_sa_ExtendedTrieNode {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":109
+/* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":109
* trie_node_to_map(edge.node, result, prefix, include_zeros)
*
* cdef class TrieMap: # <<<<<<<<<<<<<<
@@ -1048,7 +1228,7 @@ struct __pyx_obj_3_sa_TrieMap {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":112
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":112
*
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<<
@@ -1075,7 +1255,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":107
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":107
* return ALPHABET.fromstring(string, terminal)
*
* def make_lattice(words): # <<<<<<<<<<<<<<
@@ -1089,122 +1269,6 @@ struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":183
- * return self.f.arity()
- *
- * def __str__(self): # <<<<<<<<<<<<<<
- * cdef unsigned i
- * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)]
- */
-struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ {
- PyObject_HEAD
- struct __pyx_obj_3_sa_Rule *__pyx_v_self;
-};
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":933
- * return sorted(result);
- *
- * def input(self, fwords, meta): # <<<<<<<<<<<<<<
- * '''When this function is called on the RuleFactory,
- * it looks up all of the rules that can be used to translate
- */
-struct __pyx_obj_3_sa___pyx_scope_struct_15_input {
- PyObject_HEAD
- PyObject *__pyx_v_alignment;
- PyObject *__pyx_v_als;
- PyObject *__pyx_v_alslist;
- int __pyx_v_alt;
- int __pyx_v_alt_id;
- int __pyx_v_arity;
- struct __pyx_obj_3_sa_IntList *__pyx_v_chunklen;
- PyObject *__pyx_v_count;
- PyObject *__pyx_v_e;
- PyObject *__pyx_v_elist;
- PyObject *__pyx_v_extract;
- PyObject *__pyx_v_extract_start;
- PyObject *__pyx_v_extract_stop;
- PyObject *__pyx_v_extracts;
- PyObject *__pyx_v_f;
- PyObject *__pyx_v_fcount;
- int __pyx_v_flen;
- PyObject *__pyx_v_fphrases;
- PyObject *__pyx_v_frontier;
- PyObject *__pyx_v_frontier_nodes;
- PyObject *__pyx_v_fwords;
- struct __pyx_obj_3_sa_Phrase *__pyx_v_hiero_phrase;
- long __pyx_v_hit;
- int __pyx_v_i;
- PyObject *__pyx_v_input_match;
- PyObject *__pyx_v_is_shadow_path;
- int __pyx_v_j;
- int __pyx_v_k;
- PyObject *__pyx_v_key;
- PyObject *__pyx_v_loc;
- PyObject *__pyx_v_locs;
- int __pyx_v_lookup_required;
- struct __pyx_t_3_sa_Matching __pyx_v_matching;
- PyObject *__pyx_v_max_locs;
- PyObject *__pyx_v_meta;
- PyObject *__pyx_v_new_frontier;
- PyObject *__pyx_v_new_node;
- PyObject *__pyx_v_next_states;
- PyObject *__pyx_v_node;
- PyObject *__pyx_v_nodes_isteps_away_buffer;
- int __pyx_v_nualt;
- int __pyx_v_num_samples;
- int __pyx_v_num_subpatterns;
- PyObject *__pyx_v_pathlen;
- PyObject *__pyx_v_phrase;
- struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_phrase_location;
- PyObject *__pyx_v_prefix;
- PyObject *__pyx_v_reachable_buffer;
- PyObject *__pyx_v_sa_range;
- struct __pyx_obj_3_sa_IntList *__pyx_v_sample;
- struct __pyx_obj_3_sa_FeatureVector *__pyx_v_scores;
- struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self;
- PyObject *__pyx_v_spanlen;
- float __pyx_v_start_time;
- PyObject *__pyx_v_stop_time;
- PyObject *__pyx_v_suffix_link;
- int __pyx_v_suffix_link_xcat;
- PyObject *__pyx_v_suffix_link_xcat_index;
- PyObject *__pyx_v_word_id;
- int __pyx_v_x1;
- int __pyx_v_xcat;
- PyObject *__pyx_v_xcat_index;
- 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;
- 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;
-};
-
-
-/* "/Users/vchahun/Sandbox/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())) # <<<<<<<<<<<<<<
- * return ' ||| '.join(fields)
- *
- */
-struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr {
- PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *__pyx_outer_scope;
- PyObject *__pyx_v_a;
- PyObject *__pyx_t_0;
- Py_ssize_t __pyx_t_1;
- PyObject *(*__pyx_t_2)(PyObject *);
-};
-
-
/* "_sa.pxd":29
* cdef FloatList values
*
@@ -1222,7 +1286,7 @@ struct __pyx_obj_3_sa_Phrase {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":81
+/* "/home/m/workspace/cdec/python/src/sa/int_list.pxi":81
* free(self.arr)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -1238,7 +1302,7 @@ struct __pyx_obj_3_sa___pyx_scope_struct____iter__ {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":53
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":53
*
*
* cdef class TrieTable: # <<<<<<<<<<<<<<
@@ -1253,22 +1317,7 @@ struct __pyx_obj_3_sa_TrieTable {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":141
- * return self.syms[i]
- *
- * def __iter__(self): # <<<<<<<<<<<<<<
- * cdef int i
- * for i from 0 <= i < self.n:
- */
-struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ {
- PyObject_HEAD
- int __pyx_v_i;
- struct __pyx_obj_3_sa_Phrase *__pyx_v_self;
- int __pyx_t_0;
-};
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":108
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":108
*
* def make_lattice(words):
* word_ids = (sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
@@ -1285,10 +1334,12 @@ struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":116
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":116
*
* def decode_sentence(lattice):
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) # <<<<<<<<<<<<<<
+ *
+ * def encode_words(words):
*/
struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr {
PyObject_HEAD
@@ -1301,6 +1352,19 @@ struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr {
};
+/* "/home/m/workspace/cdec/python/src/sa/features.pxi":20
+ * yield (FD.word(self.names[i]), self.values[i])
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return ' '.join('%s=%s' % feat for feat in self)
+ *
+ */
+struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ {
+ PyObject_HEAD
+ struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self;
+};
+
+
/* "_sa.pxd":3
* from libc.stdio cimport FILE
*
@@ -1319,7 +1383,7 @@ struct __pyx_obj_3_sa_FloatList {
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":8
+/* "/home/m/workspace/cdec/python/src/sa/str_map.pxi":8
* char* stringmap_word(StrMap *vocab, int i)
*
* cdef class StringMap: # <<<<<<<<<<<<<<
@@ -1334,7 +1398,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/m/workspace/cdec/python/src/sa/data_array.pxi":9
* from libc.string cimport memset, strcpy
*
* cdef class DataArray: # <<<<<<<<<<<<<<
@@ -1349,7 +1413,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/m/workspace/cdec/python/src/sa/precomputation.pxi":109
* trie_node_to_map(edge.node, result, prefix, include_zeros)
*
* cdef class TrieMap: # <<<<<<<<<<<<<<
@@ -1364,7 +1428,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/alignment.pxi":8
+/* "/home/m/workspace/cdec/python/src/sa/alignment.pxi":8
* # May need to revisit if things get really tight, though.
*
* cdef class Alignment: # <<<<<<<<<<<<<<
@@ -1380,7 +1444,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/m/workspace/cdec/python/src/sa/bilex.pxi":47
*
*
* cdef class BiLex: # <<<<<<<<<<<<<<
@@ -1399,7 +1463,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/m/workspace/cdec/python/src/sa/int_list.pxi":9
* from libc.string cimport memset, memcpy
*
* cdef class IntList: # <<<<<<<<<<<<<<
@@ -1419,7 +1483,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/m/workspace/cdec/python/src/sa/rule.pxi":4
* from libc.string cimport strsep, strcpy, strlen
*
* cdef class Phrase: # <<<<<<<<<<<<<<
@@ -1434,7 +1498,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":74
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":74
* # in the suffix array; if discontiguous, it is the set of
* # actual locations (packed into an array)
* cdef class PhraseLocation: # <<<<<<<<<<<<<<
@@ -1448,7 +1512,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/m/workspace/cdec/python/src/sa/precomputation.pxi":188
*
*
* cdef class Precomputation: # <<<<<<<<<<<<<<
@@ -1463,7 +1527,7 @@ 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/features.pxi":23
+/* "/home/m/workspace/cdec/python/src/sa/features.pxi":23
* return ' '.join('%s=%s' % feat for feat in self)
*
* cdef class Scorer: # <<<<<<<<<<<<<<
@@ -1477,7 +1541,7 @@ struct __pyx_vtabstruct_3_sa_Scorer {
static struct __pyx_vtabstruct_3_sa_Scorer *__pyx_vtabptr_3_sa_Scorer;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":9
+/* "/home/m/workspace/cdec/python/src/sa/float_list.pxi":9
* from libc.string cimport memset, strcpy, strlen
*
* cdef class FloatList: # <<<<<<<<<<<<<<
@@ -1493,7 +1557,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/m/workspace/cdec/python/src/sa/veb.pxi":354
*
*
* cdef class VEB: # <<<<<<<<<<<<<<
@@ -1509,7 +1573,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/m/workspace/cdec/python/src/sa/sym.pxi":7
* cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1
*
* cdef class Alphabet: # <<<<<<<<<<<<<<
@@ -1532,7 +1596,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":218
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":218
*
*
* cdef class HieroCachingRuleFactory: # <<<<<<<<<<<<<<
@@ -1560,7 +1624,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/m/workspace/cdec/python/src/sa/suffix_array.pxi":6
* from libc.stdio cimport FILE, fclose, fopen
*
* cdef class SuffixArray: # <<<<<<<<<<<<<<
@@ -2199,14 +2263,18 @@ static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_7_decode_lattice = 0;
static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_8_genexpr = 0;
static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_9_decode_sentence = 0;
static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_10_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_11___iter__ = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_12___str__ = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_13_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_14_alignments = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_15_input = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_16___iter__ = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_17___str__ = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_18_genexpr = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_11_encode_words = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_12_genexpr = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_13_decode_words = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_14_genexpr = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_15___iter__ = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_16___str__ = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_17_genexpr = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_18_alignments = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_19_input = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_20___iter__ = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_21___str__ = 0;
+static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_22_genexpr = 0;
static int __pyx_v_3_sa_MIN_BOTTOM_SIZE;
static int __pyx_v_3_sa_MIN_BOTTOM_BITS;
static int __pyx_v_3_sa_LOWER_MASK[32];
@@ -2377,6 +2445,10 @@ static PyObject *__pyx_pf_3_sa_14decode_lattice_genexpr(PyObject *__pyx_self); /
static PyObject *__pyx_pf_3_sa_4decode_lattice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lattice); /* proto */
static PyObject *__pyx_pf_3_sa_15decode_sentence_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3_sa_6decode_sentence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lattice); /* proto */
+static PyObject *__pyx_pf_3_sa_12encode_words_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_3_sa_8encode_words(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_words); /* proto */
+static PyObject *__pyx_pf_3_sa_12decode_words_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_3_sa_10decode_words(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_syms); /* proto */
static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_words); /* proto */
static void __pyx_pf_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3_sa_6Phrase_4__str__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self); /* proto */
@@ -2466,6 +2538,7 @@ static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self
static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_22input(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_meta); /* proto */
+static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(CYTHON_UNUSED struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_words, PyObject *__pyx_v_e_words, PyObject *__pyx_v_alignment); /* proto */
static int __pyx_pf_3_sa_13FeatureVector___cinit__(struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3_sa_13FeatureVector_2set(struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self, unsigned int __pyx_v_name, float __pyx_v_value); /* proto */
static PyObject *__pyx_pf_3_sa_13FeatureVector_4__iter__(struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self); /* proto */
@@ -2564,11 +2637,12 @@ static char __pyx_k_130[] = "Inside edges of following subphrase are not tight";
static char __pyx_k_131[] = "Subphrase [%d, %d] failed integrity check";
static char __pyx_k_132[] = "Didn't extract anything from [%d, %d] -> [%d, %d]";
static char __pyx_k_133[] = "Unable to extract basic phrase";
-static char __pyx_k_134[] = "%s=%s";
-static char __pyx_k_137[] = "/Users/vchahun/Sandbox/cdec/python/src/sa/_sa.pyx";
-static char __pyx_k_138[] = "cdec.sa";
-static char __pyx_k_142[] = "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi";
-static char __pyx_k_147[] = "*EPS*";
+static char __pyx_k_134[] = "I would add:";
+static char __pyx_k_136[] = "%s=%s";
+static char __pyx_k_139[] = "/home/m/workspace/cdec/python/src/sa/_sa.pyx";
+static char __pyx_k_140[] = "cdec.sa";
+static char __pyx_k_144[] = "/home/m/workspace/cdec/python/src/sa/sym.pxi";
+static char __pyx_k_153[] = "*EPS*";
static char __pyx_k__gc[] = "gc";
static char __pyx_k__sa[] = "sa";
static char __pyx_k___sa[] = "_sa";
@@ -2601,6 +2675,7 @@ static char __pyx_k__side[] = "side";
static char __pyx_k__size[] = "size";
static char __pyx_k__skip[] = "skip";
static char __pyx_k__stop[] = "stop";
+static char __pyx_k__syms[] = "syms";
static char __pyx_k__warn[] = "warn";
static char __pyx_k__word[] = "word";
static char __pyx_k___SEP_[] = "_SEP_";
@@ -2646,8 +2721,10 @@ 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";
+static char __pyx_k__e_words[] = "e_words";
static char __pyx_k__edarray[] = "edarray";
static char __pyx_k__ephrase[] = "ephrase";
+static char __pyx_k__f_words[] = "f_words";
static char __pyx_k__fphrase[] = "fphrase";
static char __pyx_k__fsarray[] = "fsarray";
static char __pyx_k__genexpr[] = "genexpr";
@@ -2725,6 +2802,8 @@ 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___doquicksort[] = "_doquicksort";
+static char __pyx_k__decode_words[] = "decode_words";
+static char __pyx_k__encode_words[] = "encode_words";
static char __pyx_k__gzip_or_text[] = "gzip_or_text";
static char __pyx_k__make_lattice[] = "make_lattice";
static char __pyx_k__min_gap_size[] = "min_gap_size";
@@ -2789,10 +2868,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_137;
-static PyObject *__pyx_kp_s_138;
+static PyObject *__pyx_kp_s_136;
+static PyObject *__pyx_kp_s_139;
static PyObject *__pyx_kp_s_14;
-static PyObject *__pyx_kp_s_142;
+static PyObject *__pyx_kp_s_140;
+static PyObject *__pyx_kp_s_144;
static PyObject *__pyx_kp_s_18;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_s_21;
@@ -2885,12 +2965,15 @@ static PyObject *__pyx_n_s__curr_idx;
static PyObject *__pyx_n_s__debug;
static PyObject *__pyx_n_s__decode_lattice;
static PyObject *__pyx_n_s__decode_sentence;
+static PyObject *__pyx_n_s__decode_words;
static PyObject *__pyx_n_s__defaultdict;
static PyObject *__pyx_n_s__dist;
static PyObject *__pyx_n_s__e;
static PyObject *__pyx_n_s__e_text;
+static PyObject *__pyx_n_s__e_words;
static PyObject *__pyx_n_s__earray;
static PyObject *__pyx_n_s__edarray;
+static PyObject *__pyx_n_s__encode_words;
static PyObject *__pyx_n_s__end;
static PyObject *__pyx_n_s__enumerate;
static PyObject *__pyx_n_s__ephrase;
@@ -2899,6 +2982,7 @@ static PyObject *__pyx_n_s__extend;
static PyObject *__pyx_n_s__extended;
static PyObject *__pyx_n_s__f;
static PyObject *__pyx_n_s__f_text;
+static PyObject *__pyx_n_s__f_words;
static PyObject *__pyx_n_s__fcount;
static PyObject *__pyx_n_s__filename;
static PyObject *__pyx_n_s__fphrase;
@@ -3017,6 +3101,7 @@ static PyObject *__pyx_n_s__start;
static PyObject *__pyx_n_s__stats;
static PyObject *__pyx_n_s__stop;
static PyObject *__pyx_n_s__suffix_link;
+static PyObject *__pyx_n_s__syms;
static PyObject *__pyx_n_s__test_sentence;
static PyObject *__pyx_n_s__tight_phrases;
static PyObject *__pyx_n_s__toMap;
@@ -3097,14 +3182,19 @@ static PyObject *__pyx_k_tuple_102;
static PyObject *__pyx_k_tuple_107;
static PyObject *__pyx_k_tuple_122;
static PyObject *__pyx_k_tuple_135;
-static PyObject *__pyx_k_tuple_139;
-static PyObject *__pyx_k_tuple_140;
-static PyObject *__pyx_k_tuple_143;
+static PyObject *__pyx_k_tuple_137;
+static PyObject *__pyx_k_tuple_141;
+static PyObject *__pyx_k_tuple_142;
static PyObject *__pyx_k_tuple_145;
-static PyObject *__pyx_k_codeobj_136;
-static PyObject *__pyx_k_codeobj_141;
-static PyObject *__pyx_k_codeobj_144;
+static PyObject *__pyx_k_tuple_147;
+static PyObject *__pyx_k_tuple_149;
+static PyObject *__pyx_k_tuple_151;
+static PyObject *__pyx_k_codeobj_138;
+static PyObject *__pyx_k_codeobj_143;
static PyObject *__pyx_k_codeobj_146;
+static PyObject *__pyx_k_codeobj_148;
+static PyObject *__pyx_k_codeobj_150;
+static PyObject *__pyx_k_codeobj_152;
/* "_sa.pyx":5
* import gzip
@@ -3414,7 +3504,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/m/workspace/cdec/python/src/sa/float_list.pxi":11
* cdef class FloatList:
*
* def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<<
@@ -3428,7 +3518,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -3438,7 +3528,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -3450,7 +3540,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/m/workspace/cdec/python/src/sa/float_list.pxi":14
* if initial_len > size:
* size = initial_len
* self.size = size # <<<<<<<<<<<<<<
@@ -3459,7 +3549,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/m/workspace/cdec/python/src/sa/float_list.pxi":15
* size = initial_len
* self.size = size
* self.increment = increment # <<<<<<<<<<<<<<
@@ -3468,7 +3558,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/m/workspace/cdec/python/src/sa/float_list.pxi":16
* self.size = size
* self.increment = increment
* self.len = initial_len # <<<<<<<<<<<<<<
@@ -3477,7 +3567,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/m/workspace/cdec/python/src/sa/float_list.pxi":17
* self.increment = increment
* self.len = initial_len
* self.arr = <float*> malloc(size*sizeof(float)) # <<<<<<<<<<<<<<
@@ -3486,7 +3576,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -3509,7 +3599,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/m/workspace/cdec/python/src/sa/float_list.pxi":20
* memset(self.arr, 0, initial_len*sizeof(float))
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -3521,7 +3611,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/m/workspace/cdec/python/src/sa/float_list.pxi":21
*
* def __dealloc__(self):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -3544,7 +3634,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/m/workspace/cdec/python/src/sa/float_list.pxi":23
* free(self.arr)
*
* def __getitem__(self, i): # <<<<<<<<<<<<<<
@@ -3567,7 +3657,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/m/workspace/cdec/python/src/sa/float_list.pxi":24
*
* def __getitem__(self, i):
* j = i # <<<<<<<<<<<<<<
@@ -3577,7 +3667,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/m/workspace/cdec/python/src/sa/float_list.pxi":25
* def __getitem__(self, i):
* j = i
* if i<0: # <<<<<<<<<<<<<<
@@ -3589,7 +3679,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/m/workspace/cdec/python/src/sa/float_list.pxi":26
* j = i
* if i<0:
* j = self.len + i # <<<<<<<<<<<<<<
@@ -3608,7 +3698,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/m/workspace/cdec/python/src/sa/float_list.pxi":27
* if i<0:
* j = self.len + i
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -3631,7 +3721,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -3666,7 +3756,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -3695,7 +3785,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/m/workspace/cdec/python/src/sa/float_list.pxi":31
* return self.arr[j]
*
* cdef void set(self, int i, float v): # <<<<<<<<<<<<<<
@@ -3717,7 +3807,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/m/workspace/cdec/python/src/sa/float_list.pxi":32
*
* cdef void set(self, int i, float v):
* j = i # <<<<<<<<<<<<<<
@@ -3726,7 +3816,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/m/workspace/cdec/python/src/sa/float_list.pxi":33
* cdef void set(self, int i, float v):
* j = i
* if i<0: # <<<<<<<<<<<<<<
@@ -3736,7 +3826,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/m/workspace/cdec/python/src/sa/float_list.pxi":34
* j = i
* if i<0:
* j = self.len + i # <<<<<<<<<<<<<<
@@ -3748,7 +3838,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/m/workspace/cdec/python/src/sa/float_list.pxi":35
* if i<0:
* j = self.len + i
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -3764,7 +3854,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -3801,7 +3891,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -3831,7 +3921,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/m/workspace/cdec/python/src/sa/float_list.pxi":39
* self.arr[j] = v
*
* def __setitem__(self, i, val): # <<<<<<<<<<<<<<
@@ -3849,7 +3939,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/m/workspace/cdec/python/src/sa/float_list.pxi":40
*
* def __setitem__(self, i, val):
* self.set(i, val) # <<<<<<<<<<<<<<
@@ -3881,7 +3971,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/m/workspace/cdec/python/src/sa/float_list.pxi":42
* self.set(i, val)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -3894,7 +3984,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/m/workspace/cdec/python/src/sa/float_list.pxi":43
*
* def __len__(self):
* return self.len # <<<<<<<<<<<<<<
@@ -3931,7 +4021,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/m/workspace/cdec/python/src/sa/float_list.pxi":45
* return self.len
*
* def append(self, float val): # <<<<<<<<<<<<<<
@@ -3945,7 +4035,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/m/workspace/cdec/python/src/sa/float_list.pxi":46
*
* def append(self, float val):
* if self.len == self.size: # <<<<<<<<<<<<<<
@@ -3955,7 +4045,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/m/workspace/cdec/python/src/sa/float_list.pxi":47
* def append(self, float val):
* if self.len == self.size:
* self.size = self.size + self.increment # <<<<<<<<<<<<<<
@@ -3964,7 +4054,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -3976,7 +4066,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -3985,7 +4075,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -4000,7 +4090,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/m/workspace/cdec/python/src/sa/float_list.pxi":52
* self.len = self.len + 1
*
* cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -4012,7 +4102,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/m/workspace/cdec/python/src/sa/float_list.pxi":53
*
* cdef void write_handle(self, FILE* f):
* fwrite(&(self.len), sizeof(float), 1, f) # <<<<<<<<<<<<<<
@@ -4021,7 +4111,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -4054,7 +4144,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/m/workspace/cdec/python/src/sa/float_list.pxi":56
* fwrite(self.arr, sizeof(float), self.len, f)
*
* def write(self, char* filename): # <<<<<<<<<<<<<<
@@ -4068,7 +4158,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/m/workspace/cdec/python/src/sa/float_list.pxi":58
* def write(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -4077,7 +4167,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/m/workspace/cdec/python/src/sa/float_list.pxi":59
* cdef FILE* f
* f = fopen(filename, "w")
* self.write_handle(f) # <<<<<<<<<<<<<<
@@ -4086,7 +4176,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/m/workspace/cdec/python/src/sa/float_list.pxi":60
* f = fopen(filename, "w")
* self.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -4101,7 +4191,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/m/workspace/cdec/python/src/sa/float_list.pxi":62
* fclose(f)
*
* cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -4113,7 +4203,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/m/workspace/cdec/python/src/sa/float_list.pxi":63
*
* cdef void read_handle(self, FILE* f):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -4122,7 +4212,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -4131,7 +4221,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -4140,7 +4230,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -4149,7 +4239,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -4182,7 +4272,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/m/workspace/cdec/python/src/sa/float_list.pxi":69
* fread(self.arr, sizeof(float), self.len, f)
*
* def read(self, char* filename): # <<<<<<<<<<<<<<
@@ -4196,7 +4286,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/m/workspace/cdec/python/src/sa/float_list.pxi":71
* def read(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -4205,7 +4295,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/m/workspace/cdec/python/src/sa/float_list.pxi":72
* cdef FILE* f
* f = fopen(filename, "r")
* self.read_handle(f) # <<<<<<<<<<<<<<
@@ -4213,7 +4303,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/m/workspace/cdec/python/src/sa/float_list.pxi":73
* f = fopen(filename, "r")
* self.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -4307,7 +4397,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/m/workspace/cdec/python/src/sa/int_list.pxi":11
* cdef class IntList:
*
* def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<<
@@ -4321,7 +4411,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -4331,7 +4421,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -4343,7 +4433,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/m/workspace/cdec/python/src/sa/int_list.pxi":14
* if initial_len > size:
* size = initial_len
* self.size = size # <<<<<<<<<<<<<<
@@ -4352,7 +4442,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/m/workspace/cdec/python/src/sa/int_list.pxi":15
* size = initial_len
* self.size = size
* self.increment = increment # <<<<<<<<<<<<<<
@@ -4361,7 +4451,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/m/workspace/cdec/python/src/sa/int_list.pxi":16
* self.size = size
* self.increment = increment
* self.len = initial_len # <<<<<<<<<<<<<<
@@ -4370,7 +4460,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/m/workspace/cdec/python/src/sa/int_list.pxi":17
* self.increment = increment
* self.len = initial_len
* self.arr = <int*> malloc(size*sizeof(int)) # <<<<<<<<<<<<<<
@@ -4379,7 +4469,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -4404,7 +4494,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/m/workspace/cdec/python/src/sa/int_list.pxi":20
* memset(self.arr, 0, initial_len*sizeof(int))
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -4427,7 +4517,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/m/workspace/cdec/python/src/sa/int_list.pxi":22
* def __str__(self):
* cdef unsigned i
* ret = "IntList[" # <<<<<<<<<<<<<<
@@ -4437,7 +4527,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/m/workspace/cdec/python/src/sa/int_list.pxi":23
* cdef unsigned i
* ret = "IntList["
* for idx in range(self.size): # <<<<<<<<<<<<<<
@@ -4448,7 +4538,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/m/workspace/cdec/python/src/sa/int_list.pxi":24
* ret = "IntList["
* for idx in range(self.size):
* if idx>0: # <<<<<<<<<<<<<<
@@ -4458,7 +4548,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/m/workspace/cdec/python/src/sa/int_list.pxi":25
* for idx in range(self.size):
* if idx>0:
* ret += "," # <<<<<<<<<<<<<<
@@ -4474,7 +4564,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/m/workspace/cdec/python/src/sa/int_list.pxi":26
* if idx>0:
* ret += ","
* ret += str(self.arr[idx]) # <<<<<<<<<<<<<<
@@ -4499,7 +4589,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/m/workspace/cdec/python/src/sa/int_list.pxi":27
* ret += ","
* ret += str(self.arr[idx])
* ret += "]" # <<<<<<<<<<<<<<
@@ -4512,7 +4602,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/m/workspace/cdec/python/src/sa/int_list.pxi":28
* ret += str(self.arr[idx])
* ret += "]"
* ret += "len=" # <<<<<<<<<<<<<<
@@ -4525,7 +4615,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/m/workspace/cdec/python/src/sa/int_list.pxi":29
* ret += "]"
* ret += "len="
* ret += self.len # <<<<<<<<<<<<<<
@@ -4541,7 +4631,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/m/workspace/cdec/python/src/sa/int_list.pxi":30
* ret += "len="
* ret += self.len
* return ret # <<<<<<<<<<<<<<
@@ -4578,7 +4668,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/m/workspace/cdec/python/src/sa/int_list.pxi":32
* return ret
*
* def index(self, val): # <<<<<<<<<<<<<<
@@ -4600,7 +4690,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/m/workspace/cdec/python/src/sa/int_list.pxi":34
* def index(self, val):
* cdef unsigned i
* for i in range(self.len): # <<<<<<<<<<<<<<
@@ -4611,7 +4701,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/m/workspace/cdec/python/src/sa/int_list.pxi":35
* cdef unsigned i
* for i in range(self.len):
* if self.arr[i] == val: # <<<<<<<<<<<<<<
@@ -4626,7 +4716,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/m/workspace/cdec/python/src/sa/int_list.pxi":36
* for i in range(self.len):
* if self.arr[i] == val:
* return i # <<<<<<<<<<<<<<
@@ -4644,7 +4734,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/m/workspace/cdec/python/src/sa/int_list.pxi":37
* if self.arr[i] == val:
* return i
* return IndexError # <<<<<<<<<<<<<<
@@ -4725,7 +4815,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/m/workspace/cdec/python/src/sa/int_list.pxi":39
* return IndexError
*
* def partition(self,start,end): # <<<<<<<<<<<<<<
@@ -4751,7 +4841,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/m/workspace/cdec/python/src/sa/int_list.pxi":40
*
* def partition(self,start,end):
* pivot = self.arr[end] # <<<<<<<<<<<<<<
@@ -4764,7 +4854,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/m/workspace/cdec/python/src/sa/int_list.pxi":41
* def partition(self,start,end):
* pivot = self.arr[end]
* bottom = start-1 # <<<<<<<<<<<<<<
@@ -4776,7 +4866,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/m/workspace/cdec/python/src/sa/int_list.pxi":42
* pivot = self.arr[end]
* bottom = start-1
* top = end # <<<<<<<<<<<<<<
@@ -4786,7 +4876,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/m/workspace/cdec/python/src/sa/int_list.pxi":43
* bottom = start-1
* top = end
* done = 0 # <<<<<<<<<<<<<<
@@ -4795,7 +4885,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/m/workspace/cdec/python/src/sa/int_list.pxi":44
* top = end
* done = 0
* while not done: # <<<<<<<<<<<<<<
@@ -4806,7 +4896,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/m/workspace/cdec/python/src/sa/int_list.pxi":45
* done = 0
* while not done:
* while not done: # <<<<<<<<<<<<<<
@@ -4817,7 +4907,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/m/workspace/cdec/python/src/sa/int_list.pxi":46
* while not done:
* while not done:
* bottom += 1 # <<<<<<<<<<<<<<
@@ -4830,7 +4920,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/m/workspace/cdec/python/src/sa/int_list.pxi":47
* while not done:
* bottom += 1
* if bottom == top: # <<<<<<<<<<<<<<
@@ -4842,7 +4932,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/m/workspace/cdec/python/src/sa/int_list.pxi":48
* bottom += 1
* if bottom == top:
* done = 1 # <<<<<<<<<<<<<<
@@ -4851,7 +4941,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/m/workspace/cdec/python/src/sa/int_list.pxi":49
* if bottom == top:
* done = 1
* break # <<<<<<<<<<<<<<
@@ -4863,7 +4953,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/m/workspace/cdec/python/src/sa/int_list.pxi":50
* done = 1
* break
* if self.arr[bottom] > pivot: # <<<<<<<<<<<<<<
@@ -4879,7 +4969,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/m/workspace/cdec/python/src/sa/int_list.pxi":51
* break
* if self.arr[bottom] > pivot:
* self.arr[top] = self.arr[bottom] # <<<<<<<<<<<<<<
@@ -4890,7 +4980,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/m/workspace/cdec/python/src/sa/int_list.pxi":52
* if self.arr[bottom] > pivot:
* self.arr[top] = self.arr[bottom]
* break # <<<<<<<<<<<<<<
@@ -4904,7 +4994,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/m/workspace/cdec/python/src/sa/int_list.pxi":53
* self.arr[top] = self.arr[bottom]
* break
* while not done: # <<<<<<<<<<<<<<
@@ -4915,7 +5005,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/m/workspace/cdec/python/src/sa/int_list.pxi":54
* break
* while not done:
* top -= 1 # <<<<<<<<<<<<<<
@@ -4928,7 +5018,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/m/workspace/cdec/python/src/sa/int_list.pxi":55
* while not done:
* top -= 1
* if top == bottom: # <<<<<<<<<<<<<<
@@ -4940,7 +5030,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/m/workspace/cdec/python/src/sa/int_list.pxi":56
* top -= 1
* if top == bottom:
* done = 1 # <<<<<<<<<<<<<<
@@ -4949,7 +5039,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/m/workspace/cdec/python/src/sa/int_list.pxi":57
* if top == bottom:
* done = 1
* break # <<<<<<<<<<<<<<
@@ -4961,7 +5051,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/m/workspace/cdec/python/src/sa/int_list.pxi":58
* done = 1
* break
* if self.arr[top] < pivot: # <<<<<<<<<<<<<<
@@ -4977,7 +5067,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/m/workspace/cdec/python/src/sa/int_list.pxi":59
* break
* if self.arr[top] < pivot:
* self.arr[bottom] = self.arr[top] # <<<<<<<<<<<<<<
@@ -4988,7 +5078,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/m/workspace/cdec/python/src/sa/int_list.pxi":60
* if self.arr[top] < pivot:
* self.arr[bottom] = self.arr[top]
* break # <<<<<<<<<<<<<<
@@ -5003,7 +5093,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/m/workspace/cdec/python/src/sa/int_list.pxi":61
* self.arr[bottom] = self.arr[top]
* break
* self.arr[top] = pivot # <<<<<<<<<<<<<<
@@ -5014,7 +5104,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/m/workspace/cdec/python/src/sa/int_list.pxi":62
* break
* self.arr[top] = pivot
* return top # <<<<<<<<<<<<<<
@@ -5098,7 +5188,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/m/workspace/cdec/python/src/sa/int_list.pxi":64
* return top
*
* def _doquicksort(self,start,end): # <<<<<<<<<<<<<<
@@ -5119,7 +5209,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/m/workspace/cdec/python/src/sa/int_list.pxi":65
*
* def _doquicksort(self,start,end):
* if start < end: # <<<<<<<<<<<<<<
@@ -5131,7 +5221,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/m/workspace/cdec/python/src/sa/int_list.pxi":66
* def _doquicksort(self,start,end):
* if start < end:
* split = self.partition(start,end) # <<<<<<<<<<<<<<
@@ -5155,7 +5245,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/m/workspace/cdec/python/src/sa/int_list.pxi":67
* if start < end:
* split = self.partition(start,end)
* self._doquicksort(start,split-1) # <<<<<<<<<<<<<<
@@ -5180,7 +5270,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/m/workspace/cdec/python/src/sa/int_list.pxi":68
* split = self.partition(start,end)
* self._doquicksort(start,split-1)
* self._doquicksort(split+1,end) # <<<<<<<<<<<<<<
@@ -5208,7 +5298,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/m/workspace/cdec/python/src/sa/int_list.pxi":70
* self._doquicksort(split+1,end)
* else:
* return # <<<<<<<<<<<<<<
@@ -5247,7 +5337,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/m/workspace/cdec/python/src/sa/int_list.pxi":72
* return
*
* def sort(self): # <<<<<<<<<<<<<<
@@ -5266,7 +5356,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/m/workspace/cdec/python/src/sa/int_list.pxi":73
*
* def sort(self):
* self._doquicksort(0,self.len-1) # <<<<<<<<<<<<<<
@@ -5316,7 +5406,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/m/workspace/cdec/python/src/sa/int_list.pxi":75
* self._doquicksort(0,self.len-1)
*
* def reset(self): # <<<<<<<<<<<<<<
@@ -5329,7 +5419,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/m/workspace/cdec/python/src/sa/int_list.pxi":76
*
* def reset(self):
* self.len = 0 # <<<<<<<<<<<<<<
@@ -5353,7 +5443,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/m/workspace/cdec/python/src/sa/int_list.pxi":78
* self.len = 0
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -5365,7 +5455,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/m/workspace/cdec/python/src/sa/int_list.pxi":79
*
* def __dealloc__(self):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -5389,7 +5479,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/m/workspace/cdec/python/src/sa/int_list.pxi":81
* free(self.arr)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -5452,7 +5542,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/m/workspace/cdec/python/src/sa/int_list.pxi":83
* def __iter__(self):
* cdef int i
* for i in range(self.len): # <<<<<<<<<<<<<<
@@ -5463,7 +5553,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/m/workspace/cdec/python/src/sa/int_list.pxi":84
* cdef int i
* for i in range(self.len):
* yield self.arr[i] # <<<<<<<<<<<<<<
@@ -5510,7 +5600,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/m/workspace/cdec/python/src/sa/int_list.pxi":86
* yield self.arr[i]
*
* def __getitem__(self, index): # <<<<<<<<<<<<<<
@@ -5540,7 +5630,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/m/workspace/cdec/python/src/sa/int_list.pxi":88
* def __getitem__(self, index):
* cdef int i, j, k
* if isinstance(index, int): # <<<<<<<<<<<<<<
@@ -5553,7 +5643,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/m/workspace/cdec/python/src/sa/int_list.pxi":89
* cdef int i, j, k
* if isinstance(index, int):
* j = index # <<<<<<<<<<<<<<
@@ -5563,7 +5653,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/m/workspace/cdec/python/src/sa/int_list.pxi":90
* if isinstance(index, int):
* j = index
* if j < 0: # <<<<<<<<<<<<<<
@@ -5573,7 +5663,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/m/workspace/cdec/python/src/sa/int_list.pxi":91
* j = index
* if j < 0:
* j = self.len + j # <<<<<<<<<<<<<<
@@ -5585,7 +5675,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/m/workspace/cdec/python/src/sa/int_list.pxi":92
* if j < 0:
* j = self.len + j
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -5601,7 +5691,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -5636,7 +5726,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -5652,7 +5742,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/m/workspace/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): # <<<<<<<<<<<<<<
@@ -5665,7 +5755,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/m/workspace/cdec/python/src/sa/int_list.pxi":96
* return self.arr[j]
* elif isinstance(index, slice):
* i = index.start # <<<<<<<<<<<<<<
@@ -5678,7 +5768,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/m/workspace/cdec/python/src/sa/int_list.pxi":97
* elif isinstance(index, slice):
* i = index.start
* j = index.stop # <<<<<<<<<<<<<<
@@ -5691,7 +5781,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/m/workspace/cdec/python/src/sa/int_list.pxi":98
* i = index.start
* j = index.stop
* if i < 0: # <<<<<<<<<<<<<<
@@ -5701,7 +5791,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/m/workspace/cdec/python/src/sa/int_list.pxi":99
* j = index.stop
* if i < 0:
* i = self.len + i # <<<<<<<<<<<<<<
@@ -5713,7 +5803,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/m/workspace/cdec/python/src/sa/int_list.pxi":100
* if i < 0:
* i = self.len + i
* if j < 0: # <<<<<<<<<<<<<<
@@ -5723,7 +5813,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/m/workspace/cdec/python/src/sa/int_list.pxi":101
* i = self.len + i
* if j < 0:
* j = self.len + j # <<<<<<<<<<<<<<
@@ -5735,7 +5825,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -5763,7 +5853,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -5805,7 +5895,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/m/workspace/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 = () # <<<<<<<<<<<<<<
@@ -5815,7 +5905,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -5825,7 +5915,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/m/workspace/cdec/python/src/sa/int_list.pxi":106
* result = ()
* for k from i <= k < j:
* result = result + (self.arr[k],) # <<<<<<<<<<<<<<
@@ -5847,7 +5937,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/m/workspace/cdec/python/src/sa/int_list.pxi":107
* for k from i <= k < j:
* result = result + (self.arr[k],)
* return result # <<<<<<<<<<<<<<
@@ -5862,7 +5952,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/m/workspace/cdec/python/src/sa/int_list.pxi":109
* return result
* else:
* raise TypeError("Illegal key type %s for IntList" % type(index)) # <<<<<<<<<<<<<<
@@ -5901,7 +5991,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/m/workspace/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): # <<<<<<<<<<<<<<
@@ -5923,7 +6013,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/m/workspace/cdec/python/src/sa/int_list.pxi":112
*
* cdef void set(self, int i, int val):
* j = i # <<<<<<<<<<<<<<
@@ -5932,7 +6022,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/m/workspace/cdec/python/src/sa/int_list.pxi":113
* cdef void set(self, int i, int val):
* j = i
* if i<0: # <<<<<<<<<<<<<<
@@ -5942,7 +6032,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/m/workspace/cdec/python/src/sa/int_list.pxi":114
* j = i
* if i<0:
* j = self.len + i # <<<<<<<<<<<<<<
@@ -5954,7 +6044,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/m/workspace/cdec/python/src/sa/int_list.pxi":115
* if i<0:
* j = self.len + i
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -5970,7 +6060,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -6007,7 +6097,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -6037,7 +6127,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/m/workspace/cdec/python/src/sa/int_list.pxi":119
* self.arr[j] = val
*
* def __setitem__(self, i, val): # <<<<<<<<<<<<<<
@@ -6055,7 +6145,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/m/workspace/cdec/python/src/sa/int_list.pxi":120
*
* def __setitem__(self, i, val):
* self.set(i, val) # <<<<<<<<<<<<<<
@@ -6087,7 +6177,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/m/workspace/cdec/python/src/sa/int_list.pxi":122
* self.set(i, val)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -6100,7 +6190,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/m/workspace/cdec/python/src/sa/int_list.pxi":123
*
* def __len__(self):
* return self.len # <<<<<<<<<<<<<<
@@ -6127,7 +6217,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_26get_size(PyObject *__pyx_v_self, CYTHO
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":125
+/* "/home/m/workspace/cdec/python/src/sa/int_list.pxi":125
* return self.len
*
* def get_size(self): # <<<<<<<<<<<<<<
@@ -6144,7 +6234,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_25get_size(struct __pyx_obj_3_sa_IntList
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_size", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":126
+ /* "/home/m/workspace/cdec/python/src/sa/int_list.pxi":126
*
* def get_size(self):
* return self.size # <<<<<<<<<<<<<<
@@ -6191,7 +6281,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/m/workspace/cdec/python/src/sa/int_list.pxi":128
* return self.size
*
* def append(self, int val): # <<<<<<<<<<<<<<
@@ -6204,7 +6294,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/m/workspace/cdec/python/src/sa/int_list.pxi":129
*
* def append(self, int val):
* self._append(val) # <<<<<<<<<<<<<<
@@ -6219,7 +6309,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/m/workspace/cdec/python/src/sa/int_list.pxi":131
* self._append(val)
*
* cdef void _append(self, int val): # <<<<<<<<<<<<<<
@@ -6232,7 +6322,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/m/workspace/cdec/python/src/sa/int_list.pxi":132
*
* cdef void _append(self, int val):
* if self.len == self.size: # <<<<<<<<<<<<<<
@@ -6242,7 +6332,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -6251,7 +6341,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -6263,7 +6353,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -6272,7 +6362,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -6295,7 +6385,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/m/workspace/cdec/python/src/sa/int_list.pxi":138
* self.len = self.len + 1
*
* def extend(self, other): # <<<<<<<<<<<<<<
@@ -6312,7 +6402,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/m/workspace/cdec/python/src/sa/int_list.pxi":139
*
* def extend(self, other):
* self._extend(other) # <<<<<<<<<<<<<<
@@ -6337,7 +6427,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/m/workspace/cdec/python/src/sa/int_list.pxi":141
* self._extend(other)
*
* cdef void _extend(self, IntList other): # <<<<<<<<<<<<<<
@@ -6349,7 +6439,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/m/workspace/cdec/python/src/sa/int_list.pxi":142
*
* cdef void _extend(self, IntList other):
* self._extend_arr(other.arr, other.len) # <<<<<<<<<<<<<<
@@ -6361,7 +6451,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/m/workspace/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): # <<<<<<<<<<<<<<
@@ -6374,7 +6464,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -6384,7 +6474,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -6393,7 +6483,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -6405,7 +6495,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -6414,7 +6504,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -6426,7 +6516,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/m/workspace/cdec/python/src/sa/int_list.pxi":151
* self.len = self.len + other_len
*
* cdef void _clear(self): # <<<<<<<<<<<<<<
@@ -6438,7 +6528,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/m/workspace/cdec/python/src/sa/int_list.pxi":152
*
* cdef void _clear(self):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -6447,7 +6537,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/m/workspace/cdec/python/src/sa/int_list.pxi":153
* cdef void _clear(self):
* free(self.arr)
* self.len = 0 # <<<<<<<<<<<<<<
@@ -6456,7 +6546,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/m/workspace/cdec/python/src/sa/int_list.pxi":154
* free(self.arr)
* self.len = 0
* self.size = 0 # <<<<<<<<<<<<<<
@@ -6465,7 +6555,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/m/workspace/cdec/python/src/sa/int_list.pxi":155
* self.len = 0
* self.size = 0
* self.arr = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -6477,7 +6567,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/m/workspace/cdec/python/src/sa/int_list.pxi":157
* self.arr = <int*> malloc(0)
*
* cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -6489,7 +6579,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/m/workspace/cdec/python/src/sa/int_list.pxi":158
*
* cdef void write_handle(self, FILE* f):
* fwrite(&(self.len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -6498,7 +6588,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -6531,7 +6621,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/m/workspace/cdec/python/src/sa/int_list.pxi":161
* fwrite(self.arr, sizeof(int), self.len, f)
*
* def write(self, char* filename): # <<<<<<<<<<<<<<
@@ -6545,7 +6635,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/m/workspace/cdec/python/src/sa/int_list.pxi":163
* def write(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -6554,7 +6644,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/m/workspace/cdec/python/src/sa/int_list.pxi":164
* cdef FILE* f
* f = fopen(filename, "w")
* self.write_handle(f) # <<<<<<<<<<<<<<
@@ -6563,7 +6653,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/m/workspace/cdec/python/src/sa/int_list.pxi":165
* f = fopen(filename, "w")
* self.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -6578,7 +6668,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/m/workspace/cdec/python/src/sa/int_list.pxi":167
* fclose(f)
*
* cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -6590,7 +6680,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/m/workspace/cdec/python/src/sa/int_list.pxi":168
*
* cdef void read_handle(self, FILE* f):
* (self.arr) # <<<<<<<<<<<<<<
@@ -6599,7 +6689,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/m/workspace/cdec/python/src/sa/int_list.pxi":169
* cdef void read_handle(self, FILE* f):
* (self.arr)
* fread(&(self.len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -6608,7 +6698,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -6617,7 +6707,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -6626,7 +6716,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -6659,7 +6749,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/m/workspace/cdec/python/src/sa/int_list.pxi":174
* fread(self.arr, sizeof(int), self.len, f)
*
* def read(self, char* filename): # <<<<<<<<<<<<<<
@@ -6673,7 +6763,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/m/workspace/cdec/python/src/sa/int_list.pxi":176
* def read(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -6682,7 +6772,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/m/workspace/cdec/python/src/sa/int_list.pxi":177
* cdef FILE* f
* f = fopen(filename, "r")
* self.read_handle(f) # <<<<<<<<<<<<<<
@@ -6690,7 +6780,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/m/workspace/cdec/python/src/sa/int_list.pxi":178
* f = fopen(filename, "r")
* self.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -6717,7 +6807,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/m/workspace/cdec/python/src/sa/str_map.pxi":13
* cdef int index(self, char *s)
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -6730,7 +6820,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/m/workspace/cdec/python/src/sa/str_map.pxi":14
*
* def __cinit__(self):
* self.vocab = stringmap_new() # <<<<<<<<<<<<<<
@@ -6753,7 +6843,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/m/workspace/cdec/python/src/sa/str_map.pxi":16
* self.vocab = stringmap_new()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -6765,7 +6855,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/m/workspace/cdec/python/src/sa/str_map.pxi":17
*
* def __dealloc__(self):
* stringmap_delete(self.vocab) # <<<<<<<<<<<<<<
@@ -6777,7 +6867,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/m/workspace/cdec/python/src/sa/str_map.pxi":19
* stringmap_delete(self.vocab)
*
* cdef char *word(self, int i): # <<<<<<<<<<<<<<
@@ -6790,7 +6880,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/m/workspace/cdec/python/src/sa/str_map.pxi":20
*
* cdef char *word(self, int i):
* return stringmap_word(self.vocab, i) # <<<<<<<<<<<<<<
@@ -6806,7 +6896,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/m/workspace/cdec/python/src/sa/str_map.pxi":22
* return stringmap_word(self.vocab, i)
*
* cdef int index(self, char *s): # <<<<<<<<<<<<<<
@@ -6818,7 +6908,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/m/workspace/cdec/python/src/sa/str_map.pxi":23
*
* cdef int index(self, char *s):
* return stringmap_index(self.vocab, s) # <<<<<<<<<<<<<<
@@ -6846,7 +6936,7 @@ static int __pyx_pw_3_sa_9DataArray_1__cinit__(PyObject *__pyx_v_self, PyObject
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/m/workspace/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): # <<<<<<<<<<<<<<
@@ -6938,7 +7028,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/m/workspace/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} # <<<<<<<<<<<<<<
@@ -6955,7 +7045,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/m/workspace/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"] # <<<<<<<<<<<<<<
@@ -6976,7 +7066,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -6991,7 +7081,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -7006,7 +7096,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -7021,7 +7111,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -7030,7 +7120,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/m/workspace/cdec/python/src/sa/data_array.pxi":24
* self.sent_index = IntList(1000,1000)
* self.use_sent_id = use_sent_id
* if from_binary: # <<<<<<<<<<<<<<
@@ -7040,7 +7130,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/m/workspace/cdec/python/src/sa/data_array.pxi":25
* self.use_sent_id = use_sent_id
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -7062,7 +7152,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/m/workspace/cdec/python/src/sa/data_array.pxi":26
* if from_binary:
* self.read_binary(from_binary)
* elif from_text: # <<<<<<<<<<<<<<
@@ -7072,7 +7162,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/m/workspace/cdec/python/src/sa/data_array.pxi":27
* self.read_binary(from_binary)
* elif from_text:
* if side: # <<<<<<<<<<<<<<
@@ -7082,7 +7172,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/m/workspace/cdec/python/src/sa/data_array.pxi":28
* elif from_text:
* if side:
* self.read_bitext(from_text, (0 if side == 'source' else 1)) # <<<<<<<<<<<<<<
@@ -7118,7 +7208,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -7167,7 +7257,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/m/workspace/cdec/python/src/sa/data_array.pxi":32
* self.read_text(from_text)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -7185,7 +7275,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/m/workspace/cdec/python/src/sa/data_array.pxi":33
*
* def __len__(self):
* return len(self.data) # <<<<<<<<<<<<<<
@@ -7221,7 +7311,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_5get_sentence_id(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":35
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":35
* return len(self.data)
*
* def get_sentence_id(self, i): # <<<<<<<<<<<<<<
@@ -7239,7 +7329,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_4get_sentence_id(struct __pyx_obj_3_sa
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_sentence_id", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":36
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":36
*
* def get_sentence_id(self, i):
* return self.sent_id.arr[i] # <<<<<<<<<<<<<<
@@ -7277,7 +7367,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_7get_sentence(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":38
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":38
* return self.sent_id.arr[i]
*
* def get_sentence(self, i): # <<<<<<<<<<<<<<
@@ -7302,7 +7392,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_Da
__Pyx_RefNannySetupContext("get_sentence", 0);
__Pyx_INCREF(__pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":40
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":40
* def get_sentence(self, i):
* cdef int j, start, stop
* sent = [] # <<<<<<<<<<<<<<
@@ -7314,7 +7404,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_Da
__pyx_v_sent = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":41
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":41
* cdef int j, start, stop
* sent = []
* start = self.sent_index.arr[i] # <<<<<<<<<<<<<<
@@ -7324,7 +7414,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_Da
__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/m/workspace/cdec/python/src/sa/data_array.pxi":42
* sent = []
* start = self.sent_index.arr[i]
* stop = self.sent_index.arr[i+1] # <<<<<<<<<<<<<<
@@ -7337,7 +7427,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_Da
__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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -7352,7 +7442,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_Da
__pyx_v_i = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":44
+ /* "/home/m/workspace/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]]) # <<<<<<<<<<<<<<
@@ -7367,7 +7457,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_Da
__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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -7380,7 +7470,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_Da
__pyx_v_i = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":45
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":45
* for i from start <= i < stop:
* sent.append(self.id2word[self.data.arr[i]])
* return sent # <<<<<<<<<<<<<<
@@ -7417,7 +7507,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_9get_id(PyObject *__pyx_v_self, PyObje
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":47
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":47
* return sent
*
* def get_id(self, word): # <<<<<<<<<<<<<<
@@ -7437,7 +7527,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_8get_id(struct __pyx_obj_3_sa_DataArra
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_id", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":48
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":48
*
* def get_id(self, word):
* if not word in self.word2id: # <<<<<<<<<<<<<<
@@ -7448,7 +7538,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_8get_id(struct __pyx_obj_3_sa_DataArra
__pyx_t_2 = (!__pyx_t_1);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":49
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":49
* def get_id(self, word):
* if not word in self.word2id:
* self.word2id[word] = len(self.id2word) # <<<<<<<<<<<<<<
@@ -7464,7 +7554,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_8get_id(struct __pyx_obj_3_sa_DataArra
if (PyObject_SetItem(__pyx_v_self->word2id, __pyx_v_word, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":50
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":50
* if not word in self.word2id:
* self.word2id[word] = len(self.id2word)
* self.id2word.append(word) # <<<<<<<<<<<<<<
@@ -7478,7 +7568,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_8get_id(struct __pyx_obj_3_sa_DataArra
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":51
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":51
* self.word2id[word] = len(self.id2word)
* self.id2word.append(word)
* return self.word2id[word] # <<<<<<<<<<<<<<
@@ -7515,7 +7605,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_11__getitem__(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":53
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":53
* return self.word2id[word]
*
* def __getitem__(self, loc): # <<<<<<<<<<<<<<
@@ -7533,7 +7623,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_10__getitem__(struct __pyx_obj_3_sa_Da
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":54
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":54
*
* def __getitem__(self, loc):
* return self.id2word[self.data.arr[loc]] # <<<<<<<<<<<<<<
@@ -7571,7 +7661,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_13get_sentence_bounds(PyObject *__pyx_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":56
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":56
* return self.id2word[self.data.arr[loc]]
*
* def get_sentence_bounds(self, loc): # <<<<<<<<<<<<<<
@@ -7592,7 +7682,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_obj
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_sentence_bounds", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":57
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":57
*
* def get_sentence_bounds(self, loc):
* cdef int sid = self.sent_id.arr[loc] # <<<<<<<<<<<<<<
@@ -7602,7 +7692,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_obj
__pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_sid = (__pyx_v_self->sent_id->arr[__pyx_t_1]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":58
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":58
* def get_sentence_bounds(self, loc):
* cdef int sid = self.sent_id.arr[loc]
* return (self.sent_index.arr[sid], self.sent_index.arr[sid+1]) # <<<<<<<<<<<<<<
@@ -7661,7 +7751,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":60
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":60
* return (self.sent_index.arr[sid], self.sent_index.arr[sid+1])
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -7693,7 +7783,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":61
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":61
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -7733,7 +7823,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":62
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":62
* def write_text(self, char* filename):
* with open(filename, "w") as f:
* for w_id in self.data: # <<<<<<<<<<<<<<
@@ -7778,7 +7868,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":63
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":63
* with open(filename, "w") as f:
* for w_id in self.data:
* if w_id > 1: # <<<<<<<<<<<<<<
@@ -7790,7 +7880,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":64
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":64
* for w_id in self.data:
* if w_id > 1:
* f.write("%s " % self.get_word(w_id)) # <<<<<<<<<<<<<<
@@ -7827,7 +7917,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":65
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":65
* if w_id > 1:
* f.write("%s " % self.get_word(w_id))
* if w_id == 1: # <<<<<<<<<<<<<<
@@ -7839,7 +7929,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":66
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":66
* f.write("%s " % self.get_word(w_id))
* if w_id == 1:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -7869,7 +7959,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":61
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":61
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -7988,7 +8078,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":68
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":68
* f.write("\n")
*
* def read_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -8016,7 +8106,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":69
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":69
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -8056,7 +8146,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":70
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":70
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp:
* self.read_text_data(fp) # <<<<<<<<<<<<<<
@@ -8085,7 +8175,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":69
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":69
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -8238,7 +8328,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":74
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":74
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
@@ -8385,7 +8475,7 @@ static PyObject *__pyx_gb_3_sa_9DataArray_11read_bitext_2generator6(__pyx_Genera
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":72
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":72
* self.read_text_data(fp)
*
* def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<<
@@ -8421,7 +8511,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":73
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":73
*
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -8462,7 +8552,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":74
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":74
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
@@ -8474,7 +8564,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":75
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":75
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp)
* self.read_text_data(data) # <<<<<<<<<<<<<<
@@ -8503,7 +8593,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":73
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":73
*
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -8611,7 +8701,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":77
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":77
* self.read_text_data(data)
*
* def read_text_data(self, data): # <<<<<<<<<<<<<<
@@ -8641,7 +8731,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":78
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":78
*
* def read_text_data(self, data):
* cdef int word_count = 0 # <<<<<<<<<<<<<<
@@ -8650,7 +8740,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":79
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":79
* def read_text_data(self, data):
* cdef int word_count = 0
* for line_num, line in enumerate(data): # <<<<<<<<<<<<<<
@@ -8705,7 +8795,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":80
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":80
* cdef int word_count = 0
* for line_num, line in enumerate(data):
* self.sent_index.append(word_count) # <<<<<<<<<<<<<<
@@ -8719,7 +8809,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":81
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":81
* for line_num, line in enumerate(data):
* self.sent_index.append(word_count)
* for word in line.split(): # <<<<<<<<<<<<<<
@@ -8770,7 +8860,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":82
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":82
* self.sent_index.append(word_count)
* for word in line.split():
* self.data.append(self.get_id(word)) # <<<<<<<<<<<<<<
@@ -8793,7 +8883,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":83
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":83
* for word in line.split():
* self.data.append(self.get_id(word))
* if self.use_sent_id: # <<<<<<<<<<<<<<
@@ -8802,7 +8892,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":84
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":84
* self.data.append(self.get_id(word))
* if self.use_sent_id:
* self.sent_id.append(line_num) # <<<<<<<<<<<<<<
@@ -8816,7 +8906,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":85
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":85
* if self.use_sent_id:
* self.sent_id.append(line_num)
* word_count = word_count + 1 # <<<<<<<<<<<<<<
@@ -8827,7 +8917,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":86
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":86
* self.sent_id.append(line_num)
* word_count = word_count + 1
* self.data.append(1) # <<<<<<<<<<<<<<
@@ -8838,7 +8928,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":87
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":87
* word_count = word_count + 1
* self.data.append(1)
* if self.use_sent_id: # <<<<<<<<<<<<<<
@@ -8847,7 +8937,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":88
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":88
* self.data.append(1)
* if self.use_sent_id:
* self.sent_id.append(line_num) # <<<<<<<<<<<<<<
@@ -8861,7 +8951,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":89
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":89
* if self.use_sent_id:
* self.sent_id.append(line_num)
* word_count = word_count + 1 # <<<<<<<<<<<<<<
@@ -8873,7 +8963,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":90
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":90
* self.sent_id.append(line_num)
* word_count = word_count + 1
* self.data.append(0) # <<<<<<<<<<<<<<
@@ -8884,7 +8974,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":91
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":91
* word_count = word_count + 1
* self.data.append(0)
* self.sent_index.append(word_count) # <<<<<<<<<<<<<<
@@ -8939,7 +9029,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":94
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":94
*
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -8953,7 +9043,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":96
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":96
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -8962,7 +9052,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":97
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":97
* cdef FILE* f
* f = fopen(filename, "r")
* self.read_handle(f) # <<<<<<<<<<<<<<
@@ -8971,7 +9061,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":98
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":98
* f = fopen(filename, "r")
* self.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -8986,7 +9076,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":100
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":100
* fclose(f)
*
* cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -9011,7 +9101,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":105
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":105
* cdef char* word
*
* self.data.read_handle(f) # <<<<<<<<<<<<<<
@@ -9020,7 +9110,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":106
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":106
*
* self.data.read_handle(f)
* self.sent_index.read_handle(f) # <<<<<<<<<<<<<<
@@ -9029,7 +9119,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":107
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":107
* self.data.read_handle(f)
* self.sent_index.read_handle(f)
* self.sent_id.read_handle(f) # <<<<<<<<<<<<<<
@@ -9038,7 +9128,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":108
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":108
* self.sent_index.read_handle(f)
* self.sent_id.read_handle(f)
* fread(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -9047,7 +9137,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":109
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":109
* self.sent_id.read_handle(f)
* fread(&(num_words), sizeof(int), 1, f)
* for i in range(num_words): # <<<<<<<<<<<<<<
@@ -9058,7 +9148,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":110
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":110
* fread(&(num_words), sizeof(int), 1, f)
* for i in range(num_words):
* fread(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -9067,7 +9157,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":111
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":111
* for i in range(num_words):
* fread(&(word_len), sizeof(int), 1, f)
* word = <char*> malloc (word_len * sizeof(char)) # <<<<<<<<<<<<<<
@@ -9076,7 +9166,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
*/
__pyx_v_word = ((char *)malloc((__pyx_v_word_len * (sizeof(char)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":112
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":112
* fread(&(word_len), sizeof(int), 1, f)
* word = <char*> malloc (word_len * sizeof(char))
* fread(word, sizeof(char), word_len, f) # <<<<<<<<<<<<<<
@@ -9085,7 +9175,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
*/
fread(__pyx_v_word, (sizeof(char)), __pyx_v_word_len, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":113
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":113
* word = <char*> malloc (word_len * sizeof(char))
* fread(word, sizeof(char), word_len, f)
* self.word2id[word] = len(self.id2word) # <<<<<<<<<<<<<<
@@ -9104,7 +9194,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":114
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":114
* fread(word, sizeof(char), word_len, f)
* self.word2id[word] = len(self.id2word)
* self.id2word.append(word) # <<<<<<<<<<<<<<
@@ -9118,7 +9208,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
__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/data_array.pxi":115
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":115
* self.word2id[word] = len(self.id2word)
* self.id2word.append(word)
* free(word) # <<<<<<<<<<<<<<
@@ -9128,7 +9218,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
free(__pyx_v_word);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":116
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":116
* self.id2word.append(word)
* free(word)
* if len(self.sent_id) == 0: # <<<<<<<<<<<<<<
@@ -9142,7 +9232,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
__pyx_t_6 = (__pyx_t_4 == 0);
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":117
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":117
* free(word)
* if len(self.sent_id) == 0:
* self.use_sent_id = False # <<<<<<<<<<<<<<
@@ -9154,7 +9244,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/m/workspace/cdec/python/src/sa/data_array.pxi":119
* self.use_sent_id = False
* else:
* self.use_sent_id = True # <<<<<<<<<<<<<<
@@ -9174,7 +9264,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/m/workspace/cdec/python/src/sa/data_array.pxi":121
* self.use_sent_id = True
*
* cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -9198,7 +9288,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/m/workspace/cdec/python/src/sa/data_array.pxi":125
* cdef int num_words
*
* self.data.write_handle(f) # <<<<<<<<<<<<<<
@@ -9207,7 +9297,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/m/workspace/cdec/python/src/sa/data_array.pxi":126
*
* self.data.write_handle(f)
* self.sent_index.write_handle(f) # <<<<<<<<<<<<<<
@@ -9216,7 +9306,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -9225,7 +9315,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -9238,7 +9328,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -9247,7 +9337,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/m/workspace/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:]: # <<<<<<<<<<<<<<
@@ -9295,7 +9385,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/m/workspace/cdec/python/src/sa/data_array.pxi":131
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in self.id2word[2:]:
* word_len = len(word) + 1 # <<<<<<<<<<<<<<
@@ -9305,7 +9395,7 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
__pyx_t_5 = PyObject_Length(__pyx_v_word); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_word_len = (__pyx_t_5 + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":132
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":132
* for word in self.id2word[2:]:
* word_len = len(word) + 1
* fwrite(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -9314,7 +9404,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":133
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":133
* word_len = len(word) + 1
* fwrite(&(word_len), sizeof(int), 1, f)
* fwrite(<char *>word, sizeof(char), word_len, f) # <<<<<<<<<<<<<<
@@ -9357,7 +9447,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":135
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":135
* fwrite(<char *>word, sizeof(char), word_len, f)
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -9371,7 +9461,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":137
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":137
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -9380,7 +9470,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":138
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":138
* cdef FILE* f
* f = fopen(filename, "w")
* self.write_handle(f) # <<<<<<<<<<<<<<
@@ -9389,7 +9479,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":139
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":139
* f = fopen(filename, "w")
* self.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -9415,7 +9505,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":141
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":141
* fclose(f)
*
* def write_enhanced_handle(self, f): # <<<<<<<<<<<<<<
@@ -9439,7 +9529,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":142
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":142
*
* def write_enhanced_handle(self, f):
* for i in self.data: # <<<<<<<<<<<<<<
@@ -9484,7 +9574,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":143
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":143
* def write_enhanced_handle(self, f):
* for i in self.data:
* f.write("%d " %i) # <<<<<<<<<<<<<<
@@ -9508,7 +9598,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":144
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":144
* for i in self.data:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -9522,7 +9612,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":145
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":145
* f.write("%d " %i)
* f.write("\n")
* for i in self.sent_index: # <<<<<<<<<<<<<<
@@ -9567,7 +9657,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":146
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":146
* f.write("\n")
* for i in self.sent_index:
* f.write("%d " %i) # <<<<<<<<<<<<<<
@@ -9591,7 +9681,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":147
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":147
* for i in self.sent_index:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -9605,7 +9695,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":148
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":148
* f.write("%d " %i)
* f.write("\n")
* for i in self.sent_id: # <<<<<<<<<<<<<<
@@ -9650,7 +9740,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":149
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":149
* f.write("\n")
* for i in self.sent_id:
* f.write("%d " %i) # <<<<<<<<<<<<<<
@@ -9674,7 +9764,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":150
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":150
* for i in self.sent_id:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -9688,7 +9778,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":151
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":151
* f.write("%d " %i)
* f.write("\n")
* for word in self.id2word: # <<<<<<<<<<<<<<
@@ -9733,7 +9823,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":152
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":152
* f.write("\n")
* for word in self.id2word:
* f.write("%s %d " % (word, self.word2id[word])) # <<<<<<<<<<<<<<
@@ -9768,7 +9858,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":153
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":153
* for word in self.id2word:
* f.write("%s %d " % (word, self.word2id[word]))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -9820,7 +9910,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":155
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":155
* f.write("\n")
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -9848,7 +9938,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":156
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":156
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -9887,7 +9977,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":157
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":157
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* self.write_enhanced_handle(self, f) # <<<<<<<<<<<<<<
@@ -9917,7 +10007,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":156
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":156
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -10023,7 +10113,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_7word2id_1__get__(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":10
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":10
*
* cdef class DataArray:
* cdef public word2id # <<<<<<<<<<<<<<
@@ -10110,7 +10200,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_7id2word_1__get__(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":11
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":11
* cdef class DataArray:
* cdef public word2id
* cdef public id2word # <<<<<<<<<<<<<<
@@ -10197,7 +10287,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_4data_1__get__(PyObject *__pyx_v_self)
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":12
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":12
* cdef public word2id
* cdef public id2word
* cdef public IntList data # <<<<<<<<<<<<<<
@@ -10293,7 +10383,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_7sent_id_1__get__(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":13
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":13
* cdef public id2word
* cdef public IntList data
* cdef public IntList sent_id # <<<<<<<<<<<<<<
@@ -10389,7 +10479,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_10sent_index_1__get__(PyObject *__pyx_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":14
+/* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":14
* cdef public IntList data
* cdef public IntList sent_id
* cdef public IntList sent_index # <<<<<<<<<<<<<<
@@ -10474,7 +10564,7 @@ static int __pyx_pf_3_sa_9DataArray_10sent_index_4__del__(struct __pyx_obj_3_sa_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":12
+/* "/home/m/workspace/cdec/python/src/sa/alignment.pxi":12
* cdef IntList sent_index
*
* cdef int link(self, int i, int j): # <<<<<<<<<<<<<<
@@ -10487,7 +10577,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/m/workspace/cdec/python/src/sa/alignment.pxi":14
* cdef int link(self, int i, int j):
* """Integerizes an alignment link pair"""
* return i*65536 + j # <<<<<<<<<<<<<<
@@ -10515,7 +10605,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/m/workspace/cdec/python/src/sa/alignment.pxi":16
* return i*65536 + j
*
* def unlink(self, link): # <<<<<<<<<<<<<<
@@ -10534,7 +10624,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/m/workspace/cdec/python/src/sa/alignment.pxi":18
* def unlink(self, link):
* """De-integerizes an alignment link pair"""
* return (link/65536, link%65536) # <<<<<<<<<<<<<<
@@ -10572,7 +10662,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/m/workspace/cdec/python/src/sa/alignment.pxi":20
* return (link/65536, link%65536)
*
* cdef _unlink(self, int link, int* f, int* e): # <<<<<<<<<<<<<<
@@ -10585,7 +10675,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/m/workspace/cdec/python/src/sa/alignment.pxi":21
*
* cdef _unlink(self, int link, int* f, int* e):
* f[0] = link/65536 # <<<<<<<<<<<<<<
@@ -10594,7 +10684,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/m/workspace/cdec/python/src/sa/alignment.pxi":22
* cdef _unlink(self, int link, int* f, int* e):
* f[0] = link/65536
* e[0] = link%65536 # <<<<<<<<<<<<<<
@@ -10630,7 +10720,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/m/workspace/cdec/python/src/sa/alignment.pxi":24
* e[0] = link%65536
*
* def get_sent_links(self, int sent_id): # <<<<<<<<<<<<<<
@@ -10650,7 +10740,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/m/workspace/cdec/python/src/sa/alignment.pxi":28
* cdef int* arr
* cdef int arr_len
* sent_links = IntList() # <<<<<<<<<<<<<<
@@ -10662,7 +10752,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/m/workspace/cdec/python/src/sa/alignment.pxi":29
* cdef int arr_len
* sent_links = IntList()
* arr = self._get_sent_links(sent_id, &arr_len) # <<<<<<<<<<<<<<
@@ -10671,7 +10761,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -10680,7 +10770,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -10689,7 +10779,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/m/workspace/cdec/python/src/sa/alignment.pxi":32
* sent_links._extend_arr(arr, arr_len*2)
* free(arr)
* return sent_links # <<<<<<<<<<<<<<
@@ -10714,7 +10804,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/m/workspace/cdec/python/src/sa/alignment.pxi":34
* return sent_links
*
* cdef int* _get_sent_links(self, int sent_id, int* num_links): # <<<<<<<<<<<<<<
@@ -10736,7 +10826,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/m/workspace/cdec/python/src/sa/alignment.pxi":37
* cdef int* sent_links
* cdef int i, start, end
* start = self.sent_index.arr[sent_id] # <<<<<<<<<<<<<<
@@ -10745,7 +10835,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -10754,7 +10844,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -10763,7 +10853,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -10772,7 +10862,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/m/workspace/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]: # <<<<<<<<<<<<<<
@@ -10782,7 +10872,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -10794,7 +10884,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -10827,7 +10917,7 @@ static int __pyx_pw_3_sa_9Alignment_5__cinit__(PyObject *__pyx_v_self, PyObject
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/m/workspace/cdec/python/src/sa/alignment.pxi":45
* return sent_links
*
* def __cinit__(self, from_binary=None, from_text=None): # <<<<<<<<<<<<<<
@@ -10897,7 +10987,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/m/workspace/cdec/python/src/sa/alignment.pxi":46
*
* def __cinit__(self, from_binary=None, from_text=None):
* self.links = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -10912,7 +11002,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -10927,7 +11017,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/m/workspace/cdec/python/src/sa/alignment.pxi":48
* self.links = IntList(1000,1000)
* self.sent_index = IntList(1000,1000)
* if from_binary: # <<<<<<<<<<<<<<
@@ -10937,7 +11027,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/m/workspace/cdec/python/src/sa/alignment.pxi":49
* self.sent_index = IntList(1000,1000)
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -10959,7 +11049,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/m/workspace/cdec/python/src/sa/alignment.pxi":50
* if from_binary:
* self.read_binary(from_binary)
* elif from_text: # <<<<<<<<<<<<<<
@@ -10969,7 +11059,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/m/workspace/cdec/python/src/sa/alignment.pxi":51
* self.read_binary(from_binary)
* elif from_text:
* self.read_text(from_text) # <<<<<<<<<<<<<<
@@ -11026,7 +11116,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/m/workspace/cdec/python/src/sa/alignment.pxi":53
* self.read_text(from_text)
*
* def read_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -11068,7 +11158,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/m/workspace/cdec/python/src/sa/alignment.pxi":54
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -11108,7 +11198,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/m/workspace/cdec/python/src/sa/alignment.pxi":55
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f:
* for line in f: # <<<<<<<<<<<<<<
@@ -11153,7 +11243,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -11171,7 +11261,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/m/workspace/cdec/python/src/sa/alignment.pxi":57
* for line in f:
* self.sent_index.append(len(self.links))
* pairs = line.split() # <<<<<<<<<<<<<<
@@ -11187,7 +11277,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/m/workspace/cdec/python/src/sa/alignment.pxi":58
* self.sent_index.append(len(self.links))
* pairs = line.split()
* for pair in pairs: # <<<<<<<<<<<<<<
@@ -11232,7 +11322,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/m/workspace/cdec/python/src/sa/alignment.pxi":59
* pairs = line.split()
* for pair in pairs:
* (i, j) = map(int, pair.split('-')) # <<<<<<<<<<<<<<
@@ -11311,7 +11401,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/m/workspace/cdec/python/src/sa/alignment.pxi":60
* for pair in pairs:
* (i, j) = map(int, pair.split('-'))
* self.links.append(self.link(i, j)) # <<<<<<<<<<<<<<
@@ -11331,7 +11421,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -11361,7 +11451,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/m/workspace/cdec/python/src/sa/alignment.pxi":54
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -11485,7 +11575,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/m/workspace/cdec/python/src/sa/alignment.pxi":63
* self.sent_index.append(len(self.links))
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -11499,7 +11589,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/m/workspace/cdec/python/src/sa/alignment.pxi":65
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -11508,7 +11598,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/m/workspace/cdec/python/src/sa/alignment.pxi":66
* cdef FILE* f
* f = fopen(filename, "r")
* self.links.read_handle(f) # <<<<<<<<<<<<<<
@@ -11517,7 +11607,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/m/workspace/cdec/python/src/sa/alignment.pxi":67
* f = fopen(filename, "r")
* self.links.read_handle(f)
* self.sent_index.read_handle(f) # <<<<<<<<<<<<<<
@@ -11526,7 +11616,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/m/workspace/cdec/python/src/sa/alignment.pxi":68
* self.links.read_handle(f)
* self.sent_index.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -11562,7 +11652,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/m/workspace/cdec/python/src/sa/alignment.pxi":70
* fclose(f)
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -11597,7 +11687,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/m/workspace/cdec/python/src/sa/alignment.pxi":71
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -11637,7 +11727,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/m/workspace/cdec/python/src/sa/alignment.pxi":72
* def write_text(self, char* filename):
* with open(filename, "w") as f:
* sent_num = 0 # <<<<<<<<<<<<<<
@@ -11647,7 +11737,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/m/workspace/cdec/python/src/sa/alignment.pxi":73
* with open(filename, "w") as f:
* sent_num = 0
* for i, link in enumerate(self.links): # <<<<<<<<<<<<<<
@@ -11702,7 +11792,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/m/workspace/cdec/python/src/sa/alignment.pxi":74
* sent_num = 0
* for i, link in enumerate(self.links):
* while i >= self.sent_index[sent_num]: # <<<<<<<<<<<<<<
@@ -11718,7 +11808,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/m/workspace/cdec/python/src/sa/alignment.pxi":75
* for i, link in enumerate(self.links):
* while i >= self.sent_index[sent_num]:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -11732,7 +11822,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/m/workspace/cdec/python/src/sa/alignment.pxi":76
* while i >= self.sent_index[sent_num]:
* f.write("\n")
* sent_num = sent_num + 1 # <<<<<<<<<<<<<<
@@ -11746,7 +11836,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/m/workspace/cdec/python/src/sa/alignment.pxi":77
* f.write("\n")
* sent_num = sent_num + 1
* f.write("%d-%d " % self.unlink(link)) # <<<<<<<<<<<<<<
@@ -11783,7 +11873,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/m/workspace/cdec/python/src/sa/alignment.pxi":78
* sent_num = sent_num + 1
* f.write("%d-%d " % self.unlink(link))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -11809,7 +11899,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/m/workspace/cdec/python/src/sa/alignment.pxi":71
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -11931,7 +12021,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/m/workspace/cdec/python/src/sa/alignment.pxi":80
* f.write("\n")
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -11945,7 +12035,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/m/workspace/cdec/python/src/sa/alignment.pxi":82
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -11954,7 +12044,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/m/workspace/cdec/python/src/sa/alignment.pxi":83
* cdef FILE* f
* f = fopen(filename, "w")
* self.links.write_handle(f) # <<<<<<<<<<<<<<
@@ -11963,7 +12053,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/m/workspace/cdec/python/src/sa/alignment.pxi":84
* f = fopen(filename, "w")
* self.links.write_handle(f)
* self.sent_index.write_handle(f) # <<<<<<<<<<<<<<
@@ -11972,7 +12062,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/m/workspace/cdec/python/src/sa/alignment.pxi":85
* self.links.write_handle(f)
* self.sent_index.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -12008,7 +12098,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/m/workspace/cdec/python/src/sa/alignment.pxi":87
* fclose(f)
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -12041,7 +12131,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/m/workspace/cdec/python/src/sa/alignment.pxi":88
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -12081,7 +12171,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/m/workspace/cdec/python/src/sa/alignment.pxi":89
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* sent_num = 1 # <<<<<<<<<<<<<<
@@ -12090,7 +12180,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/m/workspace/cdec/python/src/sa/alignment.pxi":90
* with open(filename, "w") as f:
* sent_num = 1
* for link in self.links: # <<<<<<<<<<<<<<
@@ -12135,7 +12225,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/m/workspace/cdec/python/src/sa/alignment.pxi":91
* sent_num = 1
* for link in self.links:
* f.write("%d " % link) # <<<<<<<<<<<<<<
@@ -12159,7 +12249,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/m/workspace/cdec/python/src/sa/alignment.pxi":92
* for link in self.links:
* f.write("%d " % link)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -12173,7 +12263,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/m/workspace/cdec/python/src/sa/alignment.pxi":93
* f.write("%d " % link)
* f.write("\n")
* for i in self.sent_index: # <<<<<<<<<<<<<<
@@ -12218,7 +12308,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/m/workspace/cdec/python/src/sa/alignment.pxi":94
* f.write("\n")
* for i in self.sent_index:
* f.write("%d " % i) # <<<<<<<<<<<<<<
@@ -12242,7 +12332,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/m/workspace/cdec/python/src/sa/alignment.pxi":95
* for i in self.sent_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -12266,7 +12356,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/m/workspace/cdec/python/src/sa/alignment.pxi":88
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -12376,7 +12466,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/m/workspace/cdec/python/src/sa/alignment.pxi":97
* f.write("\n")
*
* def alignment(self, i): # <<<<<<<<<<<<<<
@@ -12402,7 +12492,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/m/workspace/cdec/python/src/sa/alignment.pxi":100
* """Return all (e,f) pairs for sentence i"""
* cdef int j, start, end
* result = [] # <<<<<<<<<<<<<<
@@ -12414,7 +12504,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/m/workspace/cdec/python/src/sa/alignment.pxi":101
* cdef int j, start, end
* result = []
* start = self.sent_index.arr[i] # <<<<<<<<<<<<<<
@@ -12424,7 +12514,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/m/workspace/cdec/python/src/sa/alignment.pxi":102
* result = []
* start = self.sent_index.arr[i]
* end = self.sent_index.arr[i+1] # <<<<<<<<<<<<<<
@@ -12437,7 +12527,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -12447,7 +12537,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/m/workspace/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])) # <<<<<<<<<<<<<<
@@ -12470,7 +12560,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/m/workspace/cdec/python/src/sa/alignment.pxi":105
* for j from start <= j < end:
* result.append(self.unlink(self.links.arr[j]))
* return result # <<<<<<<<<<<<<<
@@ -12495,7 +12585,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/m/workspace/cdec/python/src/sa/bilex.pxi":15
* int val
*
* cdef _node* new_node(int key): # <<<<<<<<<<<<<<
@@ -12509,7 +12599,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/m/workspace/cdec/python/src/sa/bilex.pxi":17
* cdef _node* new_node(int key):
* cdef _node* n
* n = <_node*> malloc(sizeof(_node)) # <<<<<<<<<<<<<<
@@ -12518,7 +12608,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/m/workspace/cdec/python/src/sa/bilex.pxi":18
* cdef _node* n
* n = <_node*> malloc(sizeof(_node))
* n.smaller = NULL # <<<<<<<<<<<<<<
@@ -12527,7 +12617,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/m/workspace/cdec/python/src/sa/bilex.pxi":19
* n = <_node*> malloc(sizeof(_node))
* n.smaller = NULL
* n.bigger = NULL # <<<<<<<<<<<<<<
@@ -12536,7 +12626,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/m/workspace/cdec/python/src/sa/bilex.pxi":20
* n.smaller = NULL
* n.bigger = NULL
* n.key = key # <<<<<<<<<<<<<<
@@ -12545,7 +12635,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/m/workspace/cdec/python/src/sa/bilex.pxi":21
* n.bigger = NULL
* n.key = key
* n.val = 0 # <<<<<<<<<<<<<<
@@ -12554,7 +12644,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/m/workspace/cdec/python/src/sa/bilex.pxi":22
* n.key = key
* n.val = 0
* return n # <<<<<<<<<<<<<<
@@ -12570,7 +12660,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/m/workspace/cdec/python/src/sa/bilex.pxi":25
*
*
* cdef del_node(_node* n): # <<<<<<<<<<<<<<
@@ -12588,7 +12678,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/m/workspace/cdec/python/src/sa/bilex.pxi":26
*
* cdef del_node(_node* n):
* if n.smaller != NULL: # <<<<<<<<<<<<<<
@@ -12598,7 +12688,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/m/workspace/cdec/python/src/sa/bilex.pxi":27
* cdef del_node(_node* n):
* if n.smaller != NULL:
* del_node(n.smaller) # <<<<<<<<<<<<<<
@@ -12612,7 +12702,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/m/workspace/cdec/python/src/sa/bilex.pxi":28
* if n.smaller != NULL:
* del_node(n.smaller)
* if n.bigger != NULL: # <<<<<<<<<<<<<<
@@ -12622,7 +12712,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/m/workspace/cdec/python/src/sa/bilex.pxi":29
* del_node(n.smaller)
* if n.bigger != NULL:
* del_node(n.bigger) # <<<<<<<<<<<<<<
@@ -12636,7 +12726,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/m/workspace/cdec/python/src/sa/bilex.pxi":30
* if n.bigger != NULL:
* del_node(n.bigger)
* free(n) # <<<<<<<<<<<<<<
@@ -12657,7 +12747,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/m/workspace/cdec/python/src/sa/bilex.pxi":32
* free(n)
*
* cdef int* get_val(_node* n, int key): # <<<<<<<<<<<<<<
@@ -12671,7 +12761,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/m/workspace/cdec/python/src/sa/bilex.pxi":33
*
* cdef int* get_val(_node* n, int key):
* if key == n.key: # <<<<<<<<<<<<<<
@@ -12681,7 +12771,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/m/workspace/cdec/python/src/sa/bilex.pxi":34
* cdef int* get_val(_node* n, int key):
* if key == n.key:
* return &n.val # <<<<<<<<<<<<<<
@@ -12693,7 +12783,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/m/workspace/cdec/python/src/sa/bilex.pxi":35
* if key == n.key:
* return &n.val
* elif key < n.key: # <<<<<<<<<<<<<<
@@ -12703,7 +12793,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/m/workspace/cdec/python/src/sa/bilex.pxi":36
* return &n.val
* elif key < n.key:
* if n.smaller == NULL: # <<<<<<<<<<<<<<
@@ -12713,7 +12803,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/m/workspace/cdec/python/src/sa/bilex.pxi":37
* elif key < n.key:
* if n.smaller == NULL:
* n.smaller = new_node(key) # <<<<<<<<<<<<<<
@@ -12722,7 +12812,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/m/workspace/cdec/python/src/sa/bilex.pxi":38
* if n.smaller == NULL:
* n.smaller = new_node(key)
* return &(n.smaller.val) # <<<<<<<<<<<<<<
@@ -12735,7 +12825,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/m/workspace/cdec/python/src/sa/bilex.pxi":39
* n.smaller = new_node(key)
* return &(n.smaller.val)
* return get_val(n.smaller, key) # <<<<<<<<<<<<<<
@@ -12748,7 +12838,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/m/workspace/cdec/python/src/sa/bilex.pxi":41
* return get_val(n.smaller, key)
* else:
* if n.bigger == NULL: # <<<<<<<<<<<<<<
@@ -12758,7 +12848,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/m/workspace/cdec/python/src/sa/bilex.pxi":42
* else:
* if n.bigger == NULL:
* n.bigger = new_node(key) # <<<<<<<<<<<<<<
@@ -12767,7 +12857,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/m/workspace/cdec/python/src/sa/bilex.pxi":43
* if n.bigger == NULL:
* n.bigger = new_node(key)
* return &(n.bigger.val) # <<<<<<<<<<<<<<
@@ -12780,7 +12870,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/m/workspace/cdec/python/src/sa/bilex.pxi":44
* n.bigger = new_node(key)
* return &(n.bigger.val)
* return get_val(n.bigger, key) # <<<<<<<<<<<<<<
@@ -12814,7 +12904,7 @@ static int __pyx_pw_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__p
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/m/workspace/cdec/python/src/sa/bilex.pxi":54
* cdef id2eword, id2fword, eword2id, fword2id
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<<
@@ -12825,7 +12915,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/m/workspace/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): # <<<<<<<<<<<<<<
@@ -12916,7 +13006,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/m/workspace/cdec/python/src/sa/bilex.pxi":54
* cdef id2eword, id2fword, eword2id, fword2id
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<<
@@ -12937,7 +13027,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/m/workspace/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 = [] # <<<<<<<<<<<<<<
@@ -12952,7 +13042,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/m/workspace/cdec/python/src/sa/bilex.pxi":57
* earray=None, fsarray=None, alignment=None):
* self.id2eword = []
* self.id2fword = [] # <<<<<<<<<<<<<<
@@ -12967,7 +13057,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/m/workspace/cdec/python/src/sa/bilex.pxi":58
* self.id2eword = []
* self.id2fword = []
* self.eword2id = {} # <<<<<<<<<<<<<<
@@ -12982,7 +13072,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/m/workspace/cdec/python/src/sa/bilex.pxi":59
* self.id2fword = []
* self.eword2id = {}
* self.fword2id = {} # <<<<<<<<<<<<<<
@@ -12997,7 +13087,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/m/workspace/cdec/python/src/sa/bilex.pxi":60
* self.eword2id = {}
* self.fword2id = {}
* self.e_index = IntList() # <<<<<<<<<<<<<<
@@ -13012,7 +13102,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/m/workspace/cdec/python/src/sa/bilex.pxi":61
* self.fword2id = {}
* self.e_index = IntList()
* self.f_index = IntList() # <<<<<<<<<<<<<<
@@ -13027,7 +13117,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/m/workspace/cdec/python/src/sa/bilex.pxi":62
* self.e_index = IntList()
* self.f_index = IntList()
* self.col1 = FloatList() # <<<<<<<<<<<<<<
@@ -13042,7 +13132,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/m/workspace/cdec/python/src/sa/bilex.pxi":63
* self.f_index = IntList()
* self.col1 = FloatList()
* self.col2 = FloatList() # <<<<<<<<<<<<<<
@@ -13057,7 +13147,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/m/workspace/cdec/python/src/sa/bilex.pxi":64
* self.col1 = FloatList()
* self.col2 = FloatList()
* if from_binary: # <<<<<<<<<<<<<<
@@ -13067,7 +13157,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/m/workspace/cdec/python/src/sa/bilex.pxi":65
* self.col2 = FloatList()
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -13089,7 +13179,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/m/workspace/cdec/python/src/sa/bilex.pxi":66
* if from_binary:
* self.read_binary(from_binary)
* elif from_data: # <<<<<<<<<<<<<<
@@ -13099,7 +13189,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/m/workspace/cdec/python/src/sa/bilex.pxi":67
* self.read_binary(from_binary)
* elif from_data:
* self.compute_from_data(fsarray, earray, alignment) # <<<<<<<<<<<<<<
@@ -13125,7 +13215,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/m/workspace/cdec/python/src/sa/bilex.pxi":69
* self.compute_from_data(fsarray, earray, alignment)
* else:
* self.read_text(from_text) # <<<<<<<<<<<<<<
@@ -13161,7 +13251,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/m/workspace/cdec/python/src/sa/bilex.pxi":72
*
*
* cdef compute_from_data(self, SuffixArray fsa, DataArray eda, Alignment aa): # <<<<<<<<<<<<<<
@@ -13215,7 +13305,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":79
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":79
* cdef int null_word
*
* null_word = 0 # <<<<<<<<<<<<<<
@@ -13224,7 +13314,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":80
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":80
*
* null_word = 0
* for word in fsa.darray.id2word: # I miss list comprehensions # <<<<<<<<<<<<<<
@@ -13269,7 +13359,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_v_word = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":81
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":81
* null_word = 0
* for word in fsa.darray.id2word: # I miss list comprehensions
* self.id2fword.append(word) # <<<<<<<<<<<<<<
@@ -13282,7 +13372,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":82
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":82
* for word in fsa.darray.id2word: # I miss list comprehensions
* self.id2fword.append(word)
* self.id2fword[null_word] = "NULL" # <<<<<<<<<<<<<<
@@ -13291,7 +13381,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 = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":83
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":83
* self.id2fword.append(word)
* self.id2fword[null_word] = "NULL"
* for id, word in enumerate(self.id2fword): # <<<<<<<<<<<<<<
@@ -13346,7 +13436,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":84
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":84
* self.id2fword[null_word] = "NULL"
* for id, word in enumerate(self.id2fword):
* self.fword2id[word] = id # <<<<<<<<<<<<<<
@@ -13358,7 +13448,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":86
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":86
* self.fword2id[word] = id
*
* for word in eda.id2word: # <<<<<<<<<<<<<<
@@ -13403,7 +13493,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__pyx_v_word = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":87
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":87
*
* for word in eda.id2word:
* self.id2eword.append(word) # <<<<<<<<<<<<<<
@@ -13416,7 +13506,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":88
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":88
* for word in eda.id2word:
* self.id2eword.append(word)
* self.id2eword[null_word] = "NULL" # <<<<<<<<<<<<<<
@@ -13425,7 +13515,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 = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":89
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":89
* self.id2eword.append(word)
* self.id2eword[null_word] = "NULL"
* for id, word in enumerate(self.id2eword): # <<<<<<<<<<<<<<
@@ -13480,7 +13570,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":90
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":90
* self.id2eword[null_word] = "NULL"
* for id, word in enumerate(self.id2eword):
* self.eword2id[word] = id # <<<<<<<<<<<<<<
@@ -13492,7 +13582,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":92
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":92
* self.eword2id[word] = id
*
* num_pairs = 0 # <<<<<<<<<<<<<<
@@ -13501,7 +13591,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":94
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":94
* num_pairs = 0
*
* V_E = len(eda.id2word) # <<<<<<<<<<<<<<
@@ -13514,7 +13604,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":95
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":95
*
* V_E = len(eda.id2word)
* V_F = len(fsa.darray.id2word) # <<<<<<<<<<<<<<
@@ -13527,7 +13617,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":96
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":96
* V_E = len(eda.id2word)
* V_F = len(fsa.darray.id2word)
* fmargin = <int*> malloc(V_F*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13536,7 +13626,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":97
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":97
* V_F = len(fsa.darray.id2word)
* fmargin = <int*> malloc(V_F*sizeof(int))
* emargin = <int*> malloc(V_E*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13545,7 +13635,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":98
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":98
* fmargin = <int*> malloc(V_F*sizeof(int))
* emargin = <int*> malloc(V_E*sizeof(int))
* memset(fmargin, 0, V_F*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13554,7 +13644,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":99
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":99
* emargin = <int*> malloc(V_E*sizeof(int))
* memset(fmargin, 0, V_F*sizeof(int))
* memset(emargin, 0, V_E*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13563,7 +13653,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":101
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":101
* memset(emargin, 0, V_E*sizeof(int))
*
* dict = <_node**> malloc(V_F*sizeof(_node*)) # <<<<<<<<<<<<<<
@@ -13572,7 +13662,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":102
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":102
*
* dict = <_node**> malloc(V_F*sizeof(_node*))
* memset(dict, 0, V_F*sizeof(_node*)) # <<<<<<<<<<<<<<
@@ -13581,7 +13671,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":104
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":104
* memset(dict, 0, V_F*sizeof(_node*))
*
* num_sents = len(fsa.darray.sent_index) # <<<<<<<<<<<<<<
@@ -13597,7 +13687,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":105
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":105
*
* num_sents = len(fsa.darray.sent_index)
* for sent_id from 0 <= sent_id < num_sents-1: # <<<<<<<<<<<<<<
@@ -13610,7 +13700,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":107
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":107
* for sent_id from 0 <= sent_id < num_sents-1:
*
* fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id] # <<<<<<<<<<<<<<
@@ -13619,7 +13709,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":108
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":108
*
* fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id]
* I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1 # <<<<<<<<<<<<<<
@@ -13628,7 +13718,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":109
+ /* "/home/m/workspace/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
* faligned = <int*> malloc(I*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13637,7 +13727,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":110
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":110
* 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)) # <<<<<<<<<<<<<<
@@ -13646,7 +13736,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":112
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":112
* memset(faligned, 0, I*sizeof(int))
*
* esent = eda.data.arr + eda.sent_index.arr[sent_id] # <<<<<<<<<<<<<<
@@ -13655,7 +13745,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":113
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":113
*
* esent = eda.data.arr + eda.sent_index.arr[sent_id]
* J = eda.sent_index.arr[sent_id+1] - eda.sent_index.arr[sent_id] - 1 # <<<<<<<<<<<<<<
@@ -13664,7 +13754,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":114
+ /* "/home/m/workspace/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
* ealigned = <int*> malloc(J*sizeof(int)) # <<<<<<<<<<<<<<
@@ -13673,7 +13763,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":115
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":115
* 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)) # <<<<<<<<<<<<<<
@@ -13682,7 +13772,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":117
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":117
* memset(ealigned, 0, J*sizeof(int))
*
* links = aa._get_sent_links(sent_id, &num_links) # <<<<<<<<<<<<<<
@@ -13691,7 +13781,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":119
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":119
* links = aa._get_sent_links(sent_id, &num_links)
*
* for l from 0 <= l < num_links: # <<<<<<<<<<<<<<
@@ -13701,7 +13791,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":120
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":120
*
* for l from 0 <= l < num_links:
* i = links[l*2] # <<<<<<<<<<<<<<
@@ -13710,7 +13800,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":121
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":121
* for l from 0 <= l < num_links:
* i = links[l*2]
* j = links[l*2+1] # <<<<<<<<<<<<<<
@@ -13719,7 +13809,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":122
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":122
* i = links[l*2]
* j = links[l*2+1]
* if i >= I or j >= J: # <<<<<<<<<<<<<<
@@ -13735,7 +13825,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":123
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":123
* j = links[l*2+1]
* if i >= I or j >= J:
* raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1)) # <<<<<<<<<<<<<<
@@ -13787,7 +13877,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":124
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":124
* if i >= I or j >= J:
* raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1))
* f_i = fsent[i] # <<<<<<<<<<<<<<
@@ -13796,7 +13886,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":125
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":125
* raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1))
* f_i = fsent[i]
* e_j = esent[j] # <<<<<<<<<<<<<<
@@ -13805,7 +13895,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":126
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":126
* f_i = fsent[i]
* e_j = esent[j]
* fmargin[f_i] = fmargin[f_i]+1 # <<<<<<<<<<<<<<
@@ -13814,7 +13904,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":127
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":127
* e_j = esent[j]
* fmargin[f_i] = fmargin[f_i]+1
* emargin[e_j] = emargin[e_j]+1 # <<<<<<<<<<<<<<
@@ -13823,7 +13913,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":128
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":128
* fmargin[f_i] = fmargin[f_i]+1
* emargin[e_j] = emargin[e_j]+1
* if dict[f_i] == NULL: # <<<<<<<<<<<<<<
@@ -13833,7 +13923,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":129
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":129
* emargin[e_j] = emargin[e_j]+1
* if dict[f_i] == NULL:
* dict[f_i] = new_node(e_j) # <<<<<<<<<<<<<<
@@ -13842,7 +13932,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":130
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":130
* if dict[f_i] == NULL:
* dict[f_i] = new_node(e_j)
* dict[f_i].val = 1 # <<<<<<<<<<<<<<
@@ -13851,7 +13941,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":131
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":131
* dict[f_i] = new_node(e_j)
* dict[f_i].val = 1
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -13863,7 +13953,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":133
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":133
* num_pairs = num_pairs + 1
* else:
* count = get_val(dict[f_i], e_j) # <<<<<<<<<<<<<<
@@ -13872,7 +13962,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":134
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":134
* else:
* count = get_val(dict[f_i], e_j)
* if count[0] == 0: # <<<<<<<<<<<<<<
@@ -13882,7 +13972,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":135
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":135
* count = get_val(dict[f_i], e_j)
* if count[0] == 0:
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -13894,7 +13984,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":136
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":136
* if count[0] == 0:
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1 # <<<<<<<<<<<<<<
@@ -13905,7 +13995,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":138
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":138
* count[0] = count[0] + 1
* # add count
* faligned[i] = 1 # <<<<<<<<<<<<<<
@@ -13914,7 +14004,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":139
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":139
* # add count
* faligned[i] = 1
* ealigned[j] = 1 # <<<<<<<<<<<<<<
@@ -13924,7 +14014,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":140
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":140
* faligned[i] = 1
* ealigned[j] = 1
* for i from 0 <= i < I: # <<<<<<<<<<<<<<
@@ -13934,7 +14024,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":141
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":141
* ealigned[j] = 1
* for i from 0 <= i < I:
* if faligned[i] == 0: # <<<<<<<<<<<<<<
@@ -13944,7 +14034,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":142
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":142
* for i from 0 <= i < I:
* if faligned[i] == 0:
* f_i = fsent[i] # <<<<<<<<<<<<<<
@@ -13953,7 +14043,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":143
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":143
* if faligned[i] == 0:
* f_i = fsent[i]
* fmargin[f_i] = fmargin[f_i] + 1 # <<<<<<<<<<<<<<
@@ -13962,7 +14052,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":144
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":144
* f_i = fsent[i]
* fmargin[f_i] = fmargin[f_i] + 1
* emargin[null_word] = emargin[null_word] + 1 # <<<<<<<<<<<<<<
@@ -13971,7 +14061,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":145
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":145
* fmargin[f_i] = fmargin[f_i] + 1
* emargin[null_word] = emargin[null_word] + 1
* if dict[f_i] == NULL: # <<<<<<<<<<<<<<
@@ -13981,7 +14071,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":146
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":146
* emargin[null_word] = emargin[null_word] + 1
* if dict[f_i] == NULL:
* dict[f_i] = new_node(null_word) # <<<<<<<<<<<<<<
@@ -13990,7 +14080,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":147
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":147
* if dict[f_i] == NULL:
* dict[f_i] = new_node(null_word)
* dict[f_i].val = 1 # <<<<<<<<<<<<<<
@@ -13999,7 +14089,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":148
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":148
* dict[f_i] = new_node(null_word)
* dict[f_i].val = 1
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -14011,7 +14101,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":150
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":150
* num_pairs = num_pairs + 1
* else:
* count = get_val(dict[f_i], null_word) # <<<<<<<<<<<<<<
@@ -14020,7 +14110,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":151
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":151
* else:
* count = get_val(dict[f_i], null_word)
* if count[0] == 0: # <<<<<<<<<<<<<<
@@ -14030,7 +14120,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":152
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":152
* count = get_val(dict[f_i], null_word)
* if count[0] == 0:
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -14042,7 +14132,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":153
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":153
* if count[0] == 0:
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1 # <<<<<<<<<<<<<<
@@ -14057,7 +14147,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":154
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":154
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1
* for j from 0 <= j < J: # <<<<<<<<<<<<<<
@@ -14067,7 +14157,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":155
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":155
* count[0] = count[0] + 1
* for j from 0 <= j < J:
* if ealigned[j] == 0: # <<<<<<<<<<<<<<
@@ -14077,7 +14167,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":156
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":156
* for j from 0 <= j < J:
* if ealigned[j] == 0:
* e_j = esent[j] # <<<<<<<<<<<<<<
@@ -14086,7 +14176,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":157
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":157
* if ealigned[j] == 0:
* e_j = esent[j]
* fmargin[null_word] = fmargin[null_word] + 1 # <<<<<<<<<<<<<<
@@ -14095,7 +14185,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":158
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":158
* e_j = esent[j]
* fmargin[null_word] = fmargin[null_word] + 1
* emargin[e_j] = emargin[e_j] + 1 # <<<<<<<<<<<<<<
@@ -14104,7 +14194,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":159
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":159
* fmargin[null_word] = fmargin[null_word] + 1
* emargin[e_j] = emargin[e_j] + 1
* if dict[null_word] == NULL: # <<<<<<<<<<<<<<
@@ -14114,7 +14204,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":160
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":160
* emargin[e_j] = emargin[e_j] + 1
* if dict[null_word] == NULL:
* dict[null_word] = new_node(e_j) # <<<<<<<<<<<<<<
@@ -14123,7 +14213,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":161
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":161
* if dict[null_word] == NULL:
* dict[null_word] = new_node(e_j)
* dict[null_word].val = 1 # <<<<<<<<<<<<<<
@@ -14132,7 +14222,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":162
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":162
* dict[null_word] = new_node(e_j)
* dict[null_word].val = 1
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -14144,7 +14234,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":164
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":164
* num_pairs = num_pairs + 1
* else:
* count = get_val(dict[null_word], e_j) # <<<<<<<<<<<<<<
@@ -14153,7 +14243,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":165
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":165
* else:
* count = get_val(dict[null_word], e_j)
* if count[0] == 0: # <<<<<<<<<<<<<<
@@ -14163,7 +14253,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":166
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":166
* count = get_val(dict[null_word], e_j)
* if count[0] == 0:
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -14175,7 +14265,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":167
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":167
* if count[0] == 0:
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1 # <<<<<<<<<<<<<<
@@ -14190,7 +14280,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":168
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":168
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1
* free(links) # <<<<<<<<<<<<<<
@@ -14199,7 +14289,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":169
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":169
* count[0] = count[0] + 1
* free(links)
* free(faligned) # <<<<<<<<<<<<<<
@@ -14208,7 +14298,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":170
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":170
* free(links)
* free(faligned)
* free(ealigned) # <<<<<<<<<<<<<<
@@ -14218,7 +14308,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":171
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":171
* free(faligned)
* free(ealigned)
* self.f_index = IntList(initial_len=V_F) # <<<<<<<<<<<<<<
@@ -14240,7 +14330,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":172
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":172
* free(ealigned)
* self.f_index = IntList(initial_len=V_F)
* self.e_index = IntList(initial_len=num_pairs) # <<<<<<<<<<<<<<
@@ -14262,7 +14352,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":173
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":173
* self.f_index = IntList(initial_len=V_F)
* self.e_index = IntList(initial_len=num_pairs)
* self.col1 = FloatList(initial_len=num_pairs) # <<<<<<<<<<<<<<
@@ -14284,7 +14374,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":174
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":174
* self.e_index = IntList(initial_len=num_pairs)
* self.col1 = FloatList(initial_len=num_pairs)
* self.col2 = FloatList(initial_len=num_pairs) # <<<<<<<<<<<<<<
@@ -14306,7 +14396,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":176
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":176
* self.col2 = FloatList(initial_len=num_pairs)
*
* num_pairs = 0 # <<<<<<<<<<<<<<
@@ -14315,7 +14405,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":177
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":177
*
* num_pairs = 0
* for i from 0 <= i < V_F: # <<<<<<<<<<<<<<
@@ -14325,7 +14415,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":179
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":179
* for i from 0 <= i < V_F:
* #self.f_index[i] = num_pairs
* self.f_index.set(i, num_pairs) # <<<<<<<<<<<<<<
@@ -14334,7 +14424,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":180
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":180
* #self.f_index[i] = num_pairs
* self.f_index.set(i, num_pairs)
* if dict[i] != NULL: # <<<<<<<<<<<<<<
@@ -14344,7 +14434,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":181
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":181
* self.f_index.set(i, num_pairs)
* if dict[i] != NULL:
* self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin) # <<<<<<<<<<<<<<
@@ -14355,7 +14445,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":182
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":182
* if dict[i] != NULL:
* self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin)
* del_node(dict[i]) # <<<<<<<<<<<<<<
@@ -14370,7 +14460,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":183
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":183
* self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin)
* del_node(dict[i])
* free(fmargin) # <<<<<<<<<<<<<<
@@ -14379,7 +14469,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":184
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":184
* del_node(dict[i])
* free(fmargin)
* free(emargin) # <<<<<<<<<<<<<<
@@ -14388,7 +14478,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":185
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":185
* free(fmargin)
* free(emargin)
* free(dict) # <<<<<<<<<<<<<<
@@ -14397,7 +14487,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":186
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":186
* free(emargin)
* free(dict)
* return # <<<<<<<<<<<<<<
@@ -14428,7 +14518,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":189
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":189
*
*
* cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin): # <<<<<<<<<<<<<<
@@ -14447,7 +14537,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":191
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":191
* cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin):
* cdef int loc
* if n.smaller != NULL: # <<<<<<<<<<<<<<
@@ -14457,7 +14547,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":192
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":192
* cdef int loc
* if n.smaller != NULL:
* self._add_node(n.smaller, num_pairs, fmargin, emargin) # <<<<<<<<<<<<<<
@@ -14471,7 +14561,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":193
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":193
* if n.smaller != NULL:
* self._add_node(n.smaller, num_pairs, fmargin, emargin)
* loc = num_pairs[0] # <<<<<<<<<<<<<<
@@ -14480,7 +14570,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":194
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":194
* self._add_node(n.smaller, num_pairs, fmargin, emargin)
* loc = num_pairs[0]
* self.e_index.set(loc, n.key) # <<<<<<<<<<<<<<
@@ -14489,7 +14579,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":195
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":195
* loc = num_pairs[0]
* self.e_index.set(loc, n.key)
* self.col1.set(loc, float(n.val)/fmargin) # <<<<<<<<<<<<<<
@@ -14502,7 +14592,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":196
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":196
* self.e_index.set(loc, n.key)
* self.col1.set(loc, float(n.val)/fmargin)
* self.col2.set(loc, float(n.val)/float(emargin[n.key])) # <<<<<<<<<<<<<<
@@ -14515,7 +14605,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":197
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":197
* self.col1.set(loc, float(n.val)/fmargin)
* self.col2.set(loc, float(n.val)/float(emargin[n.key]))
* num_pairs[0] = loc + 1 # <<<<<<<<<<<<<<
@@ -14524,7 +14614,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":198
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":198
* self.col2.set(loc, float(n.val)/float(emargin[n.key]))
* num_pairs[0] = loc + 1
* if n.bigger != NULL: # <<<<<<<<<<<<<<
@@ -14534,7 +14624,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":199
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":199
* num_pairs[0] = loc + 1
* if n.bigger != NULL:
* self._add_node(n.bigger, num_pairs, fmargin, emargin) # <<<<<<<<<<<<<<
@@ -14581,7 +14671,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":202
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":202
*
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -14600,7 +14690,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":204
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":204
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -14609,7 +14699,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":205
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":205
* cdef FILE* f
* f = fopen(filename, "w")
* self.f_index.write_handle(f) # <<<<<<<<<<<<<<
@@ -14618,7 +14708,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":206
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":206
* f = fopen(filename, "w")
* self.f_index.write_handle(f)
* self.e_index.write_handle(f) # <<<<<<<<<<<<<<
@@ -14627,7 +14717,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":207
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":207
* self.f_index.write_handle(f)
* self.e_index.write_handle(f)
* self.col1.write_handle(f) # <<<<<<<<<<<<<<
@@ -14636,7 +14726,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":208
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":208
* self.e_index.write_handle(f)
* self.col1.write_handle(f)
* self.col2.write_handle(f) # <<<<<<<<<<<<<<
@@ -14645,7 +14735,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":209
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":209
* self.col1.write_handle(f)
* self.col2.write_handle(f)
* self.write_wordlist(self.id2fword, f) # <<<<<<<<<<<<<<
@@ -14659,7 +14749,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":210
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":210
* self.col2.write_handle(f)
* self.write_wordlist(self.id2fword, f)
* self.write_wordlist(self.id2eword, f) # <<<<<<<<<<<<<<
@@ -14673,7 +14763,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":211
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":211
* self.write_wordlist(self.id2fword, f)
* self.write_wordlist(self.id2eword, f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -14695,7 +14785,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":214
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":214
*
*
* cdef write_wordlist(self, wordlist, FILE* f): # <<<<<<<<<<<<<<
@@ -14720,7 +14810,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":218
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":218
* cdef int num_words
*
* num_words = len(wordlist) # <<<<<<<<<<<<<<
@@ -14730,7 +14820,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 = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_num_words = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":219
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":219
*
* num_words = len(wordlist)
* fwrite(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -14739,7 +14829,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":220
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":220
* num_words = len(wordlist)
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in wordlist: # <<<<<<<<<<<<<<
@@ -14784,7 +14874,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":221
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":221
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in wordlist:
* word_len = len(word) + 1 # <<<<<<<<<<<<<<
@@ -14794,7 +14884,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
__pyx_t_5 = PyObject_Length(__pyx_v_word); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_word_len = (__pyx_t_5 + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":222
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":222
* for word in wordlist:
* word_len = len(word) + 1
* fwrite(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -14803,7 +14893,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":223
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":223
* word_len = len(word) + 1
* fwrite(&(word_len), sizeof(int), 1, f)
* fwrite(<char *>word, sizeof(char), word_len, f) # <<<<<<<<<<<<<<
@@ -14829,7 +14919,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":226
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":226
*
*
* cdef read_wordlist(self, word2id, id2word, FILE* f): # <<<<<<<<<<<<<<
@@ -14853,7 +14943,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":231
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":231
* cdef char* word
*
* fread(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -14862,7 +14952,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":232
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":232
*
* fread(&(num_words), sizeof(int), 1, f)
* for i from 0 <= i < num_words: # <<<<<<<<<<<<<<
@@ -14872,7 +14962,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":233
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":233
* fread(&(num_words), sizeof(int), 1, f)
* for i from 0 <= i < num_words:
* fread(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -14881,7 +14971,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":234
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":234
* for i from 0 <= i < num_words:
* fread(&(word_len), sizeof(int), 1, f)
* word = <char*> malloc (word_len * sizeof(char)) # <<<<<<<<<<<<<<
@@ -14890,7 +14980,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
*/
__pyx_v_word = ((char *)malloc((__pyx_v_word_len * (sizeof(char)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":235
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":235
* fread(&(word_len), sizeof(int), 1, f)
* word = <char*> malloc (word_len * sizeof(char))
* fread(word, sizeof(char), word_len, f) # <<<<<<<<<<<<<<
@@ -14899,7 +14989,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
*/
fread(__pyx_v_word, (sizeof(char)), __pyx_v_word_len, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":236
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":236
* word = <char*> malloc (word_len * sizeof(char))
* fread(word, sizeof(char), word_len, f)
* word2id[word] = len(id2word) # <<<<<<<<<<<<<<
@@ -14915,7 +15005,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":237
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":237
* fread(word, sizeof(char), word_len, f)
* word2id[word] = len(id2word)
* id2word.append(word) # <<<<<<<<<<<<<<
@@ -14929,7 +15019,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":238
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":238
* word2id[word] = len(id2word)
* id2word.append(word)
* free(word) # <<<<<<<<<<<<<<
@@ -14973,7 +15063,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":240
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":240
* free(word)
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -14993,7 +15083,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":242
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":242
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -15002,7 +15092,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":243
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":243
* cdef FILE* f
* f = fopen(filename, "r")
* self.f_index.read_handle(f) # <<<<<<<<<<<<<<
@@ -15011,7 +15101,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":244
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":244
* f = fopen(filename, "r")
* self.f_index.read_handle(f)
* self.e_index.read_handle(f) # <<<<<<<<<<<<<<
@@ -15020,7 +15110,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":245
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":245
* self.f_index.read_handle(f)
* self.e_index.read_handle(f)
* self.col1.read_handle(f) # <<<<<<<<<<<<<<
@@ -15029,7 +15119,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":246
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":246
* self.e_index.read_handle(f)
* self.col1.read_handle(f)
* self.col2.read_handle(f) # <<<<<<<<<<<<<<
@@ -15038,7 +15128,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":247
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":247
* self.col1.read_handle(f)
* self.col2.read_handle(f)
* self.read_wordlist(self.fword2id, self.id2fword, f) # <<<<<<<<<<<<<<
@@ -15055,7 +15145,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":248
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":248
* self.col2.read_handle(f)
* self.read_wordlist(self.fword2id, self.id2fword, f)
* self.read_wordlist(self.eword2id, self.id2eword, f) # <<<<<<<<<<<<<<
@@ -15072,7 +15162,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":249
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":249
* self.read_wordlist(self.fword2id, self.id2fword, f)
* self.read_wordlist(self.eword2id, self.id2eword, f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -15106,7 +15196,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":252
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":252
*
*
* def get_e_id(self, eword): # <<<<<<<<<<<<<<
@@ -15126,7 +15216,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":253
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":253
*
* def get_e_id(self, eword):
* if eword not in self.eword2id: # <<<<<<<<<<<<<<
@@ -15136,7 +15226,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
__pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_eword, __pyx_v_self->eword2id, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":254
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":254
* def get_e_id(self, eword):
* if eword not in self.eword2id:
* e_id = len(self.id2eword) # <<<<<<<<<<<<<<
@@ -15152,7 +15242,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":255
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":255
* if eword not in self.eword2id:
* e_id = len(self.id2eword)
* self.id2eword.append(eword) # <<<<<<<<<<<<<<
@@ -15163,7 +15253,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":256
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":256
* e_id = len(self.id2eword)
* self.id2eword.append(eword)
* self.eword2id[eword] = e_id # <<<<<<<<<<<<<<
@@ -15175,7 +15265,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":257
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":257
* self.id2eword.append(eword)
* self.eword2id[eword] = e_id
* return self.eword2id[eword] # <<<<<<<<<<<<<<
@@ -15213,7 +15303,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":260
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":260
*
*
* def get_f_id(self, fword): # <<<<<<<<<<<<<<
@@ -15233,7 +15323,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":261
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":261
*
* def get_f_id(self, fword):
* if fword not in self.fword2id: # <<<<<<<<<<<<<<
@@ -15243,7 +15333,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
__pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_fword, __pyx_v_self->fword2id, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":262
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":262
* def get_f_id(self, fword):
* if fword not in self.fword2id:
* f_id = len(self.id2fword) # <<<<<<<<<<<<<<
@@ -15259,7 +15349,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":263
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":263
* if fword not in self.fword2id:
* f_id = len(self.id2fword)
* self.id2fword.append(fword) # <<<<<<<<<<<<<<
@@ -15270,7 +15360,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":264
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":264
* f_id = len(self.id2fword)
* self.id2fword.append(fword)
* self.fword2id[fword] = f_id # <<<<<<<<<<<<<<
@@ -15282,7 +15372,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":265
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":265
* self.id2fword.append(fword)
* self.fword2id[fword] = f_id
* return self.fword2id[fword] # <<<<<<<<<<<<<<
@@ -15330,7 +15420,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":268
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":268
*
*
* def read_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -15385,7 +15475,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":272
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":272
* cdef IntList fcount
*
* fcount = IntList() # <<<<<<<<<<<<<<
@@ -15397,7 +15487,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":273
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":273
*
* fcount = IntList()
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -15437,7 +15527,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":275
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":275
* with gzip_or_text(filename) as f:
* # first loop merely establishes size of array objects
* for line in f: # <<<<<<<<<<<<<<
@@ -15482,7 +15572,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":276
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":276
* # first loop merely establishes size of array objects
* for line in f:
* (fword, eword, score1, score2) = line.split() # <<<<<<<<<<<<<<
@@ -15568,7 +15658,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":277
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":277
* for line in f:
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword) # <<<<<<<<<<<<<<
@@ -15590,7 +15680,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":278
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":278
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword)
* e_id = self.get_e_id(eword) # <<<<<<<<<<<<<<
@@ -15612,7 +15702,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":279
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":279
* f_id = self.get_f_id(fword)
* e_id = self.get_e_id(eword)
* while f_id >= len(fcount): # <<<<<<<<<<<<<<
@@ -15629,7 +15719,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":280
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":280
* e_id = self.get_e_id(eword)
* while f_id >= len(fcount):
* fcount.append(0) # <<<<<<<<<<<<<<
@@ -15641,7 +15731,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":281
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":281
* while f_id >= len(fcount):
* fcount.append(0)
* fcount.arr[f_id] = fcount.arr[f_id] + 1 # <<<<<<<<<<<<<<
@@ -15654,7 +15744,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":284
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":284
*
* # Allocate space for dictionary in arrays
* N = 0 # <<<<<<<<<<<<<<
@@ -15664,7 +15754,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":285
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":285
* # Allocate space for dictionary in arrays
* N = 0
* n_f = len(fcount) # <<<<<<<<<<<<<<
@@ -15677,7 +15767,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":286
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":286
* N = 0
* n_f = len(fcount)
* self.f_index = IntList(initial_len=n_f+1) # <<<<<<<<<<<<<<
@@ -15699,7 +15789,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":287
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":287
* n_f = len(fcount)
* self.f_index = IntList(initial_len=n_f+1)
* for i from 0 <= i < n_f: # <<<<<<<<<<<<<<
@@ -15714,7 +15804,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":288
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":288
* self.f_index = IntList(initial_len=n_f+1)
* for i from 0 <= i < n_f:
* self.f_index.arr[i] = N # <<<<<<<<<<<<<<
@@ -15725,7 +15815,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 = 288; __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":289
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":289
* for i from 0 <= i < n_f:
* self.f_index.arr[i] = N
* N = N + fcount.arr[i] # <<<<<<<<<<<<<<
@@ -15742,7 +15832,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":290
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":290
* self.f_index.arr[i] = N
* N = N + fcount.arr[i]
* fcount.arr[i] = 0 # <<<<<<<<<<<<<<
@@ -15754,7 +15844,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 = 287; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":287
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":287
* n_f = len(fcount)
* self.f_index = IntList(initial_len=n_f+1)
* for i from 0 <= i < n_f: # <<<<<<<<<<<<<<
@@ -15767,7 +15857,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":291
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":291
* N = N + fcount.arr[i]
* fcount.arr[i] = 0
* self.f_index.arr[n_f] = N # <<<<<<<<<<<<<<
@@ -15778,7 +15868,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 = 291; __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":292
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":292
* fcount.arr[i] = 0
* self.f_index.arr[n_f] = N
* self.e_index = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -15797,7 +15887,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":293
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":293
* self.f_index.arr[n_f] = N
* self.e_index = IntList(initial_len=N)
* self.col1 = FloatList(initial_len=N) # <<<<<<<<<<<<<<
@@ -15816,7 +15906,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":294
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":294
* self.e_index = IntList(initial_len=N)
* self.col1 = FloatList(initial_len=N)
* self.col2 = FloatList(initial_len=N) # <<<<<<<<<<<<<<
@@ -15835,7 +15925,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":297
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":297
*
* # Re-read file, placing words into buckets
* f.seek(0) # <<<<<<<<<<<<<<
@@ -15849,7 +15939,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":298
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":298
* # Re-read file, placing words into buckets
* f.seek(0)
* for line in f: # <<<<<<<<<<<<<<
@@ -15894,7 +15984,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":299
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":299
* f.seek(0)
* for line in f:
* (fword, eword, score1, score2) = line.split() # <<<<<<<<<<<<<<
@@ -15980,7 +16070,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":300
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":300
* for line in f:
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword) # <<<<<<<<<<<<<<
@@ -16002,7 +16092,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":301
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":301
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword)
* e_id = self.get_e_id(eword) # <<<<<<<<<<<<<<
@@ -16024,7 +16114,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":302
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":302
* 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] # <<<<<<<<<<<<<<
@@ -16039,7 +16129,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":303
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":303
* 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 # <<<<<<<<<<<<<<
@@ -16050,7 +16140,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 = 303; __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":304
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":304
* 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) # <<<<<<<<<<<<<<
@@ -16070,7 +16160,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 = 304; __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":305
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":305
* fcount.arr[f_id] = fcount.arr[f_id] + 1
* self.e_index.arr[index] = int(e_id)
* self.col1[index] = float(score1) # <<<<<<<<<<<<<<
@@ -16083,7 +16173,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 = 305; __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":306
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":306
* self.e_index.arr[index] = int(e_id)
* self.col1[index] = float(score1)
* self.col2[index] = float(score2) # <<<<<<<<<<<<<<
@@ -16111,7 +16201,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":273
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":273
*
* fcount = IntList()
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -16191,7 +16281,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":309
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":309
*
* # Sort buckets by eword
* for b from 0 <= b < n_f: # <<<<<<<<<<<<<<
@@ -16207,7 +16297,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":310
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":310
* # Sort buckets by eword
* for b from 0 <= b < n_f:
* i = self.f_index.arr[b] # <<<<<<<<<<<<<<
@@ -16221,7 +16311,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":311
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":311
* for b from 0 <= b < n_f:
* i = self.f_index.arr[b]
* j = self.f_index.arr[b+1] # <<<<<<<<<<<<<<
@@ -16238,7 +16328,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":312
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":312
* i = self.f_index.arr[b]
* j = self.f_index.arr[b+1]
* self.qsort(i,j, "") # <<<<<<<<<<<<<<
@@ -16256,7 +16346,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 = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":309
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":309
*
* # Sort buckets by eword
* for b from 0 <= b < n_f: # <<<<<<<<<<<<<<
@@ -16302,7 +16392,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":315
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":315
*
*
* cdef swap(self, int i, int j): # <<<<<<<<<<<<<<
@@ -16318,7 +16408,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":319
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":319
* cdef float ftmp
*
* if i == j: # <<<<<<<<<<<<<<
@@ -16328,7 +16418,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":320
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":320
*
* if i == j:
* return # <<<<<<<<<<<<<<
@@ -16342,7 +16432,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":322
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":322
* return
*
* itmp = self.e_index.arr[i] # <<<<<<<<<<<<<<
@@ -16351,7 +16441,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":323
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":323
*
* itmp = self.e_index.arr[i]
* self.e_index.arr[i] = self.e_index.arr[j] # <<<<<<<<<<<<<<
@@ -16360,7 +16450,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":324
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":324
* itmp = self.e_index.arr[i]
* self.e_index.arr[i] = self.e_index.arr[j]
* self.e_index.arr[j] = itmp # <<<<<<<<<<<<<<
@@ -16369,7 +16459,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":326
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":326
* self.e_index.arr[j] = itmp
*
* ftmp = self.col1.arr[i] # <<<<<<<<<<<<<<
@@ -16378,7 +16468,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":327
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":327
*
* ftmp = self.col1.arr[i]
* self.col1.arr[i] = self.col1.arr[j] # <<<<<<<<<<<<<<
@@ -16387,7 +16477,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":328
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":328
* ftmp = self.col1.arr[i]
* self.col1.arr[i] = self.col1.arr[j]
* self.col1.arr[j] = ftmp # <<<<<<<<<<<<<<
@@ -16396,7 +16486,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":330
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":330
* self.col1.arr[j] = ftmp
*
* ftmp = self.col2.arr[i] # <<<<<<<<<<<<<<
@@ -16405,7 +16495,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":331
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":331
*
* ftmp = self.col2.arr[i]
* self.col2.arr[i] = self.col2.arr[j] # <<<<<<<<<<<<<<
@@ -16414,7 +16504,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":332
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":332
* ftmp = self.col2.arr[i]
* self.col2.arr[i] = self.col2.arr[j]
* self.col2.arr[j] = ftmp # <<<<<<<<<<<<<<
@@ -16430,7 +16520,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":335
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":335
*
*
* cdef qsort(self, int i, int j, pad): # <<<<<<<<<<<<<<
@@ -16453,7 +16543,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":338
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":338
* cdef int pval, p
*
* if i > j: # <<<<<<<<<<<<<<
@@ -16463,7 +16553,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":339
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":339
*
* if i > j:
* raise Exception("Sort error in CLex") # <<<<<<<<<<<<<<
@@ -16479,7 +16569,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":340
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":340
* if i > j:
* raise Exception("Sort error in CLex")
* if i == j: #empty interval # <<<<<<<<<<<<<<
@@ -16489,7 +16579,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":341
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":341
* raise Exception("Sort error in CLex")
* if i == j: #empty interval
* return # <<<<<<<<<<<<<<
@@ -16503,7 +16593,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":342
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":342
* if i == j: #empty interval
* return
* if i == j-1: # singleton interval # <<<<<<<<<<<<<<
@@ -16513,7 +16603,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":343
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":343
* return
* if i == j-1: # singleton interval
* return # <<<<<<<<<<<<<<
@@ -16527,7 +16617,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":345
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":345
* return
*
* p = (i+j)/2 # <<<<<<<<<<<<<<
@@ -16536,7 +16626,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":346
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":346
*
* p = (i+j)/2
* pval = self.e_index.arr[p] # <<<<<<<<<<<<<<
@@ -16545,7 +16635,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":347
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":347
* p = (i+j)/2
* pval = self.e_index.arr[p]
* self.swap(i, p) # <<<<<<<<<<<<<<
@@ -16556,7 +16646,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":348
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":348
* pval = self.e_index.arr[p]
* self.swap(i, p)
* p = i # <<<<<<<<<<<<<<
@@ -16565,7 +16655,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":349
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":349
* self.swap(i, p)
* p = i
* for k from i+1 <= k < j: # <<<<<<<<<<<<<<
@@ -16575,7 +16665,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":350
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":350
* p = i
* for k from i+1 <= k < j:
* if pval >= self.e_index.arr[k]: # <<<<<<<<<<<<<<
@@ -16585,7 +16675,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":351
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":351
* for k from i+1 <= k < j:
* if pval >= self.e_index.arr[k]:
* self.swap(p+1, k) # <<<<<<<<<<<<<<
@@ -16596,7 +16686,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":352
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":352
* if pval >= self.e_index.arr[k]:
* self.swap(p+1, k)
* self.swap(p, p+1) # <<<<<<<<<<<<<<
@@ -16607,7 +16697,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/m/workspace/cdec/python/src/sa/bilex.pxi":353
* self.swap(p+1, k)
* self.swap(p, p+1)
* p = p + 1 # <<<<<<<<<<<<<<
@@ -16620,7 +16710,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":354
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":354
* self.swap(p, p+1)
* p = p + 1
* self.qsort(i,p, pad+" ") # <<<<<<<<<<<<<<
@@ -16634,7 +16724,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":355
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":355
* p = p + 1
* self.qsort(i,p, pad+" ")
* self.qsort(p+1,j, pad+" ") # <<<<<<<<<<<<<<
@@ -16682,7 +16772,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":358
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":358
*
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -16719,7 +16809,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":359
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":359
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -16759,7 +16849,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":360
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":360
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* for i in self.f_index: # <<<<<<<<<<<<<<
@@ -16804,7 +16894,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":361
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":361
* with open(filename, "w") as f:
* for i in self.f_index:
* f.write("%d " % i) # <<<<<<<<<<<<<<
@@ -16828,7 +16918,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":362
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":362
* for i in self.f_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -16842,7 +16932,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":363
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":363
* f.write("%d " % i)
* f.write("\n")
* for i, s1, s2 in zip(self.e_index, self.col1, self.col2): # <<<<<<<<<<<<<<
@@ -16963,7 +17053,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":364
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":364
* f.write("\n")
* for i, s1, s2 in zip(self.e_index, self.col1, self.col2):
* f.write("%d %f %f " % (i, s1, s2)) # <<<<<<<<<<<<<<
@@ -16999,7 +17089,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":365
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":365
* for i, s1, s2 in zip(self.e_index, self.col1, self.col2):
* f.write("%d %f %f " % (i, s1, s2))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -17013,7 +17103,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":366
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":366
* f.write("%d %f %f " % (i, s1, s2))
* f.write("\n")
* for i, w in enumerate(self.id2fword): # <<<<<<<<<<<<<<
@@ -17068,7 +17158,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":367
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":367
* f.write("\n")
* for i, w in enumerate(self.id2fword):
* f.write("%d %s " % (i, w)) # <<<<<<<<<<<<<<
@@ -17102,7 +17192,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":368
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":368
* for i, w in enumerate(self.id2fword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -17116,7 +17206,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":369
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":369
* f.write("%d %s " % (i, w))
* f.write("\n")
* for i, w in enumerate(self.id2eword): # <<<<<<<<<<<<<<
@@ -17171,7 +17261,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":370
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":370
* f.write("\n")
* for i, w in enumerate(self.id2eword):
* f.write("%d %s " % (i, w)) # <<<<<<<<<<<<<<
@@ -17205,7 +17295,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":371
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":371
* for i, w in enumerate(self.id2eword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -17231,7 +17321,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":359
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":359
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -17398,7 +17488,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":374
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":374
*
*
* def get_score(self, fword, eword, col): # <<<<<<<<<<<<<<
@@ -17424,7 +17514,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":377
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":377
* cdef e_id, f_id, low, high, midpoint, val
*
* if eword not in self.eword2id: # <<<<<<<<<<<<<<
@@ -17434,7 +17524,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_eword, __pyx_v_self->eword2id, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":378
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":378
*
* if eword not in self.eword2id:
* return None # <<<<<<<<<<<<<<
@@ -17449,7 +17539,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":379
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":379
* if eword not in self.eword2id:
* return None
* if fword not in self.fword2id: # <<<<<<<<<<<<<<
@@ -17459,7 +17549,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_fword, __pyx_v_self->fword2id, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":380
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":380
* return None
* if fword not in self.fword2id:
* return None # <<<<<<<<<<<<<<
@@ -17474,7 +17564,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":381
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":381
* if fword not in self.fword2id:
* return None
* f_id = self.fword2id[fword] # <<<<<<<<<<<<<<
@@ -17486,7 +17576,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":382
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":382
* return None
* f_id = self.fword2id[fword]
* e_id = self.eword2id[eword] # <<<<<<<<<<<<<<
@@ -17498,7 +17588,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":383
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":383
* f_id = self.fword2id[fword]
* e_id = self.eword2id[eword]
* low = self.f_index.arr[f_id] # <<<<<<<<<<<<<<
@@ -17511,7 +17601,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":384
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":384
* e_id = self.eword2id[eword]
* low = self.f_index.arr[f_id]
* high = self.f_index.arr[f_id+1] # <<<<<<<<<<<<<<
@@ -17527,7 +17617,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":385
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":385
* low = self.f_index.arr[f_id]
* high = self.f_index.arr[f_id+1]
* while high - low > 0: # <<<<<<<<<<<<<<
@@ -17543,7 +17633,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":386
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":386
* high = self.f_index.arr[f_id+1]
* while high - low > 0:
* midpoint = (low+high)/2 # <<<<<<<<<<<<<<
@@ -17559,7 +17649,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":387
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":387
* while high - low > 0:
* midpoint = (low+high)/2
* val = self.e_index.arr[midpoint] # <<<<<<<<<<<<<<
@@ -17573,7 +17663,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":388
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":388
* midpoint = (low+high)/2
* val = self.e_index.arr[midpoint]
* if val == e_id: # <<<<<<<<<<<<<<
@@ -17585,7 +17675,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":389
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":389
* val = self.e_index.arr[midpoint]
* if val == e_id:
* if col == 0: # <<<<<<<<<<<<<<
@@ -17597,7 +17687,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":390
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":390
* if val == e_id:
* if col == 0:
* return self.col1.arr[midpoint] # <<<<<<<<<<<<<<
@@ -17615,7 +17705,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":391
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":391
* if col == 0:
* return self.col1.arr[midpoint]
* if col == 1: # <<<<<<<<<<<<<<
@@ -17627,7 +17717,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":392
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":392
* return self.col1.arr[midpoint]
* if col == 1:
* return self.col2.arr[midpoint] # <<<<<<<<<<<<<<
@@ -17648,7 +17738,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":393
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":393
* if col == 1:
* return self.col2.arr[midpoint]
* if val > e_id: # <<<<<<<<<<<<<<
@@ -17660,7 +17750,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/m/workspace/cdec/python/src/sa/bilex.pxi":394
* return self.col2.arr[midpoint]
* if val > e_id:
* high = midpoint # <<<<<<<<<<<<<<
@@ -17674,7 +17764,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":395
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":395
* if val > e_id:
* high = midpoint
* if val < e_id: # <<<<<<<<<<<<<<
@@ -17686,7 +17776,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":396
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":396
* high = midpoint
* if val < e_id:
* low = midpoint + 1 # <<<<<<<<<<<<<<
@@ -17703,7 +17793,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":397
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":397
* if val < e_id:
* low = midpoint + 1
* return None # <<<<<<<<<<<<<<
@@ -17756,7 +17846,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":400
+/* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":400
*
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -17793,7 +17883,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":404
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":404
* cdef i, N, e_id, f_id
*
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -17833,7 +17923,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":405
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":405
*
* with open(filename, "w") as f:
* N = len(self.e_index) # <<<<<<<<<<<<<<
@@ -17849,7 +17939,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":406
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":406
* with open(filename, "w") as f:
* N = len(self.e_index)
* f_id = 0 # <<<<<<<<<<<<<<
@@ -17859,7 +17949,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":407
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":407
* N = len(self.e_index)
* f_id = 0
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -17874,7 +17964,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":408
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":408
* f_id = 0
* for i from 0 <= i < N:
* while self.f_index.arr[f_id+1] == i: # <<<<<<<<<<<<<<
@@ -17894,7 +17984,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":409
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":409
* for i from 0 <= i < N:
* while self.f_index.arr[f_id+1] == i:
* f_id = f_id + 1 # <<<<<<<<<<<<<<
@@ -17908,7 +17998,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":410
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":410
* while self.f_index.arr[f_id+1] == i:
* f_id = f_id + 1
* e_id = self.e_index.arr[i] # <<<<<<<<<<<<<<
@@ -17922,7 +18012,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":411
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":411
* f_id = f_id + 1
* e_id = self.e_index.arr[i]
* score1 = self.col1.arr[i] # <<<<<<<<<<<<<<
@@ -17936,7 +18026,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":412
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":412
* e_id = self.e_index.arr[i]
* score1 = self.col1.arr[i]
* score2 = self.col2.arr[i] # <<<<<<<<<<<<<<
@@ -17949,7 +18039,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":413
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":413
* 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)) # <<<<<<<<<<<<<<
@@ -17990,7 +18080,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 = 407; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":407
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":407
* N = len(self.e_index)
* f_id = 0
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -18013,7 +18103,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":404
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":404
* cdef i, N, e_id, f_id
*
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -18115,7 +18205,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/m/workspace/cdec/python/src/sa/veb.pxi":21
* cdef int LOWER_MASK[32]
*
* cdef void _init_lower_mask(): # <<<<<<<<<<<<<<
@@ -18131,7 +18221,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/m/workspace/cdec/python/src/sa/veb.pxi":23
* cdef void _init_lower_mask():
* cdef unsigned i
* cdef int mask = 0 # <<<<<<<<<<<<<<
@@ -18140,7 +18230,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/m/workspace/cdec/python/src/sa/veb.pxi":24
* cdef unsigned i
* cdef int mask = 0
* for i in range(MIN_BOTTOM_SIZE): # <<<<<<<<<<<<<<
@@ -18151,7 +18241,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/m/workspace/cdec/python/src/sa/veb.pxi":25
* cdef int mask = 0
* for i in range(MIN_BOTTOM_SIZE):
* mask = (mask << 1) + 1 # <<<<<<<<<<<<<<
@@ -18160,7 +18250,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/m/workspace/cdec/python/src/sa/veb.pxi":26
* for i in range(MIN_BOTTOM_SIZE):
* mask = (mask << 1) + 1
* LOWER_MASK[i] = mask # <<<<<<<<<<<<<<
@@ -18173,7 +18263,7 @@ static void __pyx_f_3_sa__init_lower_mask(void) {
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":37
+/* "/home/m/workspace/cdec/python/src/sa/veb.pxi":37
*
*
* cdef _BitSet* new_BitSet(): # <<<<<<<<<<<<<<
@@ -18187,7 +18277,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/m/workspace/cdec/python/src/sa/veb.pxi":40
* cdef _BitSet* b
*
* b = <_BitSet*> malloc(sizeof(_BitSet)) # <<<<<<<<<<<<<<
@@ -18196,7 +18286,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/m/workspace/cdec/python/src/sa/veb.pxi":41
*
* b = <_BitSet*> malloc(sizeof(_BitSet))
* b.bitset = 0 # <<<<<<<<<<<<<<
@@ -18205,7 +18295,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/m/workspace/cdec/python/src/sa/veb.pxi":42
* b = <_BitSet*> malloc(sizeof(_BitSet))
* b.bitset = 0
* b.min_val = -1 # <<<<<<<<<<<<<<
@@ -18214,7 +18304,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/m/workspace/cdec/python/src/sa/veb.pxi":43
* b.bitset = 0
* b.min_val = -1
* b.max_val = -1 # <<<<<<<<<<<<<<
@@ -18223,7 +18313,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/m/workspace/cdec/python/src/sa/veb.pxi":44
* b.min_val = -1
* b.max_val = -1
* b.size = 0 # <<<<<<<<<<<<<<
@@ -18232,7 +18322,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/m/workspace/cdec/python/src/sa/veb.pxi":45
* b.max_val = -1
* b.size = 0
* return b # <<<<<<<<<<<<<<
@@ -18248,7 +18338,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/m/workspace/cdec/python/src/sa/veb.pxi":48
*
*
* cdef int bitset_findsucc(_BitSet* b, int i): # <<<<<<<<<<<<<<
@@ -18269,7 +18359,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/m/workspace/cdec/python/src/sa/veb.pxi":52
* cdef int low, high, mid
*
* if b.max_val == -1 or i >= b.max_val: # <<<<<<<<<<<<<<
@@ -18285,7 +18375,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/m/workspace/cdec/python/src/sa/veb.pxi":53
*
* if b.max_val == -1 or i >= b.max_val:
* return -1 # <<<<<<<<<<<<<<
@@ -18298,7 +18388,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/m/workspace/cdec/python/src/sa/veb.pxi":54
* if b.max_val == -1 or i >= b.max_val:
* return -1
* if i < b.min_val: # <<<<<<<<<<<<<<
@@ -18308,7 +18398,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/m/workspace/cdec/python/src/sa/veb.pxi":55
* return -1
* if i < b.min_val:
* return b.min_val # <<<<<<<<<<<<<<
@@ -18321,7 +18411,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/m/workspace/cdec/python/src/sa/veb.pxi":57
* return b.min_val
*
* bitset = b.bitset & ~LOWER_MASK[i] # <<<<<<<<<<<<<<
@@ -18330,7 +18420,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/m/workspace/cdec/python/src/sa/veb.pxi":58
*
* bitset = b.bitset & ~LOWER_MASK[i]
* low = i+1 # <<<<<<<<<<<<<<
@@ -18339,7 +18429,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/m/workspace/cdec/python/src/sa/veb.pxi":59
* bitset = b.bitset & ~LOWER_MASK[i]
* low = i+1
* high = b.max_val+1 # <<<<<<<<<<<<<<
@@ -18348,7 +18438,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/m/workspace/cdec/python/src/sa/veb.pxi":60
* low = i+1
* high = b.max_val+1
* while low < high-1: # <<<<<<<<<<<<<<
@@ -18359,7 +18449,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/m/workspace/cdec/python/src/sa/veb.pxi":61
* high = b.max_val+1
* while low < high-1:
* mid = (high + low)/2 # <<<<<<<<<<<<<<
@@ -18368,7 +18458,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/m/workspace/cdec/python/src/sa/veb.pxi":62
* while low < high-1:
* mid = (high + low)/2
* mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1]) # <<<<<<<<<<<<<<
@@ -18377,7 +18467,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/m/workspace/cdec/python/src/sa/veb.pxi":63
* mid = (high + low)/2
* mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1])
* if bitset & mask == 0: # <<<<<<<<<<<<<<
@@ -18387,7 +18477,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/m/workspace/cdec/python/src/sa/veb.pxi":64
* mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1])
* if bitset & mask == 0:
* low = mid # <<<<<<<<<<<<<<
@@ -18399,7 +18489,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/m/workspace/cdec/python/src/sa/veb.pxi":66
* low = mid
* else:
* bitset = bitset & mask # <<<<<<<<<<<<<<
@@ -18408,7 +18498,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/m/workspace/cdec/python/src/sa/veb.pxi":67
* else:
* bitset = bitset & mask
* high = mid # <<<<<<<<<<<<<<
@@ -18420,7 +18510,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/m/workspace/cdec/python/src/sa/veb.pxi":68
* bitset = bitset & mask
* high = mid
* return low # <<<<<<<<<<<<<<
@@ -18436,7 +18526,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/m/workspace/cdec/python/src/sa/veb.pxi":71
*
*
* cdef int bitset_insert(_BitSet* b, int i): # <<<<<<<<<<<<<<
@@ -18451,7 +18541,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/m/workspace/cdec/python/src/sa/veb.pxi":74
* cdef int val
*
* val = 1 << i # <<<<<<<<<<<<<<
@@ -18460,7 +18550,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/m/workspace/cdec/python/src/sa/veb.pxi":75
*
* val = 1 << i
* if b.bitset & val == 0: # <<<<<<<<<<<<<<
@@ -18470,7 +18560,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/m/workspace/cdec/python/src/sa/veb.pxi":76
* val = 1 << i
* if b.bitset & val == 0:
* b.bitset = b.bitset | val # <<<<<<<<<<<<<<
@@ -18479,7 +18569,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/m/workspace/cdec/python/src/sa/veb.pxi":77
* if b.bitset & val == 0:
* b.bitset = b.bitset | val
* if b.size == 0: # <<<<<<<<<<<<<<
@@ -18489,7 +18579,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/m/workspace/cdec/python/src/sa/veb.pxi":78
* b.bitset = b.bitset | val
* if b.size == 0:
* b.min_val = i # <<<<<<<<<<<<<<
@@ -18498,7 +18588,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/m/workspace/cdec/python/src/sa/veb.pxi":79
* if b.size == 0:
* b.min_val = i
* b.max_val = i # <<<<<<<<<<<<<<
@@ -18510,7 +18600,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/m/workspace/cdec/python/src/sa/veb.pxi":81
* b.max_val = i
* else:
* if i < b.min_val: # <<<<<<<<<<<<<<
@@ -18520,7 +18610,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/m/workspace/cdec/python/src/sa/veb.pxi":82
* else:
* if i < b.min_val:
* b.min_val = i # <<<<<<<<<<<<<<
@@ -18532,7 +18622,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/m/workspace/cdec/python/src/sa/veb.pxi":83
* if i < b.min_val:
* b.min_val = i
* if i > b.max_val: # <<<<<<<<<<<<<<
@@ -18542,7 +18632,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/m/workspace/cdec/python/src/sa/veb.pxi":84
* b.min_val = i
* if i > b.max_val:
* b.max_val = i # <<<<<<<<<<<<<<
@@ -18556,7 +18646,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/m/workspace/cdec/python/src/sa/veb.pxi":85
* if i > b.max_val:
* b.max_val = i
* b.size = b.size + 1 # <<<<<<<<<<<<<<
@@ -18565,7 +18655,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/m/workspace/cdec/python/src/sa/veb.pxi":86
* b.max_val = i
* b.size = b.size + 1
* return 1 # <<<<<<<<<<<<<<
@@ -18578,7 +18668,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/m/workspace/cdec/python/src/sa/veb.pxi":87
* b.size = b.size + 1
* return 1
* return 0 # <<<<<<<<<<<<<<
@@ -18594,7 +18684,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/m/workspace/cdec/python/src/sa/veb.pxi":90
*
*
* cdef int bitset_contains(_BitSet* b, int i): # <<<<<<<<<<<<<<
@@ -18609,7 +18699,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/m/workspace/cdec/python/src/sa/veb.pxi":93
* cdef int val
*
* val = 1 << i # <<<<<<<<<<<<<<
@@ -18618,7 +18708,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/m/workspace/cdec/python/src/sa/veb.pxi":94
*
* val = 1 << i
* if b.bitset & val == 0: # <<<<<<<<<<<<<<
@@ -18628,7 +18718,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/m/workspace/cdec/python/src/sa/veb.pxi":95
* val = 1 << i
* if b.bitset & val == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -18641,7 +18731,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/m/workspace/cdec/python/src/sa/veb.pxi":97
* return 0
* else:
* return 1 # <<<<<<<<<<<<<<
@@ -18670,7 +18760,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/m/workspace/cdec/python/src/sa/veb.pxi":104
* cdef int next_val
*
* def __next__(self): # <<<<<<<<<<<<<<
@@ -18689,7 +18779,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/m/workspace/cdec/python/src/sa/veb.pxi":107
* cdef int ret_val
*
* if self.next_val == -1: # <<<<<<<<<<<<<<
@@ -18699,7 +18789,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/m/workspace/cdec/python/src/sa/veb.pxi":108
*
* if self.next_val == -1:
* raise StopIteration() # <<<<<<<<<<<<<<
@@ -18715,7 +18805,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/m/workspace/cdec/python/src/sa/veb.pxi":109
* if self.next_val == -1:
* raise StopIteration()
* ret_val = self.next_val # <<<<<<<<<<<<<<
@@ -18724,7 +18814,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/m/workspace/cdec/python/src/sa/veb.pxi":110
* raise StopIteration()
* ret_val = self.next_val
* self.next_val = bitset_findsucc(self.b, ret_val) # <<<<<<<<<<<<<<
@@ -18733,7 +18823,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/m/workspace/cdec/python/src/sa/veb.pxi":111
* ret_val = self.next_val
* self.next_val = bitset_findsucc(self.b, ret_val)
* return ret_val # <<<<<<<<<<<<<<
@@ -18773,7 +18863,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/m/workspace/cdec/python/src/sa/veb.pxi":122
* cdef _BitSet* b
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -18786,7 +18876,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/m/workspace/cdec/python/src/sa/veb.pxi":123
*
* def __cinit__(self):
* self.b = new_BitSet() # <<<<<<<<<<<<<<
@@ -18809,7 +18899,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/m/workspace/cdec/python/src/sa/veb.pxi":125
* self.b = new_BitSet()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -18821,7 +18911,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/m/workspace/cdec/python/src/sa/veb.pxi":126
*
* def __dealloc__(self):
* free(self.b) # <<<<<<<<<<<<<<
@@ -18844,7 +18934,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/m/workspace/cdec/python/src/sa/veb.pxi":128
* free(self.b)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -18862,7 +18952,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/m/workspace/cdec/python/src/sa/veb.pxi":130
* def __iter__(self):
* cdef BitSetIterator it
* it = BitSetIterator() # <<<<<<<<<<<<<<
@@ -18874,7 +18964,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/m/workspace/cdec/python/src/sa/veb.pxi":131
* cdef BitSetIterator it
* it = BitSetIterator()
* it.b = self.b # <<<<<<<<<<<<<<
@@ -18883,7 +18973,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/m/workspace/cdec/python/src/sa/veb.pxi":132
* it = BitSetIterator()
* it.b = self.b
* it.next_val = self.b.min_val # <<<<<<<<<<<<<<
@@ -18892,7 +18982,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/m/workspace/cdec/python/src/sa/veb.pxi":133
* it.b = self.b
* it.next_val = self.b.min_val
* return it # <<<<<<<<<<<<<<
@@ -18928,7 +19018,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/m/workspace/cdec/python/src/sa/veb.pxi":135
* return it
*
* def insert(self, i): # <<<<<<<<<<<<<<
@@ -18946,7 +19036,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/m/workspace/cdec/python/src/sa/veb.pxi":136
*
* def insert(self, i):
* return bitset_insert(self.b, i) # <<<<<<<<<<<<<<
@@ -18984,7 +19074,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/m/workspace/cdec/python/src/sa/veb.pxi":138
* return bitset_insert(self.b, i)
*
* def findsucc(self, i): # <<<<<<<<<<<<<<
@@ -19002,7 +19092,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/m/workspace/cdec/python/src/sa/veb.pxi":139
*
* def findsucc(self, i):
* return bitset_findsucc(self.b, i) # <<<<<<<<<<<<<<
@@ -19040,7 +19130,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/m/workspace/cdec/python/src/sa/veb.pxi":141
* return bitset_findsucc(self.b, i)
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -19059,7 +19149,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/m/workspace/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)+")" # <<<<<<<<<<<<<<
@@ -19152,7 +19242,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/m/workspace/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): # <<<<<<<<<<<<<<
@@ -19169,7 +19259,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/m/workspace/cdec/python/src/sa/veb.pxi":145
*
* def min(self):
* return self.b.min_val # <<<<<<<<<<<<<<
@@ -19206,7 +19296,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/m/workspace/cdec/python/src/sa/veb.pxi":147
* return self.b.min_val
*
* def max(self): # <<<<<<<<<<<<<<
@@ -19223,7 +19313,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/m/workspace/cdec/python/src/sa/veb.pxi":148
*
* def max(self):
* return self.b.max_val # <<<<<<<<<<<<<<
@@ -19260,7 +19350,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/m/workspace/cdec/python/src/sa/veb.pxi":150
* return self.b.max_val
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -19273,7 +19363,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/m/workspace/cdec/python/src/sa/veb.pxi":151
*
* def __len__(self):
* return self.b.size # <<<<<<<<<<<<<<
@@ -19300,7 +19390,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/m/workspace/cdec/python/src/sa/veb.pxi":153
* return self.b.size
*
* def __contains__(self, i): # <<<<<<<<<<<<<<
@@ -19319,7 +19409,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/m/workspace/cdec/python/src/sa/veb.pxi":154
*
* def __contains__(self, i):
* return bool(bitset_contains(self.b, i)) # <<<<<<<<<<<<<<
@@ -19345,7 +19435,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/m/workspace/cdec/python/src/sa/veb.pxi":157
*
*
* cdef str dec2bin(long i): # <<<<<<<<<<<<<<
@@ -19367,7 +19457,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/m/workspace/cdec/python/src/sa/veb.pxi":158
*
* cdef str dec2bin(long i):
* cdef str result = "" # <<<<<<<<<<<<<<
@@ -19377,7 +19467,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/m/workspace/cdec/python/src/sa/veb.pxi":160
* cdef str result = ""
* cdef unsigned d
* for d in range(MIN_BOTTOM_SIZE): # <<<<<<<<<<<<<<
@@ -19388,7 +19478,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/m/workspace/cdec/python/src/sa/veb.pxi":161
* cdef unsigned d
* for d in range(MIN_BOTTOM_SIZE):
* if i & LOWER_MASK[0] == 0: # <<<<<<<<<<<<<<
@@ -19398,7 +19488,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/m/workspace/cdec/python/src/sa/veb.pxi":162
* for d in range(MIN_BOTTOM_SIZE):
* if i & LOWER_MASK[0] == 0:
* result = "0"+result # <<<<<<<<<<<<<<
@@ -19414,7 +19504,7 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":164
+ /* "/home/m/workspace/cdec/python/src/sa/veb.pxi":164
* result = "0"+result
* else:
* result = "1"+result # <<<<<<<<<<<<<<
@@ -19429,7 +19519,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/m/workspace/cdec/python/src/sa/veb.pxi":165
* else:
* result = "1"+result
* i = i >> 1 # <<<<<<<<<<<<<<
@@ -19439,7 +19529,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/m/workspace/cdec/python/src/sa/veb.pxi":166
* result = "1"+result
* i = i >> 1
* return result # <<<<<<<<<<<<<<
@@ -19464,7 +19554,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/m/workspace/cdec/python/src/sa/veb.pxi":177
* void** bottom
*
* cdef _VEB* new_VEB(int n): # <<<<<<<<<<<<<<
@@ -19485,7 +19575,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/m/workspace/cdec/python/src/sa/veb.pxi":181
* cdef int num_bits, num_top_bits, i
*
* veb = <_VEB*> malloc(sizeof(_VEB)) # <<<<<<<<<<<<<<
@@ -19494,7 +19584,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/m/workspace/cdec/python/src/sa/veb.pxi":183
* veb = <_VEB*> malloc(sizeof(_VEB))
*
* num_bits = int(ceil(log(n) / log(2))) # <<<<<<<<<<<<<<
@@ -19509,7 +19599,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/m/workspace/cdec/python/src/sa/veb.pxi":184
*
* num_bits = int(ceil(log(n) / log(2)))
* veb.num_bottom_bits = num_bits/2 # <<<<<<<<<<<<<<
@@ -19518,7 +19608,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -19528,7 +19618,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -19540,7 +19630,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -19549,7 +19639,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/m/workspace/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*)) # <<<<<<<<<<<<<<
@@ -19558,7 +19648,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/m/workspace/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*)) # <<<<<<<<<<<<<<
@@ -19567,7 +19657,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -19577,7 +19667,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/m/workspace/cdec/python/src/sa/veb.pxi":193
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* veb.top = new_VEB(veb.top_universe_size) # <<<<<<<<<<<<<<
@@ -19589,7 +19679,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/m/workspace/cdec/python/src/sa/veb.pxi":195
* veb.top = new_VEB(veb.top_universe_size)
* else:
* veb.top = new_BitSet() # <<<<<<<<<<<<<<
@@ -19600,7 +19690,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/m/workspace/cdec/python/src/sa/veb.pxi":197
* veb.top = new_BitSet()
*
* veb.max_val = -1 # <<<<<<<<<<<<<<
@@ -19609,7 +19699,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/m/workspace/cdec/python/src/sa/veb.pxi":198
*
* veb.max_val = -1
* veb.min_val = -1 # <<<<<<<<<<<<<<
@@ -19618,7 +19708,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/m/workspace/cdec/python/src/sa/veb.pxi":199
* veb.max_val = -1
* veb.min_val = -1
* veb.size = 0 # <<<<<<<<<<<<<<
@@ -19627,7 +19717,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/m/workspace/cdec/python/src/sa/veb.pxi":200
* veb.min_val = -1
* veb.size = 0
* return veb # <<<<<<<<<<<<<<
@@ -19647,7 +19737,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/m/workspace/cdec/python/src/sa/veb.pxi":203
*
*
* cdef int VEB_insert(_VEB* veb, int i): # <<<<<<<<<<<<<<
@@ -19668,7 +19758,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/m/workspace/cdec/python/src/sa/veb.pxi":208
* cdef int a, b, tmp
*
* if veb.size == 0: # <<<<<<<<<<<<<<
@@ -19678,7 +19768,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/m/workspace/cdec/python/src/sa/veb.pxi":209
*
* if veb.size == 0:
* veb.min_val = i # <<<<<<<<<<<<<<
@@ -19687,7 +19777,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/m/workspace/cdec/python/src/sa/veb.pxi":210
* if veb.size == 0:
* veb.min_val = i
* veb.max_val = i # <<<<<<<<<<<<<<
@@ -19698,7 +19788,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -19714,7 +19804,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/m/workspace/cdec/python/src/sa/veb.pxi":212
* veb.max_val = i
* elif i == veb.min_val or i == veb.max_val:
* return 0 # <<<<<<<<<<<<<<
@@ -19727,7 +19817,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/m/workspace/cdec/python/src/sa/veb.pxi":214
* return 0
* else:
* if i < veb.min_val: # <<<<<<<<<<<<<<
@@ -19737,7 +19827,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/m/workspace/cdec/python/src/sa/veb.pxi":215
* else:
* if i < veb.min_val:
* tmp = i # <<<<<<<<<<<<<<
@@ -19746,7 +19836,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/m/workspace/cdec/python/src/sa/veb.pxi":216
* if i < veb.min_val:
* tmp = i
* i = veb.min_val # <<<<<<<<<<<<<<
@@ -19755,7 +19845,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/m/workspace/cdec/python/src/sa/veb.pxi":217
* tmp = i
* i = veb.min_val
* veb.min_val = tmp # <<<<<<<<<<<<<<
@@ -19767,7 +19857,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/m/workspace/cdec/python/src/sa/veb.pxi":218
* i = veb.min_val
* veb.min_val = tmp
* a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<<
@@ -19776,7 +19866,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -19785,7 +19875,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -19795,7 +19885,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -19805,7 +19895,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/m/workspace/cdec/python/src/sa/veb.pxi":222
* if veb.bottom[a] == NULL:
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top # <<<<<<<<<<<<<<
@@ -19814,7 +19904,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/m/workspace/cdec/python/src/sa/veb.pxi":223
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top
* VEB_insert(subv, a) # <<<<<<<<<<<<<<
@@ -19826,7 +19916,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/m/workspace/cdec/python/src/sa/veb.pxi":225
* VEB_insert(subv, a)
* else:
* subb = <_BitSet*> veb.top # <<<<<<<<<<<<<<
@@ -19835,7 +19925,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/m/workspace/cdec/python/src/sa/veb.pxi":226
* else:
* subb = <_BitSet*> veb.top
* bitset_insert(subb, a) # <<<<<<<<<<<<<<
@@ -19846,7 +19936,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/m/workspace/cdec/python/src/sa/veb.pxi":227
* subb = <_BitSet*> veb.top
* bitset_insert(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -19856,7 +19946,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -19868,7 +19958,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/m/workspace/cdec/python/src/sa/veb.pxi":230
* veb.bottom[a] = new_VEB(1 << veb.num_bottom_bits)
* else:
* veb.bottom[a] = new_BitSet() # <<<<<<<<<<<<<<
@@ -19882,7 +19972,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/m/workspace/cdec/python/src/sa/veb.pxi":231
* else:
* veb.bottom[a] = new_BitSet()
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -19892,7 +19982,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -19901,7 +19991,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -19911,7 +20001,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/m/workspace/cdec/python/src/sa/veb.pxi":234
* subv = <_VEB*> veb.bottom[a]
* if VEB_insert(subv, b) == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -19927,7 +20017,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/m/workspace/cdec/python/src/sa/veb.pxi":236
* return 0
* else:
* subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<<
@@ -19936,7 +20026,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/m/workspace/cdec/python/src/sa/veb.pxi":237
* else:
* subb = <_BitSet*> veb.bottom[a]
* if bitset_insert(subb, b) == 0: # <<<<<<<<<<<<<<
@@ -19946,7 +20036,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/m/workspace/cdec/python/src/sa/veb.pxi":238
* subb = <_BitSet*> veb.bottom[a]
* if bitset_insert(subb, b) == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -19961,7 +20051,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/m/workspace/cdec/python/src/sa/veb.pxi":240
* return 0
*
* if i > veb.max_val: # <<<<<<<<<<<<<<
@@ -19971,7 +20061,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/m/workspace/cdec/python/src/sa/veb.pxi":241
*
* if i > veb.max_val:
* veb.max_val = i # <<<<<<<<<<<<<<
@@ -19985,7 +20075,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/m/workspace/cdec/python/src/sa/veb.pxi":242
* if i > veb.max_val:
* veb.max_val = i
* veb.size = veb.size + 1 # <<<<<<<<<<<<<<
@@ -19994,7 +20084,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/m/workspace/cdec/python/src/sa/veb.pxi":243
* veb.max_val = i
* veb.size = veb.size + 1
* return 1 # <<<<<<<<<<<<<<
@@ -20010,7 +20100,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/m/workspace/cdec/python/src/sa/veb.pxi":246
*
*
* cdef del_VEB(_VEB* veb): # <<<<<<<<<<<<<<
@@ -20029,7 +20119,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/m/workspace/cdec/python/src/sa/veb.pxi":249
* cdef int i
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
@@ -20039,7 +20129,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/m/workspace/cdec/python/src/sa/veb.pxi":250
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* i = (<_VEB*> veb.top).min_val # <<<<<<<<<<<<<<
@@ -20051,7 +20141,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/m/workspace/cdec/python/src/sa/veb.pxi":252
* i = (<_VEB*> veb.top).min_val
* else:
* i = (<_BitSet*> veb.top).min_val # <<<<<<<<<<<<<<
@@ -20062,7 +20152,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/m/workspace/cdec/python/src/sa/veb.pxi":254
* i = (<_BitSet*> veb.top).min_val
*
* while i != -1: # <<<<<<<<<<<<<<
@@ -20073,7 +20163,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/m/workspace/cdec/python/src/sa/veb.pxi":255
*
* while i != -1:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -20083,7 +20173,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/m/workspace/cdec/python/src/sa/veb.pxi":256
* while i != -1:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* del_VEB(<_VEB*> veb.bottom[i]) # <<<<<<<<<<<<<<
@@ -20097,7 +20187,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/m/workspace/cdec/python/src/sa/veb.pxi":258
* del_VEB(<_VEB*> veb.bottom[i])
* else:
* free(<_BitSet*> veb.bottom[i]) # <<<<<<<<<<<<<<
@@ -20108,7 +20198,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/m/workspace/cdec/python/src/sa/veb.pxi":260
* free(<_BitSet*> veb.bottom[i])
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
@@ -20118,7 +20208,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/m/workspace/cdec/python/src/sa/veb.pxi":261
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* i = VEB_findsucc(<_VEB*> veb.top, i) # <<<<<<<<<<<<<<
@@ -20130,7 +20220,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/m/workspace/cdec/python/src/sa/veb.pxi":263
* i = VEB_findsucc(<_VEB*> veb.top, i)
* else:
* i = bitset_findsucc(<_BitSet*> veb.top, i) # <<<<<<<<<<<<<<
@@ -20142,7 +20232,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/m/workspace/cdec/python/src/sa/veb.pxi":265
* i = bitset_findsucc(<_BitSet*> veb.top, i)
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
@@ -20152,7 +20242,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/m/workspace/cdec/python/src/sa/veb.pxi":266
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* del_VEB(<_VEB*> veb.top) # <<<<<<<<<<<<<<
@@ -20166,7 +20256,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/m/workspace/cdec/python/src/sa/veb.pxi":268
* del_VEB(<_VEB*> veb.top)
* else:
* free(<_BitSet*> veb.top) # <<<<<<<<<<<<<<
@@ -20177,7 +20267,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/m/workspace/cdec/python/src/sa/veb.pxi":269
* else:
* free(<_BitSet*> veb.top)
* free(veb.bottom) # <<<<<<<<<<<<<<
@@ -20186,7 +20276,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/m/workspace/cdec/python/src/sa/veb.pxi":270
* free(<_BitSet*> veb.top)
* free(veb.bottom)
* free(veb) # <<<<<<<<<<<<<<
@@ -20207,7 +20297,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/m/workspace/cdec/python/src/sa/veb.pxi":273
*
*
* cdef int VEB_findsucc(_VEB* veb, int i): # <<<<<<<<<<<<<<
@@ -20230,7 +20320,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/m/workspace/cdec/python/src/sa/veb.pxi":278
* cdef int a, b, j, c, found
*
* if veb.max_val == -1 or i>=veb.max_val: # <<<<<<<<<<<<<<
@@ -20246,7 +20336,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/m/workspace/cdec/python/src/sa/veb.pxi":279
*
* if veb.max_val == -1 or i>=veb.max_val:
* return -1 # <<<<<<<<<<<<<<
@@ -20259,7 +20349,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/m/workspace/cdec/python/src/sa/veb.pxi":280
* if veb.max_val == -1 or i>=veb.max_val:
* return -1
* if i < veb.min_val: # <<<<<<<<<<<<<<
@@ -20269,7 +20359,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/m/workspace/cdec/python/src/sa/veb.pxi":281
* return -1
* if i < veb.min_val:
* return veb.min_val # <<<<<<<<<<<<<<
@@ -20282,7 +20372,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/m/workspace/cdec/python/src/sa/veb.pxi":283
* return veb.min_val
*
* a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<<
@@ -20291,7 +20381,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/m/workspace/cdec/python/src/sa/veb.pxi":284
*
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<<
@@ -20300,7 +20390,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/m/workspace/cdec/python/src/sa/veb.pxi":285
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* found = 0 # <<<<<<<<<<<<<<
@@ -20309,7 +20399,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/m/workspace/cdec/python/src/sa/veb.pxi":286
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* found = 0
* if veb.bottom[a] != NULL: # <<<<<<<<<<<<<<
@@ -20319,7 +20409,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/m/workspace/cdec/python/src/sa/veb.pxi":287
* found = 0
* if veb.bottom[a] != NULL:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -20329,7 +20419,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -20338,7 +20428,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -20348,7 +20438,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -20357,7 +20447,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/m/workspace/cdec/python/src/sa/veb.pxi":291
* if subv.max_val > b:
* j = (a << veb.num_bottom_bits) + VEB_findsucc(subv, b)
* found = 1 # <<<<<<<<<<<<<<
@@ -20372,7 +20462,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/m/workspace/cdec/python/src/sa/veb.pxi":293
* found = 1
* else:
* subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<<
@@ -20381,7 +20471,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/m/workspace/cdec/python/src/sa/veb.pxi":294
* else:
* subb = <_BitSet*> veb.bottom[a]
* if subb.max_val > b: # <<<<<<<<<<<<<<
@@ -20391,7 +20481,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -20400,7 +20490,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/m/workspace/cdec/python/src/sa/veb.pxi":296
* if subb.max_val > b:
* j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b)
* found = 1 # <<<<<<<<<<<<<<
@@ -20417,7 +20507,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/m/workspace/cdec/python/src/sa/veb.pxi":297
* j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b)
* found = 1
* if found==0: # <<<<<<<<<<<<<<
@@ -20427,7 +20517,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/m/workspace/cdec/python/src/sa/veb.pxi":298
* found = 1
* if found==0:
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
@@ -20437,7 +20527,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/m/workspace/cdec/python/src/sa/veb.pxi":299
* if found==0:
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top # <<<<<<<<<<<<<<
@@ -20446,7 +20536,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/m/workspace/cdec/python/src/sa/veb.pxi":300
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top
* c = VEB_findsucc(subv, a) # <<<<<<<<<<<<<<
@@ -20458,7 +20548,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/m/workspace/cdec/python/src/sa/veb.pxi":302
* c = VEB_findsucc(subv, a)
* else:
* subb = <_BitSet*> veb.top # <<<<<<<<<<<<<<
@@ -20467,7 +20557,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/m/workspace/cdec/python/src/sa/veb.pxi":303
* else:
* subb = <_BitSet*> veb.top
* c = bitset_findsucc(subb, a) # <<<<<<<<<<<<<<
@@ -20478,7 +20568,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/m/workspace/cdec/python/src/sa/veb.pxi":304
* subb = <_BitSet*> veb.top
* c = bitset_findsucc(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -20488,7 +20578,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -20497,7 +20587,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -20509,7 +20599,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/m/workspace/cdec/python/src/sa/veb.pxi":308
* j = (c << veb.num_bottom_bits) + subv.min_val
* else:
* subb = <_BitSet*> veb.bottom[c] # <<<<<<<<<<<<<<
@@ -20518,7 +20608,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/m/workspace/cdec/python/src/sa/veb.pxi":309
* else:
* subb = <_BitSet*> veb.bottom[c]
* j = (c << veb.num_bottom_bits) + subb.min_val # <<<<<<<<<<<<<<
@@ -20532,7 +20622,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/m/workspace/cdec/python/src/sa/veb.pxi":310
* subb = <_BitSet*> veb.bottom[c]
* j = (c << veb.num_bottom_bits) + subb.min_val
* return j # <<<<<<<<<<<<<<
@@ -20548,7 +20638,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/m/workspace/cdec/python/src/sa/veb.pxi":313
*
*
* cdef int VEB_contains(_VEB* veb, int i): # <<<<<<<<<<<<<<
@@ -20569,7 +20659,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -20591,7 +20681,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/m/workspace/cdec/python/src/sa/veb.pxi":319
*
* if veb.size == 0 or i < veb.min_val or i > veb.max_val:
* return 0 # <<<<<<<<<<<<<<
@@ -20604,7 +20694,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/m/workspace/cdec/python/src/sa/veb.pxi":321
* return 0
*
* if veb.min_val == i: # <<<<<<<<<<<<<<
@@ -20614,7 +20704,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/m/workspace/cdec/python/src/sa/veb.pxi":322
*
* if veb.min_val == i:
* return 1 # <<<<<<<<<<<<<<
@@ -20627,7 +20717,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/m/workspace/cdec/python/src/sa/veb.pxi":324
* return 1
* else:
* if veb.size == 1: # <<<<<<<<<<<<<<
@@ -20637,7 +20727,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/m/workspace/cdec/python/src/sa/veb.pxi":325
* else:
* if veb.size == 1:
* return 0 # <<<<<<<<<<<<<<
@@ -20652,7 +20742,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/m/workspace/cdec/python/src/sa/veb.pxi":327
* return 0
*
* a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<<
@@ -20661,7 +20751,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/m/workspace/cdec/python/src/sa/veb.pxi":328
*
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<<
@@ -20670,7 +20760,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -20680,7 +20770,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/m/workspace/cdec/python/src/sa/veb.pxi":330
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* if veb.bottom[a] == NULL:
* return 0 # <<<<<<<<<<<<<<
@@ -20693,7 +20783,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/m/workspace/cdec/python/src/sa/veb.pxi":332
* return 0
* else:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
@@ -20703,7 +20793,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/m/workspace/cdec/python/src/sa/veb.pxi":333
* else:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<<
@@ -20712,7 +20802,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -20725,7 +20815,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/m/workspace/cdec/python/src/sa/veb.pxi":336
* return VEB_contains(subv, b)
* else:
* subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<<
@@ -20734,7 +20824,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/m/workspace/cdec/python/src/sa/veb.pxi":337
* else:
* subb = <_BitSet*> veb.bottom[a]
* return bitset_contains(subb, b) # <<<<<<<<<<<<<<
@@ -20765,7 +20855,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/m/workspace/cdec/python/src/sa/veb.pxi":344
* cdef int next_val
*
* def __next__(self): # <<<<<<<<<<<<<<
@@ -20784,7 +20874,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/m/workspace/cdec/python/src/sa/veb.pxi":347
* cdef int ret_val
*
* if self.next_val == -1: # <<<<<<<<<<<<<<
@@ -20794,7 +20884,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/m/workspace/cdec/python/src/sa/veb.pxi":348
*
* if self.next_val == -1:
* raise StopIteration() # <<<<<<<<<<<<<<
@@ -20810,7 +20900,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/m/workspace/cdec/python/src/sa/veb.pxi":349
* if self.next_val == -1:
* raise StopIteration()
* ret_val = self.next_val # <<<<<<<<<<<<<<
@@ -20819,7 +20909,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/m/workspace/cdec/python/src/sa/veb.pxi":350
* raise StopIteration()
* ret_val = self.next_val
* self.next_val = VEB_findsucc(self.v, ret_val) # <<<<<<<<<<<<<<
@@ -20828,7 +20918,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/m/workspace/cdec/python/src/sa/veb.pxi":351
* ret_val = self.next_val
* self.next_val = VEB_findsucc(self.v, ret_val)
* return ret_val # <<<<<<<<<<<<<<
@@ -20901,7 +20991,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/m/workspace/cdec/python/src/sa/veb.pxi":360
* cdef int _first(self)
*
* def __cinit__(self, int size): # <<<<<<<<<<<<<<
@@ -20914,7 +21004,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/m/workspace/cdec/python/src/sa/veb.pxi":361
*
* def __cinit__(self, int size):
* self.veb = new_VEB(size) # <<<<<<<<<<<<<<
@@ -20937,7 +21027,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/m/workspace/cdec/python/src/sa/veb.pxi":363
* self.veb = new_VEB(size)
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -20953,7 +21043,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/m/workspace/cdec/python/src/sa/veb.pxi":364
*
* def __dealloc__(self):
* del_VEB(self.veb) # <<<<<<<<<<<<<<
@@ -20983,7 +21073,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/m/workspace/cdec/python/src/sa/veb.pxi":366
* del_VEB(self.veb)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -21001,7 +21091,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/m/workspace/cdec/python/src/sa/veb.pxi":368
* def __iter__(self):
* cdef VEBIterator it
* it = VEBIterator() # <<<<<<<<<<<<<<
@@ -21013,7 +21103,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/m/workspace/cdec/python/src/sa/veb.pxi":369
* cdef VEBIterator it
* it = VEBIterator()
* it.v = self.veb # <<<<<<<<<<<<<<
@@ -21022,7 +21112,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/m/workspace/cdec/python/src/sa/veb.pxi":370
* it = VEBIterator()
* it.v = self.veb
* it.next_val = self.veb.min_val # <<<<<<<<<<<<<<
@@ -21031,7 +21121,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/m/workspace/cdec/python/src/sa/veb.pxi":371
* it.v = self.veb
* it.next_val = self.veb.min_val
* return it # <<<<<<<<<<<<<<
@@ -21067,7 +21157,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/m/workspace/cdec/python/src/sa/veb.pxi":373
* return it
*
* def insert(self, i): # <<<<<<<<<<<<<<
@@ -21085,7 +21175,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/m/workspace/cdec/python/src/sa/veb.pxi":374
*
* def insert(self, i):
* return VEB_insert(self.veb, i) # <<<<<<<<<<<<<<
@@ -21112,7 +21202,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/m/workspace/cdec/python/src/sa/veb.pxi":376
* return VEB_insert(self.veb, i)
*
* cdef int _insert(self, int i): # <<<<<<<<<<<<<<
@@ -21125,7 +21215,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/m/workspace/cdec/python/src/sa/veb.pxi":377
*
* cdef int _insert(self, int i):
* return VEB_insert(self.veb, i) # <<<<<<<<<<<<<<
@@ -21152,7 +21242,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/m/workspace/cdec/python/src/sa/veb.pxi":379
* return VEB_insert(self.veb, i)
*
* def findsucc(self, i): # <<<<<<<<<<<<<<
@@ -21170,7 +21260,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/m/workspace/cdec/python/src/sa/veb.pxi":380
*
* def findsucc(self, i):
* return VEB_findsucc(self.veb, i) # <<<<<<<<<<<<<<
@@ -21197,7 +21287,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/m/workspace/cdec/python/src/sa/veb.pxi":382
* return VEB_findsucc(self.veb, i)
*
* cdef int _first(self): # <<<<<<<<<<<<<<
@@ -21210,7 +21300,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/m/workspace/cdec/python/src/sa/veb.pxi":383
*
* cdef int _first(self):
* return self.veb.min_val # <<<<<<<<<<<<<<
@@ -21226,7 +21316,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/m/workspace/cdec/python/src/sa/veb.pxi":385
* return self.veb.min_val
*
* cdef int _findsucc(self, int i): # <<<<<<<<<<<<<<
@@ -21239,7 +21329,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/m/workspace/cdec/python/src/sa/veb.pxi":386
*
* cdef int _findsucc(self, int i):
* return VEB_findsucc(self.veb, i) # <<<<<<<<<<<<<<
@@ -21266,7 +21356,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/m/workspace/cdec/python/src/sa/veb.pxi":388
* return VEB_findsucc(self.veb, i)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -21279,7 +21369,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/m/workspace/cdec/python/src/sa/veb.pxi":389
*
* def __len__(self):
* return self.veb.size # <<<<<<<<<<<<<<
@@ -21306,7 +21396,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/m/workspace/cdec/python/src/sa/veb.pxi":391
* return self.veb.size
*
* def __contains__(self, i): # <<<<<<<<<<<<<<
@@ -21322,7 +21412,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/m/workspace/cdec/python/src/sa/veb.pxi":392
*
* def __contains__(self, i):
* return VEB_contains(self.veb, i) # <<<<<<<<<<<<<<
@@ -21393,7 +21483,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/m/workspace/cdec/python/src/sa/lcp.pxi":9
* cdef IntList lcp
*
* def __cinit__(self, SuffixArray sa): # <<<<<<<<<<<<<<
@@ -21422,7 +21512,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/m/workspace/cdec/python/src/sa/lcp.pxi":13
* cdef IntList rank
*
* logger.info("Constructing LCP array") # <<<<<<<<<<<<<<
@@ -21439,7 +21529,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/m/workspace/cdec/python/src/sa/lcp.pxi":14
*
* logger.info("Constructing LCP array")
* self.sa = sa # <<<<<<<<<<<<<<
@@ -21452,7 +21542,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/m/workspace/cdec/python/src/sa/lcp.pxi":15
* logger.info("Constructing LCP array")
* self.sa = sa
* n = self.sa.sa.len # <<<<<<<<<<<<<<
@@ -21461,7 +21551,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/m/workspace/cdec/python/src/sa/lcp.pxi":16
* self.sa = sa
* n = self.sa.sa.len
* self.lcp = IntList(initial_len=n) # <<<<<<<<<<<<<<
@@ -21483,7 +21573,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/m/workspace/cdec/python/src/sa/lcp.pxi":18
* self.lcp = IntList(initial_len=n)
*
* rank = IntList(initial_len=n) # <<<<<<<<<<<<<<
@@ -21502,7 +21592,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/m/workspace/cdec/python/src/sa/lcp.pxi":19
*
* rank = IntList(initial_len=n)
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -21512,7 +21602,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -21522,7 +21612,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/m/workspace/cdec/python/src/sa/lcp.pxi":22
* rank.arr[sa.sa.arr[i]] = i
*
* h = 0 # <<<<<<<<<<<<<<
@@ -21531,7 +21621,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/m/workspace/cdec/python/src/sa/lcp.pxi":23
*
* h = 0
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -21541,7 +21631,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/m/workspace/cdec/python/src/sa/lcp.pxi":24
* h = 0
* for i from 0 <= i < n:
* k = rank.arr[i] # <<<<<<<<<<<<<<
@@ -21550,7 +21640,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/m/workspace/cdec/python/src/sa/lcp.pxi":25
* for i from 0 <= i < n:
* k = rank.arr[i]
* if k == 0: # <<<<<<<<<<<<<<
@@ -21560,7 +21650,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/m/workspace/cdec/python/src/sa/lcp.pxi":26
* k = rank.arr[i]
* if k == 0:
* self.lcp.arr[k] = -1 # <<<<<<<<<<<<<<
@@ -21572,7 +21662,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/m/workspace/cdec/python/src/sa/lcp.pxi":28
* self.lcp.arr[k] = -1
* else:
* j = sa.sa.arr[k-1] # <<<<<<<<<<<<<<
@@ -21581,7 +21671,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/m/workspace/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]: # <<<<<<<<<<<<<<
@@ -21604,7 +21694,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -21614,7 +21704,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -21625,7 +21715,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/m/workspace/cdec/python/src/sa/lcp.pxi":32
* h = h+1
* self.lcp.arr[k] = h
* if h > 0: # <<<<<<<<<<<<<<
@@ -21635,7 +21725,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/m/workspace/cdec/python/src/sa/lcp.pxi":33
* self.lcp.arr[k] = h
* if h > 0:
* h = h-1 # <<<<<<<<<<<<<<
@@ -21648,7 +21738,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/m/workspace/cdec/python/src/sa/lcp.pxi":34
* if h > 0:
* h = h-1
* logger.info("LCP array completed") # <<<<<<<<<<<<<<
@@ -21701,7 +21791,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/m/workspace/cdec/python/src/sa/lcp.pxi":36
* logger.info("LCP array completed")
*
* def compute_stats(self, int max_n): # <<<<<<<<<<<<<<
@@ -21772,7 +21862,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/m/workspace/cdec/python/src/sa/lcp.pxi":48
* cdef VEB veb
*
* N = self.sa.sa.len # <<<<<<<<<<<<<<
@@ -21781,7 +21871,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/m/workspace/cdec/python/src/sa/lcp.pxi":50
* N = self.sa.sa.len
*
* ngram_starts = [] # <<<<<<<<<<<<<<
@@ -21794,7 +21884,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/m/workspace/cdec/python/src/sa/lcp.pxi":51
*
* ngram_starts = []
* for n from 0 <= n < max_n: # <<<<<<<<<<<<<<
@@ -21804,7 +21894,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/m/workspace/cdec/python/src/sa/lcp.pxi":52
* ngram_starts = []
* for n from 0 <= n < max_n:
* ngram_starts.append(IntList(initial_len=N)) # <<<<<<<<<<<<<<
@@ -21824,7 +21914,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/m/workspace/cdec/python/src/sa/lcp.pxi":54
* ngram_starts.append(IntList(initial_len=N))
*
* run_start = IntList(initial_len=max_n) # <<<<<<<<<<<<<<
@@ -21844,7 +21934,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/m/workspace/cdec/python/src/sa/lcp.pxi":55
*
* run_start = IntList(initial_len=max_n)
* veb = VEB(N) # <<<<<<<<<<<<<<
@@ -21865,7 +21955,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/m/workspace/cdec/python/src/sa/lcp.pxi":57
* veb = VEB(N)
*
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -21875,7 +21965,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/m/workspace/cdec/python/src/sa/lcp.pxi":58
*
* for i from 0 <= i < N:
* h = self.lcp.arr[i] # <<<<<<<<<<<<<<
@@ -21884,7 +21974,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/m/workspace/cdec/python/src/sa/lcp.pxi":59
* for i from 0 <= i < N:
* h = self.lcp.arr[i]
* if h < 0: # <<<<<<<<<<<<<<
@@ -21894,7 +21984,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/m/workspace/cdec/python/src/sa/lcp.pxi":60
* h = self.lcp.arr[i]
* if h < 0:
* h = 0 # <<<<<<<<<<<<<<
@@ -21906,7 +21996,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/m/workspace/cdec/python/src/sa/lcp.pxi":61
* if h < 0:
* h = 0
* for n from h <= n < max_n: # <<<<<<<<<<<<<<
@@ -21916,7 +22006,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/m/workspace/cdec/python/src/sa/lcp.pxi":62
* h = 0
* for n from h <= n < max_n:
* rs = run_start.arr[n] # <<<<<<<<<<<<<<
@@ -21925,7 +22015,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/m/workspace/cdec/python/src/sa/lcp.pxi":63
* for n from h <= n < max_n:
* rs = run_start.arr[n]
* run_start.arr[n] = i # <<<<<<<<<<<<<<
@@ -21934,7 +22024,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/m/workspace/cdec/python/src/sa/lcp.pxi":64
* rs = run_start.arr[n]
* run_start.arr[n] = i
* freq = i - rs # <<<<<<<<<<<<<<
@@ -21943,7 +22033,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/m/workspace/cdec/python/src/sa/lcp.pxi":65
* run_start.arr[n] = i
* freq = i - rs
* if freq > 1000: # arbitrary, but see note below # <<<<<<<<<<<<<<
@@ -21953,7 +22043,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/m/workspace/cdec/python/src/sa/lcp.pxi":66
* freq = i - rs
* if freq > 1000: # arbitrary, but see note below
* veb._insert(freq) # <<<<<<<<<<<<<<
@@ -21962,7 +22052,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/m/workspace/cdec/python/src/sa/lcp.pxi":67
* if freq > 1000: # arbitrary, but see note below
* veb._insert(freq)
* ngram_start = ngram_starts[n] # <<<<<<<<<<<<<<
@@ -21978,7 +22068,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/m/workspace/cdec/python/src/sa/lcp.pxi":68
* veb._insert(freq)
* ngram_start = ngram_starts[n]
* while ngram_start.arr[freq] > 0: # <<<<<<<<<<<<<<
@@ -21989,7 +22079,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -21999,7 +22089,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -22013,7 +22103,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":71
+ /* "/home/m/workspace/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 # <<<<<<<<<<<<<<
@@ -22022,7 +22112,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/m/workspace/cdec/python/src/sa/lcp.pxi":72
* ngram_start.arr[freq] = rs
* i = veb.veb.min_val
* while i != -1: # <<<<<<<<<<<<<<
@@ -22033,7 +22123,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/m/workspace/cdec/python/src/sa/lcp.pxi":73
* i = veb.veb.min_val
* while i != -1:
* ii = veb._findsucc(i) # <<<<<<<<<<<<<<
@@ -22042,7 +22132,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/m/workspace/cdec/python/src/sa/lcp.pxi":74
* while i != -1:
* ii = veb._findsucc(i)
* for n from 0 <= n < max_n: # <<<<<<<<<<<<<<
@@ -22052,7 +22142,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/m/workspace/cdec/python/src/sa/lcp.pxi":75
* ii = veb._findsucc(i)
* for n from 0 <= n < max_n:
* ngram_start = ngram_starts[n] # <<<<<<<<<<<<<<
@@ -22068,7 +22158,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/m/workspace/cdec/python/src/sa/lcp.pxi":76
* for n from 0 <= n < max_n:
* ngram_start = ngram_starts[n]
* iii = i # <<<<<<<<<<<<<<
@@ -22077,7 +22167,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/m/workspace/cdec/python/src/sa/lcp.pxi":77
* ngram_start = ngram_starts[n]
* iii = i
* rs = ngram_start.arr[iii] # <<<<<<<<<<<<<<
@@ -22086,7 +22176,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/m/workspace/cdec/python/src/sa/lcp.pxi":78
* iii = i
* rs = ngram_start.arr[iii]
* while (ii==-1 or iii < ii) and rs != 0: # <<<<<<<<<<<<<<
@@ -22109,7 +22199,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -22118,7 +22208,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/m/workspace/cdec/python/src/sa/lcp.pxi":80
* while (ii==-1 or iii < ii) and rs != 0:
* j = self.sa.sa.arr[rs]
* valid = 1 # <<<<<<<<<<<<<<
@@ -22127,7 +22217,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/m/workspace/cdec/python/src/sa/lcp.pxi":81
* j = self.sa.sa.arr[rs]
* valid = 1
* for k from 0 <= k < n+1: # <<<<<<<<<<<<<<
@@ -22137,7 +22227,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -22147,7 +22237,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -22160,7 +22250,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/m/workspace/cdec/python/src/sa/lcp.pxi":84
* if self.sa.darray.data.arr[j+k] < 2:
* valid = 0
* if valid: # <<<<<<<<<<<<<<
@@ -22169,7 +22259,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/m/workspace/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)]) # <<<<<<<<<<<<<<
@@ -22195,7 +22285,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -22232,7 +22322,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -22241,7 +22331,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/m/workspace/cdec/python/src/sa/lcp.pxi":88
* yield i, n+1, ngram
* iii = iii + 1
* rs = ngram_start.arr[iii] # <<<<<<<<<<<<<<
@@ -22251,7 +22341,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":89
+ /* "/home/m/workspace/cdec/python/src/sa/lcp.pxi":89
* iii = iii + 1
* rs = ngram_start.arr[iii]
* i = ii # <<<<<<<<<<<<<<
@@ -22287,7 +22377,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/m/workspace/cdec/python/src/sa/sym.pxi":12
* cdef dict id2sym
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -22304,7 +22394,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/m/workspace/cdec/python/src/sa/sym.pxi":13
*
* def __cinit__(self):
* self.terminals = StringMap() # <<<<<<<<<<<<<<
@@ -22319,7 +22409,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/m/workspace/cdec/python/src/sa/sym.pxi":14
* def __cinit__(self):
* self.terminals = StringMap()
* self.nonterminals = StringMap() # <<<<<<<<<<<<<<
@@ -22334,7 +22424,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/m/workspace/cdec/python/src/sa/sym.pxi":15
* self.terminals = StringMap()
* self.nonterminals = StringMap()
* self.id2sym = {} # <<<<<<<<<<<<<<
@@ -22349,7 +22439,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/m/workspace/cdec/python/src/sa/sym.pxi":16
* self.nonterminals = StringMap()
* self.id2sym = {}
* self.first_nonterminal = -1 # <<<<<<<<<<<<<<
@@ -22378,7 +22468,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/m/workspace/cdec/python/src/sa/sym.pxi":18
* self.first_nonterminal = -1
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -22393,7 +22483,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/m/workspace/cdec/python/src/sa/sym.pxi":21
* pass
*
* cdef int isvar(self, int sym): # <<<<<<<<<<<<<<
@@ -22406,7 +22496,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/m/workspace/cdec/python/src/sa/sym.pxi":22
*
* cdef int isvar(self, int sym):
* return sym < 0 # <<<<<<<<<<<<<<
@@ -22422,7 +22512,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/m/workspace/cdec/python/src/sa/sym.pxi":24
* return sym < 0
*
* cdef int isword(self, int sym): # <<<<<<<<<<<<<<
@@ -22435,7 +22525,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/m/workspace/cdec/python/src/sa/sym.pxi":25
*
* cdef int isword(self, int sym):
* return sym >= 0 # <<<<<<<<<<<<<<
@@ -22451,7 +22541,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/m/workspace/cdec/python/src/sa/sym.pxi":27
* return sym >= 0
*
* cdef int getindex(self, int sym): # <<<<<<<<<<<<<<
@@ -22464,7 +22554,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/m/workspace/cdec/python/src/sa/sym.pxi":28
*
* cdef int getindex(self, int sym):
* return -sym & INDEX_MASK # <<<<<<<<<<<<<<
@@ -22480,7 +22570,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/m/workspace/cdec/python/src/sa/sym.pxi":30
* return -sym & INDEX_MASK
*
* cdef int setindex(self, int sym, int ind): # <<<<<<<<<<<<<<
@@ -22493,7 +22583,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/m/workspace/cdec/python/src/sa/sym.pxi":31
*
* cdef int setindex(self, int sym, int ind):
* return -(-sym & ~INDEX_MASK | ind) # <<<<<<<<<<<<<<
@@ -22509,7 +22599,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/m/workspace/cdec/python/src/sa/sym.pxi":33
* return -(-sym & ~INDEX_MASK | ind)
*
* cdef int clearindex(self, int sym): # <<<<<<<<<<<<<<
@@ -22522,7 +22612,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/m/workspace/cdec/python/src/sa/sym.pxi":34
*
* cdef int clearindex(self, int sym):
* return -(-sym& ~INDEX_MASK) # <<<<<<<<<<<<<<
@@ -22538,7 +22628,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/m/workspace/cdec/python/src/sa/sym.pxi":36
* return -(-sym& ~INDEX_MASK)
*
* cdef int match(self, int sym1, int sym2): # <<<<<<<<<<<<<<
@@ -22551,7 +22641,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/m/workspace/cdec/python/src/sa/sym.pxi":37
*
* cdef int match(self, int sym1, int sym2):
* return self.clearindex(sym1) == self.clearindex(sym2); # <<<<<<<<<<<<<<
@@ -22567,7 +22657,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/m/workspace/cdec/python/src/sa/sym.pxi":39
* return self.clearindex(sym1) == self.clearindex(sym2);
*
* cdef char* tocat(self, int sym): # <<<<<<<<<<<<<<
@@ -22580,7 +22670,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/m/workspace/cdec/python/src/sa/sym.pxi":40
*
* cdef char* tocat(self, int sym):
* return self.nonterminals.word((-sym >> INDEX_SHIFT)-1) # <<<<<<<<<<<<<<
@@ -22596,7 +22686,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/m/workspace/cdec/python/src/sa/sym.pxi":42
* return self.nonterminals.word((-sym >> INDEX_SHIFT)-1)
*
* cdef int fromcat(self, char *s): # <<<<<<<<<<<<<<
@@ -22611,7 +22701,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/m/workspace/cdec/python/src/sa/sym.pxi":44
* cdef int fromcat(self, char *s):
* cdef int i
* i = self.nonterminals.index(s) # <<<<<<<<<<<<<<
@@ -22620,7 +22710,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/m/workspace/cdec/python/src/sa/sym.pxi":45
* cdef int i
* i = self.nonterminals.index(s)
* if self.first_nonterminal == -1: # <<<<<<<<<<<<<<
@@ -22630,7 +22720,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/m/workspace/cdec/python/src/sa/sym.pxi":46
* i = self.nonterminals.index(s)
* if self.first_nonterminal == -1:
* self.first_nonterminal = i # <<<<<<<<<<<<<<
@@ -22642,7 +22732,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/m/workspace/cdec/python/src/sa/sym.pxi":47
* if self.first_nonterminal == -1:
* self.first_nonterminal = i
* if i > self.last_nonterminal: # <<<<<<<<<<<<<<
@@ -22652,7 +22742,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/m/workspace/cdec/python/src/sa/sym.pxi":48
* self.first_nonterminal = i
* if i > self.last_nonterminal:
* self.last_nonterminal = i # <<<<<<<<<<<<<<
@@ -22664,7 +22754,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/m/workspace/cdec/python/src/sa/sym.pxi":49
* if i > self.last_nonterminal:
* self.last_nonterminal = i
* return -(i+1 << INDEX_SHIFT) # <<<<<<<<<<<<<<
@@ -22680,7 +22770,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/m/workspace/cdec/python/src/sa/sym.pxi":51
* return -(i+1 << INDEX_SHIFT)
*
* cdef char* tostring(self, int sym): # <<<<<<<<<<<<<<
@@ -22703,7 +22793,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/m/workspace/cdec/python/src/sa/sym.pxi":53
* cdef char* tostring(self, int sym):
* cdef int ind
* if self.isvar(sym): # <<<<<<<<<<<<<<
@@ -22713,7 +22803,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/m/workspace/cdec/python/src/sa/sym.pxi":54
* cdef int ind
* if self.isvar(sym):
* if sym in self.id2sym: # <<<<<<<<<<<<<<
@@ -22730,7 +22820,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":55
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":55
* if self.isvar(sym):
* if sym in self.id2sym:
* return self.id2sym[sym] # <<<<<<<<<<<<<<
@@ -22751,7 +22841,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/m/workspace/cdec/python/src/sa/sym.pxi":56
* if sym in self.id2sym:
* return self.id2sym[sym]
* ind = self.getindex(sym) # <<<<<<<<<<<<<<
@@ -22760,7 +22850,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/m/workspace/cdec/python/src/sa/sym.pxi":57
* return self.id2sym[sym]
* ind = self.getindex(sym)
* if ind > 0: # <<<<<<<<<<<<<<
@@ -22770,7 +22860,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/m/workspace/cdec/python/src/sa/sym.pxi":58
* ind = self.getindex(sym)
* if ind > 0:
* self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind) # <<<<<<<<<<<<<<
@@ -22802,7 +22892,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":60
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":60
* self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind)
* else:
* self.id2sym[sym] = "[%s]" % self.tocat(sym) # <<<<<<<<<<<<<<
@@ -22823,7 +22913,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":61
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":61
* else:
* self.id2sym[sym] = "[%s]" % self.tocat(sym)
* return self.id2sym[sym] # <<<<<<<<<<<<<<
@@ -22844,7 +22934,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/m/workspace/cdec/python/src/sa/sym.pxi":63
* return self.id2sym[sym]
* else:
* return self.terminals.word(sym) # <<<<<<<<<<<<<<
@@ -22869,7 +22959,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/m/workspace/cdec/python/src/sa/sym.pxi":65
* return self.terminals.word(sym)
*
* cdef int fromstring(self, char *s, bint terminal): # <<<<<<<<<<<<<<
@@ -22897,7 +22987,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/m/workspace/cdec/python/src/sa/sym.pxi":69
* cdef char *comma
* cdef int n
* n = strlen(s) # <<<<<<<<<<<<<<
@@ -22906,7 +22996,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/m/workspace/cdec/python/src/sa/sym.pxi":71
* n = strlen(s)
* cdef char *sep
* sep = strstr(s,"_SEP_") # <<<<<<<<<<<<<<
@@ -22915,7 +23005,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -22943,7 +23033,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -22952,7 +23042,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -22967,7 +23057,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/m/workspace/cdec/python/src/sa/sym.pxi":75
* if terminal:
* s1 = "\\"+s
* return self.terminals.index(s1) # <<<<<<<<<<<<<<
@@ -22981,7 +23071,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/m/workspace/cdec/python/src/sa/sym.pxi":76
* s1 = "\\"+s
* return self.terminals.index(s1)
* s[n-1] = c'\0' # <<<<<<<<<<<<<<
@@ -22990,7 +23080,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/m/workspace/cdec/python/src/sa/sym.pxi":77
* return self.terminals.index(s1)
* s[n-1] = c'\0'
* s = s + 1 # <<<<<<<<<<<<<<
@@ -22999,7 +23089,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/m/workspace/cdec/python/src/sa/sym.pxi":78
* s[n-1] = c'\0'
* s = s + 1
* comma = strrchr(s, c',') # <<<<<<<<<<<<<<
@@ -23008,7 +23098,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/m/workspace/cdec/python/src/sa/sym.pxi":79
* s = s + 1
* comma = strrchr(s, c',')
* if comma != NULL: # <<<<<<<<<<<<<<
@@ -23018,7 +23108,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/m/workspace/cdec/python/src/sa/sym.pxi":80
* comma = strrchr(s, c',')
* if comma != NULL:
* comma[0] = c'\0' # <<<<<<<<<<<<<<
@@ -23027,7 +23117,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -23040,7 +23130,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/m/workspace/cdec/python/src/sa/sym.pxi":83
* return self.setindex(self.fromcat(s), strtol(comma+1, NULL, 10))
* else:
* return self.fromcat(s) # <<<<<<<<<<<<<<
@@ -23055,7 +23145,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/m/workspace/cdec/python/src/sa/sym.pxi":85
* return self.fromcat(s)
* else:
* return self.terminals.index(s) # <<<<<<<<<<<<<<
@@ -23091,7 +23181,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/m/workspace/cdec/python/src/sa/sym.pxi":8
*
* cdef class Alphabet:
* cdef readonly StringMap terminals, nonterminals # <<<<<<<<<<<<<<
@@ -23142,7 +23232,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/m/workspace/cdec/python/src/sa/sym.pxi":89
* cdef Alphabet ALPHABET = Alphabet()
*
* cdef char* sym_tostring(int sym): # <<<<<<<<<<<<<<
@@ -23155,7 +23245,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/m/workspace/cdec/python/src/sa/sym.pxi":90
*
* cdef char* sym_tostring(int sym):
* return ALPHABET.tostring(sym) # <<<<<<<<<<<<<<
@@ -23171,7 +23261,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/m/workspace/cdec/python/src/sa/sym.pxi":92
* return ALPHABET.tostring(sym)
*
* cdef char* sym_tocat(int sym): # <<<<<<<<<<<<<<
@@ -23184,7 +23274,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/m/workspace/cdec/python/src/sa/sym.pxi":93
*
* cdef char* sym_tocat(int sym):
* return ALPHABET.tocat(sym) # <<<<<<<<<<<<<<
@@ -23200,7 +23290,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/m/workspace/cdec/python/src/sa/sym.pxi":95
* return ALPHABET.tocat(sym)
*
* cdef int sym_isvar(int sym): # <<<<<<<<<<<<<<
@@ -23213,7 +23303,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/m/workspace/cdec/python/src/sa/sym.pxi":96
*
* cdef int sym_isvar(int sym):
* return ALPHABET.isvar(sym) # <<<<<<<<<<<<<<
@@ -23229,7 +23319,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/m/workspace/cdec/python/src/sa/sym.pxi":98
* return ALPHABET.isvar(sym)
*
* cdef int sym_getindex(int sym): # <<<<<<<<<<<<<<
@@ -23242,7 +23332,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/m/workspace/cdec/python/src/sa/sym.pxi":99
*
* cdef int sym_getindex(int sym):
* return ALPHABET.getindex(sym) # <<<<<<<<<<<<<<
@@ -23258,7 +23348,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/m/workspace/cdec/python/src/sa/sym.pxi":101
* return ALPHABET.getindex(sym)
*
* cdef int sym_setindex(int sym, int id): # <<<<<<<<<<<<<<
@@ -23271,7 +23361,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/m/workspace/cdec/python/src/sa/sym.pxi":102
*
* cdef int sym_setindex(int sym, int id):
* return ALPHABET.setindex(sym, id) # <<<<<<<<<<<<<<
@@ -23287,7 +23377,7 @@ static int __pyx_f_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) {
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":104
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":104
* return ALPHABET.setindex(sym, id)
*
* cdef int sym_fromstring(char* string, bint terminal): # <<<<<<<<<<<<<<
@@ -23300,7 +23390,7 @@ static int __pyx_f_3_sa_sym_fromstring(char *__pyx_v_string, int __pyx_v_termina
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_fromstring", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":105
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":105
*
* cdef int sym_fromstring(char* string, bint terminal):
* return ALPHABET.fromstring(string, terminal) # <<<<<<<<<<<<<<
@@ -23329,7 +23419,7 @@ static PyObject *__pyx_pw_3_sa_3make_lattice(PyObject *__pyx_self, PyObject *__p
}
static PyObject *__pyx_gb_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":108
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":108
*
* def make_lattice(words):
* word_ids = (sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
@@ -23471,7 +23561,7 @@ static PyObject *__pyx_gb_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject
}
static PyObject *__pyx_gb_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":109
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":109
* def make_lattice(words):
* word_ids = (sym_fromstring(word, True) for word in words)
* return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<<
@@ -23626,7 +23716,7 @@ static PyObject *__pyx_gb_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":107
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":107
* return ALPHABET.fromstring(string, terminal)
*
* def make_lattice(words): # <<<<<<<<<<<<<<
@@ -23654,7 +23744,7 @@ static PyObject *__pyx_pf_3_sa_2make_lattice(CYTHON_UNUSED PyObject *__pyx_self,
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_words);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_words);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":108
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":108
*
* def make_lattice(words):
* word_ids = (sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
@@ -23667,7 +23757,7 @@ static PyObject *__pyx_pf_3_sa_2make_lattice(CYTHON_UNUSED PyObject *__pyx_self,
__pyx_cur_scope->__pyx_v_word_ids = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":109
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":109
* def make_lattice(words):
* word_ids = (sym_fromstring(word, True) for word in words)
* return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<<
@@ -23716,7 +23806,7 @@ static PyObject *__pyx_pw_3_sa_5decode_lattice(PyObject *__pyx_self, PyObject *_
}
static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":112
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":112
*
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<<
@@ -23790,7 +23880,7 @@ static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObjec
__pyx_L3_first_run:;
if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":113
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":113
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc
* for arc in node for node in lattice) # <<<<<<<<<<<<<<
@@ -23808,7 +23898,7 @@ static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObjec
}
for (;;) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":112
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":112
*
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<<
@@ -23911,7 +24001,7 @@ static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObjec
__pyx_cur_scope->__pyx_v_dist = __pyx_t_7;
__pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":113
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":113
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc
* for arc in node for node in lattice) # <<<<<<<<<<<<<<
@@ -23999,7 +24089,7 @@ static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObjec
__pyx_cur_scope->__pyx_v_node = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":112
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":112
*
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<<
@@ -24080,7 +24170,7 @@ static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObjec
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":111
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":111
* return tuple(((word, None, 1), ) for word in word_ids)
*
* def decode_lattice(lattice): # <<<<<<<<<<<<<<
@@ -24108,7 +24198,7 @@ static PyObject *__pyx_pf_3_sa_4decode_lattice(CYTHON_UNUSED PyObject *__pyx_sel
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_lattice);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_lattice);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":112
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":112
*
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<<
@@ -24157,10 +24247,12 @@ static PyObject *__pyx_pw_3_sa_7decode_sentence(PyObject *__pyx_self, PyObject *
}
static PyObject *__pyx_gb_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":116
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":116
*
* def decode_sentence(lattice):
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) # <<<<<<<<<<<<<<
+ *
+ * def encode_words(words):
*/
static PyObject *__pyx_pf_3_sa_15decode_sentence_genexpr(PyObject *__pyx_self) {
@@ -24415,11 +24507,12 @@ static PyObject *__pyx_gb_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObj
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":115
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":115
* for arc in node for node in lattice)
*
* def decode_sentence(lattice): # <<<<<<<<<<<<<<
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+ *
*/
static PyObject *__pyx_pf_3_sa_6decode_sentence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lattice) {
@@ -24442,10 +24535,12 @@ static PyObject *__pyx_pf_3_sa_6decode_sentence(CYTHON_UNUSED PyObject *__pyx_se
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_lattice);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_lattice);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":116
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":116
*
* def decode_sentence(lattice):
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) # <<<<<<<<<<<<<<
+ *
+ * def encode_words(words):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_pf_3_sa_15decode_sentence_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -24477,6 +24572,437 @@ static PyObject *__pyx_pf_3_sa_6decode_sentence(CYTHON_UNUSED PyObject *__pyx_se
}
/* Python wrapper */
+static PyObject *__pyx_pw_3_sa_9encode_words(PyObject *__pyx_self, PyObject *__pyx_v_words); /*proto*/
+static PyMethodDef __pyx_mdef_3_sa_9encode_words = {__Pyx_NAMESTR("encode_words"), (PyCFunction)__pyx_pw_3_sa_9encode_words, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_3_sa_9encode_words(PyObject *__pyx_self, PyObject *__pyx_v_words) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("encode_words (wrapper)", 0);
+ __pyx_r = __pyx_pf_3_sa_8encode_words(__pyx_self, ((PyObject *)__pyx_v_words));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_3_sa_12encode_words_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":119
+ *
+ * def encode_words(words):
+ * return tuple(sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
+ *
+ * def decode_words(syms):
+ */
+
+static PyObject *__pyx_pf_3_sa_12encode_words_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *)__pyx_ptype_3_sa___pyx_scope_struct_12_genexpr->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_12_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_cur_scope);
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_12encode_words_2generator11, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("_sa.encode_words.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_3_sa_12encode_words_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ char *__pyx_t_5;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("None", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_words)) { __Pyx_RaiseClosureNameError("words"); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_words) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_words)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_words; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_words); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ }
+ 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++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ if (PyErr_Occurred()) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_word);
+ __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_word);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_cur_scope->__pyx_v_word = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = PyBytes_AsString(__pyx_cur_scope->__pyx_v_word); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_f_3_sa_sym_fromstring(__pyx_t_5, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Generator_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+}
+
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":118
+ * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+ *
+ * def encode_words(words): # <<<<<<<<<<<<<<
+ * return tuple(sym_fromstring(word, True) for word in words)
+ *
+ */
+
+static PyObject *__pyx_pf_3_sa_8encode_words(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_words) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("encode_words", 0);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *)__pyx_ptype_3_sa___pyx_scope_struct_11_encode_words->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_11_encode_words, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_cur_scope);
+ __pyx_cur_scope->__pyx_v_words = __pyx_v_words;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_words);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_words);
+
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":119
+ *
+ * def encode_words(words):
+ * return tuple(sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
+ *
+ * def decode_words(syms):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_pf_3_sa_12encode_words_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __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[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("_sa.encode_words", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_3_sa_11decode_words(PyObject *__pyx_self, PyObject *__pyx_v_syms); /*proto*/
+static PyMethodDef __pyx_mdef_3_sa_11decode_words = {__Pyx_NAMESTR("decode_words"), (PyCFunction)__pyx_pw_3_sa_11decode_words, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_3_sa_11decode_words(PyObject *__pyx_self, PyObject *__pyx_v_syms) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("decode_words (wrapper)", 0);
+ __pyx_r = __pyx_pf_3_sa_10decode_words(__pyx_self, ((PyObject *)__pyx_v_syms));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_3_sa_12decode_words_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":122
+ *
+ * def decode_words(syms):
+ * return tuple(sym_tostring(sym) for sym in syms) # <<<<<<<<<<<<<<
+ */
+
+static PyObject *__pyx_pf_3_sa_12decode_words_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *)__pyx_ptype_3_sa___pyx_scope_struct_14_genexpr->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_14_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_cur_scope);
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_12decode_words_2generator12, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("_sa.decode_words.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_3_sa_12decode_words_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("None", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_syms)) { __Pyx_RaiseClosureNameError("syms"); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_syms) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_syms)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_syms; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_syms); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ }
+ 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++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #endif
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ if (PyErr_Occurred()) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
+ else {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_sym);
+ __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_sym);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_cur_scope->__pyx_v_sym = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_sym); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+ __pyx_r = ((PyObject *)__pyx_t_4);
+ __pyx_t_4 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Generator_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+}
+
+/* "/home/m/workspace/cdec/python/src/sa/sym.pxi":121
+ * return tuple(sym_fromstring(word, True) for word in words)
+ *
+ * def decode_words(syms): # <<<<<<<<<<<<<<
+ * return tuple(sym_tostring(sym) for sym in syms)
+ */
+
+static PyObject *__pyx_pf_3_sa_10decode_words(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_syms) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("decode_words", 0);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *)__pyx_ptype_3_sa___pyx_scope_struct_13_decode_words->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_13_decode_words, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_cur_scope);
+ __pyx_cur_scope->__pyx_v_syms = __pyx_v_syms;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_syms);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_syms);
+
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":122
+ *
+ * def decode_words(syms):
+ * return tuple(sym_tostring(sym) for sym in syms) # <<<<<<<<<<<<<<
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_pf_3_sa_12decode_words_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __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[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("_sa.decode_words", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
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;
@@ -24523,7 +25049,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/m/workspace/cdec/python/src/sa/rule.pxi":6
* cdef class Phrase:
*
* def __cinit__(self, words): # <<<<<<<<<<<<<<
@@ -24547,7 +25073,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/m/workspace/cdec/python/src/sa/rule.pxi":8
* def __cinit__(self, words):
* cdef int i, j, n, n_vars
* n_vars = 0 # <<<<<<<<<<<<<<
@@ -24556,7 +25082,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/m/workspace/cdec/python/src/sa/rule.pxi":9
* cdef int i, j, n, n_vars
* n_vars = 0
* n = len(words) # <<<<<<<<<<<<<<
@@ -24566,7 +25092,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/m/workspace/cdec/python/src/sa/rule.pxi":10
* n_vars = 0
* n = len(words)
* self.syms = <int *>malloc(n*sizeof(int)) # <<<<<<<<<<<<<<
@@ -24575,7 +25101,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/m/workspace/cdec/python/src/sa/rule.pxi":11
* n = len(words)
* self.syms = <int *>malloc(n*sizeof(int))
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -24585,7 +25111,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -24598,7 +25124,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/m/workspace/cdec/python/src/sa/rule.pxi":13
* for i from 0 <= i < n:
* self.syms[i] = words[i]
* if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<<
@@ -24608,7 +25134,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/m/workspace/cdec/python/src/sa/rule.pxi":14
* self.syms[i] = words[i]
* if sym_isvar(self.syms[i]):
* n_vars += 1 # <<<<<<<<<<<<<<
@@ -24621,7 +25147,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/m/workspace/cdec/python/src/sa/rule.pxi":15
* if sym_isvar(self.syms[i]):
* n_vars += 1
* self.n = n # <<<<<<<<<<<<<<
@@ -24630,7 +25156,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/m/workspace/cdec/python/src/sa/rule.pxi":16
* n_vars += 1
* self.n = n
* self.n_vars = n_vars # <<<<<<<<<<<<<<
@@ -24639,7 +25165,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/m/workspace/cdec/python/src/sa/rule.pxi":17
* self.n = n
* self.n_vars = n_vars
* self.varpos = <int *>malloc(n_vars*sizeof(int)) # <<<<<<<<<<<<<<
@@ -24648,7 +25174,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/m/workspace/cdec/python/src/sa/rule.pxi":18
* self.n_vars = n_vars
* self.varpos = <int *>malloc(n_vars*sizeof(int))
* j = 0 # <<<<<<<<<<<<<<
@@ -24657,7 +25183,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/m/workspace/cdec/python/src/sa/rule.pxi":19
* self.varpos = <int *>malloc(n_vars*sizeof(int))
* j = 0
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -24667,7 +25193,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/m/workspace/cdec/python/src/sa/rule.pxi":20
* j = 0
* for i from 0 <= i < n:
* if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<<
@@ -24677,7 +25203,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/m/workspace/cdec/python/src/sa/rule.pxi":21
* for i from 0 <= i < n:
* if sym_isvar(self.syms[i]):
* self.varpos[j] = i # <<<<<<<<<<<<<<
@@ -24686,7 +25212,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/m/workspace/cdec/python/src/sa/rule.pxi":22
* if sym_isvar(self.syms[i]):
* self.varpos[j] = i
* j = j + 1 # <<<<<<<<<<<<<<
@@ -24719,7 +25245,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/m/workspace/cdec/python/src/sa/rule.pxi":24
* j = j + 1
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -24731,7 +25257,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/m/workspace/cdec/python/src/sa/rule.pxi":25
*
* def __dealloc__(self):
* free(self.syms) # <<<<<<<<<<<<<<
@@ -24740,7 +25266,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/m/workspace/cdec/python/src/sa/rule.pxi":26
* def __dealloc__(self):
* free(self.syms)
* free(self.varpos) # <<<<<<<<<<<<<<
@@ -24763,7 +25289,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/m/workspace/cdec/python/src/sa/rule.pxi":28
* free(self.varpos)
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -24787,7 +25313,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/m/workspace/cdec/python/src/sa/rule.pxi":29
*
* def __str__(self):
* strs = [] # <<<<<<<<<<<<<<
@@ -24799,7 +25325,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/m/workspace/cdec/python/src/sa/rule.pxi":31
* strs = []
* cdef int i, s
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -24809,7 +25335,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/m/workspace/cdec/python/src/sa/rule.pxi":32
* cdef int i, s
* for i from 0 <= i < self.n:
* s = self.syms[i] # <<<<<<<<<<<<<<
@@ -24818,7 +25344,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/m/workspace/cdec/python/src/sa/rule.pxi":33
* for i from 0 <= i < self.n:
* s = self.syms[i]
* strs.append(sym_tostring(s)) # <<<<<<<<<<<<<<
@@ -24831,7 +25357,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/m/workspace/cdec/python/src/sa/rule.pxi":34
* s = self.syms[i]
* strs.append(sym_tostring(s))
* return ' '.join(strs) # <<<<<<<<<<<<<<
@@ -24881,7 +25407,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/m/workspace/cdec/python/src/sa/rule.pxi":36
* return ' '.join(strs)
*
* def handle(self): # <<<<<<<<<<<<<<
@@ -24905,7 +25431,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/m/workspace/cdec/python/src/sa/rule.pxi":39
* """return a hashable representation that normalizes the ordering
* of the nonterminal indices"""
* norm = [] # <<<<<<<<<<<<<<
@@ -24917,7 +25443,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/m/workspace/cdec/python/src/sa/rule.pxi":41
* norm = []
* cdef int i, j, s
* i = 1 # <<<<<<<<<<<<<<
@@ -24926,7 +25452,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/m/workspace/cdec/python/src/sa/rule.pxi":42
* cdef int i, j, s
* i = 1
* j = 0 # <<<<<<<<<<<<<<
@@ -24935,7 +25461,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/m/workspace/cdec/python/src/sa/rule.pxi":43
* i = 1
* j = 0
* for j from 0 <= j < self.n: # <<<<<<<<<<<<<<
@@ -24945,7 +25471,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/m/workspace/cdec/python/src/sa/rule.pxi":44
* j = 0
* for j from 0 <= j < self.n:
* s = self.syms[j] # <<<<<<<<<<<<<<
@@ -24954,7 +25480,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/m/workspace/cdec/python/src/sa/rule.pxi":45
* for j from 0 <= j < self.n:
* s = self.syms[j]
* if sym_isvar(s): # <<<<<<<<<<<<<<
@@ -24964,7 +25490,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/m/workspace/cdec/python/src/sa/rule.pxi":46
* s = self.syms[j]
* if sym_isvar(s):
* s = sym_setindex(s,i) # <<<<<<<<<<<<<<
@@ -24973,7 +25499,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/m/workspace/cdec/python/src/sa/rule.pxi":47
* if sym_isvar(s):
* s = sym_setindex(s,i)
* i = i + 1 # <<<<<<<<<<<<<<
@@ -24985,7 +25511,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/m/workspace/cdec/python/src/sa/rule.pxi":48
* s = sym_setindex(s,i)
* i = i + 1
* norm.append(s) # <<<<<<<<<<<<<<
@@ -24998,7 +25524,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/m/workspace/cdec/python/src/sa/rule.pxi":49
* i = i + 1
* norm.append(s)
* return tuple(norm) # <<<<<<<<<<<<<<
@@ -25036,7 +25562,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/m/workspace/cdec/python/src/sa/rule.pxi":51
* return tuple(norm)
*
* def strhandle(self): # <<<<<<<<<<<<<<
@@ -25063,7 +25589,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/m/workspace/cdec/python/src/sa/rule.pxi":52
*
* def strhandle(self):
* strs = [] # <<<<<<<<<<<<<<
@@ -25075,7 +25601,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/m/workspace/cdec/python/src/sa/rule.pxi":53
* def strhandle(self):
* strs = []
* norm = [] # <<<<<<<<<<<<<<
@@ -25087,7 +25613,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/m/workspace/cdec/python/src/sa/rule.pxi":55
* norm = []
* cdef int i, j, s
* i = 1 # <<<<<<<<<<<<<<
@@ -25096,7 +25622,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/m/workspace/cdec/python/src/sa/rule.pxi":56
* cdef int i, j, s
* i = 1
* j = 0 # <<<<<<<<<<<<<<
@@ -25105,7 +25631,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/m/workspace/cdec/python/src/sa/rule.pxi":57
* i = 1
* j = 0
* for j from 0 <= j < self.n: # <<<<<<<<<<<<<<
@@ -25115,7 +25641,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/m/workspace/cdec/python/src/sa/rule.pxi":58
* j = 0
* for j from 0 <= j < self.n:
* s = self.syms[j] # <<<<<<<<<<<<<<
@@ -25124,7 +25650,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/m/workspace/cdec/python/src/sa/rule.pxi":59
* for j from 0 <= j < self.n:
* s = self.syms[j]
* if sym_isvar(s): # <<<<<<<<<<<<<<
@@ -25134,7 +25660,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/m/workspace/cdec/python/src/sa/rule.pxi":60
* s = self.syms[j]
* if sym_isvar(s):
* s = sym_setindex(s,i) # <<<<<<<<<<<<<<
@@ -25143,7 +25669,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/m/workspace/cdec/python/src/sa/rule.pxi":61
* if sym_isvar(s):
* s = sym_setindex(s,i)
* i = i + 1 # <<<<<<<<<<<<<<
@@ -25155,7 +25681,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/m/workspace/cdec/python/src/sa/rule.pxi":62
* s = sym_setindex(s,i)
* i = i + 1
* norm.append(sym_tostring(s)) # <<<<<<<<<<<<<<
@@ -25168,7 +25694,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/m/workspace/cdec/python/src/sa/rule.pxi":63
* i = i + 1
* norm.append(sym_tostring(s))
* return ' '.join(norm) # <<<<<<<<<<<<<<
@@ -25218,7 +25744,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/m/workspace/cdec/python/src/sa/rule.pxi":65
* return ' '.join(norm)
*
* def arity(self): # <<<<<<<<<<<<<<
@@ -25235,7 +25761,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/m/workspace/cdec/python/src/sa/rule.pxi":66
*
* def arity(self):
* return self.n_vars # <<<<<<<<<<<<<<
@@ -25272,7 +25798,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/m/workspace/cdec/python/src/sa/rule.pxi":68
* return self.n_vars
*
* def getvarpos(self, i): # <<<<<<<<<<<<<<
@@ -25292,7 +25818,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/m/workspace/cdec/python/src/sa/rule.pxi":69
*
* def getvarpos(self, i):
* if 0 <= i < self.n_vars: # <<<<<<<<<<<<<<
@@ -25311,7 +25837,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/m/workspace/cdec/python/src/sa/rule.pxi":70
* def getvarpos(self, i):
* if 0 <= i < self.n_vars:
* return self.varpos[i] # <<<<<<<<<<<<<<
@@ -25329,7 +25855,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/m/workspace/cdec/python/src/sa/rule.pxi":72
* return self.varpos[i]
* else:
* raise IndexError # <<<<<<<<<<<<<<
@@ -25365,7 +25891,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/m/workspace/cdec/python/src/sa/rule.pxi":74
* raise IndexError
*
* def getvar(self, i): # <<<<<<<<<<<<<<
@@ -25385,7 +25911,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/m/workspace/cdec/python/src/sa/rule.pxi":75
*
* def getvar(self, i):
* if 0 <= i < self.n_vars: # <<<<<<<<<<<<<<
@@ -25404,7 +25930,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/m/workspace/cdec/python/src/sa/rule.pxi":76
* def getvar(self, i):
* if 0 <= i < self.n_vars:
* return self.syms[self.varpos[i]] # <<<<<<<<<<<<<<
@@ -25422,7 +25948,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/m/workspace/cdec/python/src/sa/rule.pxi":78
* return self.syms[self.varpos[i]]
* else:
* raise IndexError # <<<<<<<<<<<<<<
@@ -25447,7 +25973,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/m/workspace/cdec/python/src/sa/rule.pxi":80
* raise IndexError
*
* cdef int chunkpos(self, int k): # <<<<<<<<<<<<<<
@@ -25461,7 +25987,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/m/workspace/cdec/python/src/sa/rule.pxi":81
*
* cdef int chunkpos(self, int k):
* if k == 0: # <<<<<<<<<<<<<<
@@ -25471,7 +25997,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/m/workspace/cdec/python/src/sa/rule.pxi":82
* cdef int chunkpos(self, int k):
* if k == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -25484,7 +26010,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/m/workspace/cdec/python/src/sa/rule.pxi":84
* return 0
* else:
* return self.varpos[k-1]+1 # <<<<<<<<<<<<<<
@@ -25502,7 +26028,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/m/workspace/cdec/python/src/sa/rule.pxi":86
* return self.varpos[k-1]+1
*
* cdef int chunklen(self, int k): # <<<<<<<<<<<<<<
@@ -25516,7 +26042,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/m/workspace/cdec/python/src/sa/rule.pxi":87
*
* cdef int chunklen(self, int k):
* if self.n_vars == 0: # <<<<<<<<<<<<<<
@@ -25526,7 +26052,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/m/workspace/cdec/python/src/sa/rule.pxi":88
* cdef int chunklen(self, int k):
* if self.n_vars == 0:
* return self.n # <<<<<<<<<<<<<<
@@ -25538,7 +26064,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/m/workspace/cdec/python/src/sa/rule.pxi":89
* if self.n_vars == 0:
* return self.n
* elif k == 0: # <<<<<<<<<<<<<<
@@ -25548,7 +26074,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/m/workspace/cdec/python/src/sa/rule.pxi":90
* return self.n
* elif k == 0:
* return self.varpos[0] # <<<<<<<<<<<<<<
@@ -25560,7 +26086,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/m/workspace/cdec/python/src/sa/rule.pxi":91
* elif k == 0:
* return self.varpos[0]
* elif k == self.n_vars: # <<<<<<<<<<<<<<
@@ -25570,7 +26096,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/m/workspace/cdec/python/src/sa/rule.pxi":92
* return self.varpos[0]
* elif k == self.n_vars:
* return self.n-self.varpos[k-1]-1 # <<<<<<<<<<<<<<
@@ -25583,7 +26109,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -25612,7 +26138,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/m/workspace/cdec/python/src/sa/rule.pxi":96
* return self.varpos[k]-self.varpos[k-1]-1
*
* def clen(self, k): # <<<<<<<<<<<<<<
@@ -25630,7 +26156,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/m/workspace/cdec/python/src/sa/rule.pxi":97
*
* def clen(self, k):
* return self.chunklen(k) # <<<<<<<<<<<<<<
@@ -25668,7 +26194,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/m/workspace/cdec/python/src/sa/rule.pxi":99
* return self.chunklen(k)
*
* def getchunk(self, ci): # <<<<<<<<<<<<<<
@@ -25691,7 +26217,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/m/workspace/cdec/python/src/sa/rule.pxi":101
* def getchunk(self, ci):
* cdef int start, stop
* start = self.chunkpos(ci) # <<<<<<<<<<<<<<
@@ -25701,7 +26227,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/m/workspace/cdec/python/src/sa/rule.pxi":102
* cdef int start, stop
* start = self.chunkpos(ci)
* stop = start+self.chunklen(ci) # <<<<<<<<<<<<<<
@@ -25711,7 +26237,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/m/workspace/cdec/python/src/sa/rule.pxi":103
* start = self.chunkpos(ci)
* stop = start+self.chunklen(ci)
* chunk = [] # <<<<<<<<<<<<<<
@@ -25723,7 +26249,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/m/workspace/cdec/python/src/sa/rule.pxi":104
* stop = start+self.chunklen(ci)
* chunk = []
* for i from start <= i < stop: # <<<<<<<<<<<<<<
@@ -25733,7 +26259,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/m/workspace/cdec/python/src/sa/rule.pxi":105
* chunk = []
* for i from start <= i < stop:
* chunk.append(self.syms[i]) # <<<<<<<<<<<<<<
@@ -25746,7 +26272,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/m/workspace/cdec/python/src/sa/rule.pxi":106
* for i from start <= i < stop:
* chunk.append(self.syms[i])
* return chunk # <<<<<<<<<<<<<<
@@ -25784,7 +26310,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/m/workspace/cdec/python/src/sa/rule.pxi":108
* return chunk
*
* def __cmp__(self, other): # <<<<<<<<<<<<<<
@@ -25807,7 +26333,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/m/workspace/cdec/python/src/sa/rule.pxi":111
* cdef Phrase otherp
* cdef int i
* otherp = other # <<<<<<<<<<<<<<
@@ -25818,7 +26344,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/m/workspace/cdec/python/src/sa/rule.pxi":112
* cdef int i
* otherp = other
* for i from 0 <= i < min(self.n, otherp.n): # <<<<<<<<<<<<<<
@@ -25835,7 +26361,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/m/workspace/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]: # <<<<<<<<<<<<<<
@@ -25845,7 +26371,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -25857,7 +26383,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/m/workspace/cdec/python/src/sa/rule.pxi":115
* if self.syms[i] < otherp.syms[i]:
* return -1
* elif self.syms[i] > otherp.syms[i]: # <<<<<<<<<<<<<<
@@ -25867,7 +26393,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/m/workspace/cdec/python/src/sa/rule.pxi":116
* return -1
* elif self.syms[i] > otherp.syms[i]:
* return 1 # <<<<<<<<<<<<<<
@@ -25881,7 +26407,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/m/workspace/cdec/python/src/sa/rule.pxi":117
* elif self.syms[i] > otherp.syms[i]:
* return 1
* if self.n < otherp.n: # <<<<<<<<<<<<<<
@@ -25891,7 +26417,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/m/workspace/cdec/python/src/sa/rule.pxi":118
* return 1
* if self.n < otherp.n:
* return -1 # <<<<<<<<<<<<<<
@@ -25903,7 +26429,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/m/workspace/cdec/python/src/sa/rule.pxi":119
* if self.n < otherp.n:
* return -1
* elif self.n > otherp.n: # <<<<<<<<<<<<<<
@@ -25913,7 +26439,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/m/workspace/cdec/python/src/sa/rule.pxi":120
* return -1
* elif self.n > otherp.n:
* return 1 # <<<<<<<<<<<<<<
@@ -25926,7 +26452,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/m/workspace/cdec/python/src/sa/rule.pxi":122
* return 1
* else:
* return 0 # <<<<<<<<<<<<<<
@@ -25961,7 +26487,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/m/workspace/cdec/python/src/sa/rule.pxi":124
* return 0
*
* def __hash__(self): # <<<<<<<<<<<<<<
@@ -25978,7 +26504,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/m/workspace/cdec/python/src/sa/rule.pxi":127
* cdef int i
* cdef unsigned h
* h = 0 # <<<<<<<<<<<<<<
@@ -25987,7 +26513,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/m/workspace/cdec/python/src/sa/rule.pxi":128
* cdef unsigned h
* h = 0
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -25997,7 +26523,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/m/workspace/cdec/python/src/sa/rule.pxi":129
* h = 0
* for i from 0 <= i < self.n:
* if self.syms[i] > 0: # <<<<<<<<<<<<<<
@@ -26007,7 +26533,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -26019,7 +26545,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/m/workspace/cdec/python/src/sa/rule.pxi":132
* h = (h << 1) + self.syms[i]
* else:
* h = (h << 1) + -self.syms[i] # <<<<<<<<<<<<<<
@@ -26031,7 +26557,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/m/workspace/cdec/python/src/sa/rule.pxi":133
* else:
* h = (h << 1) + -self.syms[i]
* return h # <<<<<<<<<<<<<<
@@ -26059,7 +26585,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/m/workspace/cdec/python/src/sa/rule.pxi":135
* return h
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -26072,7 +26598,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/m/workspace/cdec/python/src/sa/rule.pxi":136
*
* def __len__(self):
* return self.n # <<<<<<<<<<<<<<
@@ -26099,7 +26625,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/m/workspace/cdec/python/src/sa/rule.pxi":138
* return self.n
*
* def __getitem__(self, i): # <<<<<<<<<<<<<<
@@ -26117,7 +26643,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/m/workspace/cdec/python/src/sa/rule.pxi":139
*
* def __getitem__(self, i):
* return self.syms[i] # <<<<<<<<<<<<<<
@@ -26156,7 +26682,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/m/workspace/cdec/python/src/sa/rule.pxi":141
* return self.syms[i]
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -26165,14 +26691,14 @@ static PyObject *__pyx_pw_3_sa_6Phrase_29__iter__(PyObject *__pyx_v_self) {
*/
static PyObject *__pyx_pf_3_sa_6Phrase_28__iter__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *__pyx_cur_scope;
+ struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__iter__", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *)__pyx_ptype_3_sa___pyx_scope_struct_11___iter__->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_11___iter__, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *)__pyx_ptype_3_sa___pyx_scope_struct_15___iter__->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_15___iter__, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -26202,7 +26728,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_28__iter__(struct __pyx_obj_3_sa_Phrase *
static PyObject *__pyx_gb_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *)__pyx_generator->closure);
+ struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
@@ -26218,7 +26744,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/m/workspace/cdec/python/src/sa/rule.pxi":143
* def __iter__(self):
* cdef int i
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -26228,7 +26754,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/m/workspace/cdec/python/src/sa/rule.pxi":144
* cdef int i
* for i from 0 <= i < self.n:
* yield self.syms[i] # <<<<<<<<<<<<<<
@@ -26318,7 +26844,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/m/workspace/cdec/python/src/sa/rule.pxi":146
* yield self.syms[i]
*
* def subst(self, start, children): # <<<<<<<<<<<<<<
@@ -26341,7 +26867,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/m/workspace/cdec/python/src/sa/rule.pxi":148
* def subst(self, start, children):
* cdef int i
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -26351,7 +26877,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/m/workspace/cdec/python/src/sa/rule.pxi":149
* cdef int i
* for i from 0 <= i < self.n:
* if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<<
@@ -26361,7 +26887,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -26381,7 +26907,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/m/workspace/cdec/python/src/sa/rule.pxi":152
* start = start + children[sym_getindex(self.syms[i])-1]
* else:
* start = start + (self.syms[i],) # <<<<<<<<<<<<<<
@@ -26405,7 +26931,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/m/workspace/cdec/python/src/sa/rule.pxi":153
* else:
* start = start + (self.syms[i],)
* return start # <<<<<<<<<<<<<<
@@ -26442,7 +26968,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/m/workspace/cdec/python/src/sa/rule.pxi":156
*
* property words:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -26466,7 +26992,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/m/workspace/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)] # <<<<<<<<<<<<<<
@@ -26561,7 +27087,7 @@ static int __pyx_pw_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__py
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/m/workspace/cdec/python/src/sa/rule.pxi":161
* cdef class Rule:
*
* def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): # <<<<<<<<<<<<<<
@@ -26658,7 +27184,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -26687,7 +27213,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -26696,7 +27222,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -26709,7 +27235,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/m/workspace/cdec/python/src/sa/rule.pxi":165
* self.lhs = lhs
* self.f = f
* self.e = e # <<<<<<<<<<<<<<
@@ -26722,7 +27248,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/m/workspace/cdec/python/src/sa/rule.pxi":166
* self.f = f
* self.e = e
* self.word_alignments = word_alignments # <<<<<<<<<<<<<<
@@ -26735,7 +27261,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/m/workspace/cdec/python/src/sa/rule.pxi":167
* self.e = e
* self.word_alignments = word_alignments
* self.scores = scores # <<<<<<<<<<<<<<
@@ -26772,7 +27298,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/m/workspace/cdec/python/src/sa/rule.pxi":169
* self.scores = scores
*
* def __hash__(self): # <<<<<<<<<<<<<<
@@ -26791,7 +27317,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/m/workspace/cdec/python/src/sa/rule.pxi":170
*
* def __hash__(self):
* return hash((self.lhs, self.f, self.e)) # <<<<<<<<<<<<<<
@@ -26847,7 +27373,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/m/workspace/cdec/python/src/sa/rule.pxi":172
* return hash((self.lhs, self.f, self.e))
*
* def __cmp__(self, Rule other): # <<<<<<<<<<<<<<
@@ -26868,7 +27394,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/m/workspace/cdec/python/src/sa/rule.pxi":173
*
* def __cmp__(self, Rule other):
* return cmp((self.lhs, self.f, self.e, self.word_alignments), # <<<<<<<<<<<<<<
@@ -26892,7 +27418,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -26961,7 +27487,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/m/workspace/cdec/python/src/sa/rule.pxi":176
* (other.lhs, other.f, other.e, self.word_alignments))
*
* def fmerge(self, Phrase f): # <<<<<<<<<<<<<<
@@ -26979,7 +27505,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/m/workspace/cdec/python/src/sa/rule.pxi":177
*
* def fmerge(self, Phrase f):
* if self.f == f: # <<<<<<<<<<<<<<
@@ -26991,7 +27517,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/m/workspace/cdec/python/src/sa/rule.pxi":178
* def fmerge(self, Phrase f):
* if self.f == f:
* self.f = f # <<<<<<<<<<<<<<
@@ -27030,7 +27556,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/m/workspace/cdec/python/src/sa/rule.pxi":180
* self.f = f
*
* def arity(self): # <<<<<<<<<<<<<<
@@ -27048,7 +27574,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/m/workspace/cdec/python/src/sa/rule.pxi":181
*
* def arity(self):
* return self.f.arity() # <<<<<<<<<<<<<<
@@ -27088,9 +27614,9 @@ static PyObject *__pyx_pw_3_sa_4Rule_11__str__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":187
+/* "/home/m/workspace/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())) # <<<<<<<<<<<<<<
@@ -27099,24 +27625,24 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator11(__pyx_GeneratorObject
*/
static PyObject *__pyx_pf_3_sa_4Rule_7__str___genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *__pyx_cur_scope;
+ struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("genexpr", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *)__pyx_ptype_3_sa___pyx_scope_struct_13_genexpr->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_13_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *)__pyx_ptype_3_sa___pyx_scope_struct_17_genexpr->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_17_genexpr, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
}
__Pyx_GOTREF(__pyx_cur_scope);
- __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *) __pyx_self;
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
{
- __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_4Rule_7__str___2generator11, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_4Rule_7__str___2generator13, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -27134,9 +27660,9 @@ static PyObject *__pyx_pf_3_sa_4Rule_7__str___genexpr(PyObject *__pyx_self) {
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
@@ -27235,7 +27761,7 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator11(__pyx_GeneratorObject
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":183
+/* "/home/m/workspace/cdec/python/src/sa/rule.pxi":183
* return self.f.arity()
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -27244,7 +27770,7 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator11(__pyx_GeneratorObject
*/
static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx_v_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *__pyx_cur_scope;
+ struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *__pyx_cur_scope;
PyObject *__pyx_v_fields = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -27259,7 +27785,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *)__pyx_ptype_3_sa___pyx_scope_struct_12___str__->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_12___str__, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *)__pyx_ptype_3_sa___pyx_scope_struct_16___str__->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_16___str__, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -27269,7 +27795,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/m/workspace/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)] # <<<<<<<<<<<<<<
@@ -27319,7 +27845,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -27329,7 +27855,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/m/workspace/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())) # <<<<<<<<<<<<<<
@@ -27355,7 +27881,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -27408,7 +27934,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/m/workspace/cdec/python/src/sa/rule.pxi":190
* return ' ||| '.join(fields)
*
* def alignments(self): # <<<<<<<<<<<<<<
@@ -27417,14 +27943,14 @@ static PyObject *__pyx_pw_3_sa_4Rule_13alignments(PyObject *__pyx_v_self, CYTHON
*/
static PyObject *__pyx_pf_3_sa_4Rule_12alignments(struct __pyx_obj_3_sa_Rule *__pyx_v_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *__pyx_cur_scope;
+ struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("alignments", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *)__pyx_ptype_3_sa___pyx_scope_struct_14_alignments->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_14_alignments, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *)__pyx_ptype_3_sa___pyx_scope_struct_18_alignments->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_18_alignments, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -27454,7 +27980,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_12alignments(struct __pyx_obj_3_sa_Rule *__
static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *)__pyx_generator->closure);
+ struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -27474,7 +28000,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/m/workspace/cdec/python/src/sa/rule.pxi":191
*
* def alignments(self):
* for point in self.word_alignments: # <<<<<<<<<<<<<<
@@ -27520,7 +28046,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/m/workspace/cdec/python/src/sa/rule.pxi":192
* def alignments(self):
* for point in self.word_alignments:
* yield point/65536, point%65536 # <<<<<<<<<<<<<<
@@ -27635,7 +28161,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/m/workspace/cdec/python/src/sa/precomputation.pxi":21
* int arr_len
*
* cdef _Trie_Node* new_trie_node(): # <<<<<<<<<<<<<<
@@ -27649,7 +28175,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/m/workspace/cdec/python/src/sa/precomputation.pxi":23
* cdef _Trie_Node* new_trie_node():
* cdef _Trie_Node* node
* node = <_Trie_Node*> malloc(sizeof(_Trie_Node)) # <<<<<<<<<<<<<<
@@ -27658,7 +28184,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/m/workspace/cdec/python/src/sa/precomputation.pxi":24
* cdef _Trie_Node* node
* node = <_Trie_Node*> malloc(sizeof(_Trie_Node))
* node.root = NULL # <<<<<<<<<<<<<<
@@ -27667,7 +28193,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/m/workspace/cdec/python/src/sa/precomputation.pxi":25
* node = <_Trie_Node*> malloc(sizeof(_Trie_Node))
* node.root = NULL
* node.arr_len = 0 # <<<<<<<<<<<<<<
@@ -27676,7 +28202,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/m/workspace/cdec/python/src/sa/precomputation.pxi":26
* node.root = NULL
* node.arr_len = 0
* node.arr = <int*> malloc(sizeof(0*sizeof(int))) # <<<<<<<<<<<<<<
@@ -27685,7 +28211,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/m/workspace/cdec/python/src/sa/precomputation.pxi":27
* node.arr_len = 0
* node.arr = <int*> malloc(sizeof(0*sizeof(int)))
* return node # <<<<<<<<<<<<<<
@@ -27701,7 +28227,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/m/workspace/cdec/python/src/sa/precomputation.pxi":29
* return node
*
* cdef _Trie_Edge* new_trie_edge(int val): # <<<<<<<<<<<<<<
@@ -27715,7 +28241,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -27724,7 +28250,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/m/workspace/cdec/python/src/sa/precomputation.pxi":32
* cdef _Trie_Edge* edge
* edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge))
* edge.node = new_trie_node() # <<<<<<<<<<<<<<
@@ -27733,7 +28259,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/m/workspace/cdec/python/src/sa/precomputation.pxi":33
* edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge))
* edge.node = new_trie_node()
* edge.bigger = NULL # <<<<<<<<<<<<<<
@@ -27742,7 +28268,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/m/workspace/cdec/python/src/sa/precomputation.pxi":34
* edge.node = new_trie_node()
* edge.bigger = NULL
* edge.smaller = NULL # <<<<<<<<<<<<<<
@@ -27751,7 +28277,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/m/workspace/cdec/python/src/sa/precomputation.pxi":35
* edge.bigger = NULL
* edge.smaller = NULL
* edge.val = val # <<<<<<<<<<<<<<
@@ -27760,7 +28286,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/m/workspace/cdec/python/src/sa/precomputation.pxi":36
* edge.smaller = NULL
* edge.val = val
* return edge # <<<<<<<<<<<<<<
@@ -27776,7 +28302,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/m/workspace/cdec/python/src/sa/precomputation.pxi":38
* return edge
*
* cdef free_trie_node(_Trie_Node* node): # <<<<<<<<<<<<<<
@@ -27794,7 +28320,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/m/workspace/cdec/python/src/sa/precomputation.pxi":39
*
* cdef free_trie_node(_Trie_Node* node):
* if node != NULL: # <<<<<<<<<<<<<<
@@ -27804,7 +28330,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/m/workspace/cdec/python/src/sa/precomputation.pxi":40
* cdef free_trie_node(_Trie_Node* node):
* if node != NULL:
* free_trie_edge(node.root) # <<<<<<<<<<<<<<
@@ -27815,7 +28341,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/m/workspace/cdec/python/src/sa/precomputation.pxi":41
* if node != NULL:
* free_trie_edge(node.root)
* free(node.arr) # <<<<<<<<<<<<<<
@@ -27839,7 +28365,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/m/workspace/cdec/python/src/sa/precomputation.pxi":43
* free(node.arr)
*
* cdef free_trie_edge(_Trie_Edge* edge): # <<<<<<<<<<<<<<
@@ -27857,7 +28383,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/m/workspace/cdec/python/src/sa/precomputation.pxi":44
*
* cdef free_trie_edge(_Trie_Edge* edge):
* if edge != NULL: # <<<<<<<<<<<<<<
@@ -27867,7 +28393,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/m/workspace/cdec/python/src/sa/precomputation.pxi":45
* cdef free_trie_edge(_Trie_Edge* edge):
* if edge != NULL:
* free_trie_node(edge.node) # <<<<<<<<<<<<<<
@@ -27878,7 +28404,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/m/workspace/cdec/python/src/sa/precomputation.pxi":46
* if edge != NULL:
* free_trie_node(edge.node)
* free_trie_edge(edge.bigger) # <<<<<<<<<<<<<<
@@ -27889,7 +28415,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/m/workspace/cdec/python/src/sa/precomputation.pxi":47
* free_trie_node(edge.node)
* free_trie_edge(edge.bigger)
* free_trie_edge(edge.smaller) # <<<<<<<<<<<<<<
@@ -27915,7 +28441,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/m/workspace/cdec/python/src/sa/precomputation.pxi":49
* free_trie_edge(edge.smaller)
*
* cdef _Trie_Node* trie_find(_Trie_Node* node, int val): # <<<<<<<<<<<<<<
@@ -27932,7 +28458,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/m/workspace/cdec/python/src/sa/precomputation.pxi":51
* cdef _Trie_Node* trie_find(_Trie_Node* node, int val):
* cdef _Trie_Edge* cur
* cur = node.root # <<<<<<<<<<<<<<
@@ -27941,7 +28467,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/m/workspace/cdec/python/src/sa/precomputation.pxi":52
* cdef _Trie_Edge* cur
* cur = node.root
* while cur != NULL and cur.val != val: # <<<<<<<<<<<<<<
@@ -27958,7 +28484,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/m/workspace/cdec/python/src/sa/precomputation.pxi":53
* cur = node.root
* while cur != NULL and cur.val != val:
* if val > cur.val: # <<<<<<<<<<<<<<
@@ -27968,7 +28494,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/m/workspace/cdec/python/src/sa/precomputation.pxi":54
* while cur != NULL and cur.val != val:
* if val > cur.val:
* cur = cur.bigger # <<<<<<<<<<<<<<
@@ -27979,7 +28505,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/m/workspace/cdec/python/src/sa/precomputation.pxi":55
* if val > cur.val:
* cur = cur.bigger
* elif val < cur.val: # <<<<<<<<<<<<<<
@@ -27989,7 +28515,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/m/workspace/cdec/python/src/sa/precomputation.pxi":56
* cur = cur.bigger
* elif val < cur.val:
* cur = cur.smaller # <<<<<<<<<<<<<<
@@ -28002,7 +28528,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/m/workspace/cdec/python/src/sa/precomputation.pxi":57
* elif val < cur.val:
* cur = cur.smaller
* if cur == NULL: # <<<<<<<<<<<<<<
@@ -28012,7 +28538,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/m/workspace/cdec/python/src/sa/precomputation.pxi":58
* cur = cur.smaller
* if cur == NULL:
* return NULL # <<<<<<<<<<<<<<
@@ -28025,7 +28551,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/m/workspace/cdec/python/src/sa/precomputation.pxi":60
* return NULL
* else:
* return cur.node # <<<<<<<<<<<<<<
@@ -28043,7 +28569,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/m/workspace/cdec/python/src/sa/precomputation.pxi":62
* return cur.node
*
* cdef trie_node_data_append(_Trie_Node* node, int val): # <<<<<<<<<<<<<<
@@ -28057,7 +28583,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -28066,7 +28592,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -28075,7 +28601,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -28084,7 +28610,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -28099,7 +28625,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/m/workspace/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): # <<<<<<<<<<<<<<
@@ -28113,7 +28639,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -28122,7 +28648,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -28131,7 +28657,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -28140,7 +28666,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -28155,7 +28681,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/m/workspace/cdec/python/src/sa/precomputation.pxi":77
*
*
* cdef _Trie_Node* trie_insert(_Trie_Node* node, int val): # <<<<<<<<<<<<<<
@@ -28172,7 +28698,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/m/workspace/cdec/python/src/sa/precomputation.pxi":79
* cdef _Trie_Node* trie_insert(_Trie_Node* node, int val):
* cdef _Trie_Edge** cur
* cur = &node.root # <<<<<<<<<<<<<<
@@ -28181,7 +28707,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/m/workspace/cdec/python/src/sa/precomputation.pxi":80
* cdef _Trie_Edge** cur
* cur = &node.root
* while cur[0] != NULL and cur[0].val != val: # <<<<<<<<<<<<<<
@@ -28198,7 +28724,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/m/workspace/cdec/python/src/sa/precomputation.pxi":81
* cur = &node.root
* while cur[0] != NULL and cur[0].val != val:
* if val > cur[0].val: # <<<<<<<<<<<<<<
@@ -28208,7 +28734,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -28219,7 +28745,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/m/workspace/cdec/python/src/sa/precomputation.pxi":83
* if val > cur[0].val:
* cur = &cur[0].bigger
* elif val < cur[0].val: # <<<<<<<<<<<<<<
@@ -28229,7 +28755,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/m/workspace/cdec/python/src/sa/precomputation.pxi":84
* cur = &cur[0].bigger
* elif val < cur[0].val:
* cur = &cur[0].smaller # <<<<<<<<<<<<<<
@@ -28242,7 +28768,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/m/workspace/cdec/python/src/sa/precomputation.pxi":85
* elif val < cur[0].val:
* cur = &cur[0].smaller
* if cur[0] == NULL: # <<<<<<<<<<<<<<
@@ -28252,7 +28778,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/m/workspace/cdec/python/src/sa/precomputation.pxi":86
* cur = &cur[0].smaller
* if cur[0] == NULL:
* cur[0] = new_trie_edge(val) # <<<<<<<<<<<<<<
@@ -28264,7 +28790,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/m/workspace/cdec/python/src/sa/precomputation.pxi":87
* if cur[0] == NULL:
* cur[0] = new_trie_edge(val)
* return cur[0].node # <<<<<<<<<<<<<<
@@ -28280,7 +28806,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/m/workspace/cdec/python/src/sa/precomputation.pxi":89
* return cur[0].node
*
* cdef trie_node_to_map(_Trie_Node* node, result, prefix, int include_zeros): # <<<<<<<<<<<<<<
@@ -28300,7 +28826,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/m/workspace/cdec/python/src/sa/precomputation.pxi":92
* cdef IntList arr
*
* if include_zeros or node.arr_len > 0: # <<<<<<<<<<<<<<
@@ -28315,7 +28841,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/m/workspace/cdec/python/src/sa/precomputation.pxi":93
*
* if include_zeros or node.arr_len > 0:
* arr = IntList() # <<<<<<<<<<<<<<
@@ -28327,7 +28853,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/m/workspace/cdec/python/src/sa/precomputation.pxi":94
* if include_zeros or node.arr_len > 0:
* arr = IntList()
* free(arr.arr) # <<<<<<<<<<<<<<
@@ -28336,7 +28862,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/m/workspace/cdec/python/src/sa/precomputation.pxi":95
* arr = IntList()
* free(arr.arr)
* arr.arr = <int*> malloc(node.arr_len * sizeof(int)) # <<<<<<<<<<<<<<
@@ -28345,7 +28871,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -28354,7 +28880,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -28363,7 +28889,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -28372,7 +28898,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/m/workspace/cdec/python/src/sa/precomputation.pxi":99
* arr.len = node.arr_len
* arr.size = node.arr_len
* result[prefix] = arr # <<<<<<<<<<<<<<
@@ -28384,7 +28910,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -28408,7 +28934,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/m/workspace/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): # <<<<<<<<<<<<<<
@@ -28428,7 +28954,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/m/workspace/cdec/python/src/sa/precomputation.pxi":103
*
* cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros):
* if edge != NULL: # <<<<<<<<<<<<<<
@@ -28438,7 +28964,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -28449,7 +28975,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -28460,7 +28986,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/m/workspace/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,) # <<<<<<<<<<<<<<
@@ -28481,7 +29007,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -28556,7 +29082,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/m/workspace/cdec/python/src/sa/precomputation.pxi":114
* cdef int V
*
* def __cinit__(self, int alphabet_size): # <<<<<<<<<<<<<<
@@ -28569,7 +29095,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/m/workspace/cdec/python/src/sa/precomputation.pxi":115
*
* def __cinit__(self, int alphabet_size):
* self.V = alphabet_size # <<<<<<<<<<<<<<
@@ -28578,7 +29104,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/m/workspace/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*)) # <<<<<<<<<<<<<<
@@ -28587,7 +29113,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/m/workspace/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*)) # <<<<<<<<<<<<<<
@@ -28610,7 +29136,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/m/workspace/cdec/python/src/sa/precomputation.pxi":120
*
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -28629,7 +29155,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/m/workspace/cdec/python/src/sa/precomputation.pxi":122
* def __dealloc__(self):
* cdef int i
* for i from 0 <= i < self.V: # <<<<<<<<<<<<<<
@@ -28639,7 +29165,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/m/workspace/cdec/python/src/sa/precomputation.pxi":123
* cdef int i
* for i from 0 <= i < self.V:
* if self.root[i] != NULL: # <<<<<<<<<<<<<<
@@ -28649,7 +29175,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/m/workspace/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]) # <<<<<<<<<<<<<<
@@ -28664,7 +29190,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/m/workspace/cdec/python/src/sa/precomputation.pxi":125
* if self.root[i] != NULL:
* free_trie_node(self.root[i])
* free(self.root) # <<<<<<<<<<<<<<
@@ -28692,7 +29218,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/m/workspace/cdec/python/src/sa/precomputation.pxi":128
*
*
* def insert(self, pattern): # <<<<<<<<<<<<<<
@@ -28715,7 +29241,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/m/workspace/cdec/python/src/sa/precomputation.pxi":131
* cdef int* p
* cdef int i, l
* l = len(pattern) # <<<<<<<<<<<<<<
@@ -28725,7 +29251,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/m/workspace/cdec/python/src/sa/precomputation.pxi":132
* cdef int i, l
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int)) # <<<<<<<<<<<<<<
@@ -28734,7 +29260,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/m/workspace/cdec/python/src/sa/precomputation.pxi":133
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l: # <<<<<<<<<<<<<<
@@ -28744,7 +29270,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/m/workspace/cdec/python/src/sa/precomputation.pxi":134
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l:
* p[i] = pattern[i] # <<<<<<<<<<<<<<
@@ -28758,7 +29284,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/m/workspace/cdec/python/src/sa/precomputation.pxi":135
* for i from 0 <= i < l:
* p[i] = pattern[i]
* self._insert(p,l) # <<<<<<<<<<<<<<
@@ -28767,7 +29293,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/m/workspace/cdec/python/src/sa/precomputation.pxi":136
* p[i] = pattern[i]
* self._insert(p,l)
* free(p) # <<<<<<<<<<<<<<
@@ -28788,7 +29314,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/m/workspace/cdec/python/src/sa/precomputation.pxi":139
*
*
* cdef _Trie_Node* _insert(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<<
@@ -28805,7 +29331,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/m/workspace/cdec/python/src/sa/precomputation.pxi":142
* cdef int i
* cdef _Trie_Node* node
* if self.root[pattern[0]] == NULL: # <<<<<<<<<<<<<<
@@ -28815,7 +29341,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/m/workspace/cdec/python/src/sa/precomputation.pxi":143
* cdef _Trie_Node* node
* if self.root[pattern[0]] == NULL:
* self.root[pattern[0]] = new_trie_node() # <<<<<<<<<<<<<<
@@ -28827,7 +29353,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/m/workspace/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]] # <<<<<<<<<<<<<<
@@ -28836,7 +29362,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -28846,7 +29372,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/m/workspace/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]) # <<<<<<<<<<<<<<
@@ -28856,7 +29382,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/m/workspace/cdec/python/src/sa/precomputation.pxi":147
* for i from 1 <= i < pattern_len:
* node = trie_insert(node, pattern[i])
* return node # <<<<<<<<<<<<<<
@@ -28883,7 +29409,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/m/workspace/cdec/python/src/sa/precomputation.pxi":149
* return node
*
* def contains(self, pattern): # <<<<<<<<<<<<<<
@@ -28908,7 +29434,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/m/workspace/cdec/python/src/sa/precomputation.pxi":153
* cdef int i, l
* cdef _Trie_Node* node
* l = len(pattern) # <<<<<<<<<<<<<<
@@ -28918,7 +29444,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/m/workspace/cdec/python/src/sa/precomputation.pxi":154
* cdef _Trie_Node* node
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int)) # <<<<<<<<<<<<<<
@@ -28927,7 +29453,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/m/workspace/cdec/python/src/sa/precomputation.pxi":155
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l: # <<<<<<<<<<<<<<
@@ -28937,7 +29463,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/m/workspace/cdec/python/src/sa/precomputation.pxi":156
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l:
* p[i] = pattern[i] # <<<<<<<<<<<<<<
@@ -28951,7 +29477,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/m/workspace/cdec/python/src/sa/precomputation.pxi":157
* for i from 0 <= i < l:
* p[i] = pattern[i]
* node = self._contains(p,l) # <<<<<<<<<<<<<<
@@ -28960,7 +29486,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/m/workspace/cdec/python/src/sa/precomputation.pxi":158
* p[i] = pattern[i]
* node = self._contains(p,l)
* free(p) # <<<<<<<<<<<<<<
@@ -28969,7 +29495,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/m/workspace/cdec/python/src/sa/precomputation.pxi":159
* node = self._contains(p,l)
* free(p)
* if node == NULL: # <<<<<<<<<<<<<<
@@ -28979,7 +29505,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/m/workspace/cdec/python/src/sa/precomputation.pxi":160
* free(p)
* if node == NULL:
* return False # <<<<<<<<<<<<<<
@@ -28996,7 +29522,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/m/workspace/cdec/python/src/sa/precomputation.pxi":162
* return False
* else:
* return True # <<<<<<<<<<<<<<
@@ -29024,7 +29550,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/m/workspace/cdec/python/src/sa/precomputation.pxi":164
* return True
*
* cdef _Trie_Node* _contains(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<<
@@ -29042,7 +29568,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/m/workspace/cdec/python/src/sa/precomputation.pxi":167
* cdef int i
* cdef _Trie_Node* node
* node = self.root[pattern[0]] # <<<<<<<<<<<<<<
@@ -29051,7 +29577,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/m/workspace/cdec/python/src/sa/precomputation.pxi":168
* cdef _Trie_Node* node
* node = self.root[pattern[0]]
* i = 1 # <<<<<<<<<<<<<<
@@ -29060,7 +29586,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/m/workspace/cdec/python/src/sa/precomputation.pxi":169
* node = self.root[pattern[0]]
* i = 1
* while node != NULL and i < pattern_len: # <<<<<<<<<<<<<<
@@ -29077,7 +29603,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/m/workspace/cdec/python/src/sa/precomputation.pxi":170
* i = 1
* while node != NULL and i < pattern_len:
* node = trie_find(node, pattern[i]) # <<<<<<<<<<<<<<
@@ -29086,7 +29612,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/m/workspace/cdec/python/src/sa/precomputation.pxi":171
* while node != NULL and i < pattern_len:
* node = trie_find(node, pattern[i])
* i = i+1 # <<<<<<<<<<<<<<
@@ -29096,7 +29622,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/m/workspace/cdec/python/src/sa/precomputation.pxi":172
* node = trie_find(node, pattern[i])
* i = i+1
* return node # <<<<<<<<<<<<<<
@@ -29123,7 +29649,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/m/workspace/cdec/python/src/sa/precomputation.pxi":174
* return node
*
* def toMap(self, flag): # <<<<<<<<<<<<<<
@@ -29146,7 +29672,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/m/workspace/cdec/python/src/sa/precomputation.pxi":177
* cdef int i, include_zeros
*
* if flag: # <<<<<<<<<<<<<<
@@ -29156,7 +29682,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/m/workspace/cdec/python/src/sa/precomputation.pxi":178
*
* if flag:
* include_zeros=1 # <<<<<<<<<<<<<<
@@ -29168,7 +29694,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/m/workspace/cdec/python/src/sa/precomputation.pxi":180
* include_zeros=1
* else:
* include_zeros=0 # <<<<<<<<<<<<<<
@@ -29179,7 +29705,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/m/workspace/cdec/python/src/sa/precomputation.pxi":181
* else:
* include_zeros=0
* result = {} # <<<<<<<<<<<<<<
@@ -29191,7 +29717,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/m/workspace/cdec/python/src/sa/precomputation.pxi":182
* include_zeros=0
* result = {}
* for i from 0 <= i < self.V: # <<<<<<<<<<<<<<
@@ -29201,7 +29727,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/m/workspace/cdec/python/src/sa/precomputation.pxi":183
* result = {}
* for i from 0 <= i < self.V:
* if self.root[i] != NULL: # <<<<<<<<<<<<<<
@@ -29211,7 +29737,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29234,7 +29760,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -29279,7 +29805,7 @@ static int __pyx_pw_3_sa_14Precomputation_1__cinit__(PyObject *__pyx_v_self, PyO
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/m/workspace/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, # <<<<<<<<<<<<<<
@@ -29413,7 +29939,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -29423,7 +29949,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -29433,7 +29959,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/m/workspace/cdec/python/src/sa/precomputation.pxi":206
* self.precompute_rank = precompute_rank
* self.precompute_secondary_rank = precompute_secondary_rank
* self.max_length = max_length # <<<<<<<<<<<<<<
@@ -29443,7 +29969,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/m/workspace/cdec/python/src/sa/precomputation.pxi":207
* self.precompute_secondary_rank = precompute_secondary_rank
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals # <<<<<<<<<<<<<<
@@ -29453,7 +29979,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -29463,7 +29989,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -29473,7 +29999,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -29483,7 +30009,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/m/workspace/cdec/python/src/sa/precomputation.pxi":211
* self.train_min_gap_size = train_min_gap_size
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -29505,7 +30031,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/m/workspace/cdec/python/src/sa/precomputation.pxi":212
* if from_binary:
* self.read_binary(from_binary)
* elif from_stats: # <<<<<<<<<<<<<<
@@ -29515,7 +30041,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/m/workspace/cdec/python/src/sa/precomputation.pxi":213
* self.read_binary(from_binary)
* elif from_stats:
* self.precompute(from_stats, fsarray) # <<<<<<<<<<<<<<
@@ -29575,7 +30101,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/m/workspace/cdec/python/src/sa/precomputation.pxi":216
*
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -29593,7 +30119,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/m/workspace/cdec/python/src/sa/precomputation.pxi":218
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -29602,7 +30128,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/m/workspace/cdec/python/src/sa/precomputation.pxi":219
* cdef FILE* f
* f = fopen(filename, "r")
* fread(&(self.precompute_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -29611,7 +30137,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29620,7 +30146,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29629,7 +30155,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29638,7 +30164,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29647,7 +30173,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29656,7 +30182,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29671,7 +30197,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29686,7 +30212,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/m/workspace/cdec/python/src/sa/precomputation.pxi":227
* self.precomputed_index = self.read_map(f)
* self.precomputed_collocations = self.read_map(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -29728,7 +30254,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/m/workspace/cdec/python/src/sa/precomputation.pxi":230
*
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -29747,7 +30273,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/m/workspace/cdec/python/src/sa/precomputation.pxi":232
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -29756,7 +30282,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/m/workspace/cdec/python/src/sa/precomputation.pxi":233
* cdef FILE* f
* f = fopen(filename, "w")
* fwrite(&(self.precompute_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -29765,7 +30291,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29774,7 +30300,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29783,7 +30309,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29792,7 +30318,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29801,7 +30327,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29810,7 +30336,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29824,7 +30350,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -29838,7 +30364,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/m/workspace/cdec/python/src/sa/precomputation.pxi":241
* self.write_map(self.precomputed_index, f)
* self.write_map(self.precomputed_collocations, f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -29860,7 +30386,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/m/workspace/cdec/python/src/sa/precomputation.pxi":244
*
*
* cdef write_map(self, m, FILE* f): # <<<<<<<<<<<<<<
@@ -29891,7 +30417,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_map", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":248
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":248
* cdef IntList arr
*
* N = len(m) # <<<<<<<<<<<<<<
@@ -29901,7 +30427,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/m/workspace/cdec/python/src/sa/precomputation.pxi":249
*
* N = len(m)
* fwrite(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -29910,7 +30436,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":250
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":250
* N = len(m)
* fwrite(&(N), sizeof(int), 1, f)
* for pattern, val in m.iteritems(): # <<<<<<<<<<<<<<
@@ -29940,7 +30466,7 @@ 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/m/workspace/cdec/python/src/sa/precomputation.pxi":251
* fwrite(&(N), sizeof(int), 1, f)
* for pattern, val in m.iteritems():
* N = len(pattern) # <<<<<<<<<<<<<<
@@ -29950,7 +30476,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":252
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":252
* for pattern, val in m.iteritems():
* N = len(pattern)
* fwrite(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -29959,7 +30485,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/m/workspace/cdec/python/src/sa/precomputation.pxi":253
* N = len(pattern)
* fwrite(&(N), sizeof(int), 1, f)
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -30004,7 +30530,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
__pyx_v_word_id = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":254
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":254
* fwrite(&(N), sizeof(int), 1, f)
* for word_id in pattern:
* i = word_id # <<<<<<<<<<<<<<
@@ -30014,7 +30540,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
__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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":255
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":255
* for word_id in pattern:
* i = word_id
* fwrite(&(i), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -30025,7 +30551,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":256
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":256
* i = word_id
* fwrite(&(i), sizeof(int), 1, f)
* arr = val # <<<<<<<<<<<<<<
@@ -30037,7 +30563,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/m/workspace/cdec/python/src/sa/precomputation.pxi":257
* fwrite(&(i), sizeof(int), 1, f)
* arr = val
* arr.write_handle(f) # <<<<<<<<<<<<<<
@@ -30066,7 +30592,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/m/workspace/cdec/python/src/sa/precomputation.pxi":260
*
*
* cdef read_map(self, FILE* f): # <<<<<<<<<<<<<<
@@ -30094,7 +30620,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/m/workspace/cdec/python/src/sa/precomputation.pxi":264
* cdef IntList arr
*
* m = {} # <<<<<<<<<<<<<<
@@ -30106,7 +30632,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/m/workspace/cdec/python/src/sa/precomputation.pxi":265
*
* m = {}
* fread(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -30115,7 +30641,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/m/workspace/cdec/python/src/sa/precomputation.pxi":266
* m = {}
* fread(&(N), sizeof(int), 1, f)
* for j from 0 <= j < N: # <<<<<<<<<<<<<<
@@ -30125,7 +30651,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -30134,7 +30660,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/m/workspace/cdec/python/src/sa/precomputation.pxi":268
* for j from 0 <= j < N:
* fread(&(i), sizeof(int), 1, f)
* key = () # <<<<<<<<<<<<<<
@@ -30145,7 +30671,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/m/workspace/cdec/python/src/sa/precomputation.pxi":269
* fread(&(i), sizeof(int), 1, f)
* key = ()
* for k from 0 <= k < i: # <<<<<<<<<<<<<<
@@ -30155,7 +30681,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/m/workspace/cdec/python/src/sa/precomputation.pxi":270
* key = ()
* for k from 0 <= k < i:
* fread(&(word_id), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -30164,7 +30690,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/m/workspace/cdec/python/src/sa/precomputation.pxi":271
* for k from 0 <= k < i:
* fread(&(word_id), sizeof(int), 1, f)
* key = key + (word_id,) # <<<<<<<<<<<<<<
@@ -30186,7 +30712,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/m/workspace/cdec/python/src/sa/precomputation.pxi":272
* fread(&(word_id), sizeof(int), 1, f)
* key = key + (word_id,)
* arr = IntList() # <<<<<<<<<<<<<<
@@ -30199,7 +30725,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/m/workspace/cdec/python/src/sa/precomputation.pxi":273
* key = key + (word_id,)
* arr = IntList()
* arr.read_handle(f) # <<<<<<<<<<<<<<
@@ -30208,7 +30734,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/m/workspace/cdec/python/src/sa/precomputation.pxi":274
* arr = IntList()
* arr.read_handle(f)
* m[key] = arr # <<<<<<<<<<<<<<
@@ -30218,7 +30744,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/m/workspace/cdec/python/src/sa/precomputation.pxi":275
* arr.read_handle(f)
* m[key] = arr
* return m # <<<<<<<<<<<<<<
@@ -30307,7 +30833,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/m/workspace/cdec/python/src/sa/precomputation.pxi":278
*
*
* def precompute(self, stats, SuffixArray sarray): # <<<<<<<<<<<<<<
@@ -30392,7 +30918,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -30402,7 +30928,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/m/workspace/cdec/python/src/sa/precomputation.pxi":285
* cdef _Trie_Node* node
*
* data = darray.data # <<<<<<<<<<<<<<
@@ -30412,7 +30938,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/m/workspace/cdec/python/src/sa/precomputation.pxi":287
* data = darray.data
*
* frequent_patterns = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<<
@@ -30436,7 +30962,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/m/workspace/cdec/python/src/sa/precomputation.pxi":288
*
* frequent_patterns = TrieMap(len(darray.id2word))
* super_frequent_patterns = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<<
@@ -30460,7 +30986,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/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -30484,7 +31010,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/m/workspace/cdec/python/src/sa/precomputation.pxi":291
* collocations = TrieMap(len(darray.id2word))
*
* I_set = set() # <<<<<<<<<<<<<<
@@ -30496,7 +31022,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/m/workspace/cdec/python/src/sa/precomputation.pxi":292
*
* I_set = set()
* J_set = set() # <<<<<<<<<<<<<<
@@ -30508,7 +31034,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/m/workspace/cdec/python/src/sa/precomputation.pxi":293
* I_set = set()
* J_set = set()
* J2_set = set() # <<<<<<<<<<<<<<
@@ -30520,7 +31046,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/m/workspace/cdec/python/src/sa/precomputation.pxi":294
* J_set = set()
* J2_set = set()
* IJ_set = set() # <<<<<<<<<<<<<<
@@ -30532,7 +31058,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/m/workspace/cdec/python/src/sa/precomputation.pxi":295
* J2_set = set()
* IJ_set = set()
* pattern_rank = {} # <<<<<<<<<<<<<<
@@ -30544,7 +31070,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/m/workspace/cdec/python/src/sa/precomputation.pxi":297
* pattern_rank = {}
*
* logger.info("Precomputing frequent intersections") # <<<<<<<<<<<<<<
@@ -30561,7 +31087,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/m/workspace/cdec/python/src/sa/precomputation.pxi":298
*
* logger.info("Precomputing frequent intersections")
* cdef float start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -30570,7 +31096,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/m/workspace/cdec/python/src/sa/precomputation.pxi":300
* cdef float start_time = monitor_cpu()
*
* max_pattern_len = 0 # <<<<<<<<<<<<<<
@@ -30579,7 +31105,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/m/workspace/cdec/python/src/sa/precomputation.pxi":301
*
* max_pattern_len = 0
* for rank, (_, _, phrase) in enumerate(stats): # <<<<<<<<<<<<<<
@@ -30695,7 +31221,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/m/workspace/cdec/python/src/sa/precomputation.pxi":302
* max_pattern_len = 0
* for rank, (_, _, phrase) in enumerate(stats):
* if rank >= self.precompute_rank: # <<<<<<<<<<<<<<
@@ -30710,7 +31236,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/m/workspace/cdec/python/src/sa/precomputation.pxi":303
* for rank, (_, _, phrase) in enumerate(stats):
* if rank >= self.precompute_rank:
* break # <<<<<<<<<<<<<<
@@ -30722,7 +31248,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/m/workspace/cdec/python/src/sa/precomputation.pxi":304
* if rank >= self.precompute_rank:
* break
* max_pattern_len = max(max_pattern_len, len(phrase)) # <<<<<<<<<<<<<<
@@ -30738,7 +31264,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/m/workspace/cdec/python/src/sa/precomputation.pxi":305
* break
* max_pattern_len = max(max_pattern_len, len(phrase))
* frequent_patterns.insert(phrase) # <<<<<<<<<<<<<<
@@ -30758,7 +31284,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/m/workspace/cdec/python/src/sa/precomputation.pxi":306
* max_pattern_len = max(max_pattern_len, len(phrase))
* frequent_patterns.insert(phrase)
* I_set.add(phrase) # <<<<<<<<<<<<<<
@@ -30767,7 +31293,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/m/workspace/cdec/python/src/sa/precomputation.pxi":307
* frequent_patterns.insert(phrase)
* I_set.add(phrase)
* pattern_rank[phrase] = rank # <<<<<<<<<<<<<<
@@ -30776,7 +31302,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/m/workspace/cdec/python/src/sa/precomputation.pxi":308
* I_set.add(phrase)
* pattern_rank[phrase] = rank
* if rank < self.precompute_secondary_rank: # <<<<<<<<<<<<<<
@@ -30791,7 +31317,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/m/workspace/cdec/python/src/sa/precomputation.pxi":309
* pattern_rank[phrase] = rank
* if rank < self.precompute_secondary_rank:
* super_frequent_patterns.insert(phrase) # <<<<<<<<<<<<<<
@@ -30811,7 +31337,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/m/workspace/cdec/python/src/sa/precomputation.pxi":310
* if rank < self.precompute_secondary_rank:
* super_frequent_patterns.insert(phrase)
* J_set.add(phrase) # <<<<<<<<<<<<<<
@@ -30827,7 +31353,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/m/workspace/cdec/python/src/sa/precomputation.pxi":312
* J_set.add(phrase)
*
* queue = IntList(increment=1000) # <<<<<<<<<<<<<<
@@ -30843,7 +31369,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/m/workspace/cdec/python/src/sa/precomputation.pxi":314
* queue = IntList(increment=1000)
*
* logger.info(" Computing inverted indexes...") # <<<<<<<<<<<<<<
@@ -30860,7 +31386,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/m/workspace/cdec/python/src/sa/precomputation.pxi":315
*
* logger.info(" Computing inverted indexes...")
* N = len(data) # <<<<<<<<<<<<<<
@@ -30870,7 +31396,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/m/workspace/cdec/python/src/sa/precomputation.pxi":316
* logger.info(" Computing inverted indexes...")
* N = len(data)
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -30880,7 +31406,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/m/workspace/cdec/python/src/sa/precomputation.pxi":317
* N = len(data)
* for i from 0 <= i < N:
* sa_word_id = data.arr[i] # <<<<<<<<<<<<<<
@@ -30889,7 +31415,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/m/workspace/cdec/python/src/sa/precomputation.pxi":318
* for i from 0 <= i < N:
* sa_word_id = data.arr[i]
* if sa_word_id == 1: # <<<<<<<<<<<<<<
@@ -30899,7 +31425,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/m/workspace/cdec/python/src/sa/precomputation.pxi":319
* sa_word_id = data.arr[i]
* if sa_word_id == 1:
* queue._append(-1) # <<<<<<<<<<<<<<
@@ -30911,7 +31437,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/m/workspace/cdec/python/src/sa/precomputation.pxi":321
* queue._append(-1)
* else:
* for l from 1 <= l <= max_pattern_len: # <<<<<<<<<<<<<<
@@ -30921,7 +31447,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/m/workspace/cdec/python/src/sa/precomputation.pxi":322
* else:
* for l from 1 <= l <= max_pattern_len:
* node = frequent_patterns._contains(data.arr+i, l) # <<<<<<<<<<<<<<
@@ -30930,7 +31456,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -30940,7 +31466,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/m/workspace/cdec/python/src/sa/precomputation.pxi":324
* node = frequent_patterns._contains(data.arr+i, l)
* if node == NULL:
* break # <<<<<<<<<<<<<<
@@ -30952,7 +31478,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/m/workspace/cdec/python/src/sa/precomputation.pxi":325
* if node == NULL:
* break
* queue._append(i) # <<<<<<<<<<<<<<
@@ -30961,7 +31487,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/m/workspace/cdec/python/src/sa/precomputation.pxi":326
* break
* queue._append(i)
* queue._append(l) # <<<<<<<<<<<<<<
@@ -30970,7 +31496,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/m/workspace/cdec/python/src/sa/precomputation.pxi":327
* queue._append(i)
* queue._append(l)
* trie_node_data_append(node, i) # <<<<<<<<<<<<<<
@@ -30986,7 +31512,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/m/workspace/cdec/python/src/sa/precomputation.pxi":329
* trie_node_data_append(node, i)
*
* logger.info(" Computing collocations...") # <<<<<<<<<<<<<<
@@ -31003,7 +31529,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/m/workspace/cdec/python/src/sa/precomputation.pxi":330
*
* logger.info(" Computing collocations...")
* N = len(queue) # <<<<<<<<<<<<<<
@@ -31013,7 +31539,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/m/workspace/cdec/python/src/sa/precomputation.pxi":331
* logger.info(" Computing collocations...")
* N = len(queue)
* ptr1 = 0 # <<<<<<<<<<<<<<
@@ -31022,7 +31548,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/m/workspace/cdec/python/src/sa/precomputation.pxi":332
* N = len(queue)
* ptr1 = 0
* sent_count = 0 # <<<<<<<<<<<<<<
@@ -31031,7 +31557,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/m/workspace/cdec/python/src/sa/precomputation.pxi":333
* ptr1 = 0
* sent_count = 0
* while ptr1 < N: # main loop # <<<<<<<<<<<<<<
@@ -31042,7 +31568,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/m/workspace/cdec/python/src/sa/precomputation.pxi":334
* sent_count = 0
* while ptr1 < N: # main loop
* i1 = queue.arr[ptr1] # <<<<<<<<<<<<<<
@@ -31051,7 +31577,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/m/workspace/cdec/python/src/sa/precomputation.pxi":335
* while ptr1 < N: # main loop
* i1 = queue.arr[ptr1]
* if i1 > -1: # <<<<<<<<<<<<<<
@@ -31061,7 +31587,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/m/workspace/cdec/python/src/sa/precomputation.pxi":336
* i1 = queue.arr[ptr1]
* if i1 > -1:
* l1 = queue.arr[ptr1+1] # <<<<<<<<<<<<<<
@@ -31070,7 +31596,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/m/workspace/cdec/python/src/sa/precomputation.pxi":337
* if i1 > -1:
* l1 = queue.arr[ptr1+1]
* ptr2 = ptr1 + 2 # <<<<<<<<<<<<<<
@@ -31079,7 +31605,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/m/workspace/cdec/python/src/sa/precomputation.pxi":338
* l1 = queue.arr[ptr1+1]
* ptr2 = ptr1 + 2
* while ptr2 < N: # <<<<<<<<<<<<<<
@@ -31090,7 +31616,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/m/workspace/cdec/python/src/sa/precomputation.pxi":339
* ptr2 = ptr1 + 2
* while ptr2 < N:
* i2 = queue.arr[ptr2] # <<<<<<<<<<<<<<
@@ -31099,7 +31625,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -31115,7 +31641,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/m/workspace/cdec/python/src/sa/precomputation.pxi":341
* i2 = queue.arr[ptr2]
* if i2 == -1 or i2 - i1 >= self.train_max_initial_size:
* break # <<<<<<<<<<<<<<
@@ -31127,7 +31653,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/m/workspace/cdec/python/src/sa/precomputation.pxi":342
* if i2 == -1 or i2 - i1 >= self.train_max_initial_size:
* break
* l2 = queue.arr[ptr2+1] # <<<<<<<<<<<<<<
@@ -31136,7 +31662,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/m/workspace/cdec/python/src/sa/precomputation.pxi":343
* break
* l2 = queue.arr[ptr2+1]
* if (i2 - i1 - l1 >= self.train_min_gap_size and # <<<<<<<<<<<<<<
@@ -31146,7 +31672,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -31156,7 +31682,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/m/workspace/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): # <<<<<<<<<<<<<<
@@ -31174,7 +31700,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31183,7 +31709,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31192,7 +31718,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -31202,7 +31728,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/m/workspace/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]) # <<<<<<<<<<<<<<
@@ -31212,7 +31738,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31223,7 +31749,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31234,7 +31760,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -31244,7 +31770,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -31254,7 +31780,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -31266,7 +31792,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/m/workspace/cdec/python/src/sa/precomputation.pxi":356
* is_super = 1
* else:
* is_super = 0 # <<<<<<<<<<<<<<
@@ -31277,7 +31803,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/m/workspace/cdec/python/src/sa/precomputation.pxi":357
* else:
* is_super = 0
* ptr3 = ptr2 + 2 # <<<<<<<<<<<<<<
@@ -31286,7 +31812,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/m/workspace/cdec/python/src/sa/precomputation.pxi":358
* is_super = 0
* ptr3 = ptr2 + 2
* while ptr3 < N: # <<<<<<<<<<<<<<
@@ -31297,7 +31823,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/m/workspace/cdec/python/src/sa/precomputation.pxi":359
* ptr3 = ptr2 + 2
* while ptr3 < N:
* i3 = queue.arr[ptr3] # <<<<<<<<<<<<<<
@@ -31306,7 +31832,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -31322,7 +31848,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/m/workspace/cdec/python/src/sa/precomputation.pxi":361
* i3 = queue.arr[ptr3]
* if i3 == -1 or i3 - i1 >= self.train_max_initial_size:
* break # <<<<<<<<<<<<<<
@@ -31334,7 +31860,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/m/workspace/cdec/python/src/sa/precomputation.pxi":362
* if i3 == -1 or i3 - i1 >= self.train_max_initial_size:
* break
* l3 = queue.arr[ptr3+1] # <<<<<<<<<<<<<<
@@ -31343,7 +31869,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/m/workspace/cdec/python/src/sa/precomputation.pxi":363
* break
* l3 = queue.arr[ptr3+1]
* if (i3 - i2 - l2 >= self.train_min_gap_size and # <<<<<<<<<<<<<<
@@ -31353,7 +31879,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -31363,7 +31889,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/m/workspace/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): # <<<<<<<<<<<<<<
@@ -31381,7 +31907,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -31396,7 +31922,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31405,7 +31931,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31414,7 +31940,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -31424,7 +31950,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/m/workspace/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]) # <<<<<<<<<<<<<<
@@ -31434,7 +31960,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31443,7 +31969,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -31453,7 +31979,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/m/workspace/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]) # <<<<<<<<<<<<<<
@@ -31463,7 +31989,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31474,7 +32000,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31485,7 +32011,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31502,7 +32028,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/m/workspace/cdec/python/src/sa/precomputation.pxi":377
* trie_node_data_append(node, i2)
* trie_node_data_append(node, i3)
* ptr3 = ptr3 + 2 # <<<<<<<<<<<<<<
@@ -31519,7 +32045,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/m/workspace/cdec/python/src/sa/precomputation.pxi":378
* trie_node_data_append(node, i3)
* ptr3 = ptr3 + 2
* ptr2 = ptr2 + 2 # <<<<<<<<<<<<<<
@@ -31530,7 +32056,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/m/workspace/cdec/python/src/sa/precomputation.pxi":379
* ptr3 = ptr3 + 2
* ptr2 = ptr2 + 2
* ptr1 = ptr1 + 2 # <<<<<<<<<<<<<<
@@ -31542,7 +32068,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/m/workspace/cdec/python/src/sa/precomputation.pxi":381
* ptr1 = ptr1 + 2
* else:
* sent_count = sent_count + 1 # <<<<<<<<<<<<<<
@@ -31551,7 +32077,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/m/workspace/cdec/python/src/sa/precomputation.pxi":382
* else:
* sent_count = sent_count + 1
* if sent_count % 10000 == 0: # <<<<<<<<<<<<<<
@@ -31561,7 +32087,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/m/workspace/cdec/python/src/sa/precomputation.pxi":383
* sent_count = sent_count + 1
* if sent_count % 10000 == 0:
* logger.debug(" %d sentences", sent_count) # <<<<<<<<<<<<<<
@@ -31592,7 +32118,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/m/workspace/cdec/python/src/sa/precomputation.pxi":384
* if sent_count % 10000 == 0:
* logger.debug(" %d sentences", sent_count)
* ptr1 = ptr1 + 1 # <<<<<<<<<<<<<<
@@ -31604,7 +32130,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/m/workspace/cdec/python/src/sa/precomputation.pxi":386
* ptr1 = ptr1 + 1
*
* self.precomputed_collocations = collocations.toMap(False) # <<<<<<<<<<<<<<
@@ -31630,7 +32156,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/m/workspace/cdec/python/src/sa/precomputation.pxi":387
*
* self.precomputed_collocations = collocations.toMap(False)
* self.precomputed_index = frequent_patterns.toMap(True) # <<<<<<<<<<<<<<
@@ -31656,7 +32182,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/m/workspace/cdec/python/src/sa/precomputation.pxi":389
* self.precomputed_index = frequent_patterns.toMap(True)
*
* x = 0 # <<<<<<<<<<<<<<
@@ -31666,7 +32192,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/m/workspace/cdec/python/src/sa/precomputation.pxi":390
*
* x = 0
* for pattern1 in J_set: # <<<<<<<<<<<<<<
@@ -31692,7 +32218,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/m/workspace/cdec/python/src/sa/precomputation.pxi":391
* x = 0
* for pattern1 in J_set:
* for pattern2 in J_set: # <<<<<<<<<<<<<<
@@ -31718,7 +32244,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/m/workspace/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: # <<<<<<<<<<<<<<
@@ -31730,7 +32256,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -31746,7 +32272,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31762,7 +32288,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/m/workspace/cdec/python/src/sa/precomputation.pxi":396
* J2_set.add(combined_pattern)
*
* for pattern1 in I_set: # <<<<<<<<<<<<<<
@@ -31788,7 +32314,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/m/workspace/cdec/python/src/sa/precomputation.pxi":397
*
* for pattern1 in I_set:
* for pattern2 in I_set: # <<<<<<<<<<<<<<
@@ -31814,7 +32340,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/m/workspace/cdec/python/src/sa/precomputation.pxi":398
* for pattern1 in I_set:
* for pattern2 in I_set:
* x = x+1 # <<<<<<<<<<<<<<
@@ -31827,7 +32353,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/m/workspace/cdec/python/src/sa/precomputation.pxi":399
* for pattern2 in I_set:
* x = x+1
* if len(pattern1) + len(pattern2) + 1 <= self.max_length: # <<<<<<<<<<<<<<
@@ -31839,7 +32365,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/m/workspace/cdec/python/src/sa/precomputation.pxi":400
* x = x+1
* if len(pattern1) + len(pattern2) + 1 <= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -31855,7 +32381,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31871,7 +32397,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/m/workspace/cdec/python/src/sa/precomputation.pxi":403
* IJ_set.add(combined_pattern)
*
* for pattern1 in I_set: # <<<<<<<<<<<<<<
@@ -31897,7 +32423,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/m/workspace/cdec/python/src/sa/precomputation.pxi":404
*
* for pattern1 in I_set:
* for pattern2 in J2_set: # <<<<<<<<<<<<<<
@@ -31923,7 +32449,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/m/workspace/cdec/python/src/sa/precomputation.pxi":405
* for pattern1 in I_set:
* for pattern2 in J2_set:
* x = x+2 # <<<<<<<<<<<<<<
@@ -31936,7 +32462,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/m/workspace/cdec/python/src/sa/precomputation.pxi":406
* for pattern2 in J2_set:
* x = x+2
* if len(pattern1) + len(pattern2) + 1<= self.max_length: # <<<<<<<<<<<<<<
@@ -31948,7 +32474,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/m/workspace/cdec/python/src/sa/precomputation.pxi":407
* x = x+2
* if len(pattern1) + len(pattern2) + 1<= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -31964,7 +32490,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -31973,7 +32499,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/m/workspace/cdec/python/src/sa/precomputation.pxi":409
* combined_pattern = pattern1 + (-1,) + pattern2
* IJ_set.add(combined_pattern)
* combined_pattern = pattern2 + (-1,) + pattern1 # <<<<<<<<<<<<<<
@@ -31989,7 +32515,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/m/workspace/cdec/python/src/sa/precomputation.pxi":410
* IJ_set.add(combined_pattern)
* combined_pattern = pattern2 + (-1,) + pattern1
* IJ_set.add(combined_pattern) # <<<<<<<<<<<<<<
@@ -32005,7 +32531,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":412
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":412
* IJ_set.add(combined_pattern)
*
* N = len(pattern_rank) # <<<<<<<<<<<<<<
@@ -32015,7 +32541,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__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_v_N = __pyx_t_14;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":413
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":413
*
* N = len(pattern_rank)
* cost_by_rank = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -32034,7 +32560,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -32053,7 +32579,7 @@ 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/m/workspace/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(): # <<<<<<<<<<<<<<
@@ -32083,7 +32609,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_arr = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":416
+ /* "/home/m/workspace/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: # <<<<<<<<<<<<<<
@@ -32093,7 +32619,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_19 = (__Pyx_PySequence_Contains(__pyx_v_pattern, ((PyObject *)__pyx_v_IJ_set), Py_NE)); 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/m/workspace/cdec/python/src/sa/precomputation.pxi":417
* for pattern, arr in self.precomputed_collocations.iteritems():
* if pattern not in IJ_set:
* s = "" # <<<<<<<<<<<<<<
@@ -32104,7 +32630,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/m/workspace/cdec/python/src/sa/precomputation.pxi":418
* if pattern not in IJ_set:
* s = ""
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -32149,7 +32675,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_word_id = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":419
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":419
* s = ""
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
@@ -32161,7 +32687,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":420
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":420
* for word_id in pattern:
* if word_id == -1:
* s = s + "X " # <<<<<<<<<<<<<<
@@ -32177,7 +32703,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":422
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":422
* s = s + "X "
* else:
* s = s + darray.id2word[word_id] + " " # <<<<<<<<<<<<<<
@@ -32200,7 +32726,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":423
+ /* "/home/m/workspace/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) # <<<<<<<<<<<<<<
@@ -32229,7 +32755,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":425
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":425
* logger.warn("ERROR: unexpected pattern %s in set of precomputed collocations", s)
* else:
* chunk = () # <<<<<<<<<<<<<<
@@ -32240,7 +32766,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/m/workspace/cdec/python/src/sa/precomputation.pxi":426
* else:
* chunk = ()
* max_rank = 0 # <<<<<<<<<<<<<<
@@ -32249,7 +32775,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/m/workspace/cdec/python/src/sa/precomputation.pxi":427
* chunk = ()
* max_rank = 0
* arity = 0 # <<<<<<<<<<<<<<
@@ -32260,7 +32786,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/m/workspace/cdec/python/src/sa/precomputation.pxi":428
* max_rank = 0
* arity = 0
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -32305,7 +32831,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_word_id = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":429
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":429
* arity = 0
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
@@ -32317,7 +32843,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_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":430
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":430
* for word_id in pattern:
* if word_id == -1:
* max_rank = max(max_rank, pattern_rank[chunk]) # <<<<<<<<<<<<<<
@@ -32347,7 +32873,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_max_rank = __pyx_t_16;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":431
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":431
* if word_id == -1:
* max_rank = max(max_rank, pattern_rank[chunk])
* arity = arity + 1 # <<<<<<<<<<<<<<
@@ -32360,7 +32886,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_arity = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":432
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":432
* max_rank = max(max_rank, pattern_rank[chunk])
* arity = arity + 1
* chunk = () # <<<<<<<<<<<<<<
@@ -32374,7 +32900,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":434
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":434
* chunk = ()
* else:
* chunk = chunk + (word_id,) # <<<<<<<<<<<<<<
@@ -32397,7 +32923,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":435
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":435
* else:
* chunk = chunk + (word_id,)
* max_rank = max(max_rank, pattern_rank[chunk]) # <<<<<<<<<<<<<<
@@ -32427,7 +32953,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_max_rank = __pyx_t_16;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":436
+ /* "/home/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -32437,7 +32963,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__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));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":437
+ /* "/home/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -32467,7 +32993,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":439
+ /* "/home/m/workspace/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 # <<<<<<<<<<<<<<
@@ -32477,7 +33003,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/m/workspace/cdec/python/src/sa/precomputation.pxi":440
*
* cumul_cost = 0
* cumul_count = 0 # <<<<<<<<<<<<<<
@@ -32487,7 +33013,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/m/workspace/cdec/python/src/sa/precomputation.pxi":441
* cumul_cost = 0
* cumul_count = 0
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -32497,7 +33023,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -32513,7 +33039,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/m/workspace/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] # <<<<<<<<<<<<<<
@@ -32529,7 +33055,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -32574,7 +33100,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":446
+ /* "/home/m/workspace/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) # <<<<<<<<<<<<<<
@@ -32590,7 +33116,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_num_found_patterns = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":447
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":447
*
* num_found_patterns = len(self.precomputed_collocations)
* for pattern in IJ_set: # <<<<<<<<<<<<<<
@@ -32616,7 +33142,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern = __pyx_t_7;
__pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":448
+ /* "/home/m/workspace/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: # <<<<<<<<<<<<<<
@@ -32626,7 +33152,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_19 = (__Pyx_PySequence_Contains(__pyx_v_pattern, __pyx_v_self->precomputed_collocations, Py_NE)); 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/m/workspace/cdec/python/src/sa/precomputation.pxi":449
* for pattern in IJ_set:
* if pattern not in self.precomputed_collocations:
* self.precomputed_collocations[pattern] = IntList() # <<<<<<<<<<<<<<
@@ -32643,7 +33169,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":451
+ /* "/home/m/workspace/cdec/python/src/sa/precomputation.pxi":451
* self.precomputed_collocations[pattern] = IntList()
*
* cdef float stop_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -32652,7 +33178,7 @@ 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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -32690,7 +33216,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":453
+ /* "/home/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -32721,7 +33247,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":454
+ /* "/home/m/workspace/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)) # <<<<<<<<<<<<<<
@@ -32807,7 +33333,7 @@ static int __pyx_pw_3_sa_11SuffixArray_1__cinit__(PyObject *__pyx_v_self, PyObje
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/m/workspace/cdec/python/src/sa/suffix_array.pxi":11
* cdef IntList ha
*
* def __cinit__(self, from_binary=None, from_text=None, side=None): # <<<<<<<<<<<<<<
@@ -32886,7 +33412,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/m/workspace/cdec/python/src/sa/suffix_array.pxi":12
*
* def __cinit__(self, from_binary=None, from_text=None, side=None):
* self.darray = DataArray() # <<<<<<<<<<<<<<
@@ -32901,7 +33427,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/m/workspace/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() # <<<<<<<<<<<<<<
@@ -32916,7 +33442,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/m/workspace/cdec/python/src/sa/suffix_array.pxi":14
* self.darray = DataArray()
* self.sa = IntList()
* self.ha = IntList() # <<<<<<<<<<<<<<
@@ -32931,7 +33457,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/m/workspace/cdec/python/src/sa/suffix_array.pxi":15
* self.sa = IntList()
* self.ha = IntList()
* if from_binary: # <<<<<<<<<<<<<<
@@ -32941,7 +33467,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/m/workspace/cdec/python/src/sa/suffix_array.pxi":16
* self.ha = IntList()
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -32963,7 +33489,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/m/workspace/cdec/python/src/sa/suffix_array.pxi":17
* if from_binary:
* self.read_binary(from_binary)
* elif from_text: # <<<<<<<<<<<<<<
@@ -32973,7 +33499,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/m/workspace/cdec/python/src/sa/suffix_array.pxi":18
* self.read_binary(from_binary)
* elif from_text:
* self.read_text(from_text, side) # <<<<<<<<<<<<<<
@@ -33023,7 +33549,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/m/workspace/cdec/python/src/sa/suffix_array.pxi":20
* self.read_text(from_text, side)
*
* def __getitem__(self, i): # <<<<<<<<<<<<<<
@@ -33041,7 +33567,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/m/workspace/cdec/python/src/sa/suffix_array.pxi":21
*
* def __getitem__(self, i):
* return self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -33125,7 +33651,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_5read_text(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":23
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":23
* return self.sa.arr[i]
*
* def read_text(self, filename, side): # <<<<<<<<<<<<<<
@@ -33165,7 +33691,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_text", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":29
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":29
* cdef IntList isa, word_count
*
* self.darray = DataArray(from_text=filename, side=side, use_sent_id=True) # <<<<<<<<<<<<<<
@@ -33189,7 +33715,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":30
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":30
*
* self.darray = DataArray(from_text=filename, side=side, use_sent_id=True)
* N = len(self.darray) # <<<<<<<<<<<<<<
@@ -33202,7 +33728,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":31
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":31
* self.darray = DataArray(from_text=filename, side=side, use_sent_id=True)
* N = len(self.darray)
* V = len(self.darray.id2word) # <<<<<<<<<<<<<<
@@ -33215,7 +33741,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":33
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":33
* V = len(self.darray.id2word)
*
* self.sa = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -33237,7 +33763,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":34
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":34
*
* self.sa = IntList(initial_len=N)
* self.ha = IntList(initial_len=V+1) # <<<<<<<<<<<<<<
@@ -33259,7 +33785,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":36
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":36
* self.ha = IntList(initial_len=V+1)
*
* isa = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -33278,7 +33804,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":37
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":37
*
* isa = IntList(initial_len=N)
* word_count = IntList(initial_len=V+1) # <<<<<<<<<<<<<<
@@ -33297,7 +33823,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":40
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":40
*
* '''Step 1: bucket sort data'''
* cdef float sort_start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -33306,7 +33832,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_sort_start_time = __pyx_f_3_sa_monitor_cpu();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":41
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":41
* '''Step 1: bucket sort data'''
* cdef float sort_start_time = monitor_cpu()
* cdef float start_time = sort_start_time # <<<<<<<<<<<<<<
@@ -33315,7 +33841,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_start_time = __pyx_v_sort_start_time;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":42
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":42
* cdef float sort_start_time = monitor_cpu()
* cdef float start_time = sort_start_time
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -33325,7 +33851,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":43
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":43
* cdef float start_time = sort_start_time
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i] # <<<<<<<<<<<<<<
@@ -33334,7 +33860,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_a_i = (__pyx_v_self->darray->data->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":44
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":44
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i]
* word_count.arr[a_i] = word_count.arr[a_i] + 1 # <<<<<<<<<<<<<<
@@ -33344,7 +33870,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
(__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":46
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":46
* word_count.arr[a_i] = word_count.arr[a_i] + 1
*
* n = 0 # <<<<<<<<<<<<<<
@@ -33353,7 +33879,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_n = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":47
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":47
*
* n = 0
* for i from 0 <= i < V+1: # <<<<<<<<<<<<<<
@@ -33363,7 +33889,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":48
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":48
* n = 0
* for i from 0 <= i < V+1:
* self.ha.arr[i] = n # <<<<<<<<<<<<<<
@@ -33372,7 +33898,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
(__pyx_v_self->ha->arr[__pyx_v_i]) = __pyx_v_n;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":49
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":49
* for i from 0 <= i < V+1:
* self.ha.arr[i] = n
* n = n + word_count.arr[i] # <<<<<<<<<<<<<<
@@ -33381,7 +33907,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_n = (__pyx_v_n + (__pyx_v_word_count->arr[__pyx_v_i]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":50
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":50
* self.ha.arr[i] = n
* n = n + word_count.arr[i]
* word_count.arr[i] = 0 # <<<<<<<<<<<<<<
@@ -33391,7 +33917,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
(__pyx_v_word_count->arr[__pyx_v_i]) = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":52
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":52
* word_count.arr[i] = 0
*
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -33401,7 +33927,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":53
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":53
*
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i] # <<<<<<<<<<<<<<
@@ -33410,7 +33936,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_a_i = (__pyx_v_self->darray->data->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":54
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":54
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i]
* self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i # <<<<<<<<<<<<<<
@@ -33419,7 +33945,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
(__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":55
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":55
* a_i = self.darray.data.arr[i]
* self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i
* isa.arr[i] = self.ha.arr[a_i + 1] - 1 # bucket pointer is last index in bucket # <<<<<<<<<<<<<<
@@ -33428,7 +33954,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
(__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":56
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":56
* self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i
* isa.arr[i] = self.ha.arr[a_i + 1] - 1 # bucket pointer is last index in bucket
* word_count.arr[a_i] = word_count.arr[a_i] + 1 # <<<<<<<<<<<<<<
@@ -33438,7 +33964,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
(__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":59
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":59
*
* '''Determine size of initial runs'''
* current_run = 0 # <<<<<<<<<<<<<<
@@ -33447,7 +33973,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_current_run = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":60
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":60
* '''Determine size of initial runs'''
* current_run = 0
* for i from 0 <= i < V+1: # <<<<<<<<<<<<<<
@@ -33457,7 +33983,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":61
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":61
* current_run = 0
* for i from 0 <= i < V+1:
* if i < V and self.ha.arr[i+1] - self.ha.arr[i] == 1: # <<<<<<<<<<<<<<
@@ -33473,7 +33999,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":62
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":62
* for i from 0 <= i < V+1:
* if i < V and self.ha.arr[i+1] - self.ha.arr[i] == 1:
* current_run = current_run + 1 # <<<<<<<<<<<<<<
@@ -33485,7 +34011,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":64
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":64
* current_run = current_run + 1
* else:
* if current_run > 0: # <<<<<<<<<<<<<<
@@ -33495,7 +34021,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_8 = (__pyx_v_current_run > 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":65
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":65
* else:
* if current_run > 0:
* self.sa.arr[self.ha.arr[i] - current_run] = -current_run # <<<<<<<<<<<<<<
@@ -33504,7 +34030,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
(__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":66
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":66
* if current_run > 0:
* self.sa.arr[self.ha.arr[i] - current_run] = -current_run
* current_run = 0 # <<<<<<<<<<<<<<
@@ -33519,7 +34045,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_L11:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":68
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":68
* current_run = 0
*
* logger.info(" Bucket sort took %f seconds", (monitor_cpu() - sort_start_time)) # <<<<<<<<<<<<<<
@@ -33547,7 +34073,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":71
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":71
*
* '''Step 2: prefix-doubling sort'''
* h = 1 # <<<<<<<<<<<<<<
@@ -33556,7 +34082,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_h = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":72
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":72
* '''Step 2: prefix-doubling sort'''
* h = 1
* while self.sa.arr[0] != -N: # <<<<<<<<<<<<<<
@@ -33567,7 +34093,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":73
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":73
* h = 1
* while self.sa.arr[0] != -N:
* sort_start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -33576,7 +34102,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_sort_start_time = __pyx_f_3_sa_monitor_cpu();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":74
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":74
* while self.sa.arr[0] != -N:
* sort_start_time = monitor_cpu()
* logger.debug(" Refining, sort depth = %d", h) # <<<<<<<<<<<<<<
@@ -33604,7 +34130,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":75
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":75
* sort_start_time = monitor_cpu()
* logger.debug(" Refining, sort depth = %d", h)
* i = 0 # <<<<<<<<<<<<<<
@@ -33613,7 +34139,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_i = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":76
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":76
* logger.debug(" Refining, sort depth = %d", h)
* i = 0
* skip = 0 # <<<<<<<<<<<<<<
@@ -33622,7 +34148,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_skip = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":77
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":77
* i = 0
* skip = 0
* while i < N: # <<<<<<<<<<<<<<
@@ -33633,7 +34159,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_8 = (__pyx_v_i < __pyx_v_N);
if (!__pyx_t_8) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":78
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":78
* skip = 0
* while i < N:
* if self.sa.arr[i] < 0: # <<<<<<<<<<<<<<
@@ -33643,7 +34169,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":79
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":79
* while i < N:
* if self.sa.arr[i] < 0:
* skip = skip + self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -33652,7 +34178,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_skip = (__pyx_v_skip + (__pyx_v_self->sa->arr[__pyx_v_i]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":80
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":80
* if self.sa.arr[i] < 0:
* skip = skip + self.sa.arr[i]
* i = i - self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -33664,7 +34190,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":82
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":82
* i = i - self.sa.arr[i]
* else:
* if skip < 0: # <<<<<<<<<<<<<<
@@ -33674,7 +34200,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_8 = (__pyx_v_skip < 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":83
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":83
* else:
* if skip < 0:
* self.sa.arr[i+skip] = skip # <<<<<<<<<<<<<<
@@ -33683,7 +34209,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
(__pyx_v_self->sa->arr[(__pyx_v_i + __pyx_v_skip)]) = __pyx_v_skip;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":84
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":84
* if skip < 0:
* self.sa.arr[i+skip] = skip
* skip = 0 # <<<<<<<<<<<<<<
@@ -33695,7 +34221,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
}
__pyx_L18:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":85
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":85
* self.sa.arr[i+skip] = skip
* skip = 0
* j = isa.arr[self.sa.arr[i]] # <<<<<<<<<<<<<<
@@ -33704,7 +34230,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__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":86
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":86
* skip = 0
* j = isa.arr[self.sa.arr[i]]
* self.q3sort(i, j, h, isa) # <<<<<<<<<<<<<<
@@ -33739,7 +34265,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":87
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":87
* j = isa.arr[self.sa.arr[i]]
* self.q3sort(i, j, h, isa)
* i = j+1 # <<<<<<<<<<<<<<
@@ -33751,7 +34277,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_L17:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":88
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":88
* self.q3sort(i, j, h, isa)
* i = j+1
* if skip < 0: # <<<<<<<<<<<<<<
@@ -33761,7 +34287,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_8 = (__pyx_v_skip < 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":89
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":89
* i = j+1
* if skip < 0:
* self.sa.arr[i+skip] = skip # <<<<<<<<<<<<<<
@@ -33773,7 +34299,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
}
__pyx_L19:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":90
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":90
* if skip < 0:
* self.sa.arr[i+skip] = skip
* h = h * 2 # <<<<<<<<<<<<<<
@@ -33782,7 +34308,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_h = (__pyx_v_h * 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":91
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":91
* self.sa.arr[i+skip] = skip
* h = h * 2
* logger.debug(" Refinement took %f seconds", (monitor_cpu() - sort_start_time)) # <<<<<<<<<<<<<<
@@ -33811,7 +34337,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":94
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":94
*
* '''Step 3: read off suffix array from inverse suffix array'''
* logger.info(" Finalizing sort...") # <<<<<<<<<<<<<<
@@ -33828,7 +34354,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":95
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":95
* '''Step 3: read off suffix array from inverse suffix array'''
* logger.info(" Finalizing sort...")
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -33838,7 +34364,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__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":96
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":96
* logger.info(" Finalizing sort...")
* for i from 0 <= i < N:
* j = isa.arr[i] # <<<<<<<<<<<<<<
@@ -33847,7 +34373,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
*/
__pyx_v_j = (__pyx_v_isa->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":97
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":97
* for i from 0 <= i < N:
* j = isa.arr[i]
* self.sa.arr[j] = i # <<<<<<<<<<<<<<
@@ -33857,7 +34383,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
(__pyx_v_self->sa->arr[__pyx_v_j]) = __pyx_v_i;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":98
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":98
* j = isa.arr[i]
* self.sa.arr[j] = i
* logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time)) # <<<<<<<<<<<<<<
@@ -33995,7 +34521,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_7q3sort(PyObject *__pyx_v_self, PyO
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":100
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":100
* logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time))
*
* def q3sort(self, int i, int j, int h, IntList isa, pad=""): # <<<<<<<<<<<<<<
@@ -34025,7 +34551,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("q3sort", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":107
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":107
* cdef int k, midpoint, pval, phead, ptail, tmp
*
* if j-i < -1: # <<<<<<<<<<<<<<
@@ -34035,7 +34561,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__pyx_t_1 = ((__pyx_v_j - __pyx_v_i) < -1);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":108
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":108
*
* if j-i < -1:
* raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j)) # <<<<<<<<<<<<<<
@@ -34072,7 +34598,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":109
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":109
* if j-i < -1:
* raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j))
* if j-i == -1: # recursive base case -- empty interval # <<<<<<<<<<<<<<
@@ -34082,7 +34608,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__pyx_t_1 = ((__pyx_v_j - __pyx_v_i) == -1);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":110
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":110
* raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j))
* if j-i == -1: # recursive base case -- empty interval
* return # <<<<<<<<<<<<<<
@@ -34096,7 +34622,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":111
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":111
* if j-i == -1: # recursive base case -- empty interval
* return
* if (j-i == 0): # recursive base case -- singleton interval # <<<<<<<<<<<<<<
@@ -34106,7 +34632,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__pyx_t_1 = ((__pyx_v_j - __pyx_v_i) == 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":112
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":112
* return
* if (j-i == 0): # recursive base case -- singleton interval
* isa.arr[self.sa.arr[i]] = i # <<<<<<<<<<<<<<
@@ -34115,7 +34641,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
(__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":113
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":113
* if (j-i == 0): # recursive base case -- singleton interval
* isa.arr[self.sa.arr[i]] = i
* self.sa.arr[i] = -1 # <<<<<<<<<<<<<<
@@ -34124,7 +34650,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
(__pyx_v_self->sa->arr[__pyx_v_i]) = -1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":114
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":114
* isa.arr[self.sa.arr[i]] = i
* self.sa.arr[i] = -1
* return # <<<<<<<<<<<<<<
@@ -34138,7 +34664,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":123
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":123
* # If the method of assigning word_id's is changed, this method
* # may need to be reconsidered as well.
* midpoint = (i+j)/2 # <<<<<<<<<<<<<<
@@ -34147,7 +34673,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
__pyx_v_midpoint = __Pyx_div_long((__pyx_v_i + __pyx_v_j), 2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":124
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":124
* # may need to be reconsidered as well.
* midpoint = (i+j)/2
* pval = isa.arr[self.sa.arr[midpoint] + h] # <<<<<<<<<<<<<<
@@ -34156,7 +34682,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
__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":125
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":125
* midpoint = (i+j)/2
* pval = isa.arr[self.sa.arr[midpoint] + h]
* if i != midpoint: # <<<<<<<<<<<<<<
@@ -34166,7 +34692,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__pyx_t_1 = (__pyx_v_i != __pyx_v_midpoint);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":126
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":126
* pval = isa.arr[self.sa.arr[midpoint] + h]
* if i != midpoint:
* tmp = self.sa.arr[midpoint] # <<<<<<<<<<<<<<
@@ -34175,7 +34701,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
__pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_midpoint]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":127
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":127
* if i != midpoint:
* tmp = self.sa.arr[midpoint]
* self.sa.arr[midpoint] = self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -34184,7 +34710,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
(__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":128
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":128
* tmp = self.sa.arr[midpoint]
* self.sa.arr[midpoint] = self.sa.arr[i]
* self.sa.arr[i] = tmp # <<<<<<<<<<<<<<
@@ -34196,7 +34722,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":129
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":129
* self.sa.arr[midpoint] = self.sa.arr[i]
* self.sa.arr[i] = tmp
* phead = i # <<<<<<<<<<<<<<
@@ -34205,7 +34731,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
__pyx_v_phead = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":130
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":130
* self.sa.arr[i] = tmp
* phead = i
* ptail = i # <<<<<<<<<<<<<<
@@ -34214,7 +34740,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
__pyx_v_ptail = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":134
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":134
* # find the three partitions. phead marks the first element
* # of the middle partition, and ptail marks the last element
* for k from i+1 <= k < j+1: # <<<<<<<<<<<<<<
@@ -34224,7 +34750,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__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":135
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":135
* # of the middle partition, and ptail marks the last element
* for k from i+1 <= k < j+1:
* if isa.arr[self.sa.arr[k] + h] < pval: # <<<<<<<<<<<<<<
@@ -34234,7 +34760,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__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":136
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":136
* for k from i+1 <= k < j+1:
* if isa.arr[self.sa.arr[k] + h] < pval:
* if k > ptail+1: # <<<<<<<<<<<<<<
@@ -34244,7 +34770,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__pyx_t_1 = (__pyx_v_k > (__pyx_v_ptail + 1));
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":137
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":137
* if isa.arr[self.sa.arr[k] + h] < pval:
* if k > ptail+1:
* tmp = self.sa.arr[phead] # <<<<<<<<<<<<<<
@@ -34253,7 +34779,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
__pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_phead]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":138
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":138
* if k > ptail+1:
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k] # <<<<<<<<<<<<<<
@@ -34262,7 +34788,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
(__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":139
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":139
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = self.sa.arr[ptail+1] # <<<<<<<<<<<<<<
@@ -34271,7 +34797,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
(__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":140
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":140
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = self.sa.arr[ptail+1]
* self.sa.arr[ptail+1] = tmp # <<<<<<<<<<<<<<
@@ -34283,7 +34809,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":142
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":142
* self.sa.arr[ptail+1] = tmp
* else: # k == ptail+1
* tmp = self.sa.arr[phead] # <<<<<<<<<<<<<<
@@ -34292,7 +34818,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
__pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_phead]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":143
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":143
* else: # k == ptail+1
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k] # <<<<<<<<<<<<<<
@@ -34301,7 +34827,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
(__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":144
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":144
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = tmp # <<<<<<<<<<<<<<
@@ -34312,7 +34838,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
}
__pyx_L10:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":145
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":145
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = tmp
* phead = phead + 1 # <<<<<<<<<<<<<<
@@ -34321,7 +34847,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
__pyx_v_phead = (__pyx_v_phead + 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":146
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":146
* self.sa.arr[k] = tmp
* phead = phead + 1
* ptail = ptail + 1 # <<<<<<<<<<<<<<
@@ -34333,7 +34859,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":148
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":148
* ptail = ptail + 1
* else:
* if isa.arr[self.sa.arr[k] + h] == pval: # <<<<<<<<<<<<<<
@@ -34343,7 +34869,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__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":149
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":149
* else:
* if isa.arr[self.sa.arr[k] + h] == pval:
* if k > ptail+1: # <<<<<<<<<<<<<<
@@ -34353,7 +34879,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__pyx_t_1 = (__pyx_v_k > (__pyx_v_ptail + 1));
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":150
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":150
* if isa.arr[self.sa.arr[k] + h] == pval:
* if k > ptail+1:
* tmp = self.sa.arr[ptail+1] # <<<<<<<<<<<<<<
@@ -34362,7 +34888,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
__pyx_v_tmp = (__pyx_v_self->sa->arr[(__pyx_v_ptail + 1)]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":151
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":151
* if k > ptail+1:
* tmp = self.sa.arr[ptail+1]
* self.sa.arr[ptail+1] = self.sa.arr[k] # <<<<<<<<<<<<<<
@@ -34371,7 +34897,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
*/
(__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":152
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":152
* tmp = self.sa.arr[ptail+1]
* self.sa.arr[ptail+1] = self.sa.arr[k]
* self.sa.arr[k] = tmp # <<<<<<<<<<<<<<
@@ -34383,7 +34909,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":153
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":153
* self.sa.arr[ptail+1] = self.sa.arr[k]
* self.sa.arr[k] = tmp
* ptail = ptail + 1 # <<<<<<<<<<<<<<
@@ -34398,7 +34924,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__pyx_L9:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":156
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":156
*
* # recursively sort smaller suffixes
* self.q3sort(i, phead-1, h, isa, pad+" ") # <<<<<<<<<<<<<<
@@ -34438,7 +34964,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__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":160
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":160
* # update suffixes with pivot value
* # corresponds to update_group function in Larsson & Sadakane
* for k from phead <= k < ptail+1: # <<<<<<<<<<<<<<
@@ -34448,7 +34974,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__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":161
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":161
* # corresponds to update_group function in Larsson & Sadakane
* for k from phead <= k < ptail+1:
* isa.arr[self.sa.arr[k]] = ptail # <<<<<<<<<<<<<<
@@ -34458,7 +34984,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
(__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":162
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":162
* for k from phead <= k < ptail+1:
* isa.arr[self.sa.arr[k]] = ptail
* if phead == ptail: # <<<<<<<<<<<<<<
@@ -34468,7 +34994,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__pyx_t_1 = (__pyx_v_phead == __pyx_v_ptail);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":163
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":163
* isa.arr[self.sa.arr[k]] = ptail
* if phead == ptail:
* self.sa.arr[phead] = -1 # <<<<<<<<<<<<<<
@@ -34480,7 +35006,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":166
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":166
*
* # recursively sort larger suffixes
* self.q3sort(ptail+1, j, h, isa, pad+" ") # <<<<<<<<<<<<<<
@@ -34558,7 +35084,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_9write_text(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":169
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":169
*
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -34577,7 +35103,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_8write_text(struct __pyx_obj_3_sa_S
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_text", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":170
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":170
*
* def write_text(self, char* filename):
* self.darray.write_text(filename) # <<<<<<<<<<<<<<
@@ -34634,7 +35160,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_11read_binary(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":172
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":172
* self.darray.write_text(filename)
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -34648,7 +35174,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_binary(struct __pyx_obj_3_sa
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":174
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":174
* def read_binary(self, char* filename):
* cdef FILE *f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -34657,7 +35183,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_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":175
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":175
* cdef FILE *f
* f = fopen(filename, "r")
* self.darray.read_handle(f) # <<<<<<<<<<<<<<
@@ -34666,7 +35192,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_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":176
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":176
* f = fopen(filename, "r")
* self.darray.read_handle(f)
* self.sa.read_handle(f) # <<<<<<<<<<<<<<
@@ -34675,7 +35201,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_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":177
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":177
* self.darray.read_handle(f)
* self.sa.read_handle(f)
* self.ha.read_handle(f) # <<<<<<<<<<<<<<
@@ -34684,7 +35210,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_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":178
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":178
* self.sa.read_handle(f)
* self.ha.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -34720,7 +35246,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_13write_binary(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":180
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":180
* fclose(f)
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -34734,7 +35260,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12write_binary(struct __pyx_obj_3_s
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":182
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":182
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -34743,7 +35269,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12write_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":183
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":183
* cdef FILE* f
* f = fopen(filename, "w")
* self.darray.write_handle(f) # <<<<<<<<<<<<<<
@@ -34752,7 +35278,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12write_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":184
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":184
* f = fopen(filename, "w")
* self.darray.write_handle(f)
* self.sa.write_handle(f) # <<<<<<<<<<<<<<
@@ -34761,7 +35287,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12write_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":185
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":185
* self.darray.write_handle(f)
* self.sa.write_handle(f)
* self.ha.write_handle(f) # <<<<<<<<<<<<<<
@@ -34770,7 +35296,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12write_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":186
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":186
* self.sa.write_handle(f)
* self.ha.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -34806,7 +35332,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_15write_enhanced(PyObject *__pyx_v_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":188
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":188
* fclose(f)
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -34838,7 +35364,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_3
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_enhanced", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":189
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":189
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -34878,7 +35404,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_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":190
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":190
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* self.darray.write_enhanced_handle(f) # <<<<<<<<<<<<<<
@@ -34898,7 +35424,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_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":191
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":191
* with open(filename, "w") as f:
* self.darray.write_enhanced_handle(f)
* for a_i in self.sa: # <<<<<<<<<<<<<<
@@ -34943,7 +35469,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_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":192
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":192
* self.darray.write_enhanced_handle(f)
* for a_i in self.sa:
* f.write("%d " % a_i) # <<<<<<<<<<<<<<
@@ -34967,7 +35493,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_3
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":193
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":193
* for a_i in self.sa:
* f.write("%d " % a_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -34981,7 +35507,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_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":194
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":194
* f.write("%d " % a_i)
* f.write("\n")
* for w_i in self.ha: # <<<<<<<<<<<<<<
@@ -35026,7 +35552,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_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":195
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":195
* f.write("\n")
* for w_i in self.ha:
* f.write("%d " % w_i) # <<<<<<<<<<<<<<
@@ -35050,7 +35576,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_3
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":196
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":196
* for w_i in self.ha:
* f.write("%d " % w_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -35074,7 +35600,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_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":189
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":189
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -35172,7 +35698,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_3
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":198
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":198
* f.write("\n")
*
* cdef int __search_high(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -35187,7 +35713,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":201
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":201
* cdef int midpoint
*
* if low >= high: # <<<<<<<<<<<<<<
@@ -35197,7 +35723,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":202
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":202
*
* if low >= high:
* return high # <<<<<<<<<<<<<<
@@ -35210,7 +35736,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":203
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":203
* if low >= high:
* return high
* midpoint = (high + low) / 2 # <<<<<<<<<<<<<<
@@ -35219,7 +35745,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":204
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":204
* return high
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<<
@@ -35229,7 +35755,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":205
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":205
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id:
* return self.__search_high(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<<
@@ -35242,7 +35768,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":207
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":207
* return self.__search_high(word_id, offset, midpoint+1, high)
* else:
* return self.__search_high(word_id, offset, low, midpoint) # <<<<<<<<<<<<<<
@@ -35260,7 +35786,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":209
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":209
* return self.__search_high(word_id, offset, low, midpoint)
*
* cdef int __search_low(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -35275,7 +35801,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":212
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":212
* cdef int midpoint
*
* if low >= high: # <<<<<<<<<<<<<<
@@ -35285,7 +35811,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":213
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":213
*
* if low >= high:
* return high # <<<<<<<<<<<<<<
@@ -35298,7 +35824,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":214
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":214
* if low >= high:
* return high
* midpoint = (high + low) / 2 # <<<<<<<<<<<<<<
@@ -35307,7 +35833,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":215
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":215
* return high
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<<
@@ -35317,7 +35843,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":216
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":216
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id:
* return self.__search_low(word_id, offset, low, midpoint) # <<<<<<<<<<<<<<
@@ -35330,7 +35856,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":218
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":218
* return self.__search_low(word_id, offset, low, midpoint)
* else:
* return self.__search_low(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<<
@@ -35348,7 +35874,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":220
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":220
* return self.__search_low(word_id, offset, midpoint+1, high)
*
* cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): # <<<<<<<<<<<<<<
@@ -35367,7 +35893,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":221
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":221
*
* cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint):
* return (self.__search_low(word_id, offset, low, midpoint), # <<<<<<<<<<<<<<
@@ -35378,7 +35904,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 = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":222
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":222
* cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint):
* return (self.__search_low(word_id, offset, low, midpoint),
* self.__search_high(word_id, offset, midpoint, high)) # <<<<<<<<<<<<<<
@@ -35413,7 +35939,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":224
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":224
* self.__search_high(word_id, offset, midpoint, high))
*
* cdef __lookup_helper(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -35434,7 +35960,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":227
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":227
* cdef int midpoint
*
* if offset == 0: # <<<<<<<<<<<<<<
@@ -35444,7 +35970,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":228
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":228
*
* if offset == 0:
* return (self.ha.arr[word_id], self.ha.arr[word_id+1]) # <<<<<<<<<<<<<<
@@ -35471,7 +35997,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":229
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":229
* if offset == 0:
* return (self.ha.arr[word_id], self.ha.arr[word_id+1])
* if low >= high: # <<<<<<<<<<<<<<
@@ -35481,7 +36007,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":230
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":230
* return (self.ha.arr[word_id], self.ha.arr[word_id+1])
* if low >= high:
* return None # <<<<<<<<<<<<<<
@@ -35496,7 +36022,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":232
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":232
* return None
*
* midpoint = (high + low) / 2 # <<<<<<<<<<<<<<
@@ -35505,7 +36031,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":233
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":233
*
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<<
@@ -35515,7 +36041,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":234
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":234
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id:
* return self.__get_range(word_id, offset, low, high, midpoint) # <<<<<<<<<<<<<<
@@ -35532,7 +36058,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":235
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":235
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id:
* return self.__get_range(word_id, offset, low, high, midpoint)
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] > word_id: # <<<<<<<<<<<<<<
@@ -35542,7 +36068,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":236
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":236
* return self.__get_range(word_id, offset, low, high, midpoint)
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] > word_id:
* return self.__lookup_helper(word_id, offset, low, midpoint) # <<<<<<<<<<<<<<
@@ -35559,7 +36085,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":238
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":238
* return self.__lookup_helper(word_id, offset, low, midpoint)
* else:
* return self.__lookup_helper(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<<
@@ -35663,7 +36189,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_17lookup(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":240
+/* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":240
* return self.__lookup_helper(word_id, offset, midpoint+1, high)
*
* def lookup(self, word, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -35684,7 +36210,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("lookup", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":242
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":242
* def lookup(self, word, int offset, int low, int high):
* cdef int wordid
* if low == -1: # <<<<<<<<<<<<<<
@@ -35694,7 +36220,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(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":243
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":243
* cdef int wordid
* if low == -1:
* low = 0 # <<<<<<<<<<<<<<
@@ -35706,7 +36232,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":244
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":244
* if low == -1:
* low = 0
* if high == -1: # <<<<<<<<<<<<<<
@@ -35716,7 +36242,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(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":245
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":245
* low = 0
* if high == -1:
* high = len(self.sa) # <<<<<<<<<<<<<<
@@ -35732,7 +36258,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":246
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":246
* if high == -1:
* high = len(self.sa)
* if word in self.darray.word2id: # <<<<<<<<<<<<<<
@@ -35742,7 +36268,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_word, __pyx_v_self->darray->word2id, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":247
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":247
* high = len(self.sa)
* if word in self.darray.word2id:
* word_id = self.darray.word2id[word] # <<<<<<<<<<<<<<
@@ -35754,7 +36280,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(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":248
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":248
* if word in self.darray.word2id:
* word_id = self.darray.word2id[word]
* return self.__lookup_helper(word_id, offset, low, high) # <<<<<<<<<<<<<<
@@ -35772,7 +36298,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":250
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":250
* return self.__lookup_helper(word_id, offset, low, high)
* else:
* return None # <<<<<<<<<<<<<<
@@ -35811,7 +36337,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":39
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":39
* cdef public children
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -35828,7 +36354,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":40
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":40
*
* def __cinit__(self):
* self.children = {} # <<<<<<<<<<<<<<
@@ -35865,7 +36391,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":37
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":37
*
* cdef class TrieNode:
* cdef public children # <<<<<<<<<<<<<<
@@ -35954,7 +36480,7 @@ static int __pyx_pw_3_sa_16ExtendedTrieNode_1__cinit__(PyObject *__pyx_v_self, P
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":47
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":47
* cdef public suffix_link
*
* def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): # <<<<<<<<<<<<<<
@@ -36026,7 +36552,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":48
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":48
*
* def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None):
* self.phrase = phrase # <<<<<<<<<<<<<<
@@ -36039,7 +36565,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":49
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":49
* def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None):
* self.phrase = phrase
* self.phrase_location = phrase_location # <<<<<<<<<<<<<<
@@ -36052,7 +36578,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":50
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":50
* self.phrase = phrase
* self.phrase_location = phrase_location
* self.suffix_link = suffix_link # <<<<<<<<<<<<<<
@@ -36081,7 +36607,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":43
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":43
*
* cdef class ExtendedTrieNode(TrieNode):
* cdef public phrase # <<<<<<<<<<<<<<
@@ -36168,7 +36694,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":44
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":44
* cdef class ExtendedTrieNode(TrieNode):
* cdef public phrase
* cdef public phrase_location # <<<<<<<<<<<<<<
@@ -36255,7 +36781,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":45
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":45
* cdef public phrase
* cdef public phrase_location
* cdef public suffix_link # <<<<<<<<<<<<<<
@@ -36383,7 +36909,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":57
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":57
* cdef public int count
* cdef public root
* def __cinit__(self, extended=False): # <<<<<<<<<<<<<<
@@ -36402,7 +36928,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":58
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":58
* cdef public root
* def __cinit__(self, extended=False):
* self.count = 0 # <<<<<<<<<<<<<<
@@ -36411,7 +36937,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":59
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":59
* def __cinit__(self, extended=False):
* self.count = 0
* self.extended = extended # <<<<<<<<<<<<<<
@@ -36421,7 +36947,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 = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->extended = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":60
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":60
* self.count = 0
* self.extended = extended
* if extended: # <<<<<<<<<<<<<<
@@ -36431,7 +36957,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 = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":61
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":61
* self.extended = extended
* if extended:
* self.root = ExtendedTrieNode() # <<<<<<<<<<<<<<
@@ -36449,7 +36975,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":63
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":63
* self.root = ExtendedTrieNode()
* else:
* self.root = TrieNode() # <<<<<<<<<<<<<<
@@ -36488,7 +37014,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":54
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":54
*
* cdef class TrieTable:
* cdef public int extended # <<<<<<<<<<<<<<
@@ -36566,7 +37092,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":55
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":55
* cdef class TrieTable:
* cdef public int extended
* cdef public int count # <<<<<<<<<<<<<<
@@ -36644,7 +37170,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":56
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":56
* cdef public int extended
* cdef public int count
* cdef public root # <<<<<<<<<<<<<<
@@ -36720,7 +37246,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":83
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":83
*
* # returns true if sent_id is contained
* cdef int contains(self, int sent_id): # <<<<<<<<<<<<<<
@@ -36733,7 +37259,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":84
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":84
* # returns true if sent_id is contained
* cdef int contains(self, int sent_id):
* return 1 # <<<<<<<<<<<<<<
@@ -36765,7 +37291,7 @@ static int __pyx_pw_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyO
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":87
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":87
*
* 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): # <<<<<<<<<<<<<<
@@ -36874,7 +37400,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":86
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":86
* return 1
*
* def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, # <<<<<<<<<<<<<<
@@ -36890,7 +37416,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":88
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":88
* 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 # <<<<<<<<<<<<<<
@@ -36899,7 +37425,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":89
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":89
* arr=None, int num_subpatterns=1):
* self.sa_low = sa_low
* self.sa_high = sa_high # <<<<<<<<<<<<<<
@@ -36908,7 +37434,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":90
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":90
* self.sa_low = sa_low
* self.sa_high = sa_high
* self.arr_low = arr_low # <<<<<<<<<<<<<<
@@ -36917,7 +37443,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":91
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":91
* self.sa_high = sa_high
* self.arr_low = arr_low
* self.arr_high = arr_high # <<<<<<<<<<<<<<
@@ -36926,7 +37452,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":92
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":92
* self.arr_low = arr_low
* self.arr_high = arr_high
* self.arr = arr # <<<<<<<<<<<<<<
@@ -36940,7 +37466,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":93
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":93
* self.arr_high = arr_high
* self.arr = arr
* self.num_subpatterns = num_subpatterns # <<<<<<<<<<<<<<
@@ -37020,7 +37546,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":103
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":103
* cdef IntList sa
*
* def __cinit__(self, int sample_size, SuffixArray fsarray): # <<<<<<<<<<<<<<
@@ -37040,7 +37566,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":104
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":104
*
* def __cinit__(self, int sample_size, SuffixArray fsarray):
* self.sample_size = sample_size # <<<<<<<<<<<<<<
@@ -37049,7 +37575,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":105
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":105
* def __cinit__(self, int sample_size, SuffixArray fsarray):
* self.sample_size = sample_size
* self.sa = fsarray.sa # <<<<<<<<<<<<<<
@@ -37062,7 +37588,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":106
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":106
* self.sample_size = sample_size
* self.sa = fsarray.sa
* if sample_size > 0: # <<<<<<<<<<<<<<
@@ -37072,7 +37598,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":107
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":107
* self.sa = fsarray.sa
* if sample_size > 0:
* logger.info("Sampling strategy: uniform, max sample size = %d", sample_size) # <<<<<<<<<<<<<<
@@ -37103,7 +37629,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":109
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":109
* logger.info("Sampling strategy: uniform, max sample size = %d", sample_size)
* else:
* logger.info("Sampling strategy: no sampling") # <<<<<<<<<<<<<<
@@ -37152,7 +37678,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":111
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":111
* logger.info("Sampling strategy: no sampling")
*
* def sample(self, PhraseLocation phrase_location): # <<<<<<<<<<<<<<
@@ -37179,7 +37705,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":124
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":124
* cdef int num_locations, val, j
*
* sample = IntList() # <<<<<<<<<<<<<<
@@ -37191,7 +37717,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":125
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":125
*
* sample = IntList()
* if phrase_location.arr is None: # <<<<<<<<<<<<<<
@@ -37201,7 +37727,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":126
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":126
* sample = IntList()
* if phrase_location.arr is None:
* num_locations = phrase_location.sa_high - phrase_location.sa_low # <<<<<<<<<<<<<<
@@ -37210,7 +37736,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":127
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":127
* 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: # <<<<<<<<<<<<<<
@@ -37226,7 +37752,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":128
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":128
* 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) # <<<<<<<<<<<<<<
@@ -37238,7 +37764,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/m/workspace/cdec/python/src/sa/rulefactory.pxi":130
* sample._extend_arr(self.sa.arr + phrase_location.sa_low, num_locations)
* else:
* stepsize = float(num_locations)/float(self.sample_size) # <<<<<<<<<<<<<<
@@ -37251,7 +37777,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/m/workspace/cdec/python/src/sa/rulefactory.pxi":131
* else:
* stepsize = float(num_locations)/float(self.sample_size)
* i = phrase_location.sa_low # <<<<<<<<<<<<<<
@@ -37260,7 +37786,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":132
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":132
* 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: # <<<<<<<<<<<<<<
@@ -37277,7 +37803,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":135
+ /* "/home/m/workspace/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: # <<<<<<<<<<<<<<
@@ -37287,7 +37813,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":136
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":136
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5:
* val = int(ceil(i)) # <<<<<<<<<<<<<<
@@ -37299,7 +37825,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/m/workspace/cdec/python/src/sa/rulefactory.pxi":138
* val = int(ceil(i))
* else:
* val = int(floor(i)) # <<<<<<<<<<<<<<
@@ -37310,7 +37836,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":139
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":139
* else:
* val = int(floor(i))
* sample._append(self.sa.arr[val]) # <<<<<<<<<<<<<<
@@ -37319,7 +37845,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":140
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":140
* val = int(floor(i))
* sample._append(self.sa.arr[val])
* i = i + stepsize # <<<<<<<<<<<<<<
@@ -37334,7 +37860,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":142
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":142
* i = i + stepsize
* else:
* num_locations = (phrase_location.arr_high - phrase_location.arr_low) / phrase_location.num_subpatterns # <<<<<<<<<<<<<<
@@ -37352,7 +37878,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":143
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":143
* 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: # <<<<<<<<<<<<<<
@@ -37368,7 +37894,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":144
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":144
* 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 # <<<<<<<<<<<<<<
@@ -37382,7 +37908,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":146
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":146
* sample = phrase_location.arr
* else:
* stepsize = float(num_locations)/float(self.sample_size) # <<<<<<<<<<<<<<
@@ -37395,7 +37921,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":147
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":147
* else:
* stepsize = float(num_locations)/float(self.sample_size)
* i = phrase_location.arr_low # <<<<<<<<<<<<<<
@@ -37404,7 +37930,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":148
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":148
* 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: # <<<<<<<<<<<<<<
@@ -37421,7 +37947,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":151
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":151
* '''Note: int(i) not guaranteed to have the desired
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5: # <<<<<<<<<<<<<<
@@ -37431,7 +37957,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":152
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":152
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5:
* val = int(ceil(i)) # <<<<<<<<<<<<<<
@@ -37443,7 +37969,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":154
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":154
* val = int(ceil(i))
* else:
* val = int(floor(i)) # <<<<<<<<<<<<<<
@@ -37454,7 +37980,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":155
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":155
* else:
* val = int(floor(i))
* j = phrase_location.arr_low + (val*phrase_location.num_subpatterns) # <<<<<<<<<<<<<<
@@ -37463,7 +37989,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":156
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":156
* 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) # <<<<<<<<<<<<<<
@@ -37472,7 +37998,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":157
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":157
* 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 # <<<<<<<<<<<<<<
@@ -37486,7 +38012,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":158
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":158
* sample._extend_arr(phrase_location.arr.arr + j, phrase_location.num_subpatterns)
* i = i + stepsize
* return sample # <<<<<<<<<<<<<<
@@ -37511,7 +38037,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":170
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":170
*
*
* cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): # <<<<<<<<<<<<<<
@@ -37523,7 +38049,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":171
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":171
*
* cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr):
* m.arr = arr # <<<<<<<<<<<<<<
@@ -37532,7 +38058,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":172
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":172
* cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr):
* m.arr = arr
* m.start = start # <<<<<<<<<<<<<<
@@ -37541,7 +38067,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":173
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":173
* m.arr = arr
* m.start = start
* m.end = start + step # <<<<<<<<<<<<<<
@@ -37550,7 +38076,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":174
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":174
* m.start = start
* m.end = start + step
* m.sent_id = sent_id_arr[arr[start]] # <<<<<<<<<<<<<<
@@ -37559,7 +38085,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":175
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":175
* m.end = start + step
* m.sent_id = sent_id_arr[arr[start]]
* m.size = step # <<<<<<<<<<<<<<
@@ -37571,7 +38097,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":178
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":178
*
*
* cdef int* append_combined_matching(int* arr, Matching* loc1, Matching* loc2, # <<<<<<<<<<<<<<
@@ -37588,7 +38114,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":182
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":182
* cdef int i, new_len
*
* new_len = result_len[0] + num_subpatterns # <<<<<<<<<<<<<<
@@ -37597,7 +38123,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":183
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":183
*
* new_len = result_len[0] + num_subpatterns
* arr = <int*> realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -37606,7 +38132,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":185
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":185
* arr = <int*> realloc(arr, new_len*sizeof(int))
*
* for i from 0 <= i < loc1.size: # <<<<<<<<<<<<<<
@@ -37616,7 +38142,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":186
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":186
*
* for i from 0 <= i < loc1.size:
* arr[result_len[0]+i] = loc1.arr[loc1.start+i] # <<<<<<<<<<<<<<
@@ -37626,7 +38152,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":187
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":187
* for i from 0 <= i < loc1.size:
* arr[result_len[0]+i] = loc1.arr[loc1.start+i]
* if num_subpatterns > loc1.size: # <<<<<<<<<<<<<<
@@ -37636,7 +38162,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":188
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":188
* arr[result_len[0]+i] = loc1.arr[loc1.start+i]
* if num_subpatterns > loc1.size:
* arr[new_len-1] = loc2.arr[loc2.end-1] # <<<<<<<<<<<<<<
@@ -37648,7 +38174,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":189
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":189
* if num_subpatterns > loc1.size:
* arr[new_len-1] = loc2.arr[loc2.end-1]
* result_len[0] = new_len # <<<<<<<<<<<<<<
@@ -37657,7 +38183,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":190
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":190
* arr[new_len-1] = loc2.arr[loc2.end-1]
* result_len[0] = new_len
* return arr # <<<<<<<<<<<<<<
@@ -37673,7 +38199,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":193
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":193
*
*
* cdef int* extend_arr(int* arr, int* arr_len, int* appendix, int appendix_len): # <<<<<<<<<<<<<<
@@ -37687,7 +38213,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":196
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":196
* cdef int new_len
*
* new_len = arr_len[0] + appendix_len # <<<<<<<<<<<<<<
@@ -37696,7 +38222,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":197
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":197
*
* new_len = arr_len[0] + appendix_len
* arr = <int*> realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -37705,7 +38231,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":198
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":198
* 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)) # <<<<<<<<<<<<<<
@@ -37714,7 +38240,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":199
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":199
* arr = <int*> realloc(arr, new_len*sizeof(int))
* memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int))
* arr_len[0] = new_len # <<<<<<<<<<<<<<
@@ -37723,7 +38249,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":200
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":200
* memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int))
* arr_len[0] = new_len
* return arr # <<<<<<<<<<<<<<
@@ -37739,7 +38265,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":202
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":202
* return arr
*
* cdef int median(int low, int high, int step): # <<<<<<<<<<<<<<
@@ -37756,7 +38282,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":203
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":203
*
* cdef int median(int low, int high, int step):
* return low + (((high - low)/step)/2)*step # <<<<<<<<<<<<<<
@@ -37785,7 +38311,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":206
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":206
*
*
* cdef void find_comparable_matchings(int low, int high, int* arr, int step, int loc, int* loc_minus, int* loc_plus): # <<<<<<<<<<<<<<
@@ -37800,7 +38326,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":210
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":210
* # in which all matchings have the same first index as the one
* # starting at loc
* loc_plus[0] = loc + step # <<<<<<<<<<<<<<
@@ -37809,7 +38335,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":211
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":211
* # starting at loc
* loc_plus[0] = loc + step
* while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]: # <<<<<<<<<<<<<<
@@ -37826,7 +38352,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":212
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":212
* loc_plus[0] = loc + step
* while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]:
* loc_plus[0] = loc_plus[0] + step # <<<<<<<<<<<<<<
@@ -37836,7 +38362,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":213
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":213
* while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]:
* loc_plus[0] = loc_plus[0] + step
* loc_minus[0] = loc # <<<<<<<<<<<<<<
@@ -37845,7 +38371,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":214
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":214
* 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]: # <<<<<<<<<<<<<<
@@ -37862,7 +38388,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":215
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":215
* 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 # <<<<<<<<<<<<<<
@@ -37906,7 +38432,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
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_103,&__pyx_n_s_104,&__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":275
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":275
* 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, # <<<<<<<<<<<<<<
@@ -37915,7 +38441,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":283
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":283
* 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, # <<<<<<<<<<<<<<
@@ -37924,7 +38450,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":285
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":285
* 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, # <<<<<<<<<<<<<<
@@ -37933,7 +38459,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":289
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":289
* unsigned min_gap_size=2,
* # filename of file containing precomputed collocations
* precompute_file=None, # <<<<<<<<<<<<<<
@@ -38110,7 +38636,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 = 271; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":271
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":271
* Alignment alignment,
* # parameter for double-binary search; doesn't seem to matter much
* float by_slack_factor=1.0, # <<<<<<<<<<<<<<
@@ -38162,7 +38688,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 = 295; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":295
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":295
* unsigned precompute_rank=100,
* # require extracted rules to have at least one aligned word
* bint require_aligned_terminal=True, # <<<<<<<<<<<<<<
@@ -38175,7 +38701,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 = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":297
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":297
* bint require_aligned_terminal=True,
* # require each contiguous chunk of extracted rules to have at least one aligned word
* bint require_aligned_chunks=False, # <<<<<<<<<<<<<<
@@ -38198,7 +38724,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 = 303; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":303
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":303
* unsigned train_min_gap_size=2,
* # False if phrases should be loose (better but slower), True otherwise
* bint tight_phrases=True, # <<<<<<<<<<<<<<
@@ -38211,7 +38737,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 = 305; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":305
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":305
* bint tight_phrases=True,
* # True to require use of double-binary alg, false otherwise
* bint use_baeza_yates=True, # <<<<<<<<<<<<<<
@@ -38224,7 +38750,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 = 307; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":307
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":307
* bint use_baeza_yates=True,
* # True to enable used of precomputed collocations
* bint use_collocations=True, # <<<<<<<<<<<<<<
@@ -38237,7 +38763,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 = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":309
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":309
* bint use_collocations=True,
* # True to enable use of precomputed inverted indices
* bint use_index=True): # <<<<<<<<<<<<<<
@@ -38265,7 +38791,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":267
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":267
* cdef IntList findexes1
*
* def __cinit__(self, # <<<<<<<<<<<<<<
@@ -38285,7 +38811,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":315
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":315
* 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 # <<<<<<<<<<<<<<
@@ -38308,7 +38834,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":316
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":316
* them to be the same, therefore we don't either.'''
* self.rules = TrieTable(True) # cache
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) # <<<<<<<<<<<<<<
@@ -38330,7 +38856,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":317
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":317
* self.rules = TrieTable(True) # cache
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
* if alignment is None: # <<<<<<<<<<<<<<
@@ -38340,7 +38866,7 @@ 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":318
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":318
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
* if alignment is None:
* raise Exception("Must specify an alignment object") # <<<<<<<<<<<<<<
@@ -38356,7 +38882,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":319
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":319
* if alignment is None:
* raise Exception("Must specify an alignment object")
* self.alignment = alignment # <<<<<<<<<<<<<<
@@ -38369,7 +38895,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":323
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":323
* # grammar parameters and settings
* # NOTE: setting max_nonterminals > 2 is not currently supported in Hiero
* self.max_length = max_length # <<<<<<<<<<<<<<
@@ -38378,7 +38904,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":324
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":324
* # NOTE: setting max_nonterminals > 2 is not currently supported in Hiero
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals # <<<<<<<<<<<<<<
@@ -38387,7 +38913,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":325
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":325
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals
* self.max_initial_size = max_initial_size # <<<<<<<<<<<<<<
@@ -38396,7 +38922,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":326
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":326
* self.max_nonterminals = max_nonterminals
* self.max_initial_size = max_initial_size
* self.train_max_initial_size = train_max_initial_size # <<<<<<<<<<<<<<
@@ -38405,7 +38931,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":327
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":327
* self.max_initial_size = max_initial_size
* self.train_max_initial_size = train_max_initial_size
* self.min_gap_size = min_gap_size # <<<<<<<<<<<<<<
@@ -38414,7 +38940,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":328
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":328
* 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 # <<<<<<<<<<<<<<
@@ -38423,7 +38949,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":329
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":329
* self.min_gap_size = min_gap_size
* self.train_min_gap_size = train_min_gap_size
* self.category = sym_fromstring(category, False) # <<<<<<<<<<<<<<
@@ -38432,7 +38958,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->category = __pyx_f_3_sa_sym_fromstring(__pyx_v_category, 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":331
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":331
* self.category = sym_fromstring(category, False)
*
* if max_chunks is None: # <<<<<<<<<<<<<<
@@ -38442,7 +38968,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":332
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":332
*
* if max_chunks is None:
* self.max_chunks = self.max_nonterminals + 1 # <<<<<<<<<<<<<<
@@ -38454,7 +38980,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":334
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":334
* self.max_chunks = self.max_nonterminals + 1
* else:
* self.max_chunks = max_chunks # <<<<<<<<<<<<<<
@@ -38466,7 +38992,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":336
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":336
* self.max_chunks = max_chunks
*
* if max_target_chunks is None: # <<<<<<<<<<<<<<
@@ -38476,7 +39002,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":337
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":337
*
* if max_target_chunks is None:
* self.max_target_chunks = self.max_nonterminals + 1 # <<<<<<<<<<<<<<
@@ -38488,7 +39014,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":339
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":339
* self.max_target_chunks = self.max_nonterminals + 1
* else:
* self.max_target_chunks = max_target_chunks # <<<<<<<<<<<<<<
@@ -38500,7 +39026,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":341
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":341
* self.max_target_chunks = max_target_chunks
*
* if max_target_length is None: # <<<<<<<<<<<<<<
@@ -38510,7 +39036,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":342
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":342
*
* if max_target_length is None:
* self.max_target_length = max_initial_size # <<<<<<<<<<<<<<
@@ -38522,7 +39048,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/m/workspace/cdec/python/src/sa/rulefactory.pxi":344
* self.max_target_length = max_initial_size
* else:
* self.max_target_length = max_target_length # <<<<<<<<<<<<<<
@@ -38534,7 +39060,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":347
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":347
*
* # algorithmic parameters and settings
* self.precomputed_collocations = {} # <<<<<<<<<<<<<<
@@ -38549,7 +39075,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_v_self->precomputed_collocations = ((PyObject *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":348
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":348
* # algorithmic parameters and settings
* self.precomputed_collocations = {}
* self.precomputed_index = {} # <<<<<<<<<<<<<<
@@ -38564,7 +39090,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_v_self->precomputed_index = ((PyObject *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":349
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":349
* self.precomputed_collocations = {}
* self.precomputed_index = {}
* self.use_index = use_index # <<<<<<<<<<<<<<
@@ -38573,7 +39099,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":350
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":350
* self.precomputed_index = {}
* self.use_index = use_index
* self.use_collocations = use_collocations # <<<<<<<<<<<<<<
@@ -38582,7 +39108,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":351
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":351
* self.use_index = use_index
* self.use_collocations = use_collocations
* self.max_rank = {} # <<<<<<<<<<<<<<
@@ -38597,7 +39123,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_v_self->max_rank = ((PyObject *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":352
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":352
* self.use_collocations = use_collocations
* self.max_rank = {}
* self.precompute_file = precompute_file # <<<<<<<<<<<<<<
@@ -38610,7 +39136,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":353
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":353
* self.max_rank = {}
* self.precompute_file = precompute_file
* self.precompute_rank = precompute_rank # <<<<<<<<<<<<<<
@@ -38619,7 +39145,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":354
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":354
* self.precompute_file = precompute_file
* self.precompute_rank = precompute_rank
* self.precompute_secondary_rank = precompute_secondary_rank # <<<<<<<<<<<<<<
@@ -38628,7 +39154,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":355
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":355
* self.precompute_rank = precompute_rank
* self.precompute_secondary_rank = precompute_secondary_rank
* self.use_baeza_yates = use_baeza_yates # <<<<<<<<<<<<<<
@@ -38637,7 +39163,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":356
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":356
* self.precompute_secondary_rank = precompute_secondary_rank
* self.use_baeza_yates = use_baeza_yates
* self.by_slack_factor = by_slack_factor # <<<<<<<<<<<<<<
@@ -38646,7 +39172,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":357
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":357
* self.use_baeza_yates = use_baeza_yates
* self.by_slack_factor = by_slack_factor
* self.tight_phrases = tight_phrases # <<<<<<<<<<<<<<
@@ -38655,7 +39181,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
*/
__pyx_v_self->tight_phrases = __pyx_v_tight_phrases;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":359
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":359
* self.tight_phrases = tight_phrases
*
* if require_aligned_chunks: # <<<<<<<<<<<<<<
@@ -38664,7 +39190,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":361
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":361
* if require_aligned_chunks:
* # one condition is a stronger version of the other.
* self.require_aligned_chunks = self.require_aligned_terminal = True # <<<<<<<<<<<<<<
@@ -38676,7 +39202,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
goto __pyx_L7;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":362
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":362
* # one condition is a stronger version of the other.
* self.require_aligned_chunks = self.require_aligned_terminal = True
* elif require_aligned_terminal: # <<<<<<<<<<<<<<
@@ -38685,7 +39211,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":363
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":363
* self.require_aligned_chunks = self.require_aligned_terminal = True
* elif require_aligned_terminal:
* self.require_aligned_chunks = False # <<<<<<<<<<<<<<
@@ -38694,7 +39220,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":364
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":364
* elif require_aligned_terminal:
* self.require_aligned_chunks = False
* self.require_aligned_terminal = True # <<<<<<<<<<<<<<
@@ -38706,7 +39232,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":366
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":366
* self.require_aligned_terminal = True
* else:
* self.require_aligned_chunks = self.require_aligned_terminal = False # <<<<<<<<<<<<<<
@@ -38718,7 +39244,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":369
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":369
*
* # diagnostics
* self.prev_norm_prefix = () # <<<<<<<<<<<<<<
@@ -38731,7 +39257,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":371
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":371
* self.prev_norm_prefix = ()
*
* self.findexes = IntList(initial_len=10) # <<<<<<<<<<<<<<
@@ -38750,7 +39276,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_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":372
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":372
*
* self.findexes = IntList(initial_len=10)
* self.findexes1 = IntList(initial_len=10) # <<<<<<<<<<<<<<
@@ -38864,7 +39390,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":374
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":374
* self.findexes1 = IntList(initial_len=10)
*
* def configure(self, SuffixArray fsarray, DataArray edarray, # <<<<<<<<<<<<<<
@@ -38882,7 +39408,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":379
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":379
* Here we also use it to precompute the most expensive intersections
* in the corpus quickly.'''
* self.fsa = fsarray # <<<<<<<<<<<<<<
@@ -38895,7 +39421,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":380
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":380
* in the corpus quickly.'''
* self.fsa = fsarray
* self.fda = fsarray.darray # <<<<<<<<<<<<<<
@@ -38908,7 +39434,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":381
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":381
* self.fsa = fsarray
* self.fda = fsarray.darray
* self.eda = edarray # <<<<<<<<<<<<<<
@@ -38921,7 +39447,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":382
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":382
* self.fda = fsarray.darray
* self.eda = edarray
* self.fid2symid = self.set_idmap(self.fda) # <<<<<<<<<<<<<<
@@ -38940,7 +39466,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":383
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":383
* self.eda = edarray
* self.fid2symid = self.set_idmap(self.fda)
* self.eid2symid = self.set_idmap(self.eda) # <<<<<<<<<<<<<<
@@ -38959,7 +39485,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":384
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":384
* self.fid2symid = self.set_idmap(self.fda)
* self.eid2symid = self.set_idmap(self.eda)
* self.precompute() # <<<<<<<<<<<<<<
@@ -38973,7 +39499,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":385
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":385
* self.eid2symid = self.set_idmap(self.eda)
* self.precompute()
* self.sampler = sampler # <<<<<<<<<<<<<<
@@ -38986,7 +39512,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":386
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":386
* self.precompute()
* self.sampler = sampler
* self.scorer = scorer # <<<<<<<<<<<<<<
@@ -39012,7 +39538,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":388
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":388
* self.scorer = scorer
*
* cdef set_idmap(self, DataArray darray): # <<<<<<<<<<<<<<
@@ -39037,7 +39563,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":392
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":392
* cdef IntList idmap
*
* N = len(darray.id2word) # <<<<<<<<<<<<<<
@@ -39050,7 +39576,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":393
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":393
*
* N = len(darray.id2word)
* idmap = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -39069,7 +39595,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":394
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":394
* N = len(darray.id2word)
* idmap = IntList(initial_len=N)
* for word_id from 0 <= word_id < N: # <<<<<<<<<<<<<<
@@ -39079,7 +39605,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":395
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":395
* idmap = IntList(initial_len=N)
* for word_id from 0 <= word_id < N:
* new_word_id = sym_fromstring(darray.id2word[word_id], True) # <<<<<<<<<<<<<<
@@ -39092,7 +39618,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_new_word_id = __pyx_f_3_sa_sym_fromstring(__pyx_t_5, 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":396
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":396
* 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 # <<<<<<<<<<<<<<
@@ -39102,7 +39628,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":397
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":397
* new_word_id = sym_fromstring(darray.id2word[word_id], True)
* idmap.arr[word_id] = new_word_id
* return idmap # <<<<<<<<<<<<<<
@@ -39139,7 +39665,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5pattern2phrase(PyObjec
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":400
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":400
*
*
* def pattern2phrase(self, pattern): # <<<<<<<<<<<<<<
@@ -39167,7 +39693,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":402
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":402
* def pattern2phrase(self, pattern):
* # pattern is a tuple, which we must convert to a hiero Phrase
* result = () # <<<<<<<<<<<<<<
@@ -39177,7 +39703,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":403
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":403
* # pattern is a tuple, which we must convert to a hiero Phrase
* result = ()
* arity = 0 # <<<<<<<<<<<<<<
@@ -39187,7 +39713,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":404
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":404
* result = ()
* arity = 0
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -39232,7 +39758,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":405
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":405
* arity = 0
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
@@ -39244,7 +39770,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":406
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":406
* for word_id in pattern:
* if word_id == -1:
* arity = arity + 1 # <<<<<<<<<<<<<<
@@ -39257,7 +39783,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":407
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":407
* if word_id == -1:
* arity = arity + 1
* new_id = sym_setindex(self.category, arity) # <<<<<<<<<<<<<<
@@ -39270,7 +39796,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":409
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":409
* new_id = sym_setindex(self.category, arity)
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True) # <<<<<<<<<<<<<<
@@ -39285,7 +39811,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":410
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":410
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,) # <<<<<<<<<<<<<<
@@ -39308,7 +39834,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":411
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":411
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,)
* return Phrase(result) # <<<<<<<<<<<<<<
@@ -39356,7 +39882,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_7pattern2phrase_plus(Py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":413
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":413
* return Phrase(result)
*
* def pattern2phrase_plus(self, pattern): # <<<<<<<<<<<<<<
@@ -39386,7 +39912,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":416
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":416
* # returns a list containing both the pattern, and pattern
* # suffixed/prefixed with the NT category.
* patterns = [] # <<<<<<<<<<<<<<
@@ -39398,7 +39924,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":417
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":417
* # suffixed/prefixed with the NT category.
* patterns = []
* result = () # <<<<<<<<<<<<<<
@@ -39408,7 +39934,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":418
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":418
* patterns = []
* result = ()
* arity = 0 # <<<<<<<<<<<<<<
@@ -39418,7 +39944,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":419
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":419
* result = ()
* arity = 0
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -39463,7 +39989,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":420
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":420
* arity = 0
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
@@ -39475,7 +40001,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":421
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":421
* for word_id in pattern:
* if word_id == -1:
* arity = arity + 1 # <<<<<<<<<<<<<<
@@ -39488,7 +40014,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":422
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":422
* if word_id == -1:
* arity = arity + 1
* new_id = sym_setindex(self.category, arity) # <<<<<<<<<<<<<<
@@ -39501,7 +40027,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":424
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":424
* new_id = sym_setindex(self.category, arity)
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True) # <<<<<<<<<<<<<<
@@ -39516,7 +40042,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":425
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":425
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,) # <<<<<<<<<<<<<<
@@ -39539,7 +40065,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":426
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":426
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,)
* patterns.append(Phrase(result)) # <<<<<<<<<<<<<<
@@ -39557,7 +40083,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__pyx_t_9 = PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":427
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":427
* result = result + (new_id,)
* patterns.append(Phrase(result))
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) # <<<<<<<<<<<<<<
@@ -39585,7 +40111,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__pyx_t_9 = PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":428
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":428
* patterns.append(Phrase(result))
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),)))
* patterns.append(Phrase((sym_setindex(self.category, 1),) + result)) # <<<<<<<<<<<<<<
@@ -39613,7 +40139,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__pyx_t_9 = PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":429
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":429
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),)))
* patterns.append(Phrase((sym_setindex(self.category, 1),) + result))
* return patterns # <<<<<<<<<<<<<<
@@ -39654,7 +40180,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9precompute(PyObject *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":431
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":431
* return patterns
*
* def precompute(self): # <<<<<<<<<<<<<<
@@ -39688,7 +40214,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":434
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":434
* cdef Precomputation pre
*
* if self.precompute_file is not None: # <<<<<<<<<<<<<<
@@ -39698,7 +40224,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":435
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":435
*
* if self.precompute_file is not None:
* start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -39710,7 +40236,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":436
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":436
* if self.precompute_file is not None:
* start_time = monitor_cpu()
* logger.info("Reading precomputed data from file %s... ", self.precompute_file) # <<<<<<<<<<<<<<
@@ -39736,7 +40262,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":437
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":437
* start_time = monitor_cpu()
* logger.info("Reading precomputed data from file %s... ", self.precompute_file)
* pre = Precomputation(from_binary=self.precompute_file) # <<<<<<<<<<<<<<
@@ -39752,7 +40278,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":439
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":439
* 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: # <<<<<<<<<<<<<<
@@ -39762,7 +40288,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":440
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":440
* # 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) # <<<<<<<<<<<<<<
@@ -39798,7 +40324,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":441
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":441
* 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: # <<<<<<<<<<<<<<
@@ -39808,7 +40334,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":442
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":442
* 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) # <<<<<<<<<<<<<<
@@ -39844,7 +40370,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":443
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":443
* 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: # <<<<<<<<<<<<<<
@@ -39854,7 +40380,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":444
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":444
* 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)) # <<<<<<<<<<<<<<
@@ -39891,7 +40417,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":445
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":445
* 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: # <<<<<<<<<<<<<<
@@ -39901,7 +40427,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":446
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":446
* 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)) # <<<<<<<<<<<<<<
@@ -39938,7 +40464,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":447
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":447
* 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: # <<<<<<<<<<<<<<
@@ -39947,7 +40473,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":448
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":448
* 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)) # <<<<<<<<<<<<<<
@@ -39979,7 +40505,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_5); __pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":449
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":449
* 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(): # <<<<<<<<<<<<<<
@@ -40009,7 +40535,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_v_arr = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":450
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":450
* 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) # <<<<<<<<<<<<<<
@@ -40031,7 +40557,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_v_phrases = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":451
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":451
* for pattern, arr in pre.precomputed_index.iteritems():
* phrases = self.pattern2phrase_plus(pattern)
* for phrase in phrases: # <<<<<<<<<<<<<<
@@ -40076,7 +40602,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_v_phrase = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":452
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":452
* phrases = self.pattern2phrase_plus(pattern)
* for phrase in phrases:
* self.precomputed_index[phrase] = arr # <<<<<<<<<<<<<<
@@ -40092,7 +40618,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":453
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":453
* for phrase in phrases:
* self.precomputed_index[phrase] = arr
* if self.use_collocations: # <<<<<<<<<<<<<<
@@ -40101,7 +40627,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":454
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":454
* self.precomputed_index[phrase] = arr
* if self.use_collocations:
* logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations)) # <<<<<<<<<<<<<<
@@ -40133,7 +40659,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_5); __pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":455
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":455
* 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(): # <<<<<<<<<<<<<<
@@ -40163,7 +40689,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_v_arr = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":456
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":456
* 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) # <<<<<<<<<<<<<<
@@ -40185,7 +40711,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":457
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":457
* for pattern, arr in pre.precomputed_collocations.iteritems():
* phrase = self.pattern2phrase(pattern)
* self.precomputed_collocations[phrase] = arr # <<<<<<<<<<<<<<
@@ -40199,7 +40725,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L13:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":458
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":458
* phrase = self.pattern2phrase(pattern)
* self.precomputed_collocations[phrase] = arr
* stop_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -40211,7 +40737,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":459
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":459
* self.precomputed_collocations[phrase] = arr
* stop_time = monitor_cpu()
* logger.info("Processing precomputations took %f seconds", stop_time - start_time) # <<<<<<<<<<<<<<
@@ -40275,7 +40801,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_11get_precomputed_collo
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":462
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":462
*
*
* def get_precomputed_collocation(self, phrase): # <<<<<<<<<<<<<<
@@ -40297,7 +40823,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":463
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":463
*
* def get_precomputed_collocation(self, phrase):
* if phrase in self.precomputed_collocations: # <<<<<<<<<<<<<<
@@ -40307,7 +40833,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
__pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_phrase, __pyx_v_self->precomputed_collocations, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":464
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":464
* def get_precomputed_collocation(self, phrase):
* if phrase in self.precomputed_collocations:
* arr = self.precomputed_collocations[phrase] # <<<<<<<<<<<<<<
@@ -40319,7 +40845,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":465
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":465
* 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) # <<<<<<<<<<<<<<
@@ -40356,7 +40882,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":466
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":466
* arr = self.precomputed_collocations[phrase]
* return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1)
* return None # <<<<<<<<<<<<<<
@@ -40383,7 +40909,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":469
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":469
*
*
* cdef int* baeza_yates_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<<
@@ -40429,7 +40955,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":482
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":482
* cdef Matching loc1, loc2
*
* result = <int*> malloc(0*sizeof(int*)) # <<<<<<<<<<<<<<
@@ -40438,7 +40964,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":484
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":484
* result = <int*> malloc(0*sizeof(int*))
*
* d_first = 0 # <<<<<<<<<<<<<<
@@ -40447,7 +40973,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":485
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":485
*
* d_first = 0
* if high1 - low1 > high2 - low2: # <<<<<<<<<<<<<<
@@ -40457,7 +40983,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":486
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":486
* d_first = 0
* if high1 - low1 > high2 - low2:
* d_first = 1 # <<<<<<<<<<<<<<
@@ -40469,7 +40995,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":490
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":490
* # 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: # <<<<<<<<<<<<<<
@@ -40485,7 +41011,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":491
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":491
* # Case 1: one of the sets is empty
* if low1 >= high1 or low2 >= high2:
* return result # <<<<<<<<<<<<<<
@@ -40498,7 +41024,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":494
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":494
*
* # Case 2: sets are non-overlapping
* assign_matching(&loc1, arr1, high1-step1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -40507,7 +41033,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":495
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":495
* # 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) # <<<<<<<<<<<<<<
@@ -40516,7 +41042,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":496
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":496
* 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: # <<<<<<<<<<<<<<
@@ -40526,7 +41052,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":497
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":497
* 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 # <<<<<<<<<<<<<<
@@ -40539,7 +41065,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":499
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":499
* return result
*
* assign_matching(&loc1, arr1, low1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -40548,7 +41074,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":500
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":500
*
* assign_matching(&loc1, arr1, low1, step1, self.fda.sent_id.arr)
* assign_matching(&loc2, arr2, high2-step2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -40557,7 +41083,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":501
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":501
* 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: # <<<<<<<<<<<<<<
@@ -40567,7 +41093,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":502
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":502
* 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 # <<<<<<<<<<<<<<
@@ -40580,7 +41106,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":506
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":506
* # Case 3: query set and data set do not meet size mismatch constraints;
* # We use mergesort instead in this case
* qsetsize = (high1-low1) / step1 # <<<<<<<<<<<<<<
@@ -40598,7 +41124,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":507
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":507
* # We use mergesort instead in this case
* qsetsize = (high1-low1) / step1
* dsetsize = (high2-low2) / step2 # <<<<<<<<<<<<<<
@@ -40616,7 +41142,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":508
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":508
* qsetsize = (high1-low1) / step1
* dsetsize = (high2-low2) / step2
* if d_first: # <<<<<<<<<<<<<<
@@ -40625,7 +41151,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":509
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":509
* dsetsize = (high2-low2) / step2
* if d_first:
* tmp = qsetsize # <<<<<<<<<<<<<<
@@ -40634,7 +41160,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":510
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":510
* if d_first:
* tmp = qsetsize
* qsetsize = dsetsize # <<<<<<<<<<<<<<
@@ -40643,7 +41169,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":511
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":511
* tmp = qsetsize
* qsetsize = dsetsize
* dsetsize = tmp # <<<<<<<<<<<<<<
@@ -40655,7 +41181,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":513
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":513
* dsetsize = tmp
*
* if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize: # <<<<<<<<<<<<<<
@@ -40671,7 +41197,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":514
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":514
*
* if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize:
* free(result) # <<<<<<<<<<<<<<
@@ -40680,7 +41206,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":515
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":515
* 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) # <<<<<<<<<<<<<<
@@ -40693,7 +41219,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":519
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":519
* # binary search. There are two flavors, depending on
* # whether the queryset or dataset is first
* if d_first: # <<<<<<<<<<<<<<
@@ -40702,7 +41228,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":520
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":520
* # whether the queryset or dataset is first
* if d_first:
* med2 = median(low2, high2, step2) # <<<<<<<<<<<<<<
@@ -40711,7 +41237,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":521
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":521
* if d_first:
* med2 = median(low2, high2, step2)
* assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -40720,7 +41246,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":523
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":523
* assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr)
*
* search_low = low1 # <<<<<<<<<<<<<<
@@ -40729,7 +41255,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":524
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":524
*
* search_low = low1
* search_high = high1 # <<<<<<<<<<<<<<
@@ -40738,7 +41264,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":525
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":525
* search_low = low1
* search_high = high1
* while search_low < search_high: # <<<<<<<<<<<<<<
@@ -40749,7 +41275,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":526
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":526
* search_high = high1
* while search_low < search_high:
* med1 = median(search_low, search_high, step1) # <<<<<<<<<<<<<<
@@ -40758,7 +41284,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":527
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":527
* while search_low < search_high:
* med1 = median(search_low, search_high, step1)
* find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) # <<<<<<<<<<<<<<
@@ -40767,7 +41293,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":528
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":528
* 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) # <<<<<<<<<<<<<<
@@ -40776,7 +41302,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":531
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":531
* if comparison == -1:
* search_low = med1_plus
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -40785,7 +41311,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":529
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":529
* 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: # <<<<<<<<<<<<<<
@@ -40794,7 +41320,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case -1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":530
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":530
* comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last)
* if comparison == -1:
* search_low = med1_plus # <<<<<<<<<<<<<<
@@ -40804,7 +41330,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":531
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":531
* if comparison == -1:
* search_low = med1_plus
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -40813,7 +41339,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case 1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":532
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":532
* search_low = med1_plus
* elif comparison == 1:
* search_high = med1_minus # <<<<<<<<<<<<<<
@@ -40824,7 +41350,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
break;
default:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":534
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":534
* search_high = med1_minus
* else:
* break # <<<<<<<<<<<<<<
@@ -40840,7 +41366,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":536
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":536
* break
* else:
* med1 = median(low1, high1, step1) # <<<<<<<<<<<<<<
@@ -40849,7 +41375,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":537
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":537
* else:
* med1 = median(low1, high1, step1)
* find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) # <<<<<<<<<<<<<<
@@ -40858,7 +41384,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":539
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":539
* find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus)
*
* search_low = low2 # <<<<<<<<<<<<<<
@@ -40867,7 +41393,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":540
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":540
*
* search_low = low2
* search_high = high2 # <<<<<<<<<<<<<<
@@ -40876,7 +41402,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":541
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":541
* search_low = low2
* search_high = high2
* while search_low < search_high: # <<<<<<<<<<<<<<
@@ -40887,7 +41413,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":542
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":542
* search_high = high2
* while search_low < search_high:
* med2 = median(search_low, search_high, step2) # <<<<<<<<<<<<<<
@@ -40896,7 +41422,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":543
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":543
* while search_low < search_high:
* med2 = median(search_low, search_high, step2)
* assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -40905,7 +41431,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":544
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":544
* 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) # <<<<<<<<<<<<<<
@@ -40914,7 +41440,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":547
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":547
* if comparison == -1:
* search_high = med2
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -40923,7 +41449,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":545
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":545
* 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: # <<<<<<<<<<<<<<
@@ -40932,7 +41458,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case -1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":546
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":546
* comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last)
* if comparison == -1:
* search_high = med2 # <<<<<<<<<<<<<<
@@ -40942,7 +41468,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":547
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":547
* if comparison == -1:
* search_high = med2
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -40951,7 +41477,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case 1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":548
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":548
* search_high = med2
* elif comparison == 1:
* search_low = med2 + step2 # <<<<<<<<<<<<<<
@@ -40962,7 +41488,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
break;
default:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":550
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":550
* search_low = med2 + step2
* else:
* break # <<<<<<<<<<<<<<
@@ -40977,7 +41503,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":552
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":552
* break
*
* med_result_len = 0 # <<<<<<<<<<<<<<
@@ -40986,7 +41512,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":553
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":553
*
* med_result_len = 0
* med_result = <int*> malloc(0*sizeof(int*)) # <<<<<<<<<<<<<<
@@ -40995,7 +41521,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":554
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":554
* med_result_len = 0
* med_result = <int*> malloc(0*sizeof(int*))
* if search_high > search_low: # <<<<<<<<<<<<<<
@@ -41005,7 +41531,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":560
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":560
* # want to store the bindings for all of those elements. We can
* # subsequently throw all of them away.
* med2_minus = med2 # <<<<<<<<<<<<<<
@@ -41014,7 +41540,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":561
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":561
* # subsequently throw all of them away.
* med2_minus = med2
* med2_plus = med2 + step2 # <<<<<<<<<<<<<<
@@ -41023,7 +41549,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":562
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":562
* med2_minus = med2
* med2_plus = med2 + step2
* i1 = med1_minus # <<<<<<<<<<<<<<
@@ -41032,7 +41558,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":563
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":563
* med2_plus = med2 + step2
* i1 = med1_minus
* while i1 < med1_plus: # <<<<<<<<<<<<<<
@@ -41043,7 +41569,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":564
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":564
* i1 = med1_minus
* while i1 < med1_plus:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -41052,7 +41578,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":565
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":565
* while i1 < med1_plus:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* while med2_minus-step2 >= low2: # <<<<<<<<<<<<<<
@@ -41063,7 +41589,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":566
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":566
* 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) # <<<<<<<<<<<<<<
@@ -41072,7 +41598,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":567
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":567
* 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: # <<<<<<<<<<<<<<
@@ -41082,7 +41608,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":568
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":568
* 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 # <<<<<<<<<<<<<<
@@ -41094,7 +41620,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":570
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":570
* med2_minus = med2_minus - step2
* else:
* break # <<<<<<<<<<<<<<
@@ -41107,7 +41633,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":571
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":571
* else:
* break
* i2 = med2_minus # <<<<<<<<<<<<<<
@@ -41116,7 +41642,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":572
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":572
* break
* i2 = med2_minus
* while i2 < high2: # <<<<<<<<<<<<<<
@@ -41127,7 +41653,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":573
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":573
* i2 = med2_minus
* while i2 < high2:
* assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -41136,7 +41662,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":574
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":574
* 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) # <<<<<<<<<<<<<<
@@ -41145,7 +41671,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":575
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":575
* 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: # <<<<<<<<<<<<<<
@@ -41155,7 +41681,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":577
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":577
* if comparison == 0:
* pass
* med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len) # <<<<<<<<<<<<<<
@@ -41167,7 +41693,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L22:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":578
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":578
* pass
* med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len)
* if comparison == -1: # <<<<<<<<<<<<<<
@@ -41177,7 +41703,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":579
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":579
* med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len)
* if comparison == -1:
* break # <<<<<<<<<<<<<<
@@ -41189,7 +41715,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L23:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":580
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":580
* if comparison == -1:
* break
* i2 = i2 + step2 # <<<<<<<<<<<<<<
@@ -41200,7 +41726,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":581
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":581
* break
* i2 = i2 + step2
* if i2 > med2_plus: # <<<<<<<<<<<<<<
@@ -41210,7 +41736,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":582
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":582
* i2 = i2 + step2
* if i2 > med2_plus:
* med2_plus = i2 # <<<<<<<<<<<<<<
@@ -41222,7 +41748,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":583
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":583
* if i2 > med2_plus:
* med2_plus = i2
* i1 = i1 + step1 # <<<<<<<<<<<<<<
@@ -41232,7 +41758,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":585
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":585
* i1 = i1 + step1
*
* tmp = med1_minus # <<<<<<<<<<<<<<
@@ -41241,7 +41767,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":586
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":586
*
* tmp = med1_minus
* med1_minus = med1_plus # <<<<<<<<<<<<<<
@@ -41250,7 +41776,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":587
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":587
* tmp = med1_minus
* med1_minus = med1_plus
* med1_plus = tmp # <<<<<<<<<<<<<<
@@ -41262,7 +41788,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":590
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":590
* else:
* # No match; need to figure out the point of division in D and Q
* med2_minus = med2 # <<<<<<<<<<<<<<
@@ -41271,7 +41797,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":591
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":591
* # No match; need to figure out the point of division in D and Q
* med2_minus = med2
* med2_plus = med2 # <<<<<<<<<<<<<<
@@ -41280,7 +41806,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":592
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":592
* med2_minus = med2
* med2_plus = med2
* if d_first: # <<<<<<<<<<<<<<
@@ -41289,7 +41815,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":593
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":593
* med2_plus = med2
* if d_first:
* med2_minus = med2_minus + step2 # <<<<<<<<<<<<<<
@@ -41298,7 +41824,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/m/workspace/cdec/python/src/sa/rulefactory.pxi":594
* if d_first:
* med2_minus = med2_minus + step2
* if comparison == -1: # <<<<<<<<<<<<<<
@@ -41308,7 +41834,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":595
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":595
* med2_minus = med2_minus + step2
* if comparison == -1:
* med1_minus = med1_plus # <<<<<<<<<<<<<<
@@ -41320,7 +41846,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L26:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":596
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":596
* if comparison == -1:
* med1_minus = med1_plus
* if comparison == 1: # <<<<<<<<<<<<<<
@@ -41330,7 +41856,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":597
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":597
* med1_minus = med1_plus
* if comparison == 1:
* med1_plus = med1_minus # <<<<<<<<<<<<<<
@@ -41345,7 +41871,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":599
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":599
* med1_plus = med1_minus
* else:
* tmp = med1_minus # <<<<<<<<<<<<<<
@@ -41354,7 +41880,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":600
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":600
* else:
* tmp = med1_minus
* med1_minus = med1_plus # <<<<<<<<<<<<<<
@@ -41363,7 +41889,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":601
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":601
* tmp = med1_minus
* med1_minus = med1_plus
* med1_plus = tmp # <<<<<<<<<<<<<<
@@ -41372,7 +41898,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":602
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":602
* med1_minus = med1_plus
* med1_plus = tmp
* if comparison == 1: # <<<<<<<<<<<<<<
@@ -41382,7 +41908,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":603
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":603
* med1_plus = tmp
* if comparison == 1:
* med2_minus = med2_minus + step2 # <<<<<<<<<<<<<<
@@ -41391,7 +41917,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":604
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":604
* if comparison == 1:
* med2_minus = med2_minus + step2
* med2_plus = med2_plus + step2 # <<<<<<<<<<<<<<
@@ -41407,7 +41933,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L14:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":606
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":606
* med2_plus = med2_plus + step2
*
* low_result_len = 0 # <<<<<<<<<<<<<<
@@ -41416,7 +41942,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":607
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":607
*
* 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) # <<<<<<<<<<<<<<
@@ -41425,7 +41951,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":608
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":608
* 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 # <<<<<<<<<<<<<<
@@ -41434,7 +41960,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":609
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":609
* 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) # <<<<<<<<<<<<<<
@@ -41443,7 +41969,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":611
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":611
* 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) # <<<<<<<<<<<<<<
@@ -41452,7 +41978,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":612
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":612
*
* result = extend_arr(result, result_len, low_result, low_result_len)
* result = extend_arr(result, result_len, med_result, med_result_len) # <<<<<<<<<<<<<<
@@ -41461,7 +41987,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":613
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":613
* 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) # <<<<<<<<<<<<<<
@@ -41470,7 +41996,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":614
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":614
* 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) # <<<<<<<<<<<<<<
@@ -41479,7 +42005,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":615
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":615
* result = extend_arr(result, result_len, high_result, high_result_len)
* free(low_result)
* free(med_result) # <<<<<<<<<<<<<<
@@ -41488,7 +42014,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":616
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":616
* free(low_result)
* free(med_result)
* free(high_result) # <<<<<<<<<<<<<<
@@ -41497,7 +42023,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":618
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":618
* free(high_result)
*
* return result # <<<<<<<<<<<<<<
@@ -41517,7 +42043,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":622
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":622
*
*
* cdef long compare_matchings_set(self, int i1_minus, int i1_plus, int* arr1, int step1, # <<<<<<<<<<<<<<
@@ -41536,7 +42062,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":633
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":633
* cdef Matching* loc1
*
* loc1 = &l1_stack # <<<<<<<<<<<<<<
@@ -41545,7 +42071,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":635
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":635
* loc1 = &l1_stack
*
* i1 = i1_minus # <<<<<<<<<<<<<<
@@ -41554,7 +42080,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":636
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":636
*
* i1 = i1_minus
* while i1 < i1_plus: # <<<<<<<<<<<<<<
@@ -41565,7 +42091,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":637
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":637
* i1 = i1_minus
* while i1 < i1_plus:
* assign_matching(loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -41574,7 +42100,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":638
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":638
* 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) # <<<<<<<<<<<<<<
@@ -41583,7 +42109,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":639
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":639
* 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: # <<<<<<<<<<<<<<
@@ -41593,7 +42119,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":640
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":640
* comparison = self.compare_matchings(loc1, loc2, offset_by_one, len_last)
* if comparison == 0:
* prev_comparison = 0 # <<<<<<<<<<<<<<
@@ -41602,7 +42128,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":641
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":641
* if comparison == 0:
* prev_comparison = 0
* break # <<<<<<<<<<<<<<
@@ -41613,7 +42139,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
goto __pyx_L5;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":642
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":642
* prev_comparison = 0
* break
* elif i1 == i1_minus: # <<<<<<<<<<<<<<
@@ -41623,7 +42149,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":643
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":643
* break
* elif i1 == i1_minus:
* prev_comparison = comparison # <<<<<<<<<<<<<<
@@ -41635,7 +42161,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":645
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":645
* prev_comparison = comparison
* else:
* if comparison != prev_comparison: # <<<<<<<<<<<<<<
@@ -41645,7 +42171,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":646
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":646
* else:
* if comparison != prev_comparison:
* prev_comparison = 0 # <<<<<<<<<<<<<<
@@ -41654,7 +42180,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":647
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":647
* if comparison != prev_comparison:
* prev_comparison = 0
* break # <<<<<<<<<<<<<<
@@ -41668,7 +42194,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":648
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":648
* prev_comparison = 0
* break
* i1 = i1 + step1 # <<<<<<<<<<<<<<
@@ -41679,7 +42205,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
}
__pyx_L4_break:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":649
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":649
* break
* i1 = i1 + step1
* return prev_comparison # <<<<<<<<<<<<<<
@@ -41695,7 +42221,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":652
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":652
*
*
* cdef long compare_matchings(self, Matching* loc1, Matching* loc2, int offset_by_one, int len_last): # <<<<<<<<<<<<<<
@@ -41713,7 +42239,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":655
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":655
* cdef int i
*
* if loc1.sent_id > loc2.sent_id: # <<<<<<<<<<<<<<
@@ -41723,7 +42249,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":656
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":656
*
* if loc1.sent_id > loc2.sent_id:
* return 1 # <<<<<<<<<<<<<<
@@ -41736,7 +42262,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":657
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":657
* if loc1.sent_id > loc2.sent_id:
* return 1
* if loc2.sent_id > loc1.sent_id: # <<<<<<<<<<<<<<
@@ -41746,7 +42272,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":658
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":658
* return 1
* if loc2.sent_id > loc1.sent_id:
* return -1 # <<<<<<<<<<<<<<
@@ -41759,7 +42285,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":660
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":660
* return -1
*
* if loc1.size == 1 and loc2.size == 1: # <<<<<<<<<<<<<<
@@ -41775,7 +42301,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":661
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":661
*
* if loc1.size == 1 and loc2.size == 1:
* if loc2.arr[loc2.start] - loc1.arr[loc1.start] <= self.train_min_gap_size: # <<<<<<<<<<<<<<
@@ -41785,7 +42311,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":662
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":662
* if loc1.size == 1 and loc2.size == 1:
* if loc2.arr[loc2.start] - loc1.arr[loc1.start] <= self.train_min_gap_size:
* return 1 # <<<<<<<<<<<<<<
@@ -41800,7 +42326,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
goto __pyx_L5;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":664
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":664
* return 1
*
* elif offset_by_one: # <<<<<<<<<<<<<<
@@ -41809,7 +42335,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":665
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":665
*
* elif offset_by_one:
* for i from 1 <= i < loc1.size: # <<<<<<<<<<<<<<
@@ -41819,7 +42345,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":666
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":666
* elif offset_by_one:
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]: # <<<<<<<<<<<<<<
@@ -41829,7 +42355,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":667
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":667
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]:
* return 1 # <<<<<<<<<<<<<<
@@ -41842,7 +42368,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":668
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":668
* 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]: # <<<<<<<<<<<<<<
@@ -41852,7 +42378,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":669
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":669
* return 1
* if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i-1]:
* return -1 # <<<<<<<<<<<<<<
@@ -41869,7 +42395,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":672
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":672
*
* else:
* if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]: # <<<<<<<<<<<<<<
@@ -41879,7 +42405,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":673
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":673
* else:
* if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]:
* return 1 # <<<<<<<<<<<<<<
@@ -41892,7 +42418,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":674
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":674
* if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]:
* return 1
* if loc1.arr[loc1.start]+1 < loc2.arr[loc2.start]: # <<<<<<<<<<<<<<
@@ -41902,7 +42428,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":675
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":675
* return 1
* if loc1.arr[loc1.start]+1 < loc2.arr[loc2.start]:
* return -1 # <<<<<<<<<<<<<<
@@ -41915,7 +42441,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":677
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":677
* return -1
*
* for i from 1 <= i < loc1.size: # <<<<<<<<<<<<<<
@@ -41925,7 +42451,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":678
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":678
*
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]: # <<<<<<<<<<<<<<
@@ -41935,7 +42461,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":679
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":679
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]:
* return 1 # <<<<<<<<<<<<<<
@@ -41948,7 +42474,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":680
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":680
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]:
* return 1
* if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i]: # <<<<<<<<<<<<<<
@@ -41958,7 +42484,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":681
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":681
* return 1
* if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i]:
* return -1 # <<<<<<<<<<<<<<
@@ -41974,7 +42500,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":683
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":683
* return -1
*
* if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size: # <<<<<<<<<<<<<<
@@ -41984,7 +42510,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":684
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":684
*
* if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size:
* return -1 # <<<<<<<<<<<<<<
@@ -41997,7 +42523,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":685
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":685
* if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size:
* return -1
* return 0 # <<<<<<<<<<<<<<
@@ -42013,7 +42539,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":688
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":688
*
*
* cdef int* merge_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<<
@@ -42037,7 +42563,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":696
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":696
* cdef Matching loc1, loc2
*
* result_len[0] = 0 # <<<<<<<<<<<<<<
@@ -42046,7 +42572,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":697
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":697
*
* result_len[0] = 0
* result = <int*> malloc(0*sizeof(int)) # <<<<<<<<<<<<<<
@@ -42055,7 +42581,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":699
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":699
* result = <int*> malloc(0*sizeof(int))
*
* i1 = low1 # <<<<<<<<<<<<<<
@@ -42064,7 +42590,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":700
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":700
*
* i1 = low1
* i2 = low2 # <<<<<<<<<<<<<<
@@ -42073,7 +42599,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":701
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":701
* i1 = low1
* i2 = low2
* while i1 < high1 and i2 < high2: # <<<<<<<<<<<<<<
@@ -42090,7 +42616,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":704
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":704
*
* # First, pop all unneeded loc2's off the stack
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -42099,7 +42625,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":705
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":705
* # First, pop all unneeded loc2's off the stack
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* while i2 < high2: # <<<<<<<<<<<<<<
@@ -42110,7 +42636,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":706
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":706
* 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) # <<<<<<<<<<<<<<
@@ -42119,7 +42645,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":707
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":707
* 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: # <<<<<<<<<<<<<<
@@ -42129,7 +42655,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":708
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":708
* 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 # <<<<<<<<<<<<<<
@@ -42141,7 +42667,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":710
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":710
* i2 = i2 + step2
* else:
* break # <<<<<<<<<<<<<<
@@ -42154,7 +42680,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":713
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":713
*
* # Next: process all loc1's with the same starting val
* j1 = i1 # <<<<<<<<<<<<<<
@@ -42163,7 +42689,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":714
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":714
* # Next: process all loc1's with the same starting val
* j1 = i1
* while i1 < high1 and arr1[j1] == arr1[i1]: # <<<<<<<<<<<<<<
@@ -42180,7 +42706,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":715
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":715
* j1 = i1
* while i1 < high1 and arr1[j1] == arr1[i1]:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -42189,7 +42715,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":716
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":716
* while i1 < high1 and arr1[j1] == arr1[i1]:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* j2 = i2 # <<<<<<<<<<<<<<
@@ -42198,7 +42724,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":717
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":717
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* j2 = i2
* while j2 < high2: # <<<<<<<<<<<<<<
@@ -42209,7 +42735,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":718
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":718
* j2 = i2
* while j2 < high2:
* assign_matching(&loc2, arr2, j2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -42218,7 +42744,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":719
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":719
* 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) # <<<<<<<<<<<<<<
@@ -42227,7 +42753,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":720
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":720
* 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: # <<<<<<<<<<<<<<
@@ -42237,7 +42763,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":721
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":721
* 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) # <<<<<<<<<<<<<<
@@ -42249,7 +42775,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":722
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":722
* if comparison == 0:
* result = append_combined_matching(result, &loc1, &loc2, offset_by_one, num_subpatterns, result_len)
* if comparison == 1: # <<<<<<<<<<<<<<
@@ -42262,7 +42788,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
__pyx_L13:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":724
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":724
* if comparison == 1:
* pass
* if comparison == -1: # <<<<<<<<<<<<<<
@@ -42272,7 +42798,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":725
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":725
* pass
* if comparison == -1:
* break # <<<<<<<<<<<<<<
@@ -42284,7 +42810,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":727
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":727
* break
* else:
* j2 = j2 + step2 # <<<<<<<<<<<<<<
@@ -42297,7 +42823,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":728
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":728
* else:
* j2 = j2 + step2
* i1 = i1 + step1 # <<<<<<<<<<<<<<
@@ -42308,7 +42834,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":729
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":729
* j2 = j2 + step2
* i1 = i1 + step1
* return result # <<<<<<<<<<<<<<
@@ -42324,7 +42850,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":732
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":732
*
*
* cdef void sort_phrase_loc(self, IntList arr, PhraseLocation loc, Phrase phrase): # <<<<<<<<<<<<<<
@@ -42346,7 +42872,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":737
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":737
* cdef IntList result
*
* if phrase in self.precomputed_index: # <<<<<<<<<<<<<<
@@ -42356,7 +42882,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__pyx_t_1 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_phrase), __pyx_v_self->precomputed_index, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":738
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":738
*
* if phrase in self.precomputed_index:
* loc.arr = self.precomputed_index[phrase] # <<<<<<<<<<<<<<
@@ -42375,7 +42901,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":740
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":740
* loc.arr = self.precomputed_index[phrase]
* else:
* loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low) # <<<<<<<<<<<<<<
@@ -42397,7 +42923,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":741
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":741
* else:
* loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low)
* veb = VEB(arr.len) # <<<<<<<<<<<<<<
@@ -42417,7 +42943,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":742
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":742
* 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: # <<<<<<<<<<<<<<
@@ -42427,7 +42953,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":743
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":743
* veb = VEB(arr.len)
* for i from loc.sa_low <= i < loc.sa_high:
* veb._insert(arr.arr[i]) # <<<<<<<<<<<<<<
@@ -42437,7 +42963,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":744
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":744
* for i from loc.sa_low <= i < loc.sa_high:
* veb._insert(arr.arr[i])
* i = veb.veb.min_val # <<<<<<<<<<<<<<
@@ -42446,7 +42972,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":745
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":745
* veb._insert(arr.arr[i])
* i = veb.veb.min_val
* for j from 0 <= j < loc.sa_high-loc.sa_low: # <<<<<<<<<<<<<<
@@ -42456,7 +42982,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":746
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":746
* i = veb.veb.min_val
* for j from 0 <= j < loc.sa_high-loc.sa_low:
* loc.arr.arr[j] = i # <<<<<<<<<<<<<<
@@ -42465,7 +42991,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":747
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":747
* for j from 0 <= j < loc.sa_high-loc.sa_low:
* loc.arr.arr[j] = i
* i = veb._findsucc(i) # <<<<<<<<<<<<<<
@@ -42477,7 +43003,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":748
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":748
* loc.arr.arr[j] = i
* i = veb._findsucc(i)
* loc.arr_low = 0 # <<<<<<<<<<<<<<
@@ -42486,7 +43012,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":749
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":749
* i = veb._findsucc(i)
* loc.arr_low = 0
* loc.arr_high = loc.arr.len # <<<<<<<<<<<<<<
@@ -42505,7 +43031,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":752
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":752
*
*
* cdef intersect_helper(self, Phrase prefix, Phrase suffix, # <<<<<<<<<<<<<<
@@ -42542,7 +43068,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":759
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":759
* cdef int* result_ptr
*
* result_len = 0 # <<<<<<<<<<<<<<
@@ -42551,7 +43077,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":761
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":761
* result_len = 0
*
* if sym_isvar(suffix[0]): # <<<<<<<<<<<<<<
@@ -42565,7 +43091,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":762
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":762
*
* if sym_isvar(suffix[0]):
* offset_by_one = 1 # <<<<<<<<<<<<<<
@@ -42577,7 +43103,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":764
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":764
* offset_by_one = 1
* else:
* offset_by_one = 0 # <<<<<<<<<<<<<<
@@ -42588,7 +43114,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":766
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":766
* offset_by_one = 0
*
* len_last = len(suffix.getchunk(suffix.arity())) # <<<<<<<<<<<<<<
@@ -42615,7 +43141,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":768
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":768
* len_last = len(suffix.getchunk(suffix.arity()))
*
* if prefix_loc.arr is None: # <<<<<<<<<<<<<<
@@ -42625,7 +43151,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":769
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":769
*
* if prefix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix) # <<<<<<<<<<<<<<
@@ -42640,7 +43166,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":770
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":770
* if prefix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix)
* arr1 = prefix_loc.arr # <<<<<<<<<<<<<<
@@ -42650,7 +43176,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":771
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":771
* self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix)
* arr1 = prefix_loc.arr
* low1 = prefix_loc.arr_low # <<<<<<<<<<<<<<
@@ -42659,7 +43185,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":772
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":772
* arr1 = prefix_loc.arr
* low1 = prefix_loc.arr_low
* high1 = prefix_loc.arr_high # <<<<<<<<<<<<<<
@@ -42668,7 +43194,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":773
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":773
* low1 = prefix_loc.arr_low
* high1 = prefix_loc.arr_high
* step1 = prefix_loc.num_subpatterns # <<<<<<<<<<<<<<
@@ -42677,7 +43203,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":775
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":775
* step1 = prefix_loc.num_subpatterns
*
* if suffix_loc.arr is None: # <<<<<<<<<<<<<<
@@ -42687,7 +43213,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":776
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":776
*
* if suffix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix) # <<<<<<<<<<<<<<
@@ -42702,7 +43228,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":777
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":777
* if suffix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix)
* arr2 = suffix_loc.arr # <<<<<<<<<<<<<<
@@ -42712,7 +43238,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":778
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":778
* self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix)
* arr2 = suffix_loc.arr
* low2 = suffix_loc.arr_low # <<<<<<<<<<<<<<
@@ -42721,7 +43247,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":779
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":779
* arr2 = suffix_loc.arr
* low2 = suffix_loc.arr_low
* high2 = suffix_loc.arr_high # <<<<<<<<<<<<<<
@@ -42730,7 +43256,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":780
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":780
* low2 = suffix_loc.arr_low
* high2 = suffix_loc.arr_high
* step2 = suffix_loc.num_subpatterns # <<<<<<<<<<<<<<
@@ -42739,7 +43265,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":782
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":782
* step2 = suffix_loc.num_subpatterns
*
* num_subpatterns = prefix.arity()+1 # <<<<<<<<<<<<<<
@@ -42758,7 +43284,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":784
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":784
* num_subpatterns = prefix.arity()+1
*
* if algorithm == MERGE: # <<<<<<<<<<<<<<
@@ -42768,7 +43294,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":787
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":787
* result_ptr = self.merge_helper(low1, high1, arr1.arr, step1,
* low2, high2, arr2.arr, step2,
* offset_by_one, len_last, num_subpatterns, &result_len) # <<<<<<<<<<<<<<
@@ -42780,7 +43306,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":791
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":791
* 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) # <<<<<<<<<<<<<<
@@ -42791,7 +43317,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":793
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":793
* offset_by_one, len_last, num_subpatterns, &result_len)
*
* if result_len == 0: # <<<<<<<<<<<<<<
@@ -42801,7 +43327,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":794
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":794
*
* if result_len == 0:
* free(result_ptr) # <<<<<<<<<<<<<<
@@ -42810,7 +43336,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":795
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":795
* if result_len == 0:
* free(result_ptr)
* return None # <<<<<<<<<<<<<<
@@ -42825,7 +43351,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":797
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":797
* return None
* else:
* result = IntList() # <<<<<<<<<<<<<<
@@ -42837,7 +43363,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":798
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":798
* else:
* result = IntList()
* free(result.arr) # <<<<<<<<<<<<<<
@@ -42846,7 +43372,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":799
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":799
* result = IntList()
* free(result.arr)
* result.arr = result_ptr # <<<<<<<<<<<<<<
@@ -42855,7 +43381,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":800
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":800
* free(result.arr)
* result.arr = result_ptr
* result.len = result_len # <<<<<<<<<<<<<<
@@ -42864,7 +43390,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":801
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":801
* result.arr = result_ptr
* result.len = result_len
* result.size = result_len # <<<<<<<<<<<<<<
@@ -42873,7 +43399,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":802
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":802
* result.len = result_len
* result.size = result_len
* return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns) # <<<<<<<<<<<<<<
@@ -42919,7 +43445,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":804
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":804
* return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns)
*
* cdef loc2str(self, PhraseLocation loc): # <<<<<<<<<<<<<<
@@ -42942,7 +43468,7 @@ 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":806
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":806
* cdef loc2str(self, PhraseLocation loc):
* cdef int i, j
* result = "{" # <<<<<<<<<<<<<<
@@ -42952,7 +43478,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
__Pyx_INCREF(((PyObject *)__pyx_kp_s_116));
__pyx_v_result = ((PyObject *)__pyx_kp_s_116);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":807
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":807
* cdef int i, j
* result = "{"
* i = 0 # <<<<<<<<<<<<<<
@@ -42961,7 +43487,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":808
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":808
* result = "{"
* i = 0
* while i < loc.arr_high: # <<<<<<<<<<<<<<
@@ -42972,7 +43498,7 @@ 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":809
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":809
* i = 0
* while i < loc.arr_high:
* result = result + "(" # <<<<<<<<<<<<<<
@@ -42985,7 +43511,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":810
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":810
* while i < loc.arr_high:
* result = result + "("
* for j from i <= j < i + loc.num_subpatterns: # <<<<<<<<<<<<<<
@@ -42995,7 +43521,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":811
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":811
* result = result + "("
* for j from i <= j < i + loc.num_subpatterns:
* result = result + ("%d " %loc.arr[j]) # <<<<<<<<<<<<<<
@@ -43015,7 +43541,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":812
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":812
* for j from i <= j < i + loc.num_subpatterns:
* result = result + ("%d " %loc.arr[j])
* result = result + ")" # <<<<<<<<<<<<<<
@@ -43028,7 +43554,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":813
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":813
* result = result + ("%d " %loc.arr[j])
* result = result + ")"
* i = i + loc.num_subpatterns # <<<<<<<<<<<<<<
@@ -43038,7 +43564,7 @@ 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":814
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":814
* result = result + ")"
* i = i + loc.num_subpatterns
* result = result + "}" # <<<<<<<<<<<<<<
@@ -43051,7 +43577,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":815
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":815
* i = i + loc.num_subpatterns
* result = result + "}"
* return result # <<<<<<<<<<<<<<
@@ -43077,7 +43603,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":817
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":817
* return result
*
* cdef PhraseLocation intersect(self, prefix_node, suffix_node, Phrase phrase): # <<<<<<<<<<<<<<
@@ -43103,7 +43629,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":821
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":821
* cdef PhraseLocation prefix_loc, suffix_loc, result
*
* prefix = prefix_node.phrase # <<<<<<<<<<<<<<
@@ -43116,7 +43642,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":822
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":822
*
* prefix = prefix_node.phrase
* suffix = suffix_node.phrase # <<<<<<<<<<<<<<
@@ -43129,7 +43655,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":823
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":823
* prefix = prefix_node.phrase
* suffix = suffix_node.phrase
* prefix_loc = prefix_node.phrase_location # <<<<<<<<<<<<<<
@@ -43142,7 +43668,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":824
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":824
* suffix = suffix_node.phrase
* prefix_loc = prefix_node.phrase_location
* suffix_loc = suffix_node.phrase_location # <<<<<<<<<<<<<<
@@ -43155,7 +43681,7 @@ 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":826
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":826
* suffix_loc = suffix_node.phrase_location
*
* result = self.get_precomputed_collocation(phrase) # <<<<<<<<<<<<<<
@@ -43177,7 +43703,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":827
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":827
*
* result = self.get_precomputed_collocation(phrase)
* if result is not None: # <<<<<<<<<<<<<<
@@ -43187,7 +43713,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":828
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":828
* result = self.get_precomputed_collocation(phrase)
* if result is not None:
* intersect_method = "precomputed" # <<<<<<<<<<<<<<
@@ -43200,7 +43726,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":830
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":830
* intersect_method = "precomputed"
*
* if result is None: # <<<<<<<<<<<<<<
@@ -43210,7 +43736,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":831
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":831
*
* if result is None:
* if self.use_baeza_yates: # <<<<<<<<<<<<<<
@@ -43219,7 +43745,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":832
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":832
* if result is None:
* if self.use_baeza_yates:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, BAEZA_YATES) # <<<<<<<<<<<<<<
@@ -43233,7 +43759,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":833
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":833
* if self.use_baeza_yates:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, BAEZA_YATES)
* intersect_method="double binary" # <<<<<<<<<<<<<<
@@ -43247,7 +43773,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":835
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":835
* intersect_method="double binary"
* else:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE) # <<<<<<<<<<<<<<
@@ -43261,7 +43787,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":836
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":836
* else:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE)
* intersect_method="merge" # <<<<<<<<<<<<<<
@@ -43277,7 +43803,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":837
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":837
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE)
* intersect_method="merge"
* return result # <<<<<<<<<<<<<<
@@ -43374,7 +43900,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__p
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":839
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":839
* return result
*
* def advance(self, frontier, res, fwords): # <<<<<<<<<<<<<<
@@ -43415,7 +43941,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":841
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":841
* def advance(self, frontier, res, fwords):
* cdef unsigned na
* nf = [] # <<<<<<<<<<<<<<
@@ -43427,7 +43953,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":842
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":842
* cdef unsigned na
* nf = []
* for (toskip, (i, alt, pathlen)) in frontier: # <<<<<<<<<<<<<<
@@ -43585,7 +44111,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":843
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":843
* nf = []
* for (toskip, (i, alt, pathlen)) in frontier:
* spanlen = fwords[i][alt][2] # <<<<<<<<<<<<<<
@@ -43604,7 +44130,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":844
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":844
* for (toskip, (i, alt, pathlen)) in frontier:
* spanlen = fwords[i][alt][2]
* if (toskip == 0): # <<<<<<<<<<<<<<
@@ -43616,7 +44142,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":845
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":845
* spanlen = fwords[i][alt][2]
* if (toskip == 0):
* res.append((i, alt, pathlen)) # <<<<<<<<<<<<<<
@@ -43642,7 +44168,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":846
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":846
* if (toskip == 0):
* res.append((i, alt, pathlen))
* ni = i + spanlen # <<<<<<<<<<<<<<
@@ -43655,7 +44181,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":847
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":847
* res.append((i, alt, pathlen))
* ni = i + spanlen
* if (ni < len(fwords) and (pathlen + 1) < self.max_initial_size): # <<<<<<<<<<<<<<
@@ -43685,7 +44211,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
if (__pyx_t_15) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":848
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":848
* ni = i + spanlen
* if (ni < len(fwords) and (pathlen + 1) < self.max_initial_size):
* for na in range(len(fwords[ni])): # <<<<<<<<<<<<<<
@@ -43699,7 +44225,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":849
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":849
* 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))) # <<<<<<<<<<<<<<
@@ -43740,7 +44266,7 @@ 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":850
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":850
* for na in range(len(fwords[ni])):
* nf.append((toskip - 1, (ni, na, pathlen + 1)))
* if (len(nf) > 0): # <<<<<<<<<<<<<<
@@ -43751,7 +44277,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__pyx_t_15 = (__pyx_t_2 > 0);
if (__pyx_t_15) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":851
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":851
* nf.append((toskip - 1, (ni, na, pathlen + 1)))
* if (len(nf) > 0):
* return self.advance(nf, res, fwords) # <<<<<<<<<<<<<<
@@ -43783,7 +44309,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":853
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":853
* return self.advance(nf, res, fwords)
* else:
* return res # <<<<<<<<<<<<<<
@@ -43924,7 +44450,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":855
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":855
* return res
*
* def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer): # <<<<<<<<<<<<<<
@@ -43962,7 +44488,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":857
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":857
* def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer):
* cdef unsigned alt_it
* frontier = [] # <<<<<<<<<<<<<<
@@ -43974,7 +44500,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":858
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":858
* cdef unsigned alt_it
* frontier = []
* if (i+spanlen+skip >= len(next_states)): # <<<<<<<<<<<<<<
@@ -43996,7 +44522,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":859
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":859
* frontier = []
* if (i+spanlen+skip >= len(next_states)):
* return frontier # <<<<<<<<<<<<<<
@@ -44011,7 +44537,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":860
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":860
* if (i+spanlen+skip >= len(next_states)):
* return frontier
* key = tuple([i,spanlen]) # <<<<<<<<<<<<<<
@@ -44032,7 +44558,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":861
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":861
* return frontier
* key = tuple([i,spanlen])
* reachable = [] # <<<<<<<<<<<<<<
@@ -44044,7 +44570,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":862
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":862
* key = tuple([i,spanlen])
* reachable = []
* if (key in reachable_buffer): # <<<<<<<<<<<<<<
@@ -44054,7 +44580,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_t_5 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_key), __pyx_v_reachable_buffer, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":863
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":863
* reachable = []
* if (key in reachable_buffer):
* reachable = reachable_buffer[key] # <<<<<<<<<<<<<<
@@ -44070,7 +44596,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":865
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":865
* reachable = reachable_buffer[key]
* else:
* reachable = self.reachable(fwords, i, spanlen) # <<<<<<<<<<<<<<
@@ -44098,7 +44624,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":866
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":866
* else:
* reachable = self.reachable(fwords, i, spanlen)
* reachable_buffer[key] = reachable # <<<<<<<<<<<<<<
@@ -44109,7 +44635,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":867
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":867
* reachable = self.reachable(fwords, i, spanlen)
* reachable_buffer[key] = reachable
* for nextreachable in reachable: # <<<<<<<<<<<<<<
@@ -44154,7 +44680,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":868
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":868
* reachable_buffer[key] = reachable
* for nextreachable in reachable:
* for next_id in next_states[nextreachable]: # <<<<<<<<<<<<<<
@@ -44202,7 +44728,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":869
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":869
* for nextreachable in reachable:
* for next_id in next_states[nextreachable]:
* jump = self.shortest(fwords,i,next_id) # <<<<<<<<<<<<<<
@@ -44230,7 +44756,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":870
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":870
* for next_id in next_states[nextreachable]:
* jump = self.shortest(fwords,i,next_id)
* if jump < skip: # <<<<<<<<<<<<<<
@@ -44242,7 +44768,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":871
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":871
* jump = self.shortest(fwords,i,next_id)
* if jump < skip:
* continue # <<<<<<<<<<<<<<
@@ -44254,7 +44780,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":872
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":872
* if jump < skip:
* continue
* if pathlen+jump <= self.max_initial_size: # <<<<<<<<<<<<<<
@@ -44272,7 +44798,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":873
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":873
* continue
* if pathlen+jump <= self.max_initial_size:
* for alt_id in range(len(fwords[next_id])): # <<<<<<<<<<<<<<
@@ -44332,7 +44858,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":874
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":874
* if pathlen+jump <= self.max_initial_size:
* for alt_id in range(len(fwords[next_id])):
* if (fwords[next_id][alt_id][0] != EPSILON): # <<<<<<<<<<<<<<
@@ -44356,7 +44882,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":875
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":875
* for alt_id in range(len(fwords[next_id])):
* if (fwords[next_id][alt_id][0] != EPSILON):
* newel = (next_id,alt_id,pathlen+jump) # <<<<<<<<<<<<<<
@@ -44380,7 +44906,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":876
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":876
* if (fwords[next_id][alt_id][0] != EPSILON):
* newel = (next_id,alt_id,pathlen+jump)
* if newel not in frontier: # <<<<<<<<<<<<<<
@@ -44390,7 +44916,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_t_5 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_newel), ((PyObject *)__pyx_v_frontier), Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":877
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":877
* newel = (next_id,alt_id,pathlen+jump)
* if newel not in frontier:
* frontier.append((next_id,alt_id,pathlen+jump)) # <<<<<<<<<<<<<<
@@ -44429,7 +44955,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":878
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":878
* if newel not in frontier:
* frontier.append((next_id,alt_id,pathlen+jump))
* return frontier # <<<<<<<<<<<<<<
@@ -44531,7 +45057,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *_
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":880
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":880
* return frontier
*
* def reachable(self, fwords, ifrom, dist): # <<<<<<<<<<<<<<
@@ -44561,7 +45087,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":881
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":881
*
* def reachable(self, fwords, ifrom, dist):
* ret = [] # <<<<<<<<<<<<<<
@@ -44573,7 +45099,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":882
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":882
* def reachable(self, fwords, ifrom, dist):
* ret = []
* if (ifrom >= len(fwords)): # <<<<<<<<<<<<<<
@@ -44589,7 +45115,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":883
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":883
* ret = []
* if (ifrom >= len(fwords)):
* return ret # <<<<<<<<<<<<<<
@@ -44604,7 +45130,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":884
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":884
* if (ifrom >= len(fwords)):
* return ret
* for alt_id in range(len(fwords[ifrom])): # <<<<<<<<<<<<<<
@@ -44664,7 +45190,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":885
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":885
* return ret
* for alt_id in range(len(fwords[ifrom])):
* if (fwords[ifrom][alt_id][0] == EPSILON): # <<<<<<<<<<<<<<
@@ -44688,7 +45214,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":886
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":886
* 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)) # <<<<<<<<<<<<<<
@@ -44739,7 +45265,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":888
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":888
* ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist))
* else:
* if (dist==0): # <<<<<<<<<<<<<<
@@ -44751,7 +45277,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":889
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":889
* else:
* if (dist==0):
* if (ifrom not in ret): # <<<<<<<<<<<<<<
@@ -44761,7 +45287,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_ifrom, ((PyObject *)__pyx_v_ret), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":890
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":890
* if (dist==0):
* if (ifrom not in ret):
* ret.append(ifrom) # <<<<<<<<<<<<<<
@@ -44776,7 +45302,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":892
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":892
* ret.append(ifrom)
* else:
* for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1): # <<<<<<<<<<<<<<
@@ -44852,7 +45378,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":893
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":893
* else:
* for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1):
* if (ifromchild not in ret): # <<<<<<<<<<<<<<
@@ -44862,7 +45388,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_ifromchild, ((PyObject *)__pyx_v_ret), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":894
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":894
* for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1):
* if (ifromchild not in ret):
* ret.append(ifromchild) # <<<<<<<<<<<<<<
@@ -44882,7 +45408,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":896
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":896
* ret.append(ifromchild)
*
* return ret # <<<<<<<<<<<<<<
@@ -44978,7 +45504,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":898
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":898
* return ret
*
* def shortest(self, fwords, ifrom, ito): # <<<<<<<<<<<<<<
@@ -45003,7 +45529,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":900
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":900
* def shortest(self, fwords, ifrom, ito):
* cdef unsigned alt_id
* min = 1000 # <<<<<<<<<<<<<<
@@ -45013,7 +45539,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":901
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":901
* cdef unsigned alt_id
* min = 1000
* if (ifrom > ito): # <<<<<<<<<<<<<<
@@ -45025,7 +45551,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":902
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":902
* min = 1000
* if (ifrom > ito):
* return min # <<<<<<<<<<<<<<
@@ -45040,7 +45566,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":903
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":903
* if (ifrom > ito):
* return min
* if (ifrom == ito): # <<<<<<<<<<<<<<
@@ -45052,7 +45578,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":904
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":904
* return min
* if (ifrom == ito):
* return 0 # <<<<<<<<<<<<<<
@@ -45067,7 +45593,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":905
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":905
* if (ifrom == ito):
* return 0
* for alt_id in range(len(fwords[ifrom])): # <<<<<<<<<<<<<<
@@ -45081,7 +45607,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":906
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":906
* return 0
* for alt_id in range(len(fwords[ifrom])):
* currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito) # <<<<<<<<<<<<<<
@@ -45120,7 +45646,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":907
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":907
* 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): # <<<<<<<<<<<<<<
@@ -45144,7 +45670,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":908
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":908
* currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito)
* if (fwords[ifrom][alt_id][0] != EPSILON):
* currmin += 1 # <<<<<<<<<<<<<<
@@ -45160,7 +45686,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":909
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":909
* if (fwords[ifrom][alt_id][0] != EPSILON):
* currmin += 1
* if (currmin<min): # <<<<<<<<<<<<<<
@@ -45172,7 +45698,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":910
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":910
* currmin += 1
* if (currmin<min):
* min = currmin # <<<<<<<<<<<<<<
@@ -45187,7 +45713,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
__pyx_L8:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":911
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":911
* if (currmin<min):
* min = currmin
* return min # <<<<<<<<<<<<<<
@@ -45283,7 +45809,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObj
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":913
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":913
* return min
*
* def get_next_states(self, _columns, curr_idx, min_dist=2): # <<<<<<<<<<<<<<
@@ -45316,7 +45842,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":914
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":914
*
* def get_next_states(self, _columns, curr_idx, min_dist=2):
* result = [] # <<<<<<<<<<<<<<
@@ -45328,7 +45854,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":915
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":915
* def get_next_states(self, _columns, curr_idx, min_dist=2):
* result = []
* candidate = [[curr_idx,0]] # <<<<<<<<<<<<<<
@@ -45351,7 +45877,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":917
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":917
* candidate = [[curr_idx,0]]
*
* while len(candidate) > 0: # <<<<<<<<<<<<<<
@@ -45363,7 +45889,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_t_4 = (__pyx_t_3 > 0);
if (!__pyx_t_4) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":918
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":918
*
* while len(candidate) > 0:
* curr = candidate.pop() # <<<<<<<<<<<<<<
@@ -45376,7 +45902,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":919
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":919
* while len(candidate) > 0:
* curr = candidate.pop()
* if curr[0] >= len(_columns): # <<<<<<<<<<<<<<
@@ -45395,7 +45921,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":920
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":920
* curr = candidate.pop()
* if curr[0] >= len(_columns):
* continue # <<<<<<<<<<<<<<
@@ -45407,7 +45933,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":921
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":921
* if curr[0] >= len(_columns):
* continue
* if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size: # <<<<<<<<<<<<<<
@@ -45438,7 +45964,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":922
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":922
* continue
* if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size:
* result.append(curr[0]); # <<<<<<<<<<<<<<
@@ -45453,7 +45979,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":923
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":923
* if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size:
* result.append(curr[0]);
* curr_col = _columns[curr[0]] # <<<<<<<<<<<<<<
@@ -45469,7 +45995,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":924
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":924
* result.append(curr[0]);
* curr_col = _columns[curr[0]]
* for alt in curr_col: # <<<<<<<<<<<<<<
@@ -45514,7 +46040,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":925
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":925
* curr_col = _columns[curr[0]]
* for alt in curr_col:
* next_id = curr[0]+alt[2] # <<<<<<<<<<<<<<
@@ -45533,7 +46059,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":926
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":926
* for alt in curr_col:
* next_id = curr[0]+alt[2]
* jump = 1 # <<<<<<<<<<<<<<
@@ -45544,7 +46070,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":927
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":927
* next_id = curr[0]+alt[2]
* jump = 1
* if (alt[0] == EPSILON): # <<<<<<<<<<<<<<
@@ -45562,7 +46088,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":928
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":928
* jump = 1
* if (alt[0] == EPSILON):
* jump = 0 # <<<<<<<<<<<<<<
@@ -45576,7 +46102,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":929
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":929
* if (alt[0] == EPSILON):
* jump = 0
* if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1: # <<<<<<<<<<<<<<
@@ -45607,7 +46133,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":930
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":930
* 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]) # <<<<<<<<<<<<<<
@@ -45637,7 +46163,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_L3_continue:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":931
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":931
* 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); # <<<<<<<<<<<<<<
@@ -45761,7 +46287,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_7lambda1_lambda2
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1093
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1093
* if len(extracts) > 0:
* fcount = Counter()
* fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) # <<<<<<<<<<<<<<
@@ -45863,7 +46389,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_1lambda3(PyObjec
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1099
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1099
* for f, elist in fphrases.iteritems():
* for e, alslist in elist.iteritems():
* alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) # <<<<<<<<<<<<<<
@@ -45903,7 +46429,7 @@ static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":933
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":933
* return sorted(result);
*
* def input(self, fwords, meta): # <<<<<<<<<<<<<<
@@ -45912,14 +46438,14 @@ static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self
*/
static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_22input(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_meta) {
- struct __pyx_obj_3_sa___pyx_scope_struct_15_input *__pyx_cur_scope;
+ struct __pyx_obj_3_sa___pyx_scope_struct_19_input *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("input", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_15_input *)__pyx_ptype_3_sa___pyx_scope_struct_15_input->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_15_input, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_19_input *)__pyx_ptype_3_sa___pyx_scope_struct_19_input->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_19_input, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -45955,7 +46481,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_22input(struct __pyx_ob
static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_15_input *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_15_input *)__pyx_generator->closure);
+ struct __pyx_obj_3_sa___pyx_scope_struct_19_input *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_19_input *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
Py_ssize_t __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
@@ -45997,7 +46523,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_L3_first_run:;
if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":944
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":944
* cdef Phrase hiero_phrase
*
* flen = len(fwords) # <<<<<<<<<<<<<<
@@ -46007,7 +46533,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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 = 944; __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":945
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":945
*
* flen = len(fwords)
* start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -46016,7 +46542,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_start_time = __pyx_f_3_sa_monitor_cpu();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":946
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":946
* flen = len(fwords)
* start_time = monitor_cpu()
* self.extract_time = 0.0 # <<<<<<<<<<<<<<
@@ -46025,7 +46551,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_self->extract_time = 0.0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":947
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":947
* start_time = monitor_cpu()
* self.extract_time = 0.0
* nodes_isteps_away_buffer = {} # <<<<<<<<<<<<<<
@@ -46038,7 +46564,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":948
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":948
* self.extract_time = 0.0
* nodes_isteps_away_buffer = {}
* hit = 0 # <<<<<<<<<<<<<<
@@ -46047,7 +46573,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_hit = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":949
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":949
* nodes_isteps_away_buffer = {}
* hit = 0
* reachable_buffer = {} # <<<<<<<<<<<<<<
@@ -46060,7 +46586,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":952
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":952
*
* # Do not cache between sentences
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) # <<<<<<<<<<<<<<
@@ -46082,7 +46608,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":954
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":954
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
*
* frontier = [] # <<<<<<<<<<<<<<
@@ -46095,7 +46621,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_frontier = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":955
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":955
*
* frontier = []
* for i in range(len(fwords)): # <<<<<<<<<<<<<<
@@ -46106,7 +46632,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":956
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":956
* frontier = []
* for i in range(len(fwords)):
* for alt in range(0, len(fwords[i])): # <<<<<<<<<<<<<<
@@ -46120,7 +46646,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":957
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":957
* for i in range(len(fwords)):
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON: # <<<<<<<<<<<<<<
@@ -46144,7 +46670,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":958
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":958
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON:
* frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False)) # <<<<<<<<<<<<<<
@@ -46200,7 +46726,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":960
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":960
* frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False))
*
* xroot = None # <<<<<<<<<<<<<<
@@ -46211,7 +46737,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GIVEREF(Py_None);
__pyx_cur_scope->__pyx_v_xroot = Py_None;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":961
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":961
*
* xroot = None
* x1 = sym_setindex(self.category, 1) # <<<<<<<<<<<<<<
@@ -46220,7 +46746,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":962
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":962
* xroot = None
* x1 = sym_setindex(self.category, 1)
* if x1 in self.rules.root.children: # <<<<<<<<<<<<<<
@@ -46236,7 +46762,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":963
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":963
* x1 = sym_setindex(self.category, 1)
* if x1 in self.rules.root.children:
* xroot = self.rules.root.children[x1] # <<<<<<<<<<<<<<
@@ -46257,7 +46783,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":965
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":965
* xroot = self.rules.root.children[x1]
* else:
* xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation()) # <<<<<<<<<<<<<<
@@ -46280,7 +46806,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_xroot = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":966
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":966
* else:
* xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation())
* self.rules.root.children[x1] = xroot # <<<<<<<<<<<<<<
@@ -46294,7 +46820,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":968
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":968
* self.rules.root.children[x1] = xroot
*
* for i in range(self.min_gap_size, len(fwords)): # <<<<<<<<<<<<<<
@@ -46305,7 +46831,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":969
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":969
*
* for i in range(self.min_gap_size, len(fwords)):
* for alt in range(0, len(fwords[i])): # <<<<<<<<<<<<<<
@@ -46319,7 +46845,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":970
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":970
* for i in range(self.min_gap_size, len(fwords)):
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON: # <<<<<<<<<<<<<<
@@ -46343,7 +46869,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":971
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":971
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON:
* frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True)) # <<<<<<<<<<<<<<
@@ -46408,7 +46934,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":973
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":973
* frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True))
*
* next_states = [] # <<<<<<<<<<<<<<
@@ -46421,7 +46947,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_next_states = __pyx_t_14;
__pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":974
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":974
*
* next_states = []
* for i in range(len(fwords)): # <<<<<<<<<<<<<<
@@ -46432,7 +46958,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":975
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":975
* next_states = []
* for i in range(len(fwords)):
* next_states.append(self.get_next_states(fwords,i,self.min_gap_size)) # <<<<<<<<<<<<<<
@@ -46464,7 +46990,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":977
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":977
* next_states.append(self.get_next_states(fwords,i,self.min_gap_size))
*
* while len(frontier) > 0: # <<<<<<<<<<<<<<
@@ -46476,7 +47002,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_8 = (__pyx_t_1 > 0);
if (!__pyx_t_8) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":978
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":978
*
* while len(frontier) > 0:
* new_frontier = [] # <<<<<<<<<<<<<<
@@ -46491,7 +47017,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_new_frontier = __pyx_t_13;
__pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":979
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":979
* while len(frontier) > 0:
* new_frontier = []
* for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier: # <<<<<<<<<<<<<<
@@ -46614,7 +47140,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_is_shadow_path = __pyx_t_16;
__pyx_t_16 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":980
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":980
* new_frontier = []
* for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier:
* word_id = fwords[i][alt][0] # <<<<<<<<<<<<<<
@@ -46635,7 +47161,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":981
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":981
* for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier:
* word_id = fwords[i][alt][0]
* spanlen = fwords[i][alt][2] # <<<<<<<<<<<<<<
@@ -46656,7 +47182,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_spanlen = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":983
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":983
* spanlen = fwords[i][alt][2]
* # TODO get rid of k -- pathlen is replacing it
* if word_id == EPSILON: # <<<<<<<<<<<<<<
@@ -46671,7 +47197,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":985
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":985
* if word_id == EPSILON:
* # skipping because word_id is epsilon
* if i+spanlen >= len(fwords): # <<<<<<<<<<<<<<
@@ -46693,7 +47219,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":986
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":986
* # skipping because word_id is epsilon
* if i+spanlen >= len(fwords):
* continue # <<<<<<<<<<<<<<
@@ -46705,7 +47231,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":987
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":987
* if i+spanlen >= len(fwords):
* continue
* for nualt in range(0,len(fwords[i+spanlen])): # <<<<<<<<<<<<<<
@@ -46725,7 +47251,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_5; __pyx_t_19+=1) {
__pyx_cur_scope->__pyx_v_nualt = __pyx_t_19;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":988
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":988
* continue
* for nualt in range(0,len(fwords[i+spanlen])):
* frontier.append((k, i+spanlen, input_match, nualt, pathlen, node, prefix, is_shadow_path)) # <<<<<<<<<<<<<<
@@ -46771,7 +47297,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":989
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":989
* for nualt in range(0,len(fwords[i+spanlen])):
* frontier.append((k, i+spanlen, input_match, nualt, pathlen, node, prefix, is_shadow_path))
* continue # <<<<<<<<<<<<<<
@@ -46783,7 +47309,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L23:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":991
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":991
* continue
*
* phrase = prefix + (word_id,) # <<<<<<<<<<<<<<
@@ -46804,7 +47330,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_phrase = __pyx_t_16;
__pyx_t_16 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":992
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":992
*
* phrase = prefix + (word_id,)
* hiero_phrase = Phrase(phrase) # <<<<<<<<<<<<<<
@@ -46825,7 +47351,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":993
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":993
* phrase = prefix + (word_id,)
* hiero_phrase = Phrase(phrase)
* arity = hiero_phrase.arity() # <<<<<<<<<<<<<<
@@ -46841,7 +47367,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
__pyx_cur_scope->__pyx_v_arity = __pyx_t_19;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":995
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":995
* arity = hiero_phrase.arity()
*
* lookup_required = False # <<<<<<<<<<<<<<
@@ -46850,7 +47376,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_lookup_required = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":996
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":996
*
* lookup_required = False
* if word_id in node.children: # <<<<<<<<<<<<<<
@@ -46863,7 +47389,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":997
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":997
* lookup_required = False
* if word_id in node.children:
* if node.children[word_id] is None: # <<<<<<<<<<<<<<
@@ -46879,7 +47405,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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/m/workspace/cdec/python/src/sa/rulefactory.pxi":999
* if node.children[word_id] is None:
* # Path dead-ends at this node
* continue # <<<<<<<<<<<<<<
@@ -46891,7 +47417,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1002
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1002
* else:
* # Path continues at this node
* node = node.children[word_id] # <<<<<<<<<<<<<<
@@ -46914,7 +47440,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1004
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1004
* node = node.children[word_id]
* else:
* if node.suffix_link is None: # <<<<<<<<<<<<<<
@@ -46927,7 +47453,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1006
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1006
* if node.suffix_link is None:
* # Current node is root; lookup required
* lookup_required = True # <<<<<<<<<<<<<<
@@ -46939,7 +47465,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1008
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1008
* lookup_required = True
* else:
* if word_id in node.suffix_link.children: # <<<<<<<<<<<<<<
@@ -46955,7 +47481,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1009
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1009
* else:
* if word_id in node.suffix_link.children:
* if node.suffix_link.children[word_id] is None: # <<<<<<<<<<<<<<
@@ -46974,7 +47500,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1011
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1011
* if node.suffix_link.children[word_id] is None:
* # Suffix link reports path is dead end
* node.children[word_id] = None # <<<<<<<<<<<<<<
@@ -46986,7 +47512,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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 = 1011; __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":1012
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1012
* # Suffix link reports path is dead end
* node.children[word_id] = None
* continue # <<<<<<<<<<<<<<
@@ -46998,7 +47524,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1015
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1015
* else:
* # Suffix link indicates lookup is reqired
* lookup_required = True # <<<<<<<<<<<<<<
@@ -47012,7 +47538,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1018
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1018
* else:
* #ERROR: We never get here
* raise Exception("Keyword trie error") # <<<<<<<<<<<<<<
@@ -47031,7 +47557,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L27:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1020
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1020
* raise Exception("Keyword trie error")
* # checking whether lookup_required
* if lookup_required: # <<<<<<<<<<<<<<
@@ -47040,7 +47566,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
if (__pyx_cur_scope->__pyx_v_lookup_required) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1021
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1021
* # checking whether lookup_required
* if lookup_required:
* new_node = None # <<<<<<<<<<<<<<
@@ -47053,7 +47579,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GIVEREF(Py_None);
__pyx_cur_scope->__pyx_v_new_node = Py_None;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1022
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1022
* if lookup_required:
* new_node = None
* if is_shadow_path: # <<<<<<<<<<<<<<
@@ -47063,7 +47589,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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 = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1025
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1025
* # 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, # <<<<<<<<<<<<<<
@@ -47086,7 +47612,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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 = 1025; __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":1026
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1026
* # 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], # <<<<<<<<<<<<<<
@@ -47104,7 +47630,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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 = 1025; __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":1027
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1027
* new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location,
* suffix_link=node.suffix_link.children[word_id],
* phrase=hiero_phrase) # <<<<<<<<<<<<<<
@@ -47124,7 +47650,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1029
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1029
* phrase=hiero_phrase)
* else:
* if arity > 0: # <<<<<<<<<<<<<<
@@ -47134,7 +47660,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1031
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1031
* if arity > 0:
* # Intersecting because of arity > 0
* phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase) # <<<<<<<<<<<<<<
@@ -47161,7 +47687,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1034
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1034
* else:
* # Suffix array search
* phrase_location = node.phrase_location # <<<<<<<<<<<<<<
@@ -47177,7 +47703,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1035
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1035
* # 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) # <<<<<<<<<<<<<<
@@ -47223,7 +47749,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_sa_range = __pyx_t_11;
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1036
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1036
* 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: # <<<<<<<<<<<<<<
@@ -47233,7 +47759,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1037
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1037
* 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]) # <<<<<<<<<<<<<<
@@ -47262,7 +47788,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1039
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1039
* phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1])
* else:
* phrase_location = None # <<<<<<<<<<<<<<
@@ -47279,7 +47805,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L34:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1041
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1041
* phrase_location = None
*
* if phrase_location is None: # <<<<<<<<<<<<<<
@@ -47289,7 +47815,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1042
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1042
*
* if phrase_location is None:
* node.children[word_id] = None # <<<<<<<<<<<<<<
@@ -47301,7 +47827,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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 = 1042; __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":1044
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1044
* node.children[word_id] = None
* # Search failed
* continue # <<<<<<<<<<<<<<
@@ -47313,7 +47839,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L36:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1046
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1046
* continue
* # Search succeeded
* suffix_link = self.rules.root # <<<<<<<<<<<<<<
@@ -47326,7 +47852,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1047
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1047
* # Search succeeded
* suffix_link = self.rules.root
* if node.suffix_link is not None: # <<<<<<<<<<<<<<
@@ -47339,7 +47865,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1048
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1048
* suffix_link = self.rules.root
* if node.suffix_link is not None:
* suffix_link = node.suffix_link.children[word_id] # <<<<<<<<<<<<<<
@@ -47363,7 +47889,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L37:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1049
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1049
* if node.suffix_link is not None:
* suffix_link = node.suffix_link.children[word_id]
* new_node = ExtendedTrieNode(phrase_location=phrase_location, # <<<<<<<<<<<<<<
@@ -47374,7 +47900,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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 = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1050
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1050
* suffix_link = node.suffix_link.children[word_id]
* new_node = ExtendedTrieNode(phrase_location=phrase_location,
* suffix_link=suffix_link, # <<<<<<<<<<<<<<
@@ -47383,7 +47909,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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 = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1051
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1051
* new_node = ExtendedTrieNode(phrase_location=phrase_location,
* suffix_link=suffix_link,
* phrase=hiero_phrase) # <<<<<<<<<<<<<<
@@ -47402,7 +47928,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L33:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1052
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1052
* suffix_link=suffix_link,
* phrase=hiero_phrase)
* node.children[word_id] = new_node # <<<<<<<<<<<<<<
@@ -47414,7 +47940,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (PyObject_SetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_word_id, __pyx_cur_scope->__pyx_v_new_node) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1053
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1053
* phrase=hiero_phrase)
* node.children[word_id] = new_node
* node = new_node # <<<<<<<<<<<<<<
@@ -47427,7 +47953,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1058
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1058
* This should happen before we get to extraction (so that
* the node will exist if needed)'''
* if arity < self.max_nonterminals: # <<<<<<<<<<<<<<
@@ -47437,7 +47963,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1059
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1059
* the node will exist if needed)'''
* if arity < self.max_nonterminals:
* xcat_index = arity+1 # <<<<<<<<<<<<<<
@@ -47452,7 +47978,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_xcat_index = __pyx_t_11;
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1060
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1060
* if arity < self.max_nonterminals:
* xcat_index = arity+1
* xcat = sym_setindex(self.category, xcat_index) # <<<<<<<<<<<<<<
@@ -47462,7 +47988,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_19 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_xcat_index); if (unlikely((__pyx_t_19 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1060; __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_19);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1061
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1061
* xcat_index = arity+1
* xcat = sym_setindex(self.category, xcat_index)
* suffix_link_xcat_index = xcat_index # <<<<<<<<<<<<<<
@@ -47475,7 +48001,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1062
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1062
* xcat = sym_setindex(self.category, xcat_index)
* suffix_link_xcat_index = xcat_index
* if is_shadow_path: # <<<<<<<<<<<<<<
@@ -47485,7 +48011,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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 = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1063
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1063
* suffix_link_xcat_index = xcat_index
* if is_shadow_path:
* suffix_link_xcat_index = xcat_index-1 # <<<<<<<<<<<<<<
@@ -47503,7 +48029,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L39:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1064
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1064
* if is_shadow_path:
* suffix_link_xcat_index = xcat_index-1
* suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) # <<<<<<<<<<<<<<
@@ -47513,7 +48039,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_19 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index); if (unlikely((__pyx_t_19 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1064; __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_19);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1065
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1065
* 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, # <<<<<<<<<<<<<<
@@ -47527,7 +48053,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1065; __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":1066
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1066
* 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], # <<<<<<<<<<<<<<
@@ -47545,7 +48071,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__suffix_link), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1065; __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":1067
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1067
* node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location,
* suffix_link=node.suffix_link.children[suffix_link_xcat],
* phrase= Phrase(phrase + (xcat,))) # <<<<<<<<<<<<<<
@@ -47576,7 +48102,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1065
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1065
* 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, # <<<<<<<<<<<<<<
@@ -47592,7 +48118,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L38:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1070
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1070
*
* # sample from range
* if not is_shadow_path: # <<<<<<<<<<<<<<
@@ -47603,7 +48129,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_20 = (!__pyx_t_8);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1071
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1071
* # sample from range
* if not is_shadow_path:
* sample = self.sampler.sample(node.phrase_location) # <<<<<<<<<<<<<<
@@ -47630,7 +48156,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_sample = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_11);
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1072
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1072
* if not is_shadow_path:
* sample = self.sampler.sample(node.phrase_location)
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns # <<<<<<<<<<<<<<
@@ -47642,7 +48168,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_num_subpatterns = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_11)->num_subpatterns;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1073
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1073
* sample = self.sampler.sample(node.phrase_location)
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns
* chunklen = IntList(initial_len=num_subpatterns) # <<<<<<<<<<<<<<
@@ -47664,7 +48190,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1074
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1074
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns
* chunklen = IntList(initial_len=num_subpatterns)
* for j from 0 <= j < num_subpatterns: # <<<<<<<<<<<<<<
@@ -47674,7 +48200,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_19 = __pyx_cur_scope->__pyx_v_num_subpatterns;
for (__pyx_cur_scope->__pyx_v_j = 0; __pyx_cur_scope->__pyx_v_j < __pyx_t_19; __pyx_cur_scope->__pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1075
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1075
* chunklen = IntList(initial_len=num_subpatterns)
* for j from 0 <= j < num_subpatterns:
* chunklen.arr[j] = hiero_phrase.chunklen(j) # <<<<<<<<<<<<<<
@@ -47684,7 +48210,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1076
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1076
* for j from 0 <= j < num_subpatterns:
* chunklen.arr[j] = hiero_phrase.chunklen(j)
* extracts = [] # <<<<<<<<<<<<<<
@@ -47699,7 +48225,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_extracts = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1077
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1077
* chunklen.arr[j] = hiero_phrase.chunklen(j)
* extracts = []
* j = 0 # <<<<<<<<<<<<<<
@@ -47708,7 +48234,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_j = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1078
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1078
* extracts = []
* j = 0
* extract_start = monitor_cpu() # <<<<<<<<<<<<<<
@@ -47723,7 +48249,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1079
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1079
* j = 0
* extract_start = monitor_cpu()
* while j < sample.len: # <<<<<<<<<<<<<<
@@ -47734,7 +48260,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_20 = (__pyx_cur_scope->__pyx_v_j < __pyx_cur_scope->__pyx_v_sample->len);
if (!__pyx_t_20) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1080
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1080
* extract_start = monitor_cpu()
* while j < sample.len:
* extract = [] # <<<<<<<<<<<<<<
@@ -47749,7 +48275,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1082
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1082
* extract = []
*
* assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
@@ -47758,7 +48284,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1083
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1083
*
* assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr)
* loc = tuple(sample[j:j+num_subpatterns]) # <<<<<<<<<<<<<<
@@ -47781,7 +48307,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_loc = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1084
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1084
* assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr)
* loc = tuple(sample[j:j+num_subpatterns])
* extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns) # <<<<<<<<<<<<<<
@@ -47796,7 +48322,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_extract = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1085
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1085
* loc = tuple(sample[j:j+num_subpatterns])
* extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns)
* extracts.extend([(e, loc) for e in extract]) # <<<<<<<<<<<<<<
@@ -47870,7 +48396,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1086
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1086
* extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns)
* extracts.extend([(e, loc) for e in extract])
* j = j + num_subpatterns # <<<<<<<<<<<<<<
@@ -47880,7 +48406,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1088
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1088
* j = j + num_subpatterns
*
* num_samples = sample.len/num_subpatterns # <<<<<<<<<<<<<<
@@ -47897,7 +48423,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1089
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1089
*
* num_samples = sample.len/num_subpatterns
* extract_stop = monitor_cpu() # <<<<<<<<<<<<<<
@@ -47912,7 +48438,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_extract_stop = __pyx_t_11;
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1090
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1090
* num_samples = sample.len/num_subpatterns
* extract_stop = monitor_cpu()
* self.extract_time = self.extract_time + extract_stop - extract_start # <<<<<<<<<<<<<<
@@ -47931,7 +48457,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_cur_scope->__pyx_v_self->extract_time = __pyx_t_22;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1091
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1091
* extract_stop = monitor_cpu()
* self.extract_time = self.extract_time + extract_stop - extract_start
* if len(extracts) > 0: # <<<<<<<<<<<<<<
@@ -47942,7 +48468,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_20 = (__pyx_t_5 > 0);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1092
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1092
* self.extract_time = self.extract_time + extract_stop - extract_start
* if len(extracts) > 0:
* fcount = Counter() # <<<<<<<<<<<<<<
@@ -47960,7 +48486,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_fcount = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1093
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1093
* if len(extracts) > 0:
* fcount = Counter()
* fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) # <<<<<<<<<<<<<<
@@ -47986,7 +48512,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_fphrases = __pyx_t_11;
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1094
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1094
* fcount = Counter()
* fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
* for (f, e, count, als), loc in extracts: # <<<<<<<<<<<<<<
@@ -48137,7 +48663,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_loc = __pyx_t_15;
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1095
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1095
* fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
* for (f, e, count, als), loc in extracts:
* fcount[f] += count # <<<<<<<<<<<<<<
@@ -48155,7 +48681,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1096
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1096
* for (f, e, count, als), loc in extracts:
* fcount[f] += count
* fphrases[f][e][als].append(loc) # <<<<<<<<<<<<<<
@@ -48177,7 +48703,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1097
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1097
* fcount[f] += count
* fphrases[f][e][als].append(loc)
* for f, elist in fphrases.iteritems(): # <<<<<<<<<<<<<<
@@ -48211,7 +48737,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_elist = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1098
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1098
* fphrases[f][e][als].append(loc)
* for f, elist in fphrases.iteritems():
* for e, alslist in elist.iteritems(): # <<<<<<<<<<<<<<
@@ -48245,7 +48771,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_alslist = __pyx_t_15;
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1099
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1099
* for f, elist in fphrases.iteritems():
* for e, alslist in elist.iteritems():
* alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) # <<<<<<<<<<<<<<
@@ -48332,7 +48858,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_max_locs = __pyx_t_15;
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1100
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1100
* for e, alslist in elist.iteritems():
* alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1]))
* locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) # <<<<<<<<<<<<<<
@@ -48375,7 +48901,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_locs = ((PyObject*)__pyx_t_9);
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1101
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1101
* alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1]))
* locs = tuple(itertools.chain.from_iterable(alslist.itervalues()))
* count = len(locs) # <<<<<<<<<<<<<<
@@ -48391,7 +48917,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_count = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1102
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1102
* locs = tuple(itertools.chain.from_iterable(alslist.itervalues()))
* count = len(locs)
* scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<<
@@ -48401,7 +48927,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__FeatureContext); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1103
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1103
* count = len(locs)
* scores = self.scorer.score(FeatureContext(
* f, e, count, fcount[f], num_samples, # <<<<<<<<<<<<<<
@@ -48413,7 +48939,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_7 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_num_samples); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1104
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1104
* scores = self.scorer.score(FeatureContext(
* f, e, count, fcount[f], num_samples,
* (k,i+spanlen), locs, input_match, # <<<<<<<<<<<<<<
@@ -48436,7 +48962,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_10 = 0;
__pyx_t_16 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1106
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1106
* (k,i+spanlen), locs, input_match,
* fwords, self.fda, self.eda,
* meta)) # <<<<<<<<<<<<<<
@@ -48494,7 +49020,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_scores = ((struct __pyx_obj_3_sa_FeatureVector *)__pyx_t_16);
__pyx_t_16 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1107
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1107
* fwords, self.fda, self.eda,
* meta))
* yield Rule(self.category, f, e, scores, alignment) # <<<<<<<<<<<<<<
@@ -48575,7 +49101,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L32:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1109
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1109
* 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: # <<<<<<<<<<<<<<
@@ -48618,7 +49144,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1110
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1110
*
* 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])): # <<<<<<<<<<<<<<
@@ -48638,7 +49164,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_23; __pyx_t_19+=1) {
__pyx_cur_scope->__pyx_v_alt_id = __pyx_t_19;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1111
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1111
* if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size:
* for alt_id in range(len(fwords[i+spanlen])):
* new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path)) # <<<<<<<<<<<<<<
@@ -48686,7 +49212,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1112
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1112
* for alt_id in range(len(fwords[i+spanlen])):
* new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path))
* num_subpatterns = arity # <<<<<<<<<<<<<<
@@ -48695,7 +49221,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_num_subpatterns = __pyx_cur_scope->__pyx_v_arity;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1113
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1113
* new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path))
* num_subpatterns = arity
* if not is_shadow_path: # <<<<<<<<<<<<<<
@@ -48706,7 +49232,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_20 = (!__pyx_t_8);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1114
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1114
* num_subpatterns = arity
* if not is_shadow_path:
* num_subpatterns = num_subpatterns + 1 # <<<<<<<<<<<<<<
@@ -48718,7 +49244,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L64:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1115
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1115
* 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: # <<<<<<<<<<<<<<
@@ -48741,7 +49267,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1116
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1116
* 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) # <<<<<<<<<<<<<<
@@ -48750,7 +49276,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__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":1117
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1117
* 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] # <<<<<<<<<<<<<<
@@ -48768,7 +49294,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_xnode = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1119
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1119
* xnode = node.children[xcat]
* # I put spanlen=1 below
* key = tuple([self.min_gap_size, i, 1, pathlen]) # <<<<<<<<<<<<<<
@@ -48802,7 +49328,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_key = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1120
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1120
* # I put spanlen=1 below
* key = tuple([self.min_gap_size, i, 1, pathlen])
* frontier_nodes = [] # <<<<<<<<<<<<<<
@@ -48817,7 +49343,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_frontier_nodes = ((PyObject *)__pyx_t_9);
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1121
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1121
* key = tuple([self.min_gap_size, i, 1, pathlen])
* frontier_nodes = []
* if (key in nodes_isteps_away_buffer): # <<<<<<<<<<<<<<
@@ -48827,7 +49353,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_8 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_cur_scope->__pyx_v_key), ((PyObject *)__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer), Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1122
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1122
* frontier_nodes = []
* if (key in nodes_isteps_away_buffer):
* frontier_nodes = nodes_isteps_away_buffer[key] # <<<<<<<<<<<<<<
@@ -48845,7 +49371,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1124
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1124
* 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) # <<<<<<<<<<<<<<
@@ -48891,7 +49417,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_frontier_nodes = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1125
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1125
* 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 # <<<<<<<<<<<<<<
@@ -48902,7 +49428,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L66:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1127
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1127
* nodes_isteps_away_buffer[key] = frontier_nodes
*
* for (i, alt, pathlen) in frontier_nodes: # <<<<<<<<<<<<<<
@@ -49010,7 +49536,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_pathlen = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1128
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1128
*
* for (i, alt, pathlen) in frontier_nodes:
* new_frontier.append((k, i, input_match + (i,), alt, pathlen, xnode, phrase +(xcat,), is_shadow_path)) # <<<<<<<<<<<<<<
@@ -49083,7 +49609,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1129
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1129
* for (i, alt, pathlen) in frontier_nodes:
* new_frontier.append((k, i, input_match + (i,), alt, pathlen, xnode, phrase +(xcat,), is_shadow_path))
* frontier = new_frontier # <<<<<<<<<<<<<<
@@ -49097,7 +49623,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_frontier = __pyx_cur_scope->__pyx_v_new_frontier;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1131
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1131
* frontier = new_frontier
*
* stop_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -49110,7 +49636,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_stop_time = __pyx_t_13;
__pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1132
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1132
*
* stop_time = monitor_cpu()
* logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time)) # <<<<<<<<<<<<<<
@@ -49141,7 +49667,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1133
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1133
* stop_time = monitor_cpu()
* logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time))
* gc.collect() # <<<<<<<<<<<<<<
@@ -49158,7 +49684,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1134
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1134
* 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) # <<<<<<<<<<<<<<
@@ -49208,7 +49734,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1137
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1137
*
*
* cdef int find_fixpoint(self, # <<<<<<<<<<<<<<
@@ -49238,7 +49764,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":1152
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1152
* 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 # <<<<<<<<<<<<<<
@@ -49247,7 +49773,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":1153
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1153
*
* e_low[0] = e_in_low
* e_high[0] = e_in_high # <<<<<<<<<<<<<<
@@ -49256,7 +49782,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":1154
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1154
* 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) # <<<<<<<<<<<<<<
@@ -49268,7 +49794,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":1155
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1155
* 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: # <<<<<<<<<<<<<<
@@ -49278,7 +49804,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":1161
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1161
* # rule X -> X_1 w X_2 / X_1 X_2. This is probably
* # not worth the bother, though.
* return 0 # <<<<<<<<<<<<<<
@@ -49290,7 +49816,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":1162
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1162
* # not worth the bother, though.
* return 0
* elif e_in_low != -1 and e_low[0] != e_in_low: # <<<<<<<<<<<<<<
@@ -49306,7 +49832,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":1163
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1163
* return 0
* elif e_in_low != -1 and e_low[0] != e_in_low:
* if e_in_low - e_low[0] < min_ex_size: # <<<<<<<<<<<<<<
@@ -49316,7 +49842,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":1164
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1164
* 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 # <<<<<<<<<<<<<<
@@ -49325,7 +49851,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":1165
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1165
* if e_in_low - e_low[0] < min_ex_size:
* e_low[0] = e_in_low - min_ex_size
* if e_low[0] < 0: # <<<<<<<<<<<<<<
@@ -49335,7 +49861,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":1166
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1166
* e_low[0] = e_in_low - min_ex_size
* if e_low[0] < 0:
* return 0 # <<<<<<<<<<<<<<
@@ -49354,7 +49880,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1168
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1168
* return 0
*
* if e_high[0] - e_low[0] > max_e_len: # <<<<<<<<<<<<<<
@@ -49364,7 +49890,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":1169
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1169
*
* if e_high[0] - e_low[0] > max_e_len:
* return 0 # <<<<<<<<<<<<<<
@@ -49376,7 +49902,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":1170
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1170
* if e_high[0] - e_low[0] > max_e_len:
* return 0
* elif e_in_high != -1 and e_high[0] != e_in_high: # <<<<<<<<<<<<<<
@@ -49392,7 +49918,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":1171
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1171
* return 0
* elif e_in_high != -1 and e_high[0] != e_in_high:
* if e_high[0] - e_in_high < min_ex_size: # <<<<<<<<<<<<<<
@@ -49402,7 +49928,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":1172
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1172
* 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 # <<<<<<<<<<<<<<
@@ -49411,7 +49937,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":1173
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1173
* 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: # <<<<<<<<<<<<<<
@@ -49421,7 +49947,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":1174
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1174
* e_high[0] = e_in_high + min_ex_size
* if e_high[0] > e_sent_len:
* return 0 # <<<<<<<<<<<<<<
@@ -49440,7 +49966,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1176
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1176
* return 0
*
* f_back_low[0] = -1 # <<<<<<<<<<<<<<
@@ -49449,7 +49975,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":1177
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1177
*
* f_back_low[0] = -1
* f_back_high[0] = -1 # <<<<<<<<<<<<<<
@@ -49458,7 +49984,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":1178
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1178
* f_back_low[0] = -1
* f_back_high[0] = -1
* f_low_prev = f_low # <<<<<<<<<<<<<<
@@ -49467,7 +49993,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":1179
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1179
* f_back_high[0] = -1
* f_low_prev = f_low
* f_high_prev = f_high # <<<<<<<<<<<<<<
@@ -49477,7 +50003,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 = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_f_high_prev = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1180
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1180
* f_low_prev = f_low
* f_high_prev = f_high
* new_x = 0 # <<<<<<<<<<<<<<
@@ -49486,7 +50012,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":1181
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1181
* f_high_prev = f_high
* new_x = 0
* new_low_x = 0 # <<<<<<<<<<<<<<
@@ -49495,7 +50021,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":1182
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1182
* new_x = 0
* new_low_x = 0
* new_high_x = 0 # <<<<<<<<<<<<<<
@@ -49504,7 +50030,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":1184
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1184
* new_high_x = 0
*
* while True: # <<<<<<<<<<<<<<
@@ -49514,7 +50040,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":1186
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1186
* while True:
*
* if f_back_low[0] == -1: # <<<<<<<<<<<<<<
@@ -49524,7 +50050,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":1187
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1187
*
* 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) # <<<<<<<<<<<<<<
@@ -49538,7 +50064,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1189
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1189
* 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) # <<<<<<<<<<<<<<
@@ -49549,7 +50075,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":1190
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1190
* 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) # <<<<<<<<<<<<<<
@@ -49562,7 +50088,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1192
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1192
* 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: # <<<<<<<<<<<<<<
@@ -49572,7 +50098,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":1193
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1193
*
* if f_back_low[0] > f_low:
* f_back_low[0] = f_low # <<<<<<<<<<<<<<
@@ -49584,7 +50110,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1195
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1195
* f_back_low[0] = f_low
*
* if f_back_high[0] < f_high: # <<<<<<<<<<<<<<
@@ -49599,7 +50125,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":1196
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1196
*
* if f_back_high[0] < f_high:
* f_back_high[0] = f_high # <<<<<<<<<<<<<<
@@ -49612,7 +50138,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L13:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1198
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1198
* f_back_high[0] = f_high
*
* if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev: # <<<<<<<<<<<<<<
@@ -49628,7 +50154,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":1199
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1199
*
* if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev:
* return 1 # <<<<<<<<<<<<<<
@@ -49641,7 +50167,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L14:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1201
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1201
* return 1
*
* if allow_low_x == 0 and f_back_low[0] < f_low: # <<<<<<<<<<<<<<
@@ -49657,7 +50183,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":1203
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1203
* if allow_low_x == 0 and f_back_low[0] < f_low:
* # FAIL: f phrase is not tight
* return 0 # <<<<<<<<<<<<<<
@@ -49670,7 +50196,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1205
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1205
* return 0
*
* if f_back_high[0] - f_back_low[0] > max_f_len: # <<<<<<<<<<<<<<
@@ -49680,7 +50206,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":1207
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1207
* if f_back_high[0] - f_back_low[0] > max_f_len:
* # FAIL: f back projection is too wide
* return 0 # <<<<<<<<<<<<<<
@@ -49693,7 +50219,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L16:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1209
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1209
* return 0
*
* if allow_high_x == 0 and f_back_high[0] > f_high: # <<<<<<<<<<<<<<
@@ -49714,7 +50240,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":1211
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1211
* if allow_high_x == 0 and f_back_high[0] > f_high:
* # FAIL: extension on high side not allowed
* return 0 # <<<<<<<<<<<<<<
@@ -49727,7 +50253,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1213
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1213
* return 0
*
* if f_low != f_back_low[0]: # <<<<<<<<<<<<<<
@@ -49737,7 +50263,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":1214
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1214
*
* if f_low != f_back_low[0]:
* if new_low_x == 0: # <<<<<<<<<<<<<<
@@ -49747,7 +50273,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":1215
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1215
* if f_low != f_back_low[0]:
* if new_low_x == 0:
* if new_x >= max_new_x: # <<<<<<<<<<<<<<
@@ -49757,7 +50283,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":1217
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1217
* if new_x >= max_new_x:
* # FAIL: extension required on low side violates max # of gaps
* return 0 # <<<<<<<<<<<<<<
@@ -49770,7 +50296,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1219
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1219
* return 0
* else:
* new_x = new_x + 1 # <<<<<<<<<<<<<<
@@ -49779,7 +50305,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":1220
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1220
* else:
* new_x = new_x + 1
* new_low_x = 1 # <<<<<<<<<<<<<<
@@ -49793,7 +50319,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L19:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1221
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1221
* new_x = new_x + 1
* new_low_x = 1
* if f_low - f_back_low[0] < min_fx_size: # <<<<<<<<<<<<<<
@@ -49803,7 +50329,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":1222
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1222
* new_low_x = 1
* if f_low - f_back_low[0] < min_fx_size:
* f_back_low[0] = f_low - min_fx_size # <<<<<<<<<<<<<<
@@ -49812,7 +50338,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":1223
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1223
* 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: # <<<<<<<<<<<<<<
@@ -49822,7 +50348,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":1225
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1225
* if f_back_high[0] - f_back_low[0] > max_f_len:
* # FAIL: extension required on low side violates max initial length
* return 0 # <<<<<<<<<<<<<<
@@ -49835,7 +50361,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L22:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1226
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1226
* # FAIL: extension required on low side violates max initial length
* return 0
* if f_back_low[0] < 0: # <<<<<<<<<<<<<<
@@ -49845,7 +50371,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":1228
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1228
* if f_back_low[0] < 0:
* # FAIL: extension required on low side violates sentence boundary
* return 0 # <<<<<<<<<<<<<<
@@ -49864,7 +50390,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L18:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1230
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1230
* return 0
*
* if f_high != f_back_high[0]: # <<<<<<<<<<<<<<
@@ -49879,7 +50405,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":1231
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1231
*
* if f_high != f_back_high[0]:
* if new_high_x == 0: # <<<<<<<<<<<<<<
@@ -49889,7 +50415,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":1232
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1232
* if f_high != f_back_high[0]:
* if new_high_x == 0:
* if new_x >= max_new_x: # <<<<<<<<<<<<<<
@@ -49899,7 +50425,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":1234
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1234
* if new_x >= max_new_x:
* # FAIL: extension required on high side violates max # of gaps
* return 0 # <<<<<<<<<<<<<<
@@ -49912,7 +50438,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1236
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1236
* return 0
* else:
* new_x = new_x + 1 # <<<<<<<<<<<<<<
@@ -49921,7 +50447,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":1237
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1237
* else:
* new_x = new_x + 1
* new_high_x = 1 # <<<<<<<<<<<<<<
@@ -49935,7 +50461,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L25:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1238
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1238
* new_x = new_x + 1
* new_high_x = 1
* if f_back_high[0] - f_high < min_fx_size: # <<<<<<<<<<<<<<
@@ -49956,7 +50482,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":1239
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1239
* new_high_x = 1
* if f_back_high[0] - f_high < min_fx_size:
* f_back_high[0] = f_high + min_fx_size # <<<<<<<<<<<<<<
@@ -49972,7 +50498,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":1240
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1240
* 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: # <<<<<<<<<<<<<<
@@ -49982,7 +50508,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":1242
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1242
* if f_back_high[0] - f_back_low[0] > max_f_len:
* # FAIL: extension required on high side violates max initial length
* return 0 # <<<<<<<<<<<<<<
@@ -49995,7 +50521,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L28:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1243
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1243
* # FAIL: extension required on high side violates max initial length
* return 0
* if f_back_high[0] > f_sent_len: # <<<<<<<<<<<<<<
@@ -50005,7 +50531,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":1245
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1245
* if f_back_high[0] > f_sent_len:
* # FAIL: extension required on high side violates sentence boundary
* return 0 # <<<<<<<<<<<<<<
@@ -50024,7 +50550,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1247
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1247
* return 0
*
* e_low_prev = e_low[0] # <<<<<<<<<<<<<<
@@ -50033,7 +50559,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":1248
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1248
*
* e_low_prev = e_low[0]
* e_high_prev = e_high[0] # <<<<<<<<<<<<<<
@@ -50042,7 +50568,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":1250
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1250
* 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) # <<<<<<<<<<<<<<
@@ -50053,7 +50579,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":1251
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1251
*
* 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) # <<<<<<<<<<<<<<
@@ -50064,7 +50590,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":1252
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1252
* 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: # <<<<<<<<<<<<<<
@@ -50080,7 +50606,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":1253
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1253
* 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 # <<<<<<<<<<<<<<
@@ -50093,7 +50619,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L30:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1254
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1254
* if e_low[0] == e_low_prev and e_high[0] == e_high_prev:
* return 1
* if allow_arbitrary_x == 0: # <<<<<<<<<<<<<<
@@ -50103,7 +50629,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":1256
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1256
* if allow_arbitrary_x == 0:
* # FAIL: arbitrary expansion not permitted
* return 0 # <<<<<<<<<<<<<<
@@ -50116,7 +50642,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L31:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1257
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1257
* # FAIL: arbitrary expansion not permitted
* return 0
* if e_high[0] - e_low[0] > max_e_len: # <<<<<<<<<<<<<<
@@ -50126,7 +50652,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":1259
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1259
* if e_high[0] - e_low[0] > max_e_len:
* # FAIL: re-projection violates sentence max phrase length
* return 0 # <<<<<<<<<<<<<<
@@ -50139,7 +50665,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L32:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1260
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1260
* # FAIL: re-projection violates sentence max phrase length
* return 0
* f_low_prev = f_back_low[0] # <<<<<<<<<<<<<<
@@ -50148,7 +50674,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":1261
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1261
* return 0
* f_low_prev = f_back_low[0]
* f_high_prev = f_back_high[0] # <<<<<<<<<<<<<<
@@ -50171,7 +50697,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":1264
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1264
*
*
* cdef find_projection(self, int in_low, int in_high, int* in_links_low, int* in_links_high, # <<<<<<<<<<<<<<
@@ -50189,7 +50715,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":1267
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1267
* int* out_low, int* out_high):
* cdef int i
* for i from in_low <= i < in_high: # <<<<<<<<<<<<<<
@@ -50199,7 +50725,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":1268
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1268
* cdef int i
* for i from in_low <= i < in_high:
* if in_links_low[i] != -1: # <<<<<<<<<<<<<<
@@ -50209,7 +50735,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":1269
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1269
* 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]: # <<<<<<<<<<<<<<
@@ -50225,7 +50751,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":1270
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1270
* 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] # <<<<<<<<<<<<<<
@@ -50237,7 +50763,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1271
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1271
* 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]: # <<<<<<<<<<<<<<
@@ -50253,7 +50779,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":1272
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1272
* 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] # <<<<<<<<<<<<<<
@@ -50275,7 +50801,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1275
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1275
*
*
* cdef int* int_arr_extend(self, int* arr, int* arr_len, int* data, int data_len): # <<<<<<<<<<<<<<
@@ -50289,7 +50815,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":1277
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1277
* 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 # <<<<<<<<<<<<<<
@@ -50298,7 +50824,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":1278
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1278
* cdef int new_len
* new_len = arr_len[0] + data_len
* arr = <int*> realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -50307,7 +50833,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":1279
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1279
* 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)) # <<<<<<<<<<<<<<
@@ -50316,7 +50842,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":1280
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1280
* arr = <int*> realloc(arr, new_len*sizeof(int))
* memcpy(arr+arr_len[0], data, data_len*sizeof(int))
* arr_len[0] = new_len # <<<<<<<<<<<<<<
@@ -50325,7 +50851,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":1281
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1281
* memcpy(arr+arr_len[0], data, data_len*sizeof(int))
* arr_len[0] = new_len
* return arr # <<<<<<<<<<<<<<
@@ -50341,7 +50867,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":1284
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1284
*
*
* 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, # <<<<<<<<<<<<<<
@@ -50387,7 +50913,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":1292
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1292
* cdef result
*
* result = [] # <<<<<<<<<<<<<<
@@ -50399,7 +50925,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":1293
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1293
*
* result = []
* len1 = 0 # <<<<<<<<<<<<<<
@@ -50408,7 +50934,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_len1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1294
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1294
* result = []
* len1 = 0
* e_gaps1 = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -50417,7 +50943,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":1295
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1295
* len1 = 0
* e_gaps1 = <int*> malloc(0)
* ephr_arr = IntList() # <<<<<<<<<<<<<<
@@ -50429,7 +50955,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":1297
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1297
* ephr_arr = IntList()
*
* e_gap_order = <int*> malloc(num_gaps*sizeof(int)) # <<<<<<<<<<<<<<
@@ -50438,7 +50964,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":1298
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1298
*
* e_gap_order = <int*> malloc(num_gaps*sizeof(int))
* if num_gaps > 0: # <<<<<<<<<<<<<<
@@ -50448,7 +50974,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":1299
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1299
* e_gap_order = <int*> malloc(num_gaps*sizeof(int))
* if num_gaps > 0:
* e_gap_order[0] = 0 # <<<<<<<<<<<<<<
@@ -50457,7 +50983,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":1300
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1300
* if num_gaps > 0:
* e_gap_order[0] = 0
* for i from 1 <= i < num_gaps: # <<<<<<<<<<<<<<
@@ -50467,7 +50993,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":1301
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1301
* e_gap_order[0] = 0
* for i from 1 <= i < num_gaps:
* for j from 0 <= j < i: # <<<<<<<<<<<<<<
@@ -50477,7 +51003,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":1302
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1302
* for i from 1 <= i < num_gaps:
* for j from 0 <= j < i:
* if e_gap_low[i] < e_gap_low[j]: # <<<<<<<<<<<<<<
@@ -50487,7 +51013,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":1303
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1303
* for j from 0 <= j < i:
* if e_gap_low[i] < e_gap_low[j]:
* for k from j <= k < i: # <<<<<<<<<<<<<<
@@ -50497,7 +51023,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":1304
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1304
* if e_gap_low[i] < e_gap_low[j]:
* for k from j <= k < i:
* e_gap_order[k+1] = e_gap_order[k] # <<<<<<<<<<<<<<
@@ -50507,7 +51033,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":1305
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1305
* for k from j <= k < i:
* e_gap_order[k+1] = e_gap_order[k]
* e_gap_order[j] = i # <<<<<<<<<<<<<<
@@ -50516,7 +51042,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":1306
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1306
* e_gap_order[k+1] = e_gap_order[k]
* e_gap_order[j] = i
* break # <<<<<<<<<<<<<<
@@ -50530,7 +51056,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1308
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1308
* break
* else:
* e_gap_order[i] = i # <<<<<<<<<<<<<<
@@ -50545,7 +51071,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1310
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1310
* e_gap_order[i] = i
*
* e_x_low = e_low # <<<<<<<<<<<<<<
@@ -50554,7 +51080,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":1311
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1311
*
* e_x_low = e_low
* e_x_high = e_high # <<<<<<<<<<<<<<
@@ -50563,7 +51089,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":1312
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1312
* e_x_low = e_low
* e_x_high = e_high
* if not self.tight_phrases: # <<<<<<<<<<<<<<
@@ -50573,7 +51099,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = (!__pyx_v_self->tight_phrases);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1313
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1313
* e_x_high = e_high
* if not self.tight_phrases:
* while e_x_low > 0 and e_high - e_x_low < self.train_max_initial_size and e_links_low[e_x_low-1] == -1: # <<<<<<<<<<<<<<
@@ -50596,7 +51122,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":1314
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1314
* if not self.tight_phrases:
* while e_x_low > 0 and e_high - e_x_low < self.train_max_initial_size and e_links_low[e_x_low-1] == -1:
* e_x_low = e_x_low - 1 # <<<<<<<<<<<<<<
@@ -50606,7 +51132,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":1315
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1315
* 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: # <<<<<<<<<<<<<<
@@ -50629,7 +51155,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":1316
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1316
* 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 # <<<<<<<<<<<<<<
@@ -50642,7 +51168,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1318
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1318
* e_x_high = e_x_high + 1
*
* for i from e_x_low <= i <= e_low: # <<<<<<<<<<<<<<
@@ -50652,7 +51178,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":1319
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1319
*
* for i from e_x_low <= i <= e_low:
* e_gaps1 = self.int_arr_extend(e_gaps1, &len1, &i, 1) # <<<<<<<<<<<<<<
@@ -50662,7 +51188,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":1321
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1321
* e_gaps1 = self.int_arr_extend(e_gaps1, &len1, &i, 1)
*
* for i from 0 <= i < num_gaps: # <<<<<<<<<<<<<<
@@ -50672,7 +51198,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":1322
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1322
*
* for i from 0 <= i < num_gaps:
* e_gaps2 = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -50681,7 +51207,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":1323
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1323
* for i from 0 <= i < num_gaps:
* e_gaps2 = <int*> malloc(0)
* len2 = 0 # <<<<<<<<<<<<<<
@@ -50690,7 +51216,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_len2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1325
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1325
* len2 = 0
*
* j = e_gap_order[i] # <<<<<<<<<<<<<<
@@ -50699,7 +51225,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":1326
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1326
*
* j = e_gap_order[i]
* e_x_gap_low = e_gap_low[j] # <<<<<<<<<<<<<<
@@ -50708,7 +51234,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":1327
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1327
* j = e_gap_order[i]
* e_x_gap_low = e_gap_low[j]
* e_x_gap_high = e_gap_high[j] # <<<<<<<<<<<<<<
@@ -50717,7 +51243,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":1328
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1328
* e_x_gap_low = e_gap_low[j]
* e_x_gap_high = e_gap_high[j]
* if not self.tight_phrases: # <<<<<<<<<<<<<<
@@ -50727,7 +51253,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = (!__pyx_v_self->tight_phrases);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1329
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1329
* e_x_gap_high = e_gap_high[j]
* if not self.tight_phrases:
* while e_x_gap_low > e_x_low and e_links_low[e_x_gap_low-1] == -1: # <<<<<<<<<<<<<<
@@ -50744,7 +51270,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":1330
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1330
* if not self.tight_phrases:
* while e_x_gap_low > e_x_low and e_links_low[e_x_gap_low-1] == -1:
* e_x_gap_low = e_x_gap_low - 1 # <<<<<<<<<<<<<<
@@ -50754,7 +51280,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":1331
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1331
* 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: # <<<<<<<<<<<<<<
@@ -50771,7 +51297,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":1332
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1332
* 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 # <<<<<<<<<<<<<<
@@ -50784,7 +51310,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L20:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1334
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1334
* e_x_gap_high = e_x_gap_high + 1
*
* k = 0 # <<<<<<<<<<<<<<
@@ -50793,7 +51319,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_k = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1335
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1335
*
* k = 0
* step = 1+(i*2) # <<<<<<<<<<<<<<
@@ -50802,7 +51328,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":1336
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1336
* k = 0
* step = 1+(i*2)
* while k < len1: # <<<<<<<<<<<<<<
@@ -50813,7 +51339,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":1337
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1337
* step = 1+(i*2)
* while k < len1:
* for m from e_x_gap_low <= m <= e_gap_low[j]: # <<<<<<<<<<<<<<
@@ -50823,7 +51349,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":1338
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1338
* while k < len1:
* for m from e_x_gap_low <= m <= e_gap_low[j]:
* if m >= e_gaps1[k+step-1]: # <<<<<<<<<<<<<<
@@ -50833,7 +51359,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":1339
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1339
* 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: # <<<<<<<<<<<<<<
@@ -50843,7 +51369,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":1340
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1340
* 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 # <<<<<<<<<<<<<<
@@ -50853,7 +51379,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":1341
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1341
* 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) # <<<<<<<<<<<<<<
@@ -50862,7 +51388,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":1342
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1342
* 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) # <<<<<<<<<<<<<<
@@ -50871,7 +51397,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":1343
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1343
* 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) # <<<<<<<<<<<<<<
@@ -50888,7 +51414,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_L29:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1344
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1344
* 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 # <<<<<<<<<<<<<<
@@ -50898,7 +51424,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":1345
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1345
* e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1)
* k = k + step
* free(e_gaps1) # <<<<<<<<<<<<<<
@@ -50907,7 +51433,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":1346
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1346
* k = k + step
* free(e_gaps1)
* e_gaps1 = e_gaps2 # <<<<<<<<<<<<<<
@@ -50916,7 +51442,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":1347
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1347
* free(e_gaps1)
* e_gaps1 = e_gaps2
* len1 = len2 # <<<<<<<<<<<<<<
@@ -50926,7 +51452,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":1349
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1349
* len1 = len2
*
* step = 1+(num_gaps*2) # <<<<<<<<<<<<<<
@@ -50935,7 +51461,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":1350
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1350
*
* step = 1+(num_gaps*2)
* e_gaps2 = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -50944,7 +51470,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":1351
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1351
* step = 1+(num_gaps*2)
* e_gaps2 = <int*> malloc(0)
* len2 = 0 # <<<<<<<<<<<<<<
@@ -50953,7 +51479,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_len2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1352
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1352
* e_gaps2 = <int*> malloc(0)
* len2 = 0
* for i from e_high <= i <= e_x_high: # <<<<<<<<<<<<<<
@@ -50963,7 +51489,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":1353
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1353
* len2 = 0
* for i from e_high <= i <= e_x_high:
* j = 0 # <<<<<<<<<<<<<<
@@ -50972,7 +51498,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_j = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1354
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1354
* for i from e_high <= i <= e_x_high:
* j = 0
* while j < len1: # <<<<<<<<<<<<<<
@@ -50983,7 +51509,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":1355
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1355
* j = 0
* while j < len1:
* if i - e_gaps1[j] <= self.train_max_initial_size and i >= e_gaps1[j+step-1]: # <<<<<<<<<<<<<<
@@ -50999,7 +51525,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1356
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1356
* 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) # <<<<<<<<<<<<<<
@@ -51008,7 +51534,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":1357
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1357
* 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) # <<<<<<<<<<<<<<
@@ -51020,7 +51546,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L37:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1358
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1358
* 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 # <<<<<<<<<<<<<<
@@ -51031,7 +51557,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1359
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1359
* e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &i, 1)
* j = j + step
* free(e_gaps1) # <<<<<<<<<<<<<<
@@ -51040,7 +51566,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":1360
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1360
* j = j + step
* free(e_gaps1)
* e_gaps1 = e_gaps2 # <<<<<<<<<<<<<<
@@ -51049,7 +51575,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":1361
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1361
* free(e_gaps1)
* e_gaps1 = e_gaps2
* len1 = len2 # <<<<<<<<<<<<<<
@@ -51058,7 +51584,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":1363
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1363
* len1 = len2
*
* step = (num_gaps+1)*2 # <<<<<<<<<<<<<<
@@ -51067,7 +51593,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":1364
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1364
*
* step = (num_gaps+1)*2
* i = 0 # <<<<<<<<<<<<<<
@@ -51076,7 +51602,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_i = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1366
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1366
* i = 0
*
* while i < len1: # <<<<<<<<<<<<<<
@@ -51087,7 +51613,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":1367
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1367
*
* while i < len1:
* ephr_arr._clear() # <<<<<<<<<<<<<<
@@ -51096,7 +51622,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":1368
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1368
* while i < len1:
* ephr_arr._clear()
* num_chunks = 0 # <<<<<<<<<<<<<<
@@ -51105,7 +51631,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":1369
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1369
* ephr_arr._clear()
* num_chunks = 0
* indexes = [] # <<<<<<<<<<<<<<
@@ -51118,7 +51644,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":1370
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1370
* num_chunks = 0
* indexes = []
* for j from 0 <= j < num_gaps+1: # <<<<<<<<<<<<<<
@@ -51128,7 +51654,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":1371
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1371
* indexes = []
* for j from 0 <= j < num_gaps+1:
* if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]: # <<<<<<<<<<<<<<
@@ -51138,7 +51664,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":1372
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1372
* 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 # <<<<<<<<<<<<<<
@@ -51150,7 +51676,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L42:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1373
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1373
* 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]: # <<<<<<<<<<<<<<
@@ -51160,7 +51686,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":1374
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1374
* num_chunks = num_chunks + 1
* for k from e_gaps1[i+2*j] <= k < e_gaps1[i+(2*j)+1]:
* indexes.append(k) # <<<<<<<<<<<<<<
@@ -51172,7 +51698,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 = 1374; __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":1375
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1375
* 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]]) # <<<<<<<<<<<<<<
@@ -51187,7 +51713,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":1376
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1376
* indexes.append(k)
* ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]])
* if j < num_gaps: # <<<<<<<<<<<<<<
@@ -51197,7 +51723,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":1377
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1377
* 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)) # <<<<<<<<<<<<<<
@@ -51209,7 +51735,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 = 1377; __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":1378
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1378
* 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)) # <<<<<<<<<<<<<<
@@ -51222,7 +51748,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_L45:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1379
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1379
* 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 # <<<<<<<<<<<<<<
@@ -51231,7 +51757,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":1380
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1380
* 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: # <<<<<<<<<<<<<<
@@ -51247,7 +51773,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1381
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1381
* i = i + step
* if ephr_arr.len <= self.max_target_length and num_chunks <= self.max_target_chunks:
* result.append((Phrase(ephr_arr),indexes)) # <<<<<<<<<<<<<<
@@ -51279,7 +51805,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_L46:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1383
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1383
* result.append((Phrase(ephr_arr),indexes))
*
* free(e_gaps1) # <<<<<<<<<<<<<<
@@ -51288,7 +51814,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":1384
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1384
*
* free(e_gaps1)
* free(e_gap_order) # <<<<<<<<<<<<<<
@@ -51297,7 +51823,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":1385
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1385
* free(e_gaps1)
* free(e_gap_order)
* return result # <<<<<<<<<<<<<<
@@ -51325,7 +51851,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1387
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1387
* return result
*
* cdef IntList create_alignments(self, int* sent_links, int num_links, findexes, eindexes): # <<<<<<<<<<<<<<
@@ -51353,7 +51879,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":1389
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1389
* cdef IntList create_alignments(self, int* sent_links, int num_links, findexes, eindexes):
* cdef unsigned i
* cdef IntList ret = IntList() # <<<<<<<<<<<<<<
@@ -51365,7 +51891,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":1390
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1390
* cdef unsigned i
* cdef IntList ret = IntList()
* for i in range(len(findexes)): # <<<<<<<<<<<<<<
@@ -51376,7 +51902,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":1391
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1391
* cdef IntList ret = IntList()
* for i in range(len(findexes)):
* s = findexes[i] # <<<<<<<<<<<<<<
@@ -51389,7 +51915,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":1392
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1392
* for i in range(len(findexes)):
* s = findexes[i]
* if (s<0): # <<<<<<<<<<<<<<
@@ -51401,7 +51927,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":1393
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1393
* s = findexes[i]
* if (s<0):
* continue # <<<<<<<<<<<<<<
@@ -51413,7 +51939,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":1394
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1394
* if (s<0):
* continue
* idx = 0 # <<<<<<<<<<<<<<
@@ -51424,7 +51950,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":1395
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1395
* continue
* idx = 0
* while (idx < num_links*2): # <<<<<<<<<<<<<<
@@ -51440,7 +51966,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":1396
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1396
* idx = 0
* while (idx < num_links*2):
* if (sent_links[idx] == s): # <<<<<<<<<<<<<<
@@ -51456,7 +51982,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":1397
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1397
* while (idx < num_links*2):
* if (sent_links[idx] == s):
* j = eindexes.index(sent_links[idx+1]) # <<<<<<<<<<<<<<
@@ -51484,7 +52010,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":1398
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1398
* if (sent_links[idx] == s):
* j = eindexes.index(sent_links[idx+1])
* ret.append(i*65536+j) # <<<<<<<<<<<<<<
@@ -51504,7 +52030,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":1399
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1399
* j = eindexes.index(sent_links[idx+1])
* ret.append(i*65536+j)
* idx += 2 # <<<<<<<<<<<<<<
@@ -51520,7 +52046,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":1400
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1400
* ret.append(i*65536+j)
* idx += 2
* return ret # <<<<<<<<<<<<<<
@@ -51550,7 +52076,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":1402
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1402
* return ret
*
* cdef extract(self, Phrase phrase, Matching* matching, int* chunklen, int num_chunks): # <<<<<<<<<<<<<<
@@ -51644,7 +52170,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":1415
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1415
* cdef reason_for_failure
*
* fphr_arr = IntList() # <<<<<<<<<<<<<<
@@ -51656,7 +52182,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":1416
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1416
*
* fphr_arr = IntList()
* phrase_len = phrase.n # <<<<<<<<<<<<<<
@@ -51665,7 +52191,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":1417
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1417
* fphr_arr = IntList()
* phrase_len = phrase.n
* extracts = [] # <<<<<<<<<<<<<<
@@ -51677,7 +52203,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":1418
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1418
* phrase_len = phrase.n
* extracts = []
* sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links) # <<<<<<<<<<<<<<
@@ -51686,7 +52212,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":1420
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1420
* sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links)
*
* e_sent_start = self.eda.sent_index.arr[matching.sent_id] # <<<<<<<<<<<<<<
@@ -51695,7 +52221,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":1421
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1421
*
* e_sent_start = self.eda.sent_index.arr[matching.sent_id]
* e_sent_end = self.eda.sent_index.arr[matching.sent_id+1] # <<<<<<<<<<<<<<
@@ -51704,7 +52230,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":1422
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1422
* 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 # <<<<<<<<<<<<<<
@@ -51713,7 +52239,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":1423
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1423
* 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] # <<<<<<<<<<<<<<
@@ -51722,7 +52248,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":1424
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1424
* 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] # <<<<<<<<<<<<<<
@@ -51731,7 +52257,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":1425
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1425
* 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 # <<<<<<<<<<<<<<
@@ -51740,7 +52266,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":1427
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1427
* f_sent_len = f_sent_end - f_sent_start - 1
*
* self.findexes1.reset() # <<<<<<<<<<<<<<
@@ -51754,7 +52280,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":1428
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1428
*
* self.findexes1.reset()
* sofar = 0 # <<<<<<<<<<<<<<
@@ -51764,7 +52290,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":1429
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1429
* self.findexes1.reset()
* sofar = 0
* for i in range(num_chunks): # <<<<<<<<<<<<<<
@@ -51775,7 +52301,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":1430
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1430
* sofar = 0
* for i in range(num_chunks):
* for j in range(chunklen[i]): # <<<<<<<<<<<<<<
@@ -51786,7 +52312,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":1431
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1431
* for i in range(num_chunks):
* for j in range(chunklen[i]):
* self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start); # <<<<<<<<<<<<<<
@@ -51800,7 +52326,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":1432
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1432
* for j in range(chunklen[i]):
* self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start);
* sofar += 1 # <<<<<<<<<<<<<<
@@ -51814,7 +52340,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":1433
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1433
* self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start);
* sofar += 1
* if (i+1<num_chunks): # <<<<<<<<<<<<<<
@@ -51824,7 +52350,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":1434
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1434
* sofar += 1
* if (i+1<num_chunks):
* self.findexes1.append(phrase[sofar]) # <<<<<<<<<<<<<<
@@ -51838,7 +52364,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":1435
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1435
* if (i+1<num_chunks):
* self.findexes1.append(phrase[sofar])
* sofar += 1 # <<<<<<<<<<<<<<
@@ -51855,7 +52381,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L7:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1438
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1438
*
*
* e_links_low = <int*> malloc(e_sent_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -51864,7 +52390,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":1439
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1439
*
* e_links_low = <int*> malloc(e_sent_len*sizeof(int))
* e_links_high = <int*> malloc(e_sent_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -51873,7 +52399,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":1440
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1440
* 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)) # <<<<<<<<<<<<<<
@@ -51882,7 +52408,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":1441
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1441
* 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)) # <<<<<<<<<<<<<<
@@ -51891,7 +52417,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":1442
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1442
* 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)) # <<<<<<<<<<<<<<
@@ -51900,7 +52426,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":1443
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1443
* 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)) # <<<<<<<<<<<<<<
@@ -51909,7 +52435,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":1444
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1444
* 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)) # <<<<<<<<<<<<<<
@@ -51918,7 +52444,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":1445
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1445
* 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)) # <<<<<<<<<<<<<<
@@ -51927,7 +52453,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":1446
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1446
* 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)) # <<<<<<<<<<<<<<
@@ -51936,7 +52462,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":1447
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1447
* 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)) # <<<<<<<<<<<<<<
@@ -51945,7 +52471,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":1448
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1448
* 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)) # <<<<<<<<<<<<<<
@@ -51954,7 +52480,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":1449
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1449
* 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)) # <<<<<<<<<<<<<<
@@ -51963,7 +52489,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":1451
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1451
* memset(e_gap_high, 0, (num_chunks+1)*sizeof(int))
*
* reason_for_failure = "" # <<<<<<<<<<<<<<
@@ -51973,7 +52499,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":1453
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1453
* reason_for_failure = ""
*
* for i from 0 <= i < e_sent_len: # <<<<<<<<<<<<<<
@@ -51983,7 +52509,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":1454
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1454
*
* for i from 0 <= i < e_sent_len:
* e_links_low[i] = -1 # <<<<<<<<<<<<<<
@@ -51992,7 +52518,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":1455
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1455
* for i from 0 <= i < e_sent_len:
* e_links_low[i] = -1
* e_links_high[i] = -1 # <<<<<<<<<<<<<<
@@ -52002,7 +52528,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":1456
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1456
* e_links_low[i] = -1
* e_links_high[i] = -1
* for i from 0 <= i < f_sent_len: # <<<<<<<<<<<<<<
@@ -52012,7 +52538,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":1457
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1457
* e_links_high[i] = -1
* for i from 0 <= i < f_sent_len:
* f_links_low[i] = -1 # <<<<<<<<<<<<<<
@@ -52021,7 +52547,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":1458
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1458
* for i from 0 <= i < f_sent_len:
* f_links_low[i] = -1
* f_links_high[i] = -1 # <<<<<<<<<<<<<<
@@ -52031,7 +52557,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":1464
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1464
* # links that we care about (but then how to look up
* # when we want to check something on the e side?)
* i = 0 # <<<<<<<<<<<<<<
@@ -52040,7 +52566,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":1465
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1465
* # when we want to check something on the e side?)
* i = 0
* while i < num_links*2: # <<<<<<<<<<<<<<
@@ -52051,7 +52577,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":1466
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1466
* i = 0
* while i < num_links*2:
* f_i = sent_links[i] # <<<<<<<<<<<<<<
@@ -52060,7 +52586,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":1467
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1467
* while i < num_links*2:
* f_i = sent_links[i]
* e_i = sent_links[i+1] # <<<<<<<<<<<<<<
@@ -52069,7 +52595,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":1468
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1468
* 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: # <<<<<<<<<<<<<<
@@ -52085,7 +52611,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":1469
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1469
* 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 # <<<<<<<<<<<<<<
@@ -52097,7 +52623,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L14:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1470
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1470
* 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: # <<<<<<<<<<<<<<
@@ -52113,7 +52639,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":1471
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1471
* 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 # <<<<<<<<<<<<<<
@@ -52125,7 +52651,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1472
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1472
* 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: # <<<<<<<<<<<<<<
@@ -52141,7 +52667,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":1473
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1473
* 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 # <<<<<<<<<<<<<<
@@ -52153,7 +52679,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L16:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1474
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1474
* 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: # <<<<<<<<<<<<<<
@@ -52169,7 +52695,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":1475
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1475
* 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 # <<<<<<<<<<<<<<
@@ -52181,7 +52707,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1476
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1476
* 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 # <<<<<<<<<<<<<<
@@ -52191,7 +52717,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":1478
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1478
* i = i + 2
*
* als = [] # <<<<<<<<<<<<<<
@@ -52203,7 +52729,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":1479
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1479
*
* als = []
* for x in range(matching.start,matching.end): # <<<<<<<<<<<<<<
@@ -52214,7 +52740,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":1480
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1480
* 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]) # <<<<<<<<<<<<<<
@@ -52237,7 +52763,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":1481
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1481
* 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) # <<<<<<<<<<<<<<
@@ -52247,7 +52773,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 = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1483
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1483
* als.append(al)
* # check all source-side alignment constraints
* met_constraints = 1 # <<<<<<<<<<<<<<
@@ -52256,7 +52782,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":1484
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1484
* # check all source-side alignment constraints
* met_constraints = 1
* if self.require_aligned_terminal: # <<<<<<<<<<<<<<
@@ -52265,7 +52791,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":1485
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1485
* met_constraints = 1
* if self.require_aligned_terminal:
* num_aligned_chunks = 0 # <<<<<<<<<<<<<<
@@ -52274,7 +52800,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":1486
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1486
* if self.require_aligned_terminal:
* num_aligned_chunks = 0
* for i from 0 <= i < num_chunks: # <<<<<<<<<<<<<<
@@ -52284,7 +52810,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":1487
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1487
* num_aligned_chunks = 0
* for i from 0 <= i < num_chunks:
* for j from 0 <= j < chunklen[i]: # <<<<<<<<<<<<<<
@@ -52294,7 +52820,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":1488
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1488
* 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: # <<<<<<<<<<<<<<
@@ -52304,7 +52830,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":1489
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1489
* 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 # <<<<<<<<<<<<<<
@@ -52313,7 +52839,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":1490
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1490
* if f_links_low[matching.arr[matching.start+i]+j-f_sent_start] > -1:
* num_aligned_chunks = num_aligned_chunks + 1
* break # <<<<<<<<<<<<<<
@@ -52328,7 +52854,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L24_break:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1491
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1491
* num_aligned_chunks = num_aligned_chunks + 1
* break
* if num_aligned_chunks == 0: # <<<<<<<<<<<<<<
@@ -52338,7 +52864,7 @@ 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":1492
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1492
* break
* if num_aligned_chunks == 0:
* reason_for_failure = "No aligned terminals" # <<<<<<<<<<<<<<
@@ -52349,7 +52875,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_v_reason_for_failure);
__pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_126);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1493
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1493
* if num_aligned_chunks == 0:
* reason_for_failure = "No aligned terminals"
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -52361,7 +52887,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L26:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1494
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1494
* reason_for_failure = "No aligned terminals"
* met_constraints = 0
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks: # <<<<<<<<<<<<<<
@@ -52376,7 +52902,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":1495
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1495
* met_constraints = 0
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks:
* reason_for_failure = "Unaligned chunk" # <<<<<<<<<<<<<<
@@ -52387,7 +52913,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_v_reason_for_failure);
__pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_127);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1496
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1496
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks:
* reason_for_failure = "Unaligned chunk"
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -52402,7 +52928,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L20:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1498
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1498
* met_constraints = 0
*
* if met_constraints and self.tight_phrases: # <<<<<<<<<<<<<<
@@ -52417,7 +52943,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":1500
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1500
* if met_constraints and self.tight_phrases:
* # outside edge constraints are checked later
* for i from 0 <= i < num_chunks-1: # <<<<<<<<<<<<<<
@@ -52427,7 +52953,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":1501
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1501
* # 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: # <<<<<<<<<<<<<<
@@ -52437,7 +52963,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_chunklen[__pyx_v_i])) - __pyx_v_f_sent_start)]) == -1);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1502
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1502
* 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" # <<<<<<<<<<<<<<
@@ -52448,7 +52974,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_v_reason_for_failure);
__pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_128);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1503
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1503
* 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 # <<<<<<<<<<<<<<
@@ -52457,7 +52983,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":1504
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1504
* reason_for_failure = "Gaps are not tight phrases"
* met_constraints = 0
* break # <<<<<<<<<<<<<<
@@ -52469,7 +52995,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L31:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1505
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1505
* met_constraints = 0
* break
* if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1: # <<<<<<<<<<<<<<
@@ -52479,7 +53005,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) + 1)]) - 1) - __pyx_v_f_sent_start)]) == -1);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1506
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1506
* break
* if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1:
* reason_for_failure = "Gaps are not tight phrases" # <<<<<<<<<<<<<<
@@ -52490,7 +53016,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_v_reason_for_failure);
__pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_128);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1507
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1507
* 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 # <<<<<<<<<<<<<<
@@ -52499,7 +53025,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":1508
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1508
* reason_for_failure = "Gaps are not tight phrases"
* met_constraints = 0
* break # <<<<<<<<<<<<<<
@@ -52516,7 +53042,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L28:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1510
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1510
* break
*
* f_low = matching.arr[matching.start] - f_sent_start # <<<<<<<<<<<<<<
@@ -52525,7 +53051,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":1511
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1511
*
* 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 # <<<<<<<<<<<<<<
@@ -52534,7 +53060,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":1512
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1512
* 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: # <<<<<<<<<<<<<<
@@ -52543,7 +53069,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":1514
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1514
* if met_constraints:
*
* if self.find_fixpoint(f_low, f_high, f_links_low, f_links_high, e_links_low, e_links_high, # <<<<<<<<<<<<<<
@@ -52553,7 +53079,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 = 1514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1518
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1518
* 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): # <<<<<<<<<<<<<<
@@ -52564,7 +53090,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":1519
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1519
* self.train_min_gap_size, 0,
* self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0):
* gap_error = 0 # <<<<<<<<<<<<<<
@@ -52573,7 +53099,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":1520
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1520
* self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0):
* gap_error = 0
* num_gaps = 0 # <<<<<<<<<<<<<<
@@ -52582,7 +53108,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":1522
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1522
* num_gaps = 0
*
* if f_back_low < f_low: # <<<<<<<<<<<<<<
@@ -52592,7 +53118,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":1523
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1523
*
* if f_back_low < f_low:
* f_gap_low[0] = f_back_low # <<<<<<<<<<<<<<
@@ -52601,7 +53127,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":1524
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1524
* if f_back_low < f_low:
* f_gap_low[0] = f_back_low
* f_gap_high[0] = f_low # <<<<<<<<<<<<<<
@@ -52610,7 +53136,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":1525
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1525
* f_gap_low[0] = f_back_low
* f_gap_high[0] = f_low
* num_gaps = 1 # <<<<<<<<<<<<<<
@@ -52619,7 +53145,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":1526
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1526
* f_gap_high[0] = f_low
* num_gaps = 1
* gap_start = 0 # <<<<<<<<<<<<<<
@@ -52628,7 +53154,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":1527
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1527
* num_gaps = 1
* gap_start = 0
* phrase_len = phrase_len+1 # <<<<<<<<<<<<<<
@@ -52637,7 +53163,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":1528
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1528
* gap_start = 0
* phrase_len = phrase_len+1
* if phrase_len > self.max_length: # <<<<<<<<<<<<<<
@@ -52647,7 +53173,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":1529
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1529
* phrase_len = phrase_len+1
* if phrase_len > self.max_length:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -52659,7 +53185,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L36:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1530
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1530
* if phrase_len > self.max_length:
* gap_error = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -52668,7 +53194,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":1531
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1531
* gap_error = 1
* if self.tight_phrases:
* if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1: # <<<<<<<<<<<<<<
@@ -52684,7 +53210,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":1532
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1532
* if self.tight_phrases:
* if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -52693,7 +53219,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":1533
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1533
* 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" # <<<<<<<<<<<<<<
@@ -52713,7 +53239,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1535
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1535
* reason_for_failure = "Inside edges of preceding subphrase are not tight"
* else:
* gap_start = 1 # <<<<<<<<<<<<<<
@@ -52722,7 +53248,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":1536
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1536
* else:
* gap_start = 1
* if self.tight_phrases and f_links_low[f_low] == -1: # <<<<<<<<<<<<<<
@@ -52737,7 +53263,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":1539
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1539
* # 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 # <<<<<<<<<<<<<<
@@ -52751,7 +53277,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L35:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1541
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1541
* met_constraints = 0
*
* for i from 0 <= i < matching.size - 1: # <<<<<<<<<<<<<<
@@ -52761,7 +53287,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":1542
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1542
*
* for i from 0 <= i < matching.size - 1:
* f_gap_low[1+i] = matching.arr[matching.start+i] + chunklen[i] - f_sent_start # <<<<<<<<<<<<<<
@@ -52770,7 +53296,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":1543
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1543
* 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 # <<<<<<<<<<<<<<
@@ -52779,7 +53305,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":1544
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1544
* 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 # <<<<<<<<<<<<<<
@@ -52789,7 +53315,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":1546
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1546
* num_gaps = num_gaps + 1
*
* if f_high < f_back_high: # <<<<<<<<<<<<<<
@@ -52799,7 +53325,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_f_high < __pyx_v_f_back_high);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1547
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1547
*
* if f_high < f_back_high:
* f_gap_low[gap_start+num_gaps] = f_high # <<<<<<<<<<<<<<
@@ -52808,7 +53334,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":1548
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1548
* 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 # <<<<<<<<<<<<<<
@@ -52817,7 +53343,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":1549
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1549
* f_gap_low[gap_start+num_gaps] = f_high
* f_gap_high[gap_start+num_gaps] = f_back_high
* num_gaps = num_gaps + 1 # <<<<<<<<<<<<<<
@@ -52826,7 +53352,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":1550
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1550
* f_gap_high[gap_start+num_gaps] = f_back_high
* num_gaps = num_gaps + 1
* phrase_len = phrase_len+1 # <<<<<<<<<<<<<<
@@ -52835,7 +53361,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":1551
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1551
* num_gaps = num_gaps + 1
* phrase_len = phrase_len+1
* if phrase_len > self.max_length: # <<<<<<<<<<<<<<
@@ -52845,7 +53371,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":1552
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1552
* phrase_len = phrase_len+1
* if phrase_len > self.max_length:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -52857,7 +53383,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L43:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1553
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1553
* if phrase_len > self.max_length:
* gap_error = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -52866,7 +53392,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":1554
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1554
* gap_error = 1
* if self.tight_phrases:
* if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1: # <<<<<<<<<<<<<<
@@ -52882,7 +53408,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":1555
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1555
* if self.tight_phrases:
* if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -52891,7 +53417,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":1556
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1556
* 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" # <<<<<<<<<<<<<<
@@ -52911,7 +53437,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1558
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1558
* reason_for_failure = "Inside edges of following subphrase are not tight"
* else:
* if self.tight_phrases and f_links_low[f_high-1] == -1: # <<<<<<<<<<<<<<
@@ -52926,7 +53452,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":1559
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1559
* else:
* if self.tight_phrases and f_links_low[f_high-1] == -1:
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -52940,7 +53466,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L42:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1561
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1561
* met_constraints = 0
*
* if gap_error == 0: # <<<<<<<<<<<<<<
@@ -52950,7 +53476,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_gap_error == 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1562
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1562
*
* if gap_error == 0:
* e_word_count = e_high - e_low # <<<<<<<<<<<<<<
@@ -52959,7 +53485,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":1563
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1563
* if gap_error == 0:
* e_word_count = e_high - e_low
* for i from 0 <= i < num_gaps: # check integrity of subphrases # <<<<<<<<<<<<<<
@@ -52969,7 +53495,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":1564
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1564
* 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], # <<<<<<<<<<<<<<
@@ -52979,7 +53505,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 = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1569
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1569
* 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, # <<<<<<<<<<<<<<
@@ -52990,7 +53516,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1571
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1571
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0) == 0:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -52999,7 +53525,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":1572
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1572
* 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]) # <<<<<<<<<<<<<<
@@ -53025,7 +53551,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_reason_for_failure = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1573
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1573
* 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 # <<<<<<<<<<<<<<
@@ -53042,7 +53568,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L47:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1575
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1575
* break
*
* if gap_error == 0: # <<<<<<<<<<<<<<
@@ -53052,7 +53578,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_gap_error == 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1576
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1576
*
* if gap_error == 0:
* i = 1 # <<<<<<<<<<<<<<
@@ -53061,7 +53587,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":1577
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1577
* if gap_error == 0:
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
@@ -53075,7 +53601,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":1578
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1578
* i = 1
* self.findexes.reset()
* if f_back_low < f_low: # <<<<<<<<<<<<<<
@@ -53085,7 +53611,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":1579
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1579
* self.findexes.reset()
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53094,7 +53620,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/m/workspace/cdec/python/src/sa/rulefactory.pxi":1580
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -53103,7 +53629,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":1581
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1581
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53120,7 +53646,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L52:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1582
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1582
* i = i+1
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
@@ -53140,7 +53666,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":1583
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1583
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -53150,7 +53676,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":1584
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1584
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
@@ -53160,7 +53686,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":1585
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1585
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53169,7 +53695,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":1586
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1586
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -53181,7 +53707,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1588
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1588
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
@@ -53193,7 +53719,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L55:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1589
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1589
* else:
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high: # <<<<<<<<<<<<<<
@@ -53203,7 +53729,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":1590
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1590
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53212,7 +53738,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":1591
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1591
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53229,7 +53755,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L56:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1593
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1593
* self.findexes.append(sym_setindex(self.category, i))
*
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
@@ -53247,7 +53773,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":1594
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1594
*
* fphr = Phrase(fphr_arr)
* if met_constraints: # <<<<<<<<<<<<<<
@@ -53256,7 +53782,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":1597
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1597
* 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) # <<<<<<<<<<<<<<
@@ -53268,7 +53794,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":1598
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1598
* 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: # <<<<<<<<<<<<<<
@@ -53279,7 +53805,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":1599
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1599
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
@@ -53296,7 +53822,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1601
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1601
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -53305,7 +53831,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":1602
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1602
* 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) # <<<<<<<<<<<<<<
@@ -53343,7 +53869,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L58:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1603
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1603
* 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: # <<<<<<<<<<<<<<
@@ -53440,7 +53966,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":1604
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1604
* 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) # <<<<<<<<<<<<<<
@@ -53456,7 +53982,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":1605
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1605
* 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))) # <<<<<<<<<<<<<<
@@ -53497,7 +54023,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L57:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1607
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1607
* extracts.append((fphr, phrase2, pair_count, tuple(als1)))
*
* if (num_gaps < self.max_nonterminals and # <<<<<<<<<<<<<<
@@ -53507,7 +54033,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_num_gaps < __pyx_v_self->max_nonterminals);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1608
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1608
*
* if (num_gaps < self.max_nonterminals and
* phrase_len < self.max_length and # <<<<<<<<<<<<<<
@@ -53517,7 +54043,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":1609
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1609
* 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): # <<<<<<<<<<<<<<
@@ -53535,7 +54061,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":1610
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1610
* 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 # <<<<<<<<<<<<<<
@@ -53545,7 +54071,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":1611
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1611
* 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 # <<<<<<<<<<<<<<
@@ -53555,7 +54081,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_f_low >= __pyx_v_self->train_min_gap_size);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1612
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1612
* 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))): # <<<<<<<<<<<<<<
@@ -53585,7 +54111,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":1613
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1613
* 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 # <<<<<<<<<<<<<<
@@ -53594,7 +54120,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":1614
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1614
* ((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 # <<<<<<<<<<<<<<
@@ -53603,7 +54129,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":1615
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1615
* f_x_low = f_low-self.train_min_gap_size
* met_constraints = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -53612,7 +54138,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":1616
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1616
* met_constraints = 1
* if self.tight_phrases:
* while f_x_low >= 0 and f_links_low[f_x_low] == -1: # <<<<<<<<<<<<<<
@@ -53629,7 +54155,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":1617
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1617
* if self.tight_phrases:
* while f_x_low >= 0 and f_links_low[f_x_low] == -1:
* f_x_low = f_x_low - 1 # <<<<<<<<<<<<<<
@@ -53642,7 +54168,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L65:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1618
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1618
* 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: # <<<<<<<<<<<<<<
@@ -53658,7 +54184,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":1619
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1619
* 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 # <<<<<<<<<<<<<<
@@ -53670,7 +54196,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L68:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1621
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1621
* met_constraints = 0
*
* if (met_constraints and # <<<<<<<<<<<<<<
@@ -53679,7 +54205,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":1622
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1622
*
* if (met_constraints and
* self.find_fixpoint(f_x_low, f_back_high, # <<<<<<<<<<<<<<
@@ -53689,7 +54215,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 = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1626
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1626
* 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, # <<<<<<<<<<<<<<
@@ -53699,7 +54225,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":1628
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1628
* 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 # <<<<<<<<<<<<<<
@@ -53715,7 +54241,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":1629
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1629
* 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 # <<<<<<<<<<<<<<
@@ -53725,7 +54251,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 = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1633
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1633
* -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, # <<<<<<<<<<<<<<
@@ -53748,7 +54274,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":1635
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1635
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear() # <<<<<<<<<<<<<<
@@ -53757,7 +54283,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":1636
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1636
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
* i = 1 # <<<<<<<<<<<<<<
@@ -53766,7 +54292,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":1637
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1637
* fphr_arr._clear()
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
@@ -53780,7 +54306,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":1638
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1638
* i = 1
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53794,7 +54320,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":1639
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1639
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53803,7 +54329,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":1640
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1640
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -53812,7 +54338,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":1641
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1641
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
@@ -53832,7 +54358,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":1642
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1642
* i = i+1
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -53842,7 +54368,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":1643
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1643
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
@@ -53852,7 +54378,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":1644
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1644
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53861,7 +54387,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":1645
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1645
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -53873,7 +54399,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1647
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1647
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
@@ -53885,7 +54411,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L72:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1648
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1648
* else:
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high: # <<<<<<<<<<<<<<
@@ -53895,7 +54421,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":1649
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1649
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53904,7 +54430,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":1650
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1650
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -53921,7 +54447,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L73:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1651
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1651
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
@@ -53940,7 +54466,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":1654
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1654
* 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) # <<<<<<<<<<<<<<
@@ -53953,7 +54479,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":1655
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1655
* 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: # <<<<<<<<<<<<<<
@@ -53964,7 +54490,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":1656
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1656
* e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
@@ -53981,7 +54507,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1658
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1658
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -53992,7 +54518,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L74:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1659
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1659
* else:
* pair_count = 0
* for phrase2,eindexes in phrase_list: # <<<<<<<<<<<<<<
@@ -54089,7 +54615,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":1660
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1660
* pair_count = 0
* for phrase2,eindexes in phrase_list:
* als2 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<<
@@ -54105,7 +54631,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":1661
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1661
* 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))) # <<<<<<<<<<<<<<
@@ -54149,7 +54675,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L64:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1663
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1663
* extracts.append((fphr, phrase2, pair_count, tuple(als2)))
*
* if (f_back_high == f_high and # <<<<<<<<<<<<<<
@@ -54159,7 +54685,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":1664
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1664
*
* if (f_back_high == f_high and
* f_sent_len - f_high >= self.train_min_gap_size and # <<<<<<<<<<<<<<
@@ -54169,7 +54695,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_f_sent_len - __pyx_v_f_high) >= __pyx_v_self->train_min_gap_size);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1665
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1665
* 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))): # <<<<<<<<<<<<<<
@@ -54199,7 +54725,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":1666
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1666
* 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 # <<<<<<<<<<<<<<
@@ -54208,7 +54734,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":1667
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1667
* ((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 # <<<<<<<<<<<<<<
@@ -54217,7 +54743,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":1668
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1668
* f_x_high = f_high+self.train_min_gap_size
* met_constraints = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -54226,7 +54752,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":1669
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1669
* met_constraints = 1
* if self.tight_phrases:
* while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: # <<<<<<<<<<<<<<
@@ -54243,7 +54769,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":1670
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1670
* 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 # <<<<<<<<<<<<<<
@@ -54256,7 +54782,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L80:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1671
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1671
* 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: # <<<<<<<<<<<<<<
@@ -54272,7 +54798,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":1672
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1672
* 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 # <<<<<<<<<<<<<<
@@ -54284,7 +54810,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L83:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1674
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1674
* met_constraints = 0
*
* if (met_constraints and # <<<<<<<<<<<<<<
@@ -54293,7 +54819,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":1675
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1675
*
* if (met_constraints and
* self.find_fixpoint(f_back_low, f_x_high, # <<<<<<<<<<<<<<
@@ -54303,7 +54829,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 = 1675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1679
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1679
* 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, # <<<<<<<<<<<<<<
@@ -54313,7 +54839,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":1681
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1681
* 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 # <<<<<<<<<<<<<<
@@ -54329,7 +54855,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":1682
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1682
* 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, # <<<<<<<<<<<<<<
@@ -54339,7 +54865,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 = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1687
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1687
* 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, # <<<<<<<<<<<<<<
@@ -54362,7 +54888,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":1689
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1689
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear() # <<<<<<<<<<<<<<
@@ -54371,7 +54897,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":1690
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1690
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
* i = 1 # <<<<<<<<<<<<<<
@@ -54380,7 +54906,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":1691
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1691
* fphr_arr._clear()
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
@@ -54394,7 +54920,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":1692
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1692
* i = 1
* self.findexes.reset()
* if f_back_low < f_low: # <<<<<<<<<<<<<<
@@ -54404,7 +54930,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":1693
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1693
* self.findexes.reset()
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54413,7 +54939,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":1694
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1694
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -54422,7 +54948,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":1695
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1695
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54439,7 +54965,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L85:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1696
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1696
* i = i+1
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
@@ -54459,7 +54985,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":1697
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1697
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -54469,7 +54995,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":1698
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1698
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
@@ -54479,7 +55005,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":1699
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1699
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54488,7 +55014,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":1700
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1700
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -54500,7 +55026,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1702
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1702
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
@@ -54512,7 +55038,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L88:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1703
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1703
* else:
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54521,7 +55047,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":1704
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1704
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -54535,7 +55061,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":1705
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1705
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
@@ -54554,7 +55080,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":1708
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1708
* 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) # <<<<<<<<<<<<<<
@@ -54567,7 +55093,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":1709
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1709
* 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: # <<<<<<<<<<<<<<
@@ -54578,7 +55104,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":1710
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1710
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
@@ -54595,7 +55121,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1712
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1712
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -54606,7 +55132,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L89:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1713
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1713
* else:
* pair_count = 0
* for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<<
@@ -54703,7 +55229,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":1714
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1714
* pair_count = 0
* for phrase2, eindexes in phrase_list:
* als3 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<<
@@ -54719,7 +55245,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":1715
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1715
* 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))) # <<<<<<<<<<<<<<
@@ -54763,7 +55289,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L79:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1716
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1716
* 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 # <<<<<<<<<<<<<<
@@ -54773,7 +55299,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (__pyx_v_num_gaps < (__pyx_v_self->max_nonterminals - 1));
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1717
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1717
* extracts.append((fphr, phrase2, pair_count, tuple(als3)))
* if (num_gaps < self.max_nonterminals - 1 and
* phrase_len+1 < self.max_length and # <<<<<<<<<<<<<<
@@ -54783,7 +55309,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_phrase_len + 1) < __pyx_v_self->max_length);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1718
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1718
* if (num_gaps < self.max_nonterminals - 1 and
* phrase_len+1 < self.max_length and
* f_back_high == f_high and # <<<<<<<<<<<<<<
@@ -54793,7 +55319,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":1719
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1719
* phrase_len+1 < self.max_length and
* f_back_high == f_high and
* f_back_low == f_low and # <<<<<<<<<<<<<<
@@ -54803,7 +55329,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":1720
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1720
* 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 # <<<<<<<<<<<<<<
@@ -54813,7 +55339,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":1721
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1721
* 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 # <<<<<<<<<<<<<<
@@ -54823,7 +55349,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":1722
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1722
* 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 # <<<<<<<<<<<<<<
@@ -54833,7 +55359,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":1723
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1723
* 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))): # <<<<<<<<<<<<<<
@@ -54883,7 +55409,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":1725
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1725
* ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_high] != -1))):
*
* met_constraints = 1 # <<<<<<<<<<<<<<
@@ -54892,7 +55418,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":1726
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1726
*
* met_constraints = 1
* f_x_low = f_low-self.train_min_gap_size # <<<<<<<<<<<<<<
@@ -54901,7 +55427,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":1727
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1727
* met_constraints = 1
* f_x_low = f_low-self.train_min_gap_size
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -54910,7 +55436,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":1728
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1728
* 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: # <<<<<<<<<<<<<<
@@ -54927,7 +55453,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":1729
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1729
* if self.tight_phrases:
* while f_x_low >= 0 and f_links_low[f_x_low] == -1:
* f_x_low = f_x_low - 1 # <<<<<<<<<<<<<<
@@ -54940,7 +55466,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L95:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1730
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1730
* 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: # <<<<<<<<<<<<<<
@@ -54950,7 +55476,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":1731
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1731
* f_x_low = f_x_low - 1
* if f_x_low < 0:
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -54962,7 +55488,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L98:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1733
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1733
* met_constraints = 0
*
* f_x_high = f_high+self.train_min_gap_size # <<<<<<<<<<<<<<
@@ -54971,7 +55497,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":1734
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1734
*
* f_x_high = f_high+self.train_min_gap_size
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -54980,7 +55506,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":1735
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1735
* 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: # <<<<<<<<<<<<<<
@@ -54997,7 +55523,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (!__pyx_t_7) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1736
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1736
* 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 # <<<<<<<<<<<<<<
@@ -55010,7 +55536,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L99:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1737
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1737
* 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: # <<<<<<<<<<<<<<
@@ -55026,7 +55552,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":1738
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1738
* 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 # <<<<<<<<<<<<<<
@@ -55038,7 +55564,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L102:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1740
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1740
* met_constraints = 0
*
* if (met_constraints and # <<<<<<<<<<<<<<
@@ -55047,7 +55573,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":1741
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1741
*
* if (met_constraints and
* self.find_fixpoint(f_x_low, f_x_high, # <<<<<<<<<<<<<<
@@ -55057,7 +55583,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 = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1745
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1745
* 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, # <<<<<<<<<<<<<<
@@ -55067,7 +55593,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":1747
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1747
* 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 # <<<<<<<<<<<<<<
@@ -55089,7 +55615,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":1748
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1748
* 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, # <<<<<<<<<<<<<<
@@ -55099,7 +55625,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 = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1752
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1752
* -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, # <<<<<<<<<<<<<<
@@ -55110,7 +55636,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":1754
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1754
* 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, # <<<<<<<<<<<<<<
@@ -55120,7 +55646,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 = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1759
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1759
* 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, # <<<<<<<<<<<<<<
@@ -55148,7 +55674,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":1761
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1761
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear() # <<<<<<<<<<<<<<
@@ -55157,7 +55683,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":1762
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1762
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
* i = 1 # <<<<<<<<<<<<<<
@@ -55166,7 +55692,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":1763
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1763
* fphr_arr._clear()
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
@@ -55180,7 +55706,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":1764
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1764
* i = 1
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -55194,7 +55720,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":1765
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1765
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -55203,7 +55729,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":1766
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1766
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -55212,7 +55738,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":1767
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1767
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
@@ -55232,7 +55758,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":1768
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1768
* i = i+1
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -55242,7 +55768,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":1769
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1769
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
@@ -55252,7 +55778,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":1770
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1770
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -55261,7 +55787,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":1771
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1771
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -55273,7 +55799,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1773
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1773
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
@@ -55285,7 +55811,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L106:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1774
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1774
* else:
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -55294,7 +55820,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":1775
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1775
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
@@ -55308,7 +55834,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":1776
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1776
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
@@ -55327,7 +55853,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":1779
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1779
* 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) # <<<<<<<<<<<<<<
@@ -55340,7 +55866,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":1780
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1780
* 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: # <<<<<<<<<<<<<<
@@ -55351,7 +55877,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":1781
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1781
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
@@ -55368,7 +55894,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1783
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1783
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -55379,7 +55905,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L107:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1784
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1784
* else:
* pair_count = 0
* for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<<
@@ -55476,7 +56002,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":1785
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1785
* pair_count = 0
* for phrase2, eindexes in phrase_list:
* als4 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<<
@@ -55492,7 +56018,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":1786
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1786
* 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))) # <<<<<<<<<<<<<<
@@ -55545,7 +56071,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1788
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1788
* extracts.append((fphr, phrase2, pair_count, tuple(als4)))
* else:
* reason_for_failure = "Unable to extract basic phrase" # <<<<<<<<<<<<<<
@@ -55561,7 +56087,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L33:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1790
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1790
* reason_for_failure = "Unable to extract basic phrase"
*
* free(sent_links) # <<<<<<<<<<<<<<
@@ -55570,7 +56096,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":1791
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1791
*
* free(sent_links)
* free(f_links_low) # <<<<<<<<<<<<<<
@@ -55579,7 +56105,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":1792
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1792
* free(sent_links)
* free(f_links_low)
* free(f_links_high) # <<<<<<<<<<<<<<
@@ -55588,7 +56114,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":1793
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1793
* free(f_links_low)
* free(f_links_high)
* free(e_links_low) # <<<<<<<<<<<<<<
@@ -55597,7 +56123,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":1794
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1794
* free(f_links_high)
* free(e_links_low)
* free(e_links_high) # <<<<<<<<<<<<<<
@@ -55606,7 +56132,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":1795
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1795
* free(e_links_low)
* free(e_links_high)
* free(f_gap_low) # <<<<<<<<<<<<<<
@@ -55615,7 +56141,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":1796
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1796
* free(e_links_high)
* free(f_gap_low)
* free(f_gap_high) # <<<<<<<<<<<<<<
@@ -55624,7 +56150,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":1797
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1797
* free(f_gap_low)
* free(f_gap_high)
* free(e_gap_low) # <<<<<<<<<<<<<<
@@ -55633,7 +56159,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":1798
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1798
* free(f_gap_high)
* free(e_gap_low)
* free(e_gap_high) # <<<<<<<<<<<<<<
@@ -55642,10 +56168,12 @@ 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":1800
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1800
* free(e_gap_high)
*
* return extracts # <<<<<<<<<<<<<<
+ *
+ * def add_instance(self, f_words, e_words, alignment):
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_extracts);
@@ -55683,6 +56211,211 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/* Python wrapper */
+static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_26add_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_26add_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_f_words = 0;
+ PyObject *__pyx_v_e_words = 0;
+ PyObject *__pyx_v_alignment = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("add_instance (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__f_words,&__pyx_n_s__e_words,&__pyx_n_s__alignment,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f_words)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e_words)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add_instance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alignment)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add_instance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_instance") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_f_words = values[0];
+ __pyx_v_e_words = values[1];
+ __pyx_v_alignment = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("add_instance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.add_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_f_words, __pyx_v_e_words, __pyx_v_alignment);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1802
+ * return extracts
+ *
+ * def add_instance(self, f_words, e_words, alignment): # <<<<<<<<<<<<<<
+ * logger.info("I would add:")
+ * logger.info(decode_words(f_words))
+ */
+
+static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(CYTHON_UNUSED struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_words, PyObject *__pyx_v_e_words, PyObject *__pyx_v_alignment) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("add_instance", 0);
+
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1803
+ *
+ * def add_instance(self, f_words, e_words, alignment):
+ * logger.info("I would add:") # <<<<<<<<<<<<<<
+ * logger.info(decode_words(f_words))
+ * logger.info(decode_words(e_words))
+ */
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1803; __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_135), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1804
+ * def add_instance(self, f_words, e_words, alignment):
+ * logger.info("I would add:")
+ * logger.info(decode_words(f_words)) # <<<<<<<<<<<<<<
+ * logger.info(decode_words(e_words))
+ * logger.info(alignment)
+ */
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__decode_words); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_f_words);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f_words);
+ __Pyx_GIVEREF(__pyx_v_f_words);
+ __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1804; __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_3)); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1804; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1805
+ * logger.info("I would add:")
+ * logger.info(decode_words(f_words))
+ * logger.info(decode_words(e_words)) # <<<<<<<<<<<<<<
+ * logger.info(alignment)
+ */
+ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__decode_words); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1805; __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 = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_e_words);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_e_words);
+ __Pyx_GIVEREF(__pyx_v_e_words);
+ __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1805; __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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1806
+ * logger.info(decode_words(f_words))
+ * logger.info(decode_words(e_words))
+ * logger.info(alignment) # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_alignment);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_alignment);
+ __Pyx_GIVEREF(__pyx_v_alignment);
+ __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.add_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
static int __pyx_pw_3_sa_13FeatureVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3_sa_13FeatureVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_r;
@@ -55696,7 +56429,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/m/workspace/cdec/python/src/sa/features.pxi":7
*
* cdef class FeatureVector:
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -55715,7 +56448,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/m/workspace/cdec/python/src/sa/features.pxi":8
* cdef class FeatureVector:
* def __cinit__(self):
* self.names = IntList(INITIAL_CAPACITY, INCREMENT) # <<<<<<<<<<<<<<
@@ -55743,7 +56476,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/m/workspace/cdec/python/src/sa/features.pxi":9
* def __cinit__(self):
* self.names = IntList(INITIAL_CAPACITY, INCREMENT)
* self.values = FloatList(INITIAL_CAPACITY, INCREMENT) # <<<<<<<<<<<<<<
@@ -55840,7 +56573,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/m/workspace/cdec/python/src/sa/features.pxi":11
* self.values = FloatList(INITIAL_CAPACITY, INCREMENT)
*
* def set(self, unsigned name, float value): # <<<<<<<<<<<<<<
@@ -55858,7 +56591,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/m/workspace/cdec/python/src/sa/features.pxi":12
*
* def set(self, unsigned name, float value):
* self.names.append(name) # <<<<<<<<<<<<<<
@@ -55872,7 +56605,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/m/workspace/cdec/python/src/sa/features.pxi":13
* def set(self, unsigned name, float value):
* self.names.append(name)
* self.values.append(value) # <<<<<<<<<<<<<<
@@ -55911,7 +56644,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/m/workspace/cdec/python/src/sa/features.pxi":15
* self.values.append(value)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -55920,14 +56653,14 @@ static PyObject *__pyx_pw_3_sa_13FeatureVector_5__iter__(PyObject *__pyx_v_self)
*/
static PyObject *__pyx_pf_3_sa_13FeatureVector_4__iter__(struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *__pyx_cur_scope;
+ struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__iter__", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *)__pyx_ptype_3_sa___pyx_scope_struct_16___iter__->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_16___iter__, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *)__pyx_ptype_3_sa___pyx_scope_struct_20___iter__->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_20___iter__, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -55957,7 +56690,7 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_4__iter__(struct __pyx_obj_3_sa_F
static PyObject *__pyx_gb_3_sa_13FeatureVector_6generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *)__pyx_generator->closure);
+ struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
int __pyx_t_1;
unsigned int __pyx_t_2;
@@ -55977,7 +56710,7 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_6generator5(__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/m/workspace/cdec/python/src/sa/features.pxi":17
* def __iter__(self):
* cdef unsigned i
* for i in range(self.names.len): # <<<<<<<<<<<<<<
@@ -55988,7 +56721,7 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_6generator5(__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/m/workspace/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]) # <<<<<<<<<<<<<<
@@ -56050,9 +56783,9 @@ static PyObject *__pyx_pw_3_sa_13FeatureVector_8__str__(PyObject *__pyx_v_self)
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":21
+/* "/home/m/workspace/cdec/python/src/sa/features.pxi":21
*
* def __str__(self):
* return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<<
@@ -56061,24 +56794,24 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator12(__pyx_Gener
*/
static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str___genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *__pyx_cur_scope;
+ struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("genexpr", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *)__pyx_ptype_3_sa___pyx_scope_struct_18_genexpr->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_18_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *)__pyx_ptype_3_sa___pyx_scope_struct_22_genexpr->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_22_genexpr, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
}
__Pyx_GOTREF(__pyx_cur_scope);
- __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *) __pyx_self;
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
{
- __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_13FeatureVector_7__str___2generator12, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_13FeatureVector_7__str___2generator14, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -56096,9 +56829,9 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str___genexpr(PyObject *__pyx_
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -56155,7 +56888,7 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator12(__pyx_Gener
__Pyx_GIVEREF(__pyx_t_4);
__pyx_cur_scope->__pyx_v_feat = __pyx_t_4;
__pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_134), __pyx_cur_scope->__pyx_v_feat); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_136), __pyx_cur_scope->__pyx_v_feat); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__pyx_r = ((PyObject *)__pyx_t_4);
__pyx_t_4 = 0;
@@ -56191,7 +56924,7 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator12(__pyx_Gener
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":20
+/* "/home/m/workspace/cdec/python/src/sa/features.pxi":20
* yield (FD.word(self.names[i]), self.values[i])
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -56200,7 +56933,7 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator12(__pyx_Gener
*/
static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str__(struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *__pyx_cur_scope;
+ struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -56210,7 +56943,7 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str__(struct __pyx_obj_3_sa_Fe
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *)__pyx_ptype_3_sa___pyx_scope_struct_17___str__->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_17___str__, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *)__pyx_ptype_3_sa___pyx_scope_struct_21___str__->tp_new(__pyx_ptype_3_sa___pyx_scope_struct_21___str__, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -56220,7 +56953,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/m/workspace/cdec/python/src/sa/features.pxi":21
*
* def __str__(self):
* return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<<
@@ -56276,7 +57009,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/m/workspace/cdec/python/src/sa/features.pxi":25
* cdef class Scorer:
* cdef models
* def __init__(self, *models): # <<<<<<<<<<<<<<
@@ -56299,7 +57032,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/m/workspace/cdec/python/src/sa/features.pxi":26
* cdef models
* def __init__(self, *models):
* names = [FD.index(<char *>model.__name__) for model in models] # <<<<<<<<<<<<<<
@@ -56333,7 +57066,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -56372,7 +57105,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/m/workspace/cdec/python/src/sa/features.pxi":29
* self.models = zip(names, models)
*
* cdef FeatureVector score(self, ctx): # <<<<<<<<<<<<<<
@@ -56399,7 +57132,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":30
+ /* "/home/m/workspace/cdec/python/src/sa/features.pxi":30
*
* cdef FeatureVector score(self, ctx):
* cdef FeatureVector scores = FeatureVector() # <<<<<<<<<<<<<<
@@ -56411,7 +57144,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":31
+ /* "/home/m/workspace/cdec/python/src/sa/features.pxi":31
* cdef FeatureVector score(self, ctx):
* cdef FeatureVector scores = FeatureVector()
* for name, model in self.models: # <<<<<<<<<<<<<<
@@ -56508,7 +57241,7 @@ 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":32
+ /* "/home/m/workspace/cdec/python/src/sa/features.pxi":32
* cdef FeatureVector scores = FeatureVector()
* for name, model in self.models:
* scores.set(name, model(ctx)) # <<<<<<<<<<<<<<
@@ -56540,7 +57273,7 @@ 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":33
+ /* "/home/m/workspace/cdec/python/src/sa/features.pxi":33
* for name, model in self.models:
* scores.set(name, model(ctx))
* return scores # <<<<<<<<<<<<<<
@@ -61648,6 +62381,7 @@ static PyMethodDef __pyx_methods_3_sa_HieroCachingRuleFactory[] = {
{__Pyx_NAMESTR("shortest"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_19shortest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{__Pyx_NAMESTR("get_next_states"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{__Pyx_NAMESTR("input"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_23input, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_3_sa_23HieroCachingRuleFactory_22input)},
+ {__Pyx_NAMESTR("add_instance"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_26add_instance, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
@@ -64283,32 +65017,828 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_10_genexpr = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_11___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *p;
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_11_encode_words(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *p;
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *)o);
+ p->__pyx_v_words = 0;
+ return o;
+}
+
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_11_encode_words(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *p = (struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *)o;
+ Py_CLEAR(p->__pyx_v_words);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_11_encode_words(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *p = (struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *)o;
+ if (p->__pyx_v_words) {
+ e = (*v)(p->__pyx_v_words, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_11_encode_words(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *p = (struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->__pyx_v_words);
+ p->__pyx_v_words = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_11_encode_words[] = {
+ {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_11_encode_words = {
+ 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___pyx_scope_struct_11_encode_words = {
+ 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___pyx_scope_struct_11_encode_words = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_11_encode_words = {
+ #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___pyx_scope_struct_11_encode_words = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_11_encode_words"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_11_encode_words, /*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___pyx_scope_struct_11_encode_words, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_11_encode_words, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_11_encode_words, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_11_encode_words, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_11_encode_words, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_11_encode_words, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_3_sa___pyx_scope_struct_11_encode_words, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_11_encode_words, /*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___pyx_scope_struct_12_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *p;
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *)o);
+ p->__pyx_outer_scope = 0;
+ p->__pyx_v_word = 0;
+ p->__pyx_t_0 = 0;
+ return o;
+}
+
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_12_genexpr(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *)o;
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_word);
+ Py_CLEAR(p->__pyx_t_0);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_12_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_word) {
+ e = (*v)(p->__pyx_v_word, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_12_genexpr(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_word);
+ p->__pyx_v_word = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_t_0);
+ p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_12_genexpr[] = {
+ {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_12_genexpr = {
+ 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___pyx_scope_struct_12_genexpr = {
+ 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___pyx_scope_struct_12_genexpr = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_12_genexpr = {
+ #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___pyx_scope_struct_12_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_12_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_12_genexpr, /*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___pyx_scope_struct_12_genexpr, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_12_genexpr, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_12_genexpr, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_12_genexpr, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_12_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_12_genexpr, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_3_sa___pyx_scope_struct_12_genexpr, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_12_genexpr, /*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___pyx_scope_struct_13_decode_words(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *p;
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *)o);
+ p->__pyx_v_syms = 0;
+ return o;
+}
+
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_13_decode_words(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *p = (struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *)o;
+ Py_CLEAR(p->__pyx_v_syms);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_13_decode_words(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *p = (struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *)o;
+ if (p->__pyx_v_syms) {
+ e = (*v)(p->__pyx_v_syms, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_13_decode_words(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *p = (struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->__pyx_v_syms);
+ p->__pyx_v_syms = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_13_decode_words[] = {
+ {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_13_decode_words = {
+ 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___pyx_scope_struct_13_decode_words = {
+ 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___pyx_scope_struct_13_decode_words = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_13_decode_words = {
+ #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___pyx_scope_struct_13_decode_words = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_13_decode_words"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_13_decode_words, /*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___pyx_scope_struct_13_decode_words, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_13_decode_words, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_13_decode_words, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_13_decode_words, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_13_decode_words, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_13_decode_words, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_3_sa___pyx_scope_struct_13_decode_words, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_13_decode_words, /*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___pyx_scope_struct_14_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *)o);
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *)o);
+ p->__pyx_outer_scope = 0;
+ p->__pyx_v_sym = 0;
+ p->__pyx_t_0 = 0;
+ return o;
+}
+
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_14_genexpr(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *)o;
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_sym);
+ Py_CLEAR(p->__pyx_t_0);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_14_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_sym) {
+ e = (*v)(p->__pyx_v_sym, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_14_genexpr(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_sym);
+ p->__pyx_v_sym = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_t_0);
+ p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_14_genexpr[] = {
+ {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_14_genexpr = {
+ 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___pyx_scope_struct_14_genexpr = {
+ 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___pyx_scope_struct_14_genexpr = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_14_genexpr = {
+ #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___pyx_scope_struct_14_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_14_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_14_genexpr, /*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___pyx_scope_struct_14_genexpr, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_14_genexpr, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_14_genexpr, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_14_genexpr, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_14_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_14_genexpr, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_3_sa___pyx_scope_struct_14_genexpr, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_14_genexpr, /*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___pyx_scope_struct_15___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *p;
+ PyObject *o = (*t->tp_alloc)(t, 0);
+ if (!o) return 0;
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *)o);
p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_11___iter__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *)o;
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_15___iter__(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *)o;
Py_CLEAR(p->__pyx_v_self);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_11___iter__(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_15___iter__(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *)o;
+ struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *)o;
if (p->__pyx_v_self) {
e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_11___iter__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__ *)o;
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_15___iter__(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *)o;
PyObject* tmp;
tmp = ((PyObject*)p->__pyx_v_self);
p->__pyx_v_self = ((struct __pyx_obj_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
@@ -64316,11 +65846,11 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_11___iter__(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_11___iter__[] = {
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_15___iter__[] = {
{0, 0, 0, 0}
};
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_11___iter__ = {
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_15___iter__ = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
@@ -64378,7 +65908,7 @@ static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_11___iter__ = {
#endif
};
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_11___iter__ = {
+static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_15___iter__ = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
@@ -64391,13 +65921,13 @@ static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_11___iter__ = {
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_11___iter__ = {
+static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_15___iter__ = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_11___iter__ = {
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_15___iter__ = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
@@ -64418,12 +65948,12 @@ static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_11___iter__ = {
#endif
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_11___iter__ = {
+static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_15___iter__ = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_11___iter__"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_11___iter__), /*tp_basicsize*/
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_15___iter__"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_11___iter__, /*tp_dealloc*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_15___iter__, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -64433,24 +65963,24 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_11___iter__ = {
0, /*reserved*/
#endif
0, /*tp_repr*/
- &__pyx_tp_as_number___pyx_scope_struct_11___iter__, /*tp_as_number*/
- &__pyx_tp_as_sequence___pyx_scope_struct_11___iter__, /*tp_as_sequence*/
- &__pyx_tp_as_mapping___pyx_scope_struct_11___iter__, /*tp_as_mapping*/
+ &__pyx_tp_as_number___pyx_scope_struct_15___iter__, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_15___iter__, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_15___iter__, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- &__pyx_tp_as_buffer___pyx_scope_struct_11___iter__, /*tp_as_buffer*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_15___iter__, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_11___iter__, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_11___iter__, /*tp_clear*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_15___iter__, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_15___iter__, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_11___iter__, /*tp_methods*/
+ __pyx_methods_3_sa___pyx_scope_struct_15___iter__, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -64460,7 +65990,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_11___iter__ = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_11___iter__, /*tp_new*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_15___iter__, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -64474,32 +66004,32 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_11___iter__ = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_12___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *p;
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_16___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *)o);
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *)o);
p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_12___str__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *)o;
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_16___str__(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *)o;
Py_CLEAR(p->__pyx_v_self);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_12___str__(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_16___str__(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *)o;
+ struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *)o;
if (p->__pyx_v_self) {
e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_12___str__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *)o;
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_16___str__(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *)o;
PyObject* tmp;
tmp = ((PyObject*)p->__pyx_v_self);
p->__pyx_v_self = ((struct __pyx_obj_3_sa_Rule *)Py_None); Py_INCREF(Py_None);
@@ -64507,11 +66037,11 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_12___str__(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_12___str__[] = {
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_16___str__[] = {
{0, 0, 0, 0}
};
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_12___str__ = {
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_16___str__ = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
@@ -64569,7 +66099,7 @@ static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_12___str__ = {
#endif
};
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_12___str__ = {
+static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_16___str__ = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
@@ -64582,13 +66112,13 @@ static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_12___str__ = {
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_12___str__ = {
+static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_16___str__ = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_12___str__ = {
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_16___str__ = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
@@ -64609,12 +66139,12 @@ static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_12___str__ = {
#endif
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_12___str__ = {
+static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_16___str__ = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_12___str__"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_12___str__), /*tp_basicsize*/
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_16___str__"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_16___str__), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_12___str__, /*tp_dealloc*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_16___str__, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -64624,24 +66154,24 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_12___str__ = {
0, /*reserved*/
#endif
0, /*tp_repr*/
- &__pyx_tp_as_number___pyx_scope_struct_12___str__, /*tp_as_number*/
- &__pyx_tp_as_sequence___pyx_scope_struct_12___str__, /*tp_as_sequence*/
- &__pyx_tp_as_mapping___pyx_scope_struct_12___str__, /*tp_as_mapping*/
+ &__pyx_tp_as_number___pyx_scope_struct_16___str__, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_16___str__, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_16___str__, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- &__pyx_tp_as_buffer___pyx_scope_struct_12___str__, /*tp_as_buffer*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_16___str__, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_12___str__, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_12___str__, /*tp_clear*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_16___str__, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_16___str__, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_12___str__, /*tp_methods*/
+ __pyx_methods_3_sa___pyx_scope_struct_16___str__, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -64651,7 +66181,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_12___str__ = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_12___str__, /*tp_new*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_16___str__, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -64665,28 +66195,28 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_12___str__ = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_13_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *p;
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_17_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *)o);
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *)o);
p->__pyx_outer_scope = 0;
p->__pyx_v_a = 0;
p->__pyx_t_0 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_13_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *)o;
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_17_genexpr(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *)o;
Py_CLEAR(p->__pyx_outer_scope);
Py_CLEAR(p->__pyx_v_a);
Py_CLEAR(p->__pyx_t_0);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_13_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_17_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *)o;
+ struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *)o;
if (p->__pyx_outer_scope) {
e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
}
@@ -64699,11 +66229,11 @@ static int __pyx_tp_traverse_3_sa___pyx_scope_struct_13_genexpr(PyObject *o, vis
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_13_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr *)o;
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_17_genexpr(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *)o;
PyObject* tmp;
tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_12___str__ *)Py_None); Py_INCREF(Py_None);
+ p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
tmp = ((PyObject*)p->__pyx_v_a);
p->__pyx_v_a = Py_None; Py_INCREF(Py_None);
@@ -64714,11 +66244,11 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_13_genexpr(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_13_genexpr[] = {
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_17_genexpr[] = {
{0, 0, 0, 0}
};
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_13_genexpr = {
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_17_genexpr = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
@@ -64776,7 +66306,7 @@ static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_13_genexpr = {
#endif
};
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_13_genexpr = {
+static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_17_genexpr = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
@@ -64789,13 +66319,13 @@ static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_13_genexpr = {
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_13_genexpr = {
+static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_17_genexpr = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_13_genexpr = {
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_17_genexpr = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
@@ -64816,12 +66346,12 @@ static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_13_genexpr = {
#endif
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_13_genexpr = {
+static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_17_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_13_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_13_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_17_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_13_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_17_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -64831,24 +66361,24 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_13_genexpr = {
0, /*reserved*/
#endif
0, /*tp_repr*/
- &__pyx_tp_as_number___pyx_scope_struct_13_genexpr, /*tp_as_number*/
- &__pyx_tp_as_sequence___pyx_scope_struct_13_genexpr, /*tp_as_sequence*/
- &__pyx_tp_as_mapping___pyx_scope_struct_13_genexpr, /*tp_as_mapping*/
+ &__pyx_tp_as_number___pyx_scope_struct_17_genexpr, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_17_genexpr, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_17_genexpr, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- &__pyx_tp_as_buffer___pyx_scope_struct_13_genexpr, /*tp_as_buffer*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_17_genexpr, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_13_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_13_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_17_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_17_genexpr, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_13_genexpr, /*tp_methods*/
+ __pyx_methods_3_sa___pyx_scope_struct_17_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -64858,7 +66388,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_13_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_13_genexpr, /*tp_new*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_17_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -64872,28 +66402,28 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_13_genexpr = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_14_alignments(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *p;
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_18_alignments(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *)o);
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *)o);
p->__pyx_v_point = 0;
p->__pyx_v_self = 0;
p->__pyx_t_0 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_14_alignments(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *p = (struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *)o;
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_18_alignments(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *p = (struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *)o;
Py_CLEAR(p->__pyx_v_point);
Py_CLEAR(p->__pyx_v_self);
Py_CLEAR(p->__pyx_t_0);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_14_alignments(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_18_alignments(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *p = (struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *)o;
+ struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *p = (struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *)o;
if (p->__pyx_v_point) {
e = (*v)(p->__pyx_v_point, a); if (e) return e;
}
@@ -64906,8 +66436,8 @@ static int __pyx_tp_traverse_3_sa___pyx_scope_struct_14_alignments(PyObject *o,
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_14_alignments(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *p = (struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments *)o;
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_18_alignments(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *p = (struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *)o;
PyObject* tmp;
tmp = ((PyObject*)p->__pyx_v_point);
p->__pyx_v_point = Py_None; Py_INCREF(Py_None);
@@ -64921,11 +66451,11 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_14_alignments(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_14_alignments[] = {
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_18_alignments[] = {
{0, 0, 0, 0}
};
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_14_alignments = {
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_18_alignments = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
@@ -64983,7 +66513,7 @@ static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_14_alignments = {
#endif
};
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_14_alignments = {
+static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_18_alignments = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
@@ -64996,13 +66526,13 @@ static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_14_alignments =
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_14_alignments = {
+static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_18_alignments = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_14_alignments = {
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_18_alignments = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
@@ -65023,12 +66553,12 @@ static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_14_alignments = {
#endif
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_14_alignments = {
+static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_18_alignments = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_14_alignments"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_14_alignments), /*tp_basicsize*/
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_18_alignments"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_14_alignments, /*tp_dealloc*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_18_alignments, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -65038,24 +66568,24 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_14_alignments = {
0, /*reserved*/
#endif
0, /*tp_repr*/
- &__pyx_tp_as_number___pyx_scope_struct_14_alignments, /*tp_as_number*/
- &__pyx_tp_as_sequence___pyx_scope_struct_14_alignments, /*tp_as_sequence*/
- &__pyx_tp_as_mapping___pyx_scope_struct_14_alignments, /*tp_as_mapping*/
+ &__pyx_tp_as_number___pyx_scope_struct_18_alignments, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_18_alignments, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_18_alignments, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- &__pyx_tp_as_buffer___pyx_scope_struct_14_alignments, /*tp_as_buffer*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_18_alignments, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_14_alignments, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_14_alignments, /*tp_clear*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_18_alignments, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_18_alignments, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_14_alignments, /*tp_methods*/
+ __pyx_methods_3_sa___pyx_scope_struct_18_alignments, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -65065,7 +66595,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_14_alignments = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_14_alignments, /*tp_new*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_18_alignments, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -65079,11 +66609,11 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_14_alignments = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_15_input(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_15_input *p;
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_19_input(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_19_input *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_15_input *)o);
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_19_input *)o);
p->__pyx_v_alignment = 0;
p->__pyx_v_als = 0;
p->__pyx_v_alslist = 0;
@@ -65137,8 +66667,8 @@ static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_15_input(PyTypeObject *t,
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_15_input(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_15_input *p = (struct __pyx_obj_3_sa___pyx_scope_struct_15_input *)o;
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_19_input(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_19_input *p = (struct __pyx_obj_3_sa___pyx_scope_struct_19_input *)o;
Py_CLEAR(p->__pyx_v_alignment);
Py_CLEAR(p->__pyx_v_als);
Py_CLEAR(p->__pyx_v_alslist);
@@ -65192,9 +66722,9 @@ static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_15_input(PyObject *o) {
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_15_input(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_19_input(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_15_input *p = (struct __pyx_obj_3_sa___pyx_scope_struct_15_input *)o;
+ struct __pyx_obj_3_sa___pyx_scope_struct_19_input *p = (struct __pyx_obj_3_sa___pyx_scope_struct_19_input *)o;
if (p->__pyx_v_alignment) {
e = (*v)(p->__pyx_v_alignment, a); if (e) return e;
}
@@ -65348,8 +66878,8 @@ static int __pyx_tp_traverse_3_sa___pyx_scope_struct_15_input(PyObject *o, visit
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_15_input(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_15_input *p = (struct __pyx_obj_3_sa___pyx_scope_struct_15_input *)o;
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_19_input(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_19_input *p = (struct __pyx_obj_3_sa___pyx_scope_struct_19_input *)o;
PyObject* tmp;
tmp = ((PyObject*)p->__pyx_v_alignment);
p->__pyx_v_alignment = Py_None; Py_INCREF(Py_None);
@@ -65504,11 +67034,11 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_15_input(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_15_input[] = {
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_19_input[] = {
{0, 0, 0, 0}
};
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_15_input = {
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_19_input = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
@@ -65566,7 +67096,7 @@ static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_15_input = {
#endif
};
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_15_input = {
+static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_19_input = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
@@ -65579,13 +67109,13 @@ static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_15_input = {
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_15_input = {
+static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_19_input = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_15_input = {
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_19_input = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
@@ -65606,12 +67136,12 @@ static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_15_input = {
#endif
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_15_input = {
+static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_19_input = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_15_input"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_15_input), /*tp_basicsize*/
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_19_input"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_19_input), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_15_input, /*tp_dealloc*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_19_input, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -65621,24 +67151,24 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_15_input = {
0, /*reserved*/
#endif
0, /*tp_repr*/
- &__pyx_tp_as_number___pyx_scope_struct_15_input, /*tp_as_number*/
- &__pyx_tp_as_sequence___pyx_scope_struct_15_input, /*tp_as_sequence*/
- &__pyx_tp_as_mapping___pyx_scope_struct_15_input, /*tp_as_mapping*/
+ &__pyx_tp_as_number___pyx_scope_struct_19_input, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_19_input, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_19_input, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- &__pyx_tp_as_buffer___pyx_scope_struct_15_input, /*tp_as_buffer*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_19_input, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_15_input, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_15_input, /*tp_clear*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_19_input, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_19_input, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_15_input, /*tp_methods*/
+ __pyx_methods_3_sa___pyx_scope_struct_19_input, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -65648,7 +67178,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_15_input = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_15_input, /*tp_new*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_19_input, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -65662,32 +67192,32 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_15_input = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_16___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *p;
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_20___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *)o);
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *)o);
p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_16___iter__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *)o;
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_20___iter__(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *)o;
Py_CLEAR(p->__pyx_v_self);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_16___iter__(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_20___iter__(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *)o;
+ struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *)o;
if (p->__pyx_v_self) {
e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_16___iter__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__ *)o;
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_20___iter__(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__ *)o;
PyObject* tmp;
tmp = ((PyObject*)p->__pyx_v_self);
p->__pyx_v_self = ((struct __pyx_obj_3_sa_FeatureVector *)Py_None); Py_INCREF(Py_None);
@@ -65695,11 +67225,11 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_16___iter__(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_16___iter__[] = {
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_20___iter__[] = {
{0, 0, 0, 0}
};
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_16___iter__ = {
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_20___iter__ = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
@@ -65757,7 +67287,7 @@ static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_16___iter__ = {
#endif
};
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_16___iter__ = {
+static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_20___iter__ = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
@@ -65770,13 +67300,13 @@ static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_16___iter__ = {
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_16___iter__ = {
+static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_20___iter__ = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_16___iter__ = {
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_20___iter__ = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
@@ -65797,12 +67327,12 @@ static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_16___iter__ = {
#endif
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_16___iter__ = {
+static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_20___iter__ = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_16___iter__"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_16___iter__), /*tp_basicsize*/
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_20___iter__"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_20___iter__), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_16___iter__, /*tp_dealloc*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_20___iter__, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -65812,24 +67342,24 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_16___iter__ = {
0, /*reserved*/
#endif
0, /*tp_repr*/
- &__pyx_tp_as_number___pyx_scope_struct_16___iter__, /*tp_as_number*/
- &__pyx_tp_as_sequence___pyx_scope_struct_16___iter__, /*tp_as_sequence*/
- &__pyx_tp_as_mapping___pyx_scope_struct_16___iter__, /*tp_as_mapping*/
+ &__pyx_tp_as_number___pyx_scope_struct_20___iter__, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_20___iter__, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_20___iter__, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- &__pyx_tp_as_buffer___pyx_scope_struct_16___iter__, /*tp_as_buffer*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_20___iter__, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_16___iter__, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_16___iter__, /*tp_clear*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_20___iter__, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_20___iter__, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_16___iter__, /*tp_methods*/
+ __pyx_methods_3_sa___pyx_scope_struct_20___iter__, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -65839,7 +67369,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_16___iter__ = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_16___iter__, /*tp_new*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_20___iter__, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -65853,32 +67383,32 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_16___iter__ = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_17___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *p;
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_21___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *)o);
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *)o);
p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_17___str__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *)o;
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_21___str__(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *)o;
Py_CLEAR(p->__pyx_v_self);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_17___str__(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_21___str__(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *)o;
+ struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *)o;
if (p->__pyx_v_self) {
e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_17___str__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *)o;
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_21___str__(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *)o;
PyObject* tmp;
tmp = ((PyObject*)p->__pyx_v_self);
p->__pyx_v_self = ((struct __pyx_obj_3_sa_FeatureVector *)Py_None); Py_INCREF(Py_None);
@@ -65886,11 +67416,11 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_17___str__(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_17___str__[] = {
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_21___str__[] = {
{0, 0, 0, 0}
};
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_17___str__ = {
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_21___str__ = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
@@ -65948,7 +67478,7 @@ static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_17___str__ = {
#endif
};
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_17___str__ = {
+static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_21___str__ = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
@@ -65961,13 +67491,13 @@ static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_17___str__ = {
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_17___str__ = {
+static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_21___str__ = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_17___str__ = {
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_21___str__ = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
@@ -65988,12 +67518,12 @@ static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_17___str__ = {
#endif
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_17___str__ = {
+static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_21___str__ = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_17___str__"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_17___str__), /*tp_basicsize*/
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_21___str__"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_21___str__), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_17___str__, /*tp_dealloc*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_21___str__, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -66003,24 +67533,24 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_17___str__ = {
0, /*reserved*/
#endif
0, /*tp_repr*/
- &__pyx_tp_as_number___pyx_scope_struct_17___str__, /*tp_as_number*/
- &__pyx_tp_as_sequence___pyx_scope_struct_17___str__, /*tp_as_sequence*/
- &__pyx_tp_as_mapping___pyx_scope_struct_17___str__, /*tp_as_mapping*/
+ &__pyx_tp_as_number___pyx_scope_struct_21___str__, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_21___str__, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_21___str__, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- &__pyx_tp_as_buffer___pyx_scope_struct_17___str__, /*tp_as_buffer*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_21___str__, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_17___str__, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_17___str__, /*tp_clear*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_21___str__, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_21___str__, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_17___str__, /*tp_methods*/
+ __pyx_methods_3_sa___pyx_scope_struct_21___str__, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -66030,7 +67560,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_17___str__ = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_17___str__, /*tp_new*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_21___str__, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -66044,28 +67574,28 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_17___str__ = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_18_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *p;
+static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_22_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *)o);
+ p = ((struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *)o);
p->__pyx_outer_scope = 0;
p->__pyx_v_feat = 0;
p->__pyx_t_0 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_18_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *)o;
+static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_22_genexpr(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *)o;
Py_CLEAR(p->__pyx_outer_scope);
Py_CLEAR(p->__pyx_v_feat);
Py_CLEAR(p->__pyx_t_0);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_18_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_3_sa___pyx_scope_struct_22_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *)o;
+ struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *)o;
if (p->__pyx_outer_scope) {
e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
}
@@ -66078,11 +67608,11 @@ static int __pyx_tp_traverse_3_sa___pyx_scope_struct_18_genexpr(PyObject *o, vis
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_18_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr *)o;
+static int __pyx_tp_clear_3_sa___pyx_scope_struct_22_genexpr(PyObject *o) {
+ struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr *)o;
PyObject* tmp;
tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_17___str__ *)Py_None); Py_INCREF(Py_None);
+ p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_21___str__ *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
tmp = ((PyObject*)p->__pyx_v_feat);
p->__pyx_v_feat = Py_None; Py_INCREF(Py_None);
@@ -66093,11 +67623,11 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_18_genexpr(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_18_genexpr[] = {
+static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_22_genexpr[] = {
{0, 0, 0, 0}
};
-static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_18_genexpr = {
+static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_22_genexpr = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
@@ -66155,7 +67685,7 @@ static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_18_genexpr = {
#endif
};
-static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_18_genexpr = {
+static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_22_genexpr = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
@@ -66168,13 +67698,13 @@ static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_18_genexpr = {
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_18_genexpr = {
+static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_22_genexpr = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};
-static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_18_genexpr = {
+static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_22_genexpr = {
#if PY_MAJOR_VERSION < 3
0, /*bf_getreadbuffer*/
#endif
@@ -66195,12 +67725,12 @@ static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_18_genexpr = {
#endif
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_18_genexpr = {
+static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_22_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_18_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_18_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("_sa.__pyx_scope_struct_22_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_22_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_18_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_3_sa___pyx_scope_struct_22_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -66210,24 +67740,24 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_18_genexpr = {
0, /*reserved*/
#endif
0, /*tp_repr*/
- &__pyx_tp_as_number___pyx_scope_struct_18_genexpr, /*tp_as_number*/
- &__pyx_tp_as_sequence___pyx_scope_struct_18_genexpr, /*tp_as_sequence*/
- &__pyx_tp_as_mapping___pyx_scope_struct_18_genexpr, /*tp_as_mapping*/
+ &__pyx_tp_as_number___pyx_scope_struct_22_genexpr, /*tp_as_number*/
+ &__pyx_tp_as_sequence___pyx_scope_struct_22_genexpr, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___pyx_scope_struct_22_genexpr, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- &__pyx_tp_as_buffer___pyx_scope_struct_18_genexpr, /*tp_as_buffer*/
+ &__pyx_tp_as_buffer___pyx_scope_struct_22_genexpr, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_18_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_18_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_3_sa___pyx_scope_struct_22_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_3_sa___pyx_scope_struct_22_genexpr, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_18_genexpr, /*tp_methods*/
+ __pyx_methods_3_sa___pyx_scope_struct_22_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -66237,7 +67767,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_18_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_18_genexpr, /*tp_new*/
+ __pyx_tp_new_3_sa___pyx_scope_struct_22_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -66303,10 +67833,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_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_136, __pyx_k_136, sizeof(__pyx_k_136), 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_140, __pyx_k_140, sizeof(__pyx_k_140), 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},
@@ -66399,12 +67930,15 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s__debug, __pyx_k__debug, sizeof(__pyx_k__debug), 0, 0, 1, 1},
{&__pyx_n_s__decode_lattice, __pyx_k__decode_lattice, sizeof(__pyx_k__decode_lattice), 0, 0, 1, 1},
{&__pyx_n_s__decode_sentence, __pyx_k__decode_sentence, sizeof(__pyx_k__decode_sentence), 0, 0, 1, 1},
+ {&__pyx_n_s__decode_words, __pyx_k__decode_words, sizeof(__pyx_k__decode_words), 0, 0, 1, 1},
{&__pyx_n_s__defaultdict, __pyx_k__defaultdict, sizeof(__pyx_k__defaultdict), 0, 0, 1, 1},
{&__pyx_n_s__dist, __pyx_k__dist, sizeof(__pyx_k__dist), 0, 0, 1, 1},
{&__pyx_n_s__e, __pyx_k__e, sizeof(__pyx_k__e), 0, 0, 1, 1},
{&__pyx_n_s__e_text, __pyx_k__e_text, sizeof(__pyx_k__e_text), 0, 0, 1, 1},
+ {&__pyx_n_s__e_words, __pyx_k__e_words, sizeof(__pyx_k__e_words), 0, 0, 1, 1},
{&__pyx_n_s__earray, __pyx_k__earray, sizeof(__pyx_k__earray), 0, 0, 1, 1},
{&__pyx_n_s__edarray, __pyx_k__edarray, sizeof(__pyx_k__edarray), 0, 0, 1, 1},
+ {&__pyx_n_s__encode_words, __pyx_k__encode_words, sizeof(__pyx_k__encode_words), 0, 0, 1, 1},
{&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
{&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1},
{&__pyx_n_s__ephrase, __pyx_k__ephrase, sizeof(__pyx_k__ephrase), 0, 0, 1, 1},
@@ -66413,6 +67947,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s__extended, __pyx_k__extended, sizeof(__pyx_k__extended), 0, 0, 1, 1},
{&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1},
{&__pyx_n_s__f_text, __pyx_k__f_text, sizeof(__pyx_k__f_text), 0, 0, 1, 1},
+ {&__pyx_n_s__f_words, __pyx_k__f_words, sizeof(__pyx_k__f_words), 0, 0, 1, 1},
{&__pyx_n_s__fcount, __pyx_k__fcount, sizeof(__pyx_k__fcount), 0, 0, 1, 1},
{&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1},
{&__pyx_n_s__fphrase, __pyx_k__fphrase, sizeof(__pyx_k__fphrase), 0, 0, 1, 1},
@@ -66531,6 +68066,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s__stats, __pyx_k__stats, sizeof(__pyx_k__stats), 0, 0, 1, 1},
{&__pyx_n_s__stop, __pyx_k__stop, sizeof(__pyx_k__stop), 0, 0, 1, 1},
{&__pyx_n_s__suffix_link, __pyx_k__suffix_link, sizeof(__pyx_k__suffix_link), 0, 0, 1, 1},
+ {&__pyx_n_s__syms, __pyx_k__syms, sizeof(__pyx_k__syms), 0, 0, 1, 1},
{&__pyx_n_s__test_sentence, __pyx_k__test_sentence, sizeof(__pyx_k__test_sentence), 0, 0, 1, 1},
{&__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},
@@ -66574,7 +68110,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -66591,7 +68127,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -66608,7 +68144,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -66625,7 +68161,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":66
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":66
* f.write("%s " % self.get_word(w_id))
* if w_id == 1:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -66639,7 +68175,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":61
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":61
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -66659,7 +68195,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":69
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":69
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -66679,7 +68215,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":74
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":74
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
@@ -66693,7 +68229,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":73
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":73
*
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -66713,7 +68249,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":144
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":144
* for i in self.data:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -66727,7 +68263,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":147
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":147
* for i in self.sent_index:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -66741,7 +68277,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":150
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":150
* for i in self.sent_id:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -66755,7 +68291,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":153
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":153
* for word in self.id2word:
* f.write("%s %d " % (word, self.word2id[word]))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -66769,7 +68305,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":156
+ /* "/home/m/workspace/cdec/python/src/sa/data_array.pxi":156
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -66788,7 +68324,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/m/workspace/cdec/python/src/sa/alignment.pxi":46
*
* def __cinit__(self, from_binary=None, from_text=None):
* self.links = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -66805,7 +68341,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/m/workspace/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) # <<<<<<<<<<<<<<
@@ -66822,7 +68358,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/m/workspace/cdec/python/src/sa/alignment.pxi":59
* pairs = line.split()
* for pair in pairs:
* (i, j) = map(int, pair.split('-')) # <<<<<<<<<<<<<<
@@ -66836,7 +68372,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/m/workspace/cdec/python/src/sa/alignment.pxi":54
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -66856,7 +68392,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/m/workspace/cdec/python/src/sa/alignment.pxi":75
* for i, link in enumerate(self.links):
* while i >= self.sent_index[sent_num]:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -66870,7 +68406,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/m/workspace/cdec/python/src/sa/alignment.pxi":78
* sent_num = sent_num + 1
* f.write("%d-%d " % self.unlink(link))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -66884,7 +68420,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/m/workspace/cdec/python/src/sa/alignment.pxi":71
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -66904,7 +68440,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/m/workspace/cdec/python/src/sa/alignment.pxi":92
* for link in self.links:
* f.write("%d " % link)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -66918,7 +68454,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/m/workspace/cdec/python/src/sa/alignment.pxi":95
* for i in self.sent_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -66932,7 +68468,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/m/workspace/cdec/python/src/sa/alignment.pxi":88
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -66952,7 +68488,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":297
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":297
*
* # Re-read file, placing words into buckets
* f.seek(0) # <<<<<<<<<<<<<<
@@ -66966,7 +68502,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":273
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":273
*
* fcount = IntList()
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -66986,7 +68522,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":339
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":339
*
* if i > j:
* raise Exception("Sort error in CLex") # <<<<<<<<<<<<<<
@@ -67000,7 +68536,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":362
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":362
* for i in self.f_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -67014,7 +68550,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":365
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":365
* for i, s1, s2 in zip(self.e_index, self.col1, self.col2):
* f.write("%d %f %f " % (i, s1, s2))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -67028,7 +68564,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":368
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":368
* for i, w in enumerate(self.id2fword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -67042,7 +68578,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":371
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":371
* for i, w in enumerate(self.id2eword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -67056,7 +68592,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":359
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":359
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -67076,7 +68612,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":404
+ /* "/home/m/workspace/cdec/python/src/sa/bilex.pxi":404
* cdef i, N, e_id, f_id
*
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -67096,7 +68632,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/m/workspace/cdec/python/src/sa/lcp.pxi":13
* cdef IntList rank
*
* logger.info("Constructing LCP array") # <<<<<<<<<<<<<<
@@ -67110,7 +68646,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/m/workspace/cdec/python/src/sa/lcp.pxi":34
* if h > 0:
* h = h-1
* logger.info("LCP array completed") # <<<<<<<<<<<<<<
@@ -67124,7 +68660,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/m/workspace/cdec/python/src/sa/precomputation.pxi":297
* pattern_rank = {}
*
* logger.info("Precomputing frequent intersections") # <<<<<<<<<<<<<<
@@ -67138,7 +68674,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/m/workspace/cdec/python/src/sa/precomputation.pxi":314
* queue = IntList(increment=1000)
*
* logger.info(" Computing inverted indexes...") # <<<<<<<<<<<<<<
@@ -67152,7 +68688,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/m/workspace/cdec/python/src/sa/precomputation.pxi":329
* trie_node_data_append(node, i)
*
* logger.info(" Computing collocations...") # <<<<<<<<<<<<<<
@@ -67166,7 +68702,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/m/workspace/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 # <<<<<<<<<<<<<<
@@ -67180,7 +68716,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/m/workspace/cdec/python/src/sa/precomputation.pxi":400
* x = x+1
* if len(pattern1) + len(pattern2) + 1 <= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -67194,7 +68730,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/m/workspace/cdec/python/src/sa/precomputation.pxi":407
* x = x+2
* if len(pattern1) + len(pattern2) + 1<= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -67208,7 +68744,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/m/workspace/cdec/python/src/sa/precomputation.pxi":409
* combined_pattern = pattern1 + (-1,) + pattern2
* IJ_set.add(combined_pattern)
* combined_pattern = pattern2 + (-1,) + pattern1 # <<<<<<<<<<<<<<
@@ -67222,7 +68758,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":94
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":94
*
* '''Step 3: read off suffix array from inverse suffix array'''
* logger.info(" Finalizing sort...") # <<<<<<<<<<<<<<
@@ -67236,7 +68772,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":193
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":193
* for a_i in self.sa:
* f.write("%d " % a_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -67250,7 +68786,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":196
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":196
* for w_i in self.ha:
* f.write("%d " % w_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -67264,7 +68800,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":189
+ /* "/home/m/workspace/cdec/python/src/sa/suffix_array.pxi":189
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -67284,7 +68820,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":109
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":109
* logger.info("Sampling strategy: uniform, max sample size = %d", sample_size)
* else:
* logger.info("Sampling strategy: no sampling") # <<<<<<<<<<<<<<
@@ -67298,7 +68834,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_101));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_102));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":318
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":318
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
* if alignment is None:
* raise Exception("Must specify an alignment object") # <<<<<<<<<<<<<<
@@ -67312,7 +68848,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_106));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_107));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1018
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1018
* else:
* #ERROR: We never get here
* raise Exception("Keyword trie error") # <<<<<<<<<<<<<<
@@ -67326,6 +68862,20 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_121));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":1803
+ *
+ * def add_instance(self, f_words, e_words, alignment):
+ * logger.info("I would add:") # <<<<<<<<<<<<<<
+ * logger.info(decode_words(f_words))
+ * logger.info(decode_words(e_words))
+ */
+ __pyx_k_tuple_135 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_135);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_134));
+ PyTuple_SET_ITEM(__pyx_k_tuple_135, 0, ((PyObject *)__pyx_kp_s_134));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_134));
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));
+
/* "_sa.pyx":9
* resource.getrusage(resource.RUSAGE_SELF).ru_stime)
*
@@ -67333,16 +68883,16 @@ static int __Pyx_InitCachedConstants(void) {
* if filename.endswith('.gz'):
* return gzip.GzipFile(filename)
*/
- __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_k_tuple_137 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_137);
__Pyx_INCREF(((PyObject *)__pyx_n_s__filename));
- PyTuple_SET_ITEM(__pyx_k_tuple_135, 0, ((PyObject *)__pyx_n_s__filename));
+ PyTuple_SET_ITEM(__pyx_k_tuple_137, 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_135, 1, ((PyObject *)__pyx_n_s__filename));
+ PyTuple_SET_ITEM(__pyx_k_tuple_137, 1, ((PyObject *)__pyx_n_s__filename));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__filename));
- __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;}
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_137));
+ __pyx_k_codeobj_138 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_139, __pyx_n_s__gzip_or_text, 9, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "_sa.pyx":15
* return open(filename)
@@ -67351,80 +68901,122 @@ static int __Pyx_InitCachedConstants(void) {
*
* include "float_list.pxi"
*/
- __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));
+ __pyx_k_tuple_141 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_141);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_140));
+ PyTuple_SET_ITEM(__pyx_k_tuple_141, 0, ((PyObject *)__pyx_kp_s_140));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_140));
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":107
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":107
* return ALPHABET.fromstring(string, terminal)
*
* def make_lattice(words): # <<<<<<<<<<<<<<
* word_ids = (sym_fromstring(word, True) for word in words)
* return tuple(((word, None, 1), ) for word in word_ids)
*/
- __pyx_k_tuple_140 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_140)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_140);
+ __pyx_k_tuple_142 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_142)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_142);
__Pyx_INCREF(((PyObject *)__pyx_n_s__words));
- PyTuple_SET_ITEM(__pyx_k_tuple_140, 0, ((PyObject *)__pyx_n_s__words));
+ PyTuple_SET_ITEM(__pyx_k_tuple_142, 0, ((PyObject *)__pyx_n_s__words));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__words));
__Pyx_INCREF(((PyObject *)__pyx_n_s__word_ids));
- PyTuple_SET_ITEM(__pyx_k_tuple_140, 1, ((PyObject *)__pyx_n_s__word_ids));
+ PyTuple_SET_ITEM(__pyx_k_tuple_142, 1, ((PyObject *)__pyx_n_s__word_ids));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__word_ids));
__Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
- PyTuple_SET_ITEM(__pyx_k_tuple_140, 2, ((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_142, 2, ((PyObject *)__pyx_n_s__genexpr));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
__Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
- PyTuple_SET_ITEM(__pyx_k_tuple_140, 3, ((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_142, 3, ((PyObject *)__pyx_n_s__genexpr));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
__Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
- PyTuple_SET_ITEM(__pyx_k_tuple_140, 4, ((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_142, 4, ((PyObject *)__pyx_n_s__genexpr));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_140));
- __pyx_k_codeobj_141 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 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__make_lattice, 107, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_141)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_142));
+ __pyx_k_codeobj_143 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_144, __pyx_n_s__make_lattice, 107, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_143)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":111
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":111
* return tuple(((word, None, 1), ) for word in word_ids)
*
* def decode_lattice(lattice): # <<<<<<<<<<<<<<
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc
* for arc in node for node in lattice)
*/
- __pyx_k_tuple_143 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_143)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_143);
+ __pyx_k_tuple_145 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_145)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_145);
__Pyx_INCREF(((PyObject *)__pyx_n_s__lattice));
- PyTuple_SET_ITEM(__pyx_k_tuple_143, 0, ((PyObject *)__pyx_n_s__lattice));
+ PyTuple_SET_ITEM(__pyx_k_tuple_145, 0, ((PyObject *)__pyx_n_s__lattice));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__lattice));
__Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
- PyTuple_SET_ITEM(__pyx_k_tuple_143, 1, ((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_145, 1, ((PyObject *)__pyx_n_s__genexpr));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
__Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
- PyTuple_SET_ITEM(__pyx_k_tuple_143, 2, ((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_145, 2, ((PyObject *)__pyx_n_s__genexpr));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_143));
- __pyx_k_codeobj_144 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_142, __pyx_n_s__decode_lattice, 111, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_144)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_145));
+ __pyx_k_codeobj_146 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_144, __pyx_n_s__decode_lattice, 111, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_146)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":115
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":115
* for arc in node for node in lattice)
*
* def decode_sentence(lattice): # <<<<<<<<<<<<<<
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+ *
*/
- __pyx_k_tuple_145 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_145)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_145);
+ __pyx_k_tuple_147 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_147)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_147);
__Pyx_INCREF(((PyObject *)__pyx_n_s__lattice));
- PyTuple_SET_ITEM(__pyx_k_tuple_145, 0, ((PyObject *)__pyx_n_s__lattice));
+ PyTuple_SET_ITEM(__pyx_k_tuple_147, 0, ((PyObject *)__pyx_n_s__lattice));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__lattice));
__Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
- PyTuple_SET_ITEM(__pyx_k_tuple_145, 1, ((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_147, 1, ((PyObject *)__pyx_n_s__genexpr));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
__Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
- PyTuple_SET_ITEM(__pyx_k_tuple_145, 2, ((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_147, 2, ((PyObject *)__pyx_n_s__genexpr));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_145));
- __pyx_k_codeobj_146 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_142, __pyx_n_s__decode_sentence, 115, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_146)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_147));
+ __pyx_k_codeobj_148 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_144, __pyx_n_s__decode_sentence, 115, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_148)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":118
+ * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+ *
+ * def encode_words(words): # <<<<<<<<<<<<<<
+ * return tuple(sym_fromstring(word, True) for word in words)
+ *
+ */
+ __pyx_k_tuple_149 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_149)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_149);
+ __Pyx_INCREF(((PyObject *)__pyx_n_s__words));
+ PyTuple_SET_ITEM(__pyx_k_tuple_149, 0, ((PyObject *)__pyx_n_s__words));
+ __Pyx_GIVEREF(((PyObject *)__pyx_n_s__words));
+ __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_149, 1, ((PyObject *)__pyx_n_s__genexpr));
+ __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
+ __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_149, 2, ((PyObject *)__pyx_n_s__genexpr));
+ __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_149));
+ __pyx_k_codeobj_150 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_144, __pyx_n_s__encode_words, 118, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_150)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":121
+ * return tuple(sym_fromstring(word, True) for word in words)
+ *
+ * def decode_words(syms): # <<<<<<<<<<<<<<
+ * return tuple(sym_tostring(sym) for sym in syms)
+ */
+ __pyx_k_tuple_151 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_151)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_151);
+ __Pyx_INCREF(((PyObject *)__pyx_n_s__syms));
+ PyTuple_SET_ITEM(__pyx_k_tuple_151, 0, ((PyObject *)__pyx_n_s__syms));
+ __Pyx_GIVEREF(((PyObject *)__pyx_n_s__syms));
+ __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_151, 1, ((PyObject *)__pyx_n_s__genexpr));
+ __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
+ __Pyx_INCREF(((PyObject *)__pyx_n_s__genexpr));
+ PyTuple_SET_ITEM(__pyx_k_tuple_151, 2, ((PyObject *)__pyx_n_s__genexpr));
+ __Pyx_GIVEREF(((PyObject *)__pyx_n_s__genexpr));
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_151));
+ __pyx_k_codeobj_152 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_144, __pyx_n_s__decode_words, 121, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_152)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
@@ -67712,22 +69304,30 @@ PyMODINIT_FUNC PyInit__sa(void)
__pyx_ptype_3_sa___pyx_scope_struct_9_decode_sentence = &__pyx_type_3_sa___pyx_scope_struct_9_decode_sentence;
if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_10_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_3_sa___pyx_scope_struct_10_genexpr = &__pyx_type_3_sa___pyx_scope_struct_10_genexpr;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_11___iter__) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_11___iter__ = &__pyx_type_3_sa___pyx_scope_struct_11___iter__;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_12___str__) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_12___str__ = &__pyx_type_3_sa___pyx_scope_struct_12___str__;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_13_genexpr) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_13_genexpr = &__pyx_type_3_sa___pyx_scope_struct_13_genexpr;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_14_alignments) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_14_alignments = &__pyx_type_3_sa___pyx_scope_struct_14_alignments;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_15_input) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_15_input = &__pyx_type_3_sa___pyx_scope_struct_15_input;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_16___iter__) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_16___iter__ = &__pyx_type_3_sa___pyx_scope_struct_16___iter__;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_17___str__) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_17___str__ = &__pyx_type_3_sa___pyx_scope_struct_17___str__;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_18_genexpr) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_18_genexpr = &__pyx_type_3_sa___pyx_scope_struct_18_genexpr;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_11_encode_words) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_11_encode_words = &__pyx_type_3_sa___pyx_scope_struct_11_encode_words;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_12_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_12_genexpr = &__pyx_type_3_sa___pyx_scope_struct_12_genexpr;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_13_decode_words) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_13_decode_words = &__pyx_type_3_sa___pyx_scope_struct_13_decode_words;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_14_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_14_genexpr = &__pyx_type_3_sa___pyx_scope_struct_14_genexpr;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_15___iter__) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_15___iter__ = &__pyx_type_3_sa___pyx_scope_struct_15___iter__;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_16___str__) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_16___str__ = &__pyx_type_3_sa___pyx_scope_struct_16___str__;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_17_genexpr) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_17_genexpr = &__pyx_type_3_sa___pyx_scope_struct_17_genexpr;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_18_alignments) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_18_alignments = &__pyx_type_3_sa___pyx_scope_struct_18_alignments;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_19_input) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_19_input = &__pyx_type_3_sa___pyx_scope_struct_19_input;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_20___iter__) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_20___iter__ = &__pyx_type_3_sa___pyx_scope_struct_20___iter__;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_21___str__) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_21___str__ = &__pyx_type_3_sa___pyx_scope_struct_21___str__;
+ if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_22_genexpr) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_3_sa___pyx_scope_struct_22_genexpr = &__pyx_type_3_sa___pyx_scope_struct_22_genexpr;
/*--- Type import code ---*/
/*--- Variable import code ---*/
/*--- Function import code ---*/
@@ -67790,13 +69390,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_139), 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_141), 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/m/workspace/cdec/python/src/sa/bilex.pxi":54
* cdef id2eword, id2fword, eword2id, fword2id
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<<
@@ -67809,7 +69409,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/m/workspace/cdec/python/src/sa/veb.pxi":17
* from libc.string cimport memset
*
* cdef int MIN_BOTTOM_SIZE = 32 # <<<<<<<<<<<<<<
@@ -67818,7 +69418,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/m/workspace/cdec/python/src/sa/veb.pxi":18
*
* cdef int MIN_BOTTOM_SIZE = 32
* cdef int MIN_BOTTOM_BITS = 5 # <<<<<<<<<<<<<<
@@ -67827,7 +69427,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/m/workspace/cdec/python/src/sa/veb.pxi":28
* LOWER_MASK[i] = mask
*
* _init_lower_mask() # <<<<<<<<<<<<<<
@@ -67836,7 +69436,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_f_3_sa__init_lower_mask();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":4
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":4
* from libc.stdlib cimport malloc, realloc, strtol
*
* cdef int INDEX_SHIFT = 3 # <<<<<<<<<<<<<<
@@ -67845,7 +69445,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_INDEX_SHIFT = 3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":5
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":5
*
* cdef int INDEX_SHIFT = 3
* cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1 # <<<<<<<<<<<<<<
@@ -67854,7 +69454,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/m/workspace/cdec/python/src/sa/sym.pxi":87
* return self.terminals.index(s)
*
* cdef Alphabet ALPHABET = Alphabet() # <<<<<<<<<<<<<<
@@ -67869,7 +69469,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":107
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":107
* return ALPHABET.fromstring(string, terminal)
*
* def make_lattice(words): # <<<<<<<<<<<<<<
@@ -67881,7 +69481,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__make_lattice, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":111
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":111
* return tuple(((word, None, 1), ) for word in word_ids)
*
* def decode_lattice(lattice): # <<<<<<<<<<<<<<
@@ -67893,18 +69493,42 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__decode_lattice, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":115
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":115
* for arc in node for node in lattice)
*
* def decode_sentence(lattice): # <<<<<<<<<<<<<<
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+ *
*/
__pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_7decode_sentence, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__decode_sentence, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __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":5
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":118
+ * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+ *
+ * def encode_words(words): # <<<<<<<<<<<<<<
+ * return tuple(sym_fromstring(word, True) for word in words)
+ *
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_9encode_words, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__encode_words, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "/home/m/workspace/cdec/python/src/sa/sym.pxi":121
+ * return tuple(sym_fromstring(word, True) for word in words)
+ *
+ * def decode_words(syms): # <<<<<<<<<<<<<<
+ * return tuple(sym_tostring(sym) for sym in syms)
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_11decode_words, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__decode_words, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "/home/m/workspace/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 # <<<<<<<<<<<<<<
@@ -67916,7 +69540,7 @@ 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":6
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":6
* # Note to reader: this code is closer to C than Python
* import gc
* import itertools # <<<<<<<<<<<<<<
@@ -67928,7 +69552,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__itertools, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 6; __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":12
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":12
* from libc.math cimport fmod, ceil, floor, log
*
* from collections import defaultdict, Counter, namedtuple # <<<<<<<<<<<<<<
@@ -67975,7 +69599,7 @@ PyMODINIT_FUNC PyInit__sa(void)
__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":14
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":14
* from collections import defaultdict, Counter, namedtuple
*
* FeatureContext = namedtuple('FeatureContext', # <<<<<<<<<<<<<<
@@ -67985,7 +69609,7 @@ PyMODINIT_FUNC PyInit__sa(void)
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__namedtuple); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":15
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":15
*
* FeatureContext = namedtuple('FeatureContext',
* ['fphrase', # <<<<<<<<<<<<<<
@@ -68045,7 +69669,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__FeatureContext, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 14; __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":29
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":29
* ])
*
* cdef int PRECOMPUTE = 0 # <<<<<<<<<<<<<<
@@ -68054,7 +69678,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_PRECOMPUTE = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":30
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":30
*
* cdef int PRECOMPUTE = 0
* cdef int MERGE = 1 # <<<<<<<<<<<<<<
@@ -68063,7 +69687,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_MERGE = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":31
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":31
* cdef int PRECOMPUTE = 0
* cdef int MERGE = 1
* cdef int BAEZA_YATES = 2 # <<<<<<<<<<<<<<
@@ -68072,16 +69696,16 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
__pyx_v_3_sa_BAEZA_YATES = 2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":34
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":34
*
* # NOTE: was encoded as a non-terminal in the previous version
* cdef int EPSILON = sym_fromstring('*EPS*', True) # <<<<<<<<<<<<<<
*
* cdef class TrieNode:
*/
- __pyx_v_3_sa_EPSILON = __pyx_f_3_sa_sym_fromstring(__pyx_k_147, 1);
+ __pyx_v_3_sa_EPSILON = __pyx_f_3_sa_sym_fromstring(__pyx_k_153, 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":57
+ /* "/home/m/workspace/cdec/python/src/sa/rulefactory.pxi":57
* cdef public int count
* cdef public root
* def __cinit__(self, extended=False): # <<<<<<<<<<<<<<
@@ -68094,7 +69718,7 @@ PyMODINIT_FUNC PyInit__sa(void)
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":1
+ /* "/home/m/workspace/cdec/python/src/sa/features.pxi":1
* cdef StringMap FD = StringMap() # Feature name dictionary # <<<<<<<<<<<<<<
*
* INITIAL_CAPACITY = 7 # default number of features
@@ -68107,7 +69731,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/m/workspace/cdec/python/src/sa/features.pxi":3
* cdef StringMap FD = StringMap() # Feature name dictionary
*
* INITIAL_CAPACITY = 7 # default number of features # <<<<<<<<<<<<<<
@@ -68116,7 +69740,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/m/workspace/cdec/python/src/sa/features.pxi":4
*
* INITIAL_CAPACITY = 7 # default number of features
* INCREMENT = INITIAL_CAPACITY # double size # <<<<<<<<<<<<<<
diff --git a/python/src/sa/online_extractor.py b/python/src/sa/online_extractor.py
deleted file mode 100755
index 03a46b3b..00000000
--- a/python/src/sa/online_extractor.py
+++ /dev/null
@@ -1,337 +0,0 @@
-#!/usr/bin/env python
-
-import collections, sys
-
-import cdec.configobj
-
-CAT = '[X]' # Default non-terminal
-MAX_SIZE = 15 # Max span of a grammar rule (source)
-MAX_LEN = 5 # Max number of terminals and non-terminals in a rule (source)
-MAX_NT = 2 # Max number of non-terminals in a rule
-MIN_GAP = 1 # Min number of terminals between non-terminals (source)
-
-# Spans are _inclusive_ on both ends [i, j]
-# TODO: Replace all of this with bit vectors?
-def span_check(vec, i, j):
- k = i
- while k <= j:
- if vec[k]:
- return False
- k += 1
- return True
-
-def span_flip(vec, i, j):
- k = i
- while k <= j:
- vec[k] = ~vec[k]
- k += 1
-
-# Next non-terminal
-def next_nt(nt):
- if not nt:
- return 1
- return nt[-1][0] + 1
-
-class NonTerminal:
- def __init__(self, index):
- self.index = index
- def __str__(self):
- return '[X,{0}]'.format(self.index)
-
-def fmt_rule(f_sym, e_sym, links):
- a_str = ' '.join('{0}-{1}'.format(i, j) for (i, j) in links)
- return '[X] ||| {0} ||| {1} ||| {2}'.format(' '.join(str(sym) for sym in f_sym),
- ' '.join(str(sym) for sym in e_sym),
- a_str)
-
-class OnlineGrammarExtractor:
-
- def __init__(self, config=None):
- if isinstance(config, str) or isinstance(config, unicode):
- if not os.path.exists(config):
- raise IOError('cannot read configuration from {0}'.format(config))
- config = cdec.configobj.ConfigObj(config, unrepr=True)
- elif not config:
- config = collections.defaultdict(lambda: None)
- self.category = CAT
- self.max_size = MAX_SIZE
- self.max_length = config['max_len'] or MAX_LEN
- self.max_nonterminals = config['max_nt'] or MAX_NT
- self.min_gap_size = MIN_GAP
- # Hard coded: require at least one aligned word
- # Hard coded: require tight phrases
-
- # Phrase counts
- self.phrases_f = collections.defaultdict(lambda: 0)
- self.phrases_e = collections.defaultdict(lambda: 0)
- self.phrases_fe = collections.defaultdict(lambda: collections.defaultdict(lambda: 0))
-
- # Bilexical counts
- self.bilex_f = collections.defaultdict(lambda: 0)
- self.bilex_e = collections.defaultdict(lambda: 0)
- self.bilex_fe = collections.defaultdict(lambda: collections.defaultdict(lambda: 0))
-
- # Aggregate bilexical counts
- def aggr_bilex(self, f_words, e_words):
-
- for e_w in e_words:
- self.bilex_e[e_w] += 1
-
- for f_w in f_words:
- self.bilex_f[f_w] += 1
- for e_w in e_words:
- self.bilex_fe[f_w][e_w] += 1
-
- # Aggregate stats from a training instance:
- # Extract hierarchical phrase pairs
- # Update bilexical counts
- def add_instance(self, f_words, e_words, alignment):
-
- # Bilexical counts
- self.aggr_bilex(f_words, e_words)
-
- # Phrase pairs extracted from this instance
- phrases = set()
-
- f_len = len(f_words)
- e_len = len(e_words)
-
- # Pre-compute alignment info
- al = [[] for i in range(f_len)]
- al_span = [[f_len + 1, -1] for i in range(f_len)]
- for (f, e) in alignment:
- al[f].append(e)
- al_span[f][0] = min(al_span[f][0], e)
- al_span[f][1] = max(al_span[f][1], e)
-
- # Target side word coverage
- # TODO: Does Cython do bit vectors?
- cover = [0] * e_len
-
- # Extract all possible hierarchical phrases starting at a source index
- # f_ i and j are current, e_ i and j are previous
- def extract(f_i, f_j, e_i, e_j, wc, links, nt, nt_open):
- # Phrase extraction limits
- if wc + len(nt) > self.max_length or (f_j + 1) > f_len or \
- (f_j - f_i) + 1 > self.max_size:
- return
- # Unaligned word
- if not al[f_j]:
- # Open non-terminal: extend
- if nt_open:
- nt[-1][2] += 1
- extract(f_i, f_j + 1, e_i, e_j, wc, links, nt, True)
- nt[-1][2] -= 1
- # No open non-terminal: extend with word
- else:
- extract(f_i, f_j + 1, e_i, e_j, wc + 1, links, nt, False)
- return
- # Aligned word
- link_i = al_span[f_j][0]
- link_j = al_span[f_j][1]
- new_e_i = min(link_i, e_i)
- new_e_j = max(link_j, e_j)
- # Open non-terminal: close, extract, extend
- if nt_open:
- # Close non-terminal, checking for collisions
- old_last_nt = nt[-1][:]
- nt[-1][2] = f_j
- if link_i < nt[-1][3]:
- if not span_check(cover, link_i, nt[-1][3] - 1):
- nt[-1] = old_last_nt
- return
- span_flip(cover, link_i, nt[-1][3] - 1)
- nt[-1][3] = link_i
- if link_j > nt[-1][4]:
- if not span_check(cover, nt[-1][4] + 1, link_j):
- nt[-1] = old_last_nt
- return
- span_flip(cover, nt[-1][4] + 1, link_j)
- nt[-1][4] = link_j
- for rule in self.form_rules(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links):
- phrases.add(rule)
- extract(f_i, f_j + 1, new_e_i, new_e_j, wc, links, nt, False)
- nt[-1] = old_last_nt
- if link_i < nt[-1][3]:
- span_flip(cover, link_i, nt[-1][3] - 1)
- if link_j > nt[-1][4]:
- span_flip(cover, nt[-1][4] + 1, link_j)
- return
- # No open non-terminal
- # Extract, extend with word
- collision = False
- for link in al[f_j]:
- if cover[link]:
- collision = True
- # Collisions block extraction and extension, but may be okay for
- # continuing non-terminals
- if not collision:
- plus_links = []
- for link in al[f_j]:
- plus_links.append((f_j, link))
- cover[link] = ~cover[link]
- links.append(plus_links)
- for rule in self.form_rules(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links):
- phrases.add(rule)
- extract(f_i, f_j + 1, new_e_i, new_e_j, wc + 1, links, nt, False)
- links.pop()
- for link in al[f_j]:
- cover[link] = ~cover[link]
- # Try to add a word to a (closed) non-terminal, extract, extend
- if nt and nt[-1][2] == f_j - 1:
- # Add to non-terminal, checking for collisions
- old_last_nt = nt[-1][:]
- nt[-1][2] = f_j
- if link_i < nt[-1][3]:
- if not span_check(cover, link_i, nt[-1][3] - 1):
- nt[-1] = old_last_nt
- return
- span_flip(cover, link_i, nt[-1][3] - 1)
- nt[-1][3] = link_i
- if link_j > nt[-1][4]:
- if not span_check(cover, nt[-1][4] + 1, link_j):
- nt[-1] = old_last_nt
- return
- span_flip(cover, nt[-1][4] + 1, link_j)
- nt[-1][4] = link_j
- # Require at least one word in phrase
- if links:
- for rule in self.form_rules(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links):
- phrases.add(rule)
- extract(f_i, f_j + 1, new_e_i, new_e_j, wc, links, nt, False)
- nt[-1] = old_last_nt
- if new_e_i < nt[-1][3]:
- span_flip(cover, link_i, nt[-1][3] - 1)
- if link_j > nt[-1][4]:
- span_flip(cover, nt[-1][4] + 1, link_j)
- # Try to start a new non-terminal, extract, extend
- if (not nt or f_j - nt[-1][2] > 1) and len(nt) < self.max_nonterminals:
- # Check for collisions
- if not span_check(cover, link_i, link_j):
- return
- span_flip(cover, link_i, link_j)
- nt.append([next_nt(nt), f_j, f_j, link_i, link_j])
- # Require at least one word in phrase
- if links:
- for rule in self.form_rules(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links):
- phrases.add(rule)
- extract(f_i, f_j + 1, new_e_i, new_e_j, wc, links, nt, False)
- nt.pop()
- span_flip(cover, link_i, link_j)
- # TODO: try adding NT to start, end, both
- # check: one aligned word on boundary that is not part of a NT
-
- # Try to extract phrases from every f index
- f_i = 0
- while f_i < f_len:
- # Skip if phrases won't be tight on left side
- if not al[f_i]:
- f_i += 1
- continue
- extract(f_i, f_i, f_len + 1, -1, 1, [], [], False)
- f_i += 1
-
- for rule in sorted(phrases):
- print rule
-
- # Create a rule from source, target, non-terminals, and alignments
- def form_rules(self, f_i, e_i, f_span, e_span, nt, al):
-
- # This could be more efficient but is unlikely to be the bottleneck
-
- rules = []
-
- nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3]))
-
- f_sym = f_span[:]
- off = f_i
- for next_nt in nt:
- nt_len = (next_nt[2] - next_nt[1]) + 1
- i = 0
- while i < nt_len:
- f_sym.pop(next_nt[1] - off)
- i += 1
- f_sym.insert(next_nt[1] - off, NonTerminal(next_nt[0]))
- off += (nt_len - 1)
-
- e_sym = e_span[:]
- off = e_i
- for next_nt in nt_inv:
- nt_len = (next_nt[4] - next_nt[3]) + 1
- i = 0
- while i < nt_len:
- e_sym.pop(next_nt[3] - off)
- i += 1
- e_sym.insert(next_nt[3] - off, NonTerminal(next_nt[0]))
- off += (nt_len - 1)
-
- # Adjusting alignment links takes some doing
- links = [list(link) for sub in al for link in sub]
- links_len = len(links)
- nt_len = len(nt)
- nt_i = 0
- off = f_i
- i = 0
- while i < links_len:
- while nt_i < nt_len and links[i][0] > nt[nt_i][1]:
- off += (nt[nt_i][2] - nt[nt_i][1])
- nt_i += 1
- links[i][0] -= off
- i += 1
- nt_i = 0
- off = e_i
- i = 0
- while i < links_len:
- while nt_i < nt_len and links[i][1] > nt_inv[nt_i][3]:
- off += (nt_inv[nt_i][4] - nt_inv[nt_i][3])
- nt_i += 1
- links[i][1] -= off
- i += 1
-
- # Rule
- rules.append(fmt_rule(f_sym, e_sym, links))
- if len(f_sym) >= self.max_length or len(nt) >= self.max_nonterminals:
- return rules
- last_index = nt[-1][0] if nt else 0
- # Rule [X]
- if not nt or not isinstance(f_sym[-1], NonTerminal):
- f_sym.append(NonTerminal(last_index + 1))
- e_sym.append(NonTerminal(last_index + 1))
- rules.append(fmt_rule(f_sym, e_sym, links))
- f_sym.pop()
- e_sym.pop()
- # [X] Rule
- if not nt or not isinstance(f_sym[0], NonTerminal):
- for sym in f_sym:
- if isinstance(sym, NonTerminal):
- sym.index += 1
- for sym in e_sym:
- if isinstance(sym, NonTerminal):
- sym.index += 1
- for link in links:
- link[0] += 1
- link[1] += 1
- f_sym.insert(0, NonTerminal(1))
- e_sym.insert(0, NonTerminal(1))
- rules.append(fmt_rule(f_sym, e_sym, links))
- if len(f_sym) >= self.max_length or len(nt) + 1 >= self.max_nonterminals:
- return rules
- # [X] Rule [X]
- if not nt or not isinstance(f_sym[-1], NonTerminal):
- f_sym.append(NonTerminal(last_index + 2))
- e_sym.append(NonTerminal(last_index + 2))
- rules.append(fmt_rule(f_sym, e_sym, links))
- return rules
-
-def main(argv):
-
- extractor = OnlineGrammarExtractor()
-
- for line in sys.stdin:
- print >> sys.stderr, line.strip()
- f_words, e_words, a_str = (x.split() for x in line.split('|||'))
- alignment = sorted(tuple(int(y) for y in x.split('-')) for x in a_str)
- extractor.add_instance(f_words, e_words, alignment)
-
-if __name__ == '__main__':
- main(sys.argv)
diff --git a/python/src/sa/rulefactory.pxi b/python/src/sa/rulefactory.pxi
index 5006a838..a0bda793 100644
--- a/python/src/sa/rulefactory.pxi
+++ b/python/src/sa/rulefactory.pxi
@@ -1798,3 +1798,9 @@ cdef class HieroCachingRuleFactory:
free(e_gap_high)
return extracts
+
+ def add_instance(self, f_words, e_words, alignment):
+ logger.info("I would add:")
+ logger.info(decode_words(f_words))
+ logger.info(decode_words(e_words))
+ logger.info(alignment) \ No newline at end of file
diff --git a/python/src/sa/sym.pxi b/python/src/sa/sym.pxi
index f47599cf..81f19ef1 100644
--- a/python/src/sa/sym.pxi
+++ b/python/src/sa/sym.pxi
@@ -114,3 +114,9 @@ def decode_lattice(lattice):
def decode_sentence(lattice):
return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+
+def encode_words(words):
+ return tuple(sym_fromstring(word, True) for word in words)
+
+def decode_words(syms):
+ return tuple(sym_tostring(sym) for sym in syms) \ No newline at end of file