summaryrefslogtreecommitdiff
path: root/python/cdec/sa
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2013-11-13 18:12:10 +0100
committerPatrick Simianer <p@simianer.de>2013-11-13 18:12:10 +0100
commitd6e6babf2cfe49fed040b651624b7e34d1a9b507 (patch)
tree2a00ab18f10a7f93e7e172551c01b48cc9f20b8c /python/cdec/sa
parent2d2d5eced93d58bc77894d8c328195cd9950b96d (diff)
parent8a24bb77bc2e9fd17a6f6529a2942cde96a6af49 (diff)
merge w/ upstream
Diffstat (limited to 'python/cdec/sa')
-rw-r--r--python/cdec/sa/_sa.cpp (renamed from python/cdec/sa/_sa.c)29282
-rw-r--r--python/cdec/sa/compile.py13
-rw-r--r--python/cdec/sa/extractor.py18
-rw-r--r--python/cdec/sa/rulefactory.pxi126
-rw-r--r--python/cdec/sa/strmap.cc11
5 files changed, 14789 insertions, 14661 deletions
diff --git a/python/cdec/sa/_sa.c b/python/cdec/sa/_sa.cpp
index 2e565e22..a9f7855e 100644
--- a/python/cdec/sa/_sa.c
+++ b/python/cdec/sa/_sa.cpp
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.19.1 on Sun Jun 2 14:47:43 2013 */
+/* Generated by Cython 0.19.1 on Tue Sep 24 13:39:51 2013 */
#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
@@ -306,8 +306,8 @@ static CYTHON_INLINE float __PYX_NAN() {
#define _USE_MATH_DEFINES
#endif
#include <math.h>
-#define __PYX_HAVE___sa
-#define __PYX_HAVE_API___sa
+#define __PYX_HAVE__cdec__sa___sa
+#define __PYX_HAVE_API__cdec__sa___sa
#include "string.h"
#include "stdio.h"
#include "stdlib.h"
@@ -503,105 +503,106 @@ 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_20_genexpr;
-struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats;
-struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr;
-struct __pyx_obj_3_sa___pyx_scope_struct_29_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_23_genexpr;
-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_21_add_instance;
-struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr;
-struct __pyx_obj_3_sa_PhraseLocation;
-struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__;
-struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule;
-struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr;
-struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule;
-struct __pyx_obj_3_sa___pyx_scope_struct_28___str__;
-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_26_get_f_phrases;
-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_Phrase;
-struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__;
-struct __pyx_obj_3_sa___pyx_scope_struct____iter__;
-struct __pyx_obj_3_sa_TrieTable;
-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_FloatList;
-struct __pyx_t_3_sa__node;
-struct __pyx_t_3_sa__BitSet;
-struct __pyx_t_3_sa__VEB;
-struct __pyx_t_3_sa__Trie_Edge;
-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
+struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector;
+struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule;
+struct __pyx_obj_4cdec_2sa_3_sa_LCP;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats;
+struct __pyx_obj_4cdec_2sa_3_sa_IntList;
+struct __pyx_obj_4cdec_2sa_3_sa_Phrase;
+struct __pyx_obj_4cdec_2sa_3_sa_TrieNode;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases;
+struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode;
+struct __pyx_obj_4cdec_2sa_3_sa_Alignment;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa_Rule;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa_Precomputation;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance;
+struct __pyx_obj_4cdec_2sa_3_sa_TrieMap;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments;
+struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa_FloatList;
+struct __pyx_obj_4cdec_2sa_3_sa_StringMap;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__;
+struct __pyx_obj_4cdec_2sa_3_sa_TrieTable;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa_VEB;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice;
+struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation;
+struct __pyx_obj_4cdec_2sa_3_sa_Scorer;
+struct __pyx_obj_4cdec_2sa_3_sa_Sampler;
+struct __pyx_obj_4cdec_2sa_3_sa_Alphabet;
+struct __pyx_obj_4cdec_2sa_3_sa_BiLex;
+struct __pyx_obj_4cdec_2sa_3_sa_DataArray;
+struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator;
+struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr;
+struct __pyx_obj_4cdec_2sa_3_sa_BitSet;
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence;
+struct __pyx_t_4cdec_2sa_3_sa__node;
+struct __pyx_t_4cdec_2sa_3_sa__BitSet;
+struct __pyx_t_4cdec_2sa_3_sa__VEB;
+struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge;
+struct __pyx_t_4cdec_2sa_3_sa__Trie_Node;
+struct __pyx_t_4cdec_2sa_3_sa_match_node;
+struct __pyx_t_4cdec_2sa_3_sa_Matching;
+
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":9
* from libc.string cimport memset, strcpy
*
* cdef struct _node: # <<<<<<<<<<<<<<
* _node* smaller
* _node* bigger
*/
-struct __pyx_t_3_sa__node {
- struct __pyx_t_3_sa__node *smaller;
- struct __pyx_t_3_sa__node *bigger;
+struct __pyx_t_4cdec_2sa_3_sa__node {
+ struct __pyx_t_4cdec_2sa_3_sa__node *smaller;
+ struct __pyx_t_4cdec_2sa_3_sa__node *bigger;
int key;
int val;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":30
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":30
* _init_lower_mask()
*
* cdef struct _BitSet: # <<<<<<<<<<<<<<
* long bitset
* int min_val
*/
-struct __pyx_t_3_sa__BitSet {
+struct __pyx_t_4cdec_2sa_3_sa__BitSet {
long bitset;
int min_val;
int max_val;
int size;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":168
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":168
* return result
*
* cdef struct _VEB: # <<<<<<<<<<<<<<
* int top_universe_size
* int num_bottom_bits
*/
-struct __pyx_t_3_sa__VEB {
+struct __pyx_t_4cdec_2sa_3_sa__VEB {
int top_universe_size;
int num_bottom_bits;
int max_val;
@@ -611,53 +612,53 @@ struct __pyx_t_3_sa__VEB {
void **bottom;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":10
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":10
* cdef struct _Trie_Node # forward decl
*
* cdef struct _Trie_Edge: # <<<<<<<<<<<<<<
* int val
* _Trie_Node* node
*/
-struct __pyx_t_3_sa__Trie_Edge {
+struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge {
int val;
- struct __pyx_t_3_sa__Trie_Node *node;
- struct __pyx_t_3_sa__Trie_Edge *bigger;
- struct __pyx_t_3_sa__Trie_Edge *smaller;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *node;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *bigger;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *smaller;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":8
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":8
* from libc.string cimport memset, memcpy
*
* cdef struct _Trie_Node # forward decl # <<<<<<<<<<<<<<
*
* cdef struct _Trie_Edge:
*/
-struct __pyx_t_3_sa__Trie_Node {
- struct __pyx_t_3_sa__Trie_Edge *root;
+struct __pyx_t_4cdec_2sa_3_sa__Trie_Node {
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *root;
int *arr;
int arr_len;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":76
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":101
*
* # linked list structure for storing matches in BaselineRuleFactory
* cdef struct match_node: # <<<<<<<<<<<<<<
* int* match
* match_node* next
*/
-struct __pyx_t_3_sa_match_node {
+struct __pyx_t_4cdec_2sa_3_sa_match_node {
int *match;
- struct __pyx_t_3_sa_match_node *next;
+ struct __pyx_t_4cdec_2sa_3_sa_match_node *next;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":172
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":197
*
* # struct used to encapsulate a single matching
* cdef struct Matching: # <<<<<<<<<<<<<<
* int* arr
* int start
*/
-struct __pyx_t_3_sa_Matching {
+struct __pyx_t_4cdec_2sa_3_sa_Matching {
int *arr;
int start;
int end;
@@ -665,187 +666,125 @@ struct __pyx_t_3_sa_Matching {
int size;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":228
- *
+/* "cdec/sa/_sa.pxd":25
+ * cdef void read_handle(self, FILE* f)
*
- * cdef class HieroCachingRuleFactory: # <<<<<<<<<<<<<<
- * '''This RuleFactory implements a caching
- * method using TrieTable, which makes phrase
+ * cdef class FeatureVector: # <<<<<<<<<<<<<<
+ * cdef IntList names
+ * cdef FloatList values
*/
-struct __pyx_obj_3_sa_HieroCachingRuleFactory {
+struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *__pyx_vtab;
- struct __pyx_obj_3_sa_TrieTable *rules;
- struct __pyx_obj_3_sa_Sampler *sampler;
- struct __pyx_obj_3_sa_Scorer *scorer;
- int max_chunks;
- int max_target_chunks;
- int max_length;
- int max_target_length;
- int max_nonterminals;
- int max_initial_size;
- int train_max_initial_size;
- int min_gap_size;
- int train_min_gap_size;
- int category;
- PyObject *precomputed_index;
- PyObject *precomputed_collocations;
- PyObject *precompute_file;
- PyObject *max_rank;
- int precompute_rank;
- int precompute_secondary_rank;
- int use_baeza_yates;
- int use_index;
- int use_collocations;
- float by_slack_factor;
- PyObject *prev_norm_prefix;
- float extract_time;
- float intersect_time;
- struct __pyx_obj_3_sa_SuffixArray *fsa;
- struct __pyx_obj_3_sa_DataArray *fda;
- struct __pyx_obj_3_sa_DataArray *eda;
- struct __pyx_obj_3_sa_Alignment *alignment;
- struct __pyx_obj_3_sa_IntList *eid2symid;
- struct __pyx_obj_3_sa_IntList *fid2symid;
- int tight_phrases;
- int require_aligned_terminal;
- int require_aligned_chunks;
- struct __pyx_obj_3_sa_IntList *findexes;
- struct __pyx_obj_3_sa_IntList *findexes1;
- int online;
- PyObject *samples_f;
- PyObject *phrases_f;
- PyObject *phrases_e;
- PyObject *phrases_fe;
- PyObject *phrases_al;
- PyObject *bilex_f;
- PyObject *bilex_e;
- PyObject *bilex_fe;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *names;
+ struct __pyx_obj_4cdec_2sa_3_sa_FloatList *values;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":118
- * for arc in node for node in lattice)
- *
- * def decode_sentence(lattice): # <<<<<<<<<<<<<<
- * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+/* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":6
+ * from libc.stdio cimport FILE, fclose, fopen
*
+ * cdef class SuffixArray: # <<<<<<<<<<<<<<
+ * cdef DataArray darray
+ * cdef IntList sa
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence {
+struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray {
PyObject_HEAD
- PyObject *__pyx_v_lattice;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *__pyx_vtab;
+ struct __pyx_obj_4cdec_2sa_3_sa_DataArray *darray;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *sa;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *ha;
};
-/* "/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)
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":110
+ * return sym_isvar(sym)
*
+ * def make_lattice(words): # <<<<<<<<<<<<<<
+ * word_ids = (sym_fromstring(word, True) for word in words)
+ * return tuple(((word, None, 1), ) for word in word_ids)
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice {
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 *);
+ PyObject *__pyx_v_word_ids;
+ PyObject *__pyx_v_words;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1187
- * # Online rule extraction and scoring
- * if self.online:
- * f_syms = tuple(word[0][0] for word in fwords) # <<<<<<<<<<<<<<
- * for f, lex_i, lex_j in self.get_f_phrases(f_syms):
- * spanlen = (lex_j - lex_i) + 1
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2128
+ *
+ * # Rule string from rule
+ * def fmt_rule(self, f, e, a): # <<<<<<<<<<<<<<
+ * a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a)
+ * return '[X] ||| {0} ||| {1} ||| {2}'.format(f, e, a_str)
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule {
PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_19_input *__pyx_outer_scope;
- PyObject *__pyx_v_word;
- PyObject *__pyx_t_0;
- Py_ssize_t __pyx_t_1;
- PyObject *(*__pyx_t_2)(PyObject *);
+ PyObject *__pyx_v_a;
+ struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":36
- * logger.info("LCP array completed")
+/* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":5
+ * as k most frequent n-grams"""
*
- * def compute_stats(self, int max_n): # <<<<<<<<<<<<<<
- * """Note: the output of this function is not exact. In
- * particular, the frequency associated with each word is
+ * cdef class LCP: # <<<<<<<<<<<<<<
+ * cdef SuffixArray sa
+ * cdef IntList lcp
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats {
+struct __pyx_obj_4cdec_2sa_3_sa_LCP {
PyObject_HEAD
- int __pyx_v_N;
- int __pyx_v_freq;
- int __pyx_v_h;
- int __pyx_v_i;
- int __pyx_v_ii;
- int __pyx_v_iii;
- int __pyx_v_j;
- int __pyx_v_k;
- int __pyx_v_max_n;
- int __pyx_v_n;
- PyObject *__pyx_v_ngram;
- struct __pyx_obj_3_sa_IntList *__pyx_v_ngram_start;
- PyObject *__pyx_v_ngram_starts;
- int __pyx_v_rs;
- struct __pyx_obj_3_sa_IntList *__pyx_v_run_start;
- struct __pyx_obj_3_sa_LCP *__pyx_v_self;
- int __pyx_v_valid;
- struct __pyx_obj_3_sa_VEB *__pyx_v_veb;
- int __pyx_t_0;
+ struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *sa;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *lcp;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":122
- *
- * def encode_words(words):
- * return tuple(sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":186
+ * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)]
+ * if self.word_alignments is not None:
+ * fields.append(' '.join('%d-%d' % a for a in self.alignments())) # <<<<<<<<<<<<<<
+ * return ' ||| '.join(fields)
*
- * def decode_words(syms):
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr {
PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *__pyx_outer_scope;
- PyObject *__pyx_v_word;
+ struct __pyx_obj_4cdec_2sa_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 *);
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":21
- *
- * def __str__(self):
- * return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<<
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":39
+ * ])
*
- * cdef class Scorer:
+ * cdef class OnlineStats: # <<<<<<<<<<<<<<
+ * cdef public samples_f
+ * cdef public phrases_f
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats {
PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *__pyx_outer_scope;
- PyObject *__pyx_v_feat;
- PyObject *__pyx_t_0;
- Py_ssize_t __pyx_t_1;
- PyObject *(*__pyx_t_2)(PyObject *);
+ PyObject *samples_f;
+ PyObject *phrases_f;
+ PyObject *phrases_e;
+ PyObject *phrases_fe;
+ PyObject *phrases_al;
+ PyObject *bilex_f;
+ PyObject *bilex_e;
+ PyObject *bilex_fe;
};
-/* "_sa.pxd":12
+/* "cdec/sa/_sa.pxd":12
* cdef void read_handle(self, FILE* f)
*
* cdef class IntList: # <<<<<<<<<<<<<<
* cdef int size
* cdef int increment
*/
-struct __pyx_obj_3_sa_IntList {
+struct __pyx_obj_4cdec_2sa_3_sa_IntList {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_IntList *__pyx_vtab;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *__pyx_vtab;
int size;
int increment;
int len;
@@ -853,125 +792,250 @@ struct __pyx_obj_3_sa_IntList {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":340
- *
+/* "cdec/sa/_sa.pxd":29
+ * cdef FloatList values
*
- * cdef class VEBIterator: # <<<<<<<<<<<<<<
- * cdef _VEB* v
- * cdef int next_val
+ * cdef class Phrase: # <<<<<<<<<<<<<<
+ * cdef int *syms
+ * cdef int n, *varpos, n_vars
*/
-struct __pyx_obj_3_sa_VEBIterator {
+struct __pyx_obj_4cdec_2sa_3_sa_Phrase {
PyObject_HEAD
- struct __pyx_t_3_sa__VEB *v;
- int next_val;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtab;
+ int *syms;
+ int n;
+ int *varpos;
+ int n_vars;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":47
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":71
+ * cdef int EPSILON = sym_fromstring('*EPS*', True)
*
+ * cdef class TrieNode: # <<<<<<<<<<<<<<
+ * cdef public children
*
- * cdef class BiLex: # <<<<<<<<<<<<<<
- * cdef FloatList col1
- * cdef FloatList col2
*/
-struct __pyx_obj_3_sa_BiLex {
+struct __pyx_obj_4cdec_2sa_3_sa_TrieNode {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_BiLex *__pyx_vtab;
- struct __pyx_obj_3_sa_FloatList *col1;
- struct __pyx_obj_3_sa_FloatList *col2;
- struct __pyx_obj_3_sa_IntList *f_index;
- struct __pyx_obj_3_sa_IntList *e_index;
- PyObject *id2eword;
- PyObject *id2fword;
- PyObject *eword2id;
- PyObject *fword2id;
+ PyObject *children;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":354
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":74
+ * def read_bitext(self, char* filename, int side):
+ * with gzip_or_text(filename) as fp:
+ * data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
+ * self.read_text_data(data)
*
+ */
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *__pyx_outer_scope;
+ PyObject *__pyx_v_line;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":72
+ * self.read_text_data(fp)
*
- * cdef class VEB: # <<<<<<<<<<<<<<
- * cdef _VEB* veb
- * cdef int _findsucc(self, int i)
+ * def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<<
+ * with gzip_or_text(filename) as fp:
+ * data = (line.split(' ||| ')[side] for line in fp)
*/
-struct __pyx_obj_3_sa_VEB {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_VEB *__pyx_vtab;
- struct __pyx_t_3_sa__VEB *veb;
+ PyObject *__pyx_v_fp;
+ int __pyx_v_side;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":121
- * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+/* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":21
*
- * def encode_words(words): # <<<<<<<<<<<<<<
- * return tuple(sym_fromstring(word, True) for word in words)
+ * def __str__(self):
+ * return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<<
*
+ * cdef class Scorer:
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr {
PyObject_HEAD
- PyObject *__pyx_v_words;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *__pyx_outer_scope;
+ PyObject *__pyx_v_feat;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":5
- * as k most frequent n-grams"""
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2147
+ * # (Used for EGivenFCoherent)
+ * # Return set of (fphrase, lex_i, lex_j)
+ * def get_f_phrases(self, f_words): # <<<<<<<<<<<<<<
*
- * cdef class LCP: # <<<<<<<<<<<<<<
- * cdef SuffixArray sa
- * cdef IntList lcp
+ * f_len = len(f_words)
*/
-struct __pyx_obj_3_sa_LCP {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases {
PyObject_HEAD
- struct __pyx_obj_3_sa_SuffixArray *sa;
- struct __pyx_obj_3_sa_IntList *lcp;
+ PyObject *__pyx_v_extract;
+ PyObject *__pyx_v_f_len;
+ PyObject *__pyx_v_f_words;
+ PyObject *__pyx_v_phrases;
+ struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":9
- * from libc.string cimport memset, strcpy
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":77
+ * self.children = {}
*
- * cdef class DataArray: # <<<<<<<<<<<<<<
- * cdef public word2id
- * cdef public id2word
+ * cdef class ExtendedTrieNode(TrieNode): # <<<<<<<<<<<<<<
+ * cdef public phrase
+ * cdef public phrase_location
+ */
+struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode {
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieNode __pyx_base;
+ PyObject *phrase;
+ PyObject *phrase_location;
+ PyObject *suffix_link;
+};
+
+
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":10
+ * cdef int ALIGNMENT_CODE = 1 << 16
+ *
+ * cdef class Alignment: # <<<<<<<<<<<<<<
+ * cdef IntList links
+ * cdef IntList sent_index
*/
-struct __pyx_obj_3_sa_DataArray {
+struct __pyx_obj_4cdec_2sa_3_sa_Alignment {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_DataArray *__pyx_vtab;
- PyObject *word2id;
- PyObject *id2word;
- struct __pyx_obj_3_sa_IntList *data;
- struct __pyx_obj_3_sa_IntList *sent_id;
- struct __pyx_obj_3_sa_IntList *sent_index;
- int use_sent_id;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *__pyx_vtab;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *links;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *sent_index;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":100
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":978
+ * return sorted(result);
*
+ * def input(self, fwords, meta, ctx_name=None): # <<<<<<<<<<<<<<
+ * '''When this function is called on the RuleFactory,
+ * it looks up all of the rules that can be used to translate
+ */
+struct __pyx_obj_4cdec_2sa_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_4cdec_2sa_3_sa_IntList *__pyx_v_chunklen;
+ PyObject *__pyx_v_count;
+ PyObject *__pyx_v_ctx_name;
+ 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_f_syms;
+ 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;
+ PyObject *__pyx_v_genexpr;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_hiero_phrase;
+ long __pyx_v_hit;
+ int __pyx_v_i;
+ PyObject *__pyx_v_input_match;
+ PyObject *__pyx_v_intersect_start_time;
+ PyObject *__pyx_v_intersect_stop_time;
+ PyObject *__pyx_v_is_shadow_path;
+ int __pyx_v_j;
+ int __pyx_v_k;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_v_lex_i;
+ PyObject *__pyx_v_lex_j;
+ PyObject *__pyx_v_loc;
+ PyObject *__pyx_v_locs;
+ int __pyx_v_lookup_required;
+ struct __pyx_t_4cdec_2sa_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_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_phrase_location;
+ PyObject *__pyx_v_prefix;
+ PyObject *__pyx_v_reachable_buffer;
+ PyObject *__pyx_v_sa_range;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_sample;
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_scores;
+ PyObject *__pyx_v_seen_phrases;
+ struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self;
+ PyObject *__pyx_v_spanlen;
+ float __pyx_v_start_time;
+ PyObject *__pyx_v_stats;
+ 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;
+ Py_ssize_t __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3;
+ PyObject *__pyx_t_4;
+ PyObject *__pyx_t_5;
+ int __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+ Py_ssize_t __pyx_t_8;
+ Py_ssize_t __pyx_t_9;
+ PyObject *(*__pyx_t_10)(PyObject *);
+ PyObject *(*__pyx_t_11)(PyObject *);
+};
+
+
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":124
+ * return tuple(sym_fromstring(word, True) for word in words)
*
- * cdef class BitSetIterator: # <<<<<<<<<<<<<<
- * cdef _BitSet* b
- * cdef int next_val
+ * def decode_words(syms): # <<<<<<<<<<<<<<
+ * return tuple(sym_tostring(sym) for sym in syms)
*/
-struct __pyx_obj_3_sa_BitSetIterator {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words {
PyObject_HEAD
- struct __pyx_t_3_sa__BitSet *b;
- int next_val;
+ PyObject *__pyx_v_syms;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2116
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2124
* f = Phrase(f_sym)
* e = Phrase(e_sym)
* a = tuple(self.alignment.link(i, j) for i, j in links) # <<<<<<<<<<<<<<
* return (f, e, a, lex_f_i, lex_f_j)
*
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr {
PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *__pyx_outer_scope;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *__pyx_outer_scope;
PyObject *__pyx_v_i;
PyObject *__pyx_v_j;
PyObject *__pyx_t_0;
@@ -979,16 +1043,51 @@ struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":188
+/* "cdec/sa/_sa.pxd":35
+ * cdef public int chunklen(self, int k)
+ *
+ * cdef class Rule: # <<<<<<<<<<<<<<
+ * cdef int lhs
+ * cdef readonly Phrase f, e
+ */
+struct __pyx_obj_4cdec_2sa_3_sa_Rule {
+ PyObject_HEAD
+ int lhs;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *f;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *e;
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *scores;
+ int n_scores;
+ PyObject *word_alignments;
+};
+
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1193
+ * if self.online:
+ * stats = self.online_stats[ctx_name]
+ * f_syms = tuple(word[0][0] for word in fwords) # <<<<<<<<<<<<<<
+ * for f, lex_i, lex_j in self.get_f_phrases(f_syms):
+ * spanlen = (lex_j - lex_i) + 1
+ */
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *__pyx_outer_scope;
+ PyObject *__pyx_v_word;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":188
*
*
* cdef class Precomputation: # <<<<<<<<<<<<<<
* cdef int precompute_rank
* cdef int precompute_secondary_rank
*/
-struct __pyx_obj_3_sa_Precomputation {
+struct __pyx_obj_4cdec_2sa_3_sa_Precomputation {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_Precomputation *__pyx_vtab;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_Precomputation *__pyx_vtab;
int precompute_rank;
int precompute_secondary_rank;
int max_length;
@@ -1000,113 +1099,101 @@ struct __pyx_obj_3_sa_Precomputation {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":190
- * return ' ||| '.join(fields)
+/* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":15
+ * self.values.append(value)
*
- * def alignments(self): # <<<<<<<<<<<<<<
- * for point in self.word_alignments:
- * yield point / ALIGNMENT_CODE, point % ALIGNMENT_CODE
+ * def __iter__(self): # <<<<<<<<<<<<<<
+ * cdef unsigned i
+ * for i in range(self.names.len):
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ {
PyObject_HEAD
- PyObject *__pyx_v_point;
- struct __pyx_obj_3_sa_Rule *__pyx_v_self;
- PyObject *__pyx_t_0;
- Py_ssize_t __pyx_t_1;
- PyObject *(*__pyx_t_2)(PyObject *);
+ unsigned int __pyx_v_i;
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_self;
+ int __pyx_t_0;
+ unsigned int __pyx_t_1;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":125
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1891
+ * # Aggregate stats from a training instance
+ * # (Extract rules, update counts)
+ * def add_instance(self, f_words, e_words, alignment, ctx_name=None): # <<<<<<<<<<<<<<
*
- * def decode_words(syms):
- * return tuple(sym_tostring(sym) for sym in syms) # <<<<<<<<<<<<<<
+ * self.online = True
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance {
PyObject_HEAD
- 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 *);
+ PyObject *__pyx_v_al;
+ PyObject *__pyx_v_cover;
+ PyObject *__pyx_v_e_nt_cover;
+ PyObject *__pyx_v_e_words;
+ PyObject *__pyx_v_ef_span;
+ PyObject *__pyx_v_extract;
+ PyObject *__pyx_v_f_len;
+ PyObject *__pyx_v_f_words;
+ PyObject *__pyx_v_fe_span;
+ PyObject *__pyx_v_rules;
+ struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":6
- * from libc.stdio cimport FILE, fclose, fopen
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":109
+ * trie_node_to_map(edge.node, result, prefix, include_zeros)
*
- * cdef class SuffixArray: # <<<<<<<<<<<<<<
- * cdef DataArray darray
- * cdef IntList sa
- */
-struct __pyx_obj_3_sa_SuffixArray {
- PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_SuffixArray *__pyx_vtab;
- struct __pyx_obj_3_sa_DataArray *darray;
- struct __pyx_obj_3_sa_IntList *sa;
- struct __pyx_obj_3_sa_IntList *ha;
-};
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":183
- * return self.f.arity()
+ * cdef class TrieMap: # <<<<<<<<<<<<<<
*
- * def __str__(self): # <<<<<<<<<<<<<<
- * cdef unsigned i
- * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)]
+ * cdef _Trie_Node** root
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ {
+struct __pyx_obj_4cdec_2sa_3_sa_TrieMap {
PyObject_HEAD
- struct __pyx_obj_3_sa_Rule *__pyx_v_self;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *__pyx_vtab;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node **root;
+ int V;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":7
- * cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":189
+ * return ' ||| '.join(fields)
*
- * cdef class Alphabet: # <<<<<<<<<<<<<<
- * cdef readonly StringMap terminals, nonterminals
- * cdef int first_nonterminal, last_nonterminal
+ * def alignments(self): # <<<<<<<<<<<<<<
+ * for point in self.word_alignments:
+ * yield point / ALIGNMENT_CODE, point % ALIGNMENT_CODE
*/
-struct __pyx_obj_3_sa_Alphabet {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_Alphabet *__pyx_vtab;
- struct __pyx_obj_3_sa_StringMap *terminals;
- struct __pyx_obj_3_sa_StringMap *nonterminals;
- int first_nonterminal;
- int last_nonterminal;
- PyObject *id2sym;
+ PyObject *__pyx_v_point;
+ struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
};
-/* "_sa.pxd":35
- * cdef public int chunklen(self, int k)
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":340
*
- * cdef class Rule: # <<<<<<<<<<<<<<
- * cdef int lhs
- * cdef readonly Phrase f, e
+ *
+ * cdef class VEBIterator: # <<<<<<<<<<<<<<
+ * cdef _VEB* v
+ * cdef int next_val
*/
-struct __pyx_obj_3_sa_Rule {
+struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator {
PyObject_HEAD
- int lhs;
- struct __pyx_obj_3_sa_Phrase *f;
- struct __pyx_obj_3_sa_Phrase *e;
- struct __pyx_obj_3_sa_FeatureVector *scores;
- int n_scores;
- PyObject *word_alignments;
+ struct __pyx_t_4cdec_2sa_3_sa__VEB *v;
+ int next_val;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":112
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":111
+ *
* def make_lattice(words):
- * word_ids = (sym_fromstring(word, True) for word in words)
- * return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<<
+ * word_ids = (sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
+ * return tuple(((word, None, 1), ) for word in word_ids)
*
- * def decode_lattice(lattice):
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr {
PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *__pyx_outer_scope;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *__pyx_outer_scope;
PyObject *__pyx_v_word;
PyObject *__pyx_t_0;
Py_ssize_t __pyx_t_1;
@@ -1114,104 +1201,103 @@ struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1885
- * # Aggregate stats from a training instance
- * # (Extract rules, update counts)
- * def add_instance(self, f_words, e_words, alignment): # <<<<<<<<<<<<<<
+/* "cdec/sa/_sa.pxd":3
+ * from libc.stdio cimport FILE
*
- * self.online = True
+ * cdef class FloatList: # <<<<<<<<<<<<<<
+ * cdef int size
+ * cdef int increment
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance {
+struct __pyx_obj_4cdec_2sa_3_sa_FloatList {
PyObject_HEAD
- PyObject *__pyx_v_al;
- PyObject *__pyx_v_cover;
- PyObject *__pyx_v_e_nt_cover;
- PyObject *__pyx_v_e_words;
- PyObject *__pyx_v_ef_span;
- PyObject *__pyx_v_extract;
- PyObject *__pyx_v_f_len;
- PyObject *__pyx_v_f_words;
- PyObject *__pyx_v_fe_span;
- PyObject *__pyx_v_rules;
- struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtab;
+ int size;
+ int increment;
+ int len;
+ float *arr;
};
-/* "/Users/vchahun/Sandbox/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) # <<<<<<<<<<<<<<
- * self.read_text_data(data)
+/* "/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":8
+ * char* stringmap_word(StrMap *vocab, int i)
*
+ * cdef class StringMap: # <<<<<<<<<<<<<<
+ * cdef StrMap *vocab
+ * cdef char *word(self, int i)
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr {
- PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *__pyx_outer_scope;
- PyObject *__pyx_v_line;
- PyObject *__pyx_t_0;
- Py_ssize_t __pyx_t_1;
- PyObject *(*__pyx_t_2)(PyObject *);
-};
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":84
- * # in the suffix array; if discontiguous, it is the set of
- * # actual locations (packed into an array)
- * cdef class PhraseLocation: # <<<<<<<<<<<<<<
- * cdef int sa_low
- * cdef int sa_high
- */
-struct __pyx_obj_3_sa_PhraseLocation {
+struct __pyx_obj_4cdec_2sa_3_sa_StringMap {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_PhraseLocation *__pyx_vtab;
- int sa_low;
- int sa_high;
- int arr_low;
- int arr_high;
- struct __pyx_obj_3_sa_IntList *arr;
- int num_subpatterns;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *__pyx_vtab;
+ StrMap *vocab;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":141
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":140
* 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_15___iter__ {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ {
PyObject_HEAD
int __pyx_v_i;
- struct __pyx_obj_3_sa_Phrase *__pyx_v_self;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self;
int __pyx_t_0;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2055
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":182
+ * return self.f.arity()
*
- * # Create a rule from source, target, non-terminals, and alignments
- * def form_rule(self, f_i, e_i, f_span, e_span, nt, al): # <<<<<<<<<<<<<<
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * cdef unsigned i
+ * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)]
+ */
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ {
+ PyObject_HEAD
+ struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self;
+};
+
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":88
*
- * # Substitute in non-terminals
+ *
+ * cdef class TrieTable: # <<<<<<<<<<<<<<
+ * cdef public int extended
+ * cdef public int count
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule {
+struct __pyx_obj_4cdec_2sa_3_sa_TrieTable {
PyObject_HEAD
- PyObject *__pyx_v_links;
- struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self;
+ int extended;
+ int count;
+ PyObject *root;
+};
+
+
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":121
+ * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+ *
+ * def encode_words(words): # <<<<<<<<<<<<<<
+ * return tuple(sym_fromstring(word, True) for word in words)
+ *
+ */
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words {
+ PyObject_HEAD
+ PyObject *__pyx_v_words;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2121
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2129
* # Rule string from rule
* def fmt_rule(self, f, e, a):
* a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a) # <<<<<<<<<<<<<<
* return '[X] ||| {0} ||| {1} ||| {2}'.format(f, e, a_str)
*
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr {
PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *__pyx_outer_scope;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *__pyx_outer_scope;
PyObject *__pyx_v_packed;
PyObject *__pyx_t_0;
Py_ssize_t __pyx_t_1;
@@ -1219,584 +1305,495 @@ struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr {
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2120
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":122
*
- * # Rule string from rule
- * def fmt_rule(self, f, e, a): # <<<<<<<<<<<<<<
- * a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a)
- * return '[X] ||| {0} ||| {1} ||| {2}'.format(f, e, a_str)
+ * 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_24_fmt_rule {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr {
PyObject_HEAD
- PyObject *__pyx_v_a;
- struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self;
+ struct __pyx_obj_4cdec_2sa_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 *);
};
-/* "/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)
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":112
+ * def make_lattice(words):
+ * word_ids = (sym_fromstring(word, True) for word in words)
+ * return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<<
*
+ * def decode_lattice(lattice):
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr {
PyObject_HEAD
- struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *__pyx_outer_scope;
+ PyObject *__pyx_v_word;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":72
- * self.read_text_data(fp)
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2063
*
- * def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<<
- * with gzip_or_text(filename) as fp:
- * data = (line.split(' ||| ')[side] for line in fp)
+ * # Create a rule from source, target, non-terminals, and alignments
+ * def form_rule(self, f_i, e_i, f_span, e_span, nt, al): # <<<<<<<<<<<<<<
+ *
+ * # Substitute in non-terminals
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule {
PyObject_HEAD
- PyObject *__pyx_v_fp;
- int __pyx_v_side;
+ PyObject *__pyx_v_links;
+ struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":124
- * return tuple(sym_fromstring(word, True) for word in words)
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":119
*
- * def decode_words(syms): # <<<<<<<<<<<<<<
- * return tuple(sym_tostring(sym) for sym in syms)
+ * 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_13_decode_words {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr {
PyObject_HEAD
- PyObject *__pyx_v_syms;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *__pyx_outer_scope;
+ PyObject *__pyx_v__;
+ PyObject *__pyx_v_sym;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
};
-/* "_sa.pxd":25
- * cdef void read_handle(self, FILE* f)
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":354
*
- * cdef class FeatureVector: # <<<<<<<<<<<<<<
- * cdef IntList names
- * cdef FloatList values
+ *
+ * cdef class VEB: # <<<<<<<<<<<<<<
+ * cdef _VEB* veb
+ * cdef int _findsucc(self, int i)
*/
-struct __pyx_obj_3_sa_FeatureVector {
+struct __pyx_obj_4cdec_2sa_3_sa_VEB {
PyObject_HEAD
- struct __pyx_obj_3_sa_IntList *names;
- struct __pyx_obj_3_sa_FloatList *values;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *__pyx_vtab;
+ struct __pyx_t_4cdec_2sa_3_sa__VEB *veb;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":114
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":114
* return tuple(((word, None, 1), ) for word in word_ids)
*
* def decode_lattice(lattice): # <<<<<<<<<<<<<<
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc
* for arc in node for node in lattice)
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice {
PyObject_HEAD
PyObject *__pyx_v_lattice;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":973
- * 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
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":109
+ * # in the suffix array; if discontiguous, it is the set of
+ * # actual locations (packed into an array)
+ * cdef class PhraseLocation: # <<<<<<<<<<<<<<
+ * cdef int sa_low
+ * cdef int sa_high
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_19_input {
+struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation {
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_f_syms;
- 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;
- PyObject *__pyx_v_genexpr;
- 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_intersect_start_time;
- PyObject *__pyx_v_intersect_stop_time;
- PyObject *__pyx_v_is_shadow_path;
- int __pyx_v_j;
- int __pyx_v_k;
- PyObject *__pyx_v_key;
- PyObject *__pyx_v_lex_i;
- PyObject *__pyx_v_lex_j;
- 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;
- PyObject *__pyx_v_seen_phrases;
- 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;
- Py_ssize_t __pyx_t_1;
- int __pyx_t_2;
- PyObject *__pyx_t_3;
- PyObject *__pyx_t_4;
- PyObject *__pyx_t_5;
- int __pyx_t_6;
- Py_ssize_t __pyx_t_7;
- Py_ssize_t __pyx_t_8;
- Py_ssize_t __pyx_t_9;
- PyObject *(*__pyx_t_10)(PyObject *);
- PyObject *(*__pyx_t_11)(PyObject *);
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_PhraseLocation *__pyx_vtab;
+ int sa_low;
+ int sa_high;
+ int arr_low;
+ int arr_high;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *arr;
+ int num_subpatterns;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":23
+/* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":23
* return ' '.join('%s=%s' % feat for feat in self)
*
* cdef class Scorer: # <<<<<<<<<<<<<<
* cdef models
* def __init__(self, *models):
*/
-struct __pyx_obj_3_sa_Scorer {
+struct __pyx_obj_4cdec_2sa_3_sa_Scorer {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_Scorer *__pyx_vtab;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_Scorer *__pyx_vtab;
PyObject *models;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":10
- * cdef int ALIGNMENT_CODE = 1 << 16
- *
- * cdef class Alignment: # <<<<<<<<<<<<<<
- * cdef IntList links
- * cdef IntList sent_index
- */
-struct __pyx_obj_3_sa_Alignment {
- PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_Alignment *__pyx_vtab;
- struct __pyx_obj_3_sa_IntList *links;
- struct __pyx_obj_3_sa_IntList *sent_index;
-};
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":118
- * # (entirely C-implemented) _BitSet struct.
- * # Very slow; use only for debugging
- * cdef class BitSet: # <<<<<<<<<<<<<<
- *
- * cdef _BitSet* b
- */
-struct __pyx_obj_3_sa_BitSet {
- PyObject_HEAD
- struct __pyx_t_3_sa__BitSet *b;
-};
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":106
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":131
*
*
* cdef class Sampler: # <<<<<<<<<<<<<<
* '''A Sampler implements a logic for choosing
* samples from a population range'''
*/
-struct __pyx_obj_3_sa_Sampler {
+struct __pyx_obj_4cdec_2sa_3_sa_Sampler {
PyObject_HEAD
int sample_size;
- struct __pyx_obj_3_sa_IntList *sa;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *sa;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":8
- * char* stringmap_word(StrMap *vocab, int i)
- *
- * cdef class StringMap: # <<<<<<<<<<<<<<
- * cdef StrMap *vocab
- * cdef char *word(self, int i)
- */
-struct __pyx_obj_3_sa_StringMap {
- PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_StringMap *__pyx_vtab;
- StrMap *vocab;
-};
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2167
- * # (Used for EGivenFCoherent)
- * # Return set of (fphrase, lex_i, lex_j)
- * def get_f_phrases(self, f_words): # <<<<<<<<<<<<<<
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":7
+ * cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1
*
- * f_len = len(f_words)
+ * cdef class Alphabet: # <<<<<<<<<<<<<<
+ * cdef readonly StringMap terminals, nonterminals
+ * cdef int first_nonterminal, last_nonterminal
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases {
+struct __pyx_obj_4cdec_2sa_3_sa_Alphabet {
PyObject_HEAD
- PyObject *__pyx_v_extract;
- PyObject *__pyx_v_f_len;
- PyObject *__pyx_v_f_words;
- PyObject *__pyx_v_phrases;
- struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *__pyx_vtab;
+ struct __pyx_obj_4cdec_2sa_3_sa_StringMap *terminals;
+ struct __pyx_obj_4cdec_2sa_3_sa_StringMap *nonterminals;
+ int first_nonterminal;
+ int last_nonterminal;
+ PyObject *id2sym;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":46
- * cdef int EPSILON = sym_fromstring('*EPS*', True)
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":47
*
- * cdef class TrieNode: # <<<<<<<<<<<<<<
- * cdef public children
*
+ * cdef class BiLex: # <<<<<<<<<<<<<<
+ * cdef FloatList col1
+ * cdef FloatList col2
*/
-struct __pyx_obj_3_sa_TrieNode {
+struct __pyx_obj_4cdec_2sa_3_sa_BiLex {
PyObject_HEAD
- PyObject *children;
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *__pyx_vtab;
+ struct __pyx_obj_4cdec_2sa_3_sa_FloatList *col1;
+ struct __pyx_obj_4cdec_2sa_3_sa_FloatList *col2;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *f_index;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *e_index;
+ PyObject *id2eword;
+ PyObject *id2fword;
+ PyObject *eword2id;
+ PyObject *fword2id;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":52
- * self.children = {}
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":9
+ * from libc.string cimport memset, strcpy
*
- * cdef class ExtendedTrieNode(TrieNode): # <<<<<<<<<<<<<<
- * cdef public phrase
- * cdef public phrase_location
+ * cdef class DataArray: # <<<<<<<<<<<<<<
+ * cdef public word2id
+ * cdef public id2word
*/
-struct __pyx_obj_3_sa_ExtendedTrieNode {
- struct __pyx_obj_3_sa_TrieNode __pyx_base;
- PyObject *phrase;
- PyObject *phrase_location;
- PyObject *suffix_link;
+struct __pyx_obj_4cdec_2sa_3_sa_DataArray {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray *__pyx_vtab;
+ PyObject *word2id;
+ PyObject *id2word;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *data;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *sent_id;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *sent_index;
+ int use_sent_id;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":109
- * trie_node_to_map(edge.node, result, prefix, include_zeros)
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":100
*
- * cdef class TrieMap: # <<<<<<<<<<<<<<
*
- * cdef _Trie_Node** root
+ * cdef class BitSetIterator: # <<<<<<<<<<<<<<
+ * cdef _BitSet* b
+ * cdef int next_val
*/
-struct __pyx_obj_3_sa_TrieMap {
+struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_TrieMap *__pyx_vtab;
- struct __pyx_t_3_sa__Trie_Node **root;
- int V;
+ struct __pyx_t_4cdec_2sa_3_sa__BitSet *b;
+ int next_val;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":115
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":253
*
- * 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)
*
+ * cdef class HieroCachingRuleFactory: # <<<<<<<<<<<<<<
+ * '''This RuleFactory implements a caching
+ * method using TrieTable, which makes phrase
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory {
PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *__pyx_outer_scope;
- PyObject *__pyx_v_arc;
- PyObject *__pyx_v_dist;
- PyObject *__pyx_v_node;
- PyObject *__pyx_v_sym;
- PyObject *__pyx_v_weight;
- PyObject *__pyx_t_0;
- Py_ssize_t __pyx_t_1;
- PyObject *(*__pyx_t_2)(PyObject *);
- PyObject *__pyx_t_3;
- PyObject *__pyx_t_4;
- Py_ssize_t __pyx_t_5;
- PyObject *(*__pyx_t_6)(PyObject *);
- Py_ssize_t __pyx_t_7;
- PyObject *(*__pyx_t_8)(PyObject *);
+ struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_vtab;
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *rules;
+ struct __pyx_obj_4cdec_2sa_3_sa_Sampler *sampler;
+ struct __pyx_obj_4cdec_2sa_3_sa_Scorer *scorer;
+ int max_chunks;
+ int max_target_chunks;
+ int max_length;
+ int max_target_length;
+ int max_nonterminals;
+ int max_initial_size;
+ int train_max_initial_size;
+ int min_gap_size;
+ int train_min_gap_size;
+ int category;
+ PyObject *precomputed_index;
+ PyObject *precomputed_collocations;
+ PyObject *precompute_file;
+ PyObject *max_rank;
+ int precompute_rank;
+ int precompute_secondary_rank;
+ int use_baeza_yates;
+ int use_index;
+ int use_collocations;
+ float by_slack_factor;
+ PyObject *prev_norm_prefix;
+ float extract_time;
+ float intersect_time;
+ struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *fsa;
+ struct __pyx_obj_4cdec_2sa_3_sa_DataArray *fda;
+ struct __pyx_obj_4cdec_2sa_3_sa_DataArray *eda;
+ struct __pyx_obj_4cdec_2sa_3_sa_Alignment *alignment;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *eid2symid;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *fid2symid;
+ int tight_phrases;
+ int require_aligned_terminal;
+ int require_aligned_chunks;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *findexes;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *findexes1;
+ int online;
+ PyObject *online_stats;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":110
- * return sym_isvar(sym)
+/* "/home/mdenkows/cdec/python/cdec/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)
*
- * def make_lattice(words): # <<<<<<<<<<<<<<
- * word_ids = (sym_fromstring(word, True) for word in words)
- * return tuple(((word, None, 1), ) for word in word_ids)
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ {
PyObject_HEAD
- PyObject *__pyx_v_word_ids;
- PyObject *__pyx_v_words;
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_self;
};
-/* "_sa.pxd":29
- * cdef FloatList values
+/* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":36
+ * logger.info("LCP array completed")
*
- * cdef class Phrase: # <<<<<<<<<<<<<<
- * cdef int *syms
- * cdef int n, *varpos, n_vars
+ * def compute_stats(self, int max_n): # <<<<<<<<<<<<<<
+ * """Note: the output of this function is not exact. In
+ * particular, the frequency associated with each word is
*/
-struct __pyx_obj_3_sa_Phrase {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_Phrase *__pyx_vtab;
- int *syms;
- int n;
- int *varpos;
- int n_vars;
+ int __pyx_v_N;
+ int __pyx_v_freq;
+ int __pyx_v_h;
+ int __pyx_v_i;
+ int __pyx_v_ii;
+ int __pyx_v_iii;
+ int __pyx_v_j;
+ int __pyx_v_k;
+ int __pyx_v_max_n;
+ int __pyx_v_n;
+ PyObject *__pyx_v_ngram;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_ngram_start;
+ PyObject *__pyx_v_ngram_starts;
+ int __pyx_v_rs;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_run_start;
+ struct __pyx_obj_4cdec_2sa_3_sa_LCP *__pyx_v_self;
+ int __pyx_v_valid;
+ struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_veb;
+ int __pyx_t_0;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":15
- * self.values.append(value)
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":125
*
- * def __iter__(self): # <<<<<<<<<<<<<<
- * cdef unsigned i
- * for i in range(self.names.len):
+ * def decode_words(syms):
+ * return tuple(sym_tostring(sym) for sym in syms) # <<<<<<<<<<<<<<
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr {
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;
+ struct __pyx_obj_4cdec_2sa_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/int_list.pxi":81
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":81
* free(self.arr)
*
* def __iter__(self): # <<<<<<<<<<<<<<
* cdef int i
* for i in range(self.len):
*/
-struct __pyx_obj_3_sa___pyx_scope_struct____iter__ {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ {
PyObject_HEAD
int __pyx_v_i;
- struct __pyx_obj_3_sa_IntList *__pyx_v_self;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self;
int __pyx_t_0;
int __pyx_t_1;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":63
- *
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":115
*
- * cdef class TrieTable: # <<<<<<<<<<<<<<
- * cdef public int extended
- * cdef public int count
- */
-struct __pyx_obj_3_sa_TrieTable {
- PyObject_HEAD
- int extended;
- int count;
- PyObject *root;
-};
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":111
- *
- * def make_lattice(words):
- * word_ids = (sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
- * 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)
*
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr {
PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *__pyx_outer_scope;
- PyObject *__pyx_v_word;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *__pyx_outer_scope;
+ PyObject *__pyx_v_arc;
+ PyObject *__pyx_v_dist;
+ PyObject *__pyx_v_node;
+ PyObject *__pyx_v_sym;
+ PyObject *__pyx_v_weight;
PyObject *__pyx_t_0;
Py_ssize_t __pyx_t_1;
PyObject *(*__pyx_t_2)(PyObject *);
+ PyObject *__pyx_t_3;
+ PyObject *__pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ PyObject *(*__pyx_t_6)(PyObject *);
+ Py_ssize_t __pyx_t_7;
+ PyObject *(*__pyx_t_8)(PyObject *);
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":119
- *
- * def decode_sentence(lattice):
- * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) # <<<<<<<<<<<<<<
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":118
+ * # (entirely C-implemented) _BitSet struct.
+ * # Very slow; use only for debugging
+ * cdef class BitSet: # <<<<<<<<<<<<<<
*
- * def encode_words(words):
+ * cdef _BitSet* b
*/
-struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr {
+struct __pyx_obj_4cdec_2sa_3_sa_BitSet {
PyObject_HEAD
- struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *__pyx_outer_scope;
- PyObject *__pyx_v__;
- PyObject *__pyx_v_sym;
- PyObject *__pyx_t_0;
- Py_ssize_t __pyx_t_1;
- PyObject *(*__pyx_t_2)(PyObject *);
+ struct __pyx_t_4cdec_2sa_3_sa__BitSet *b;
};
-
-/* "_sa.pxd":3
- * from libc.stdio cimport FILE
- *
- * cdef class FloatList: # <<<<<<<<<<<<<<
- * cdef int size
- * cdef int increment
- */
-struct __pyx_obj_3_sa_FloatList {
+struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence {
PyObject_HEAD
- struct __pyx_vtabstruct_3_sa_FloatList *__pyx_vtab;
- int size;
- int increment;
- int len;
- float *arr;
+ PyObject *__pyx_v_lattice;
};
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":9
- * from libc.string cimport memset, strcpy
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":47
*
- * cdef class DataArray: # <<<<<<<<<<<<<<
- * cdef public word2id
- * cdef public id2word
- */
-
-struct __pyx_vtabstruct_3_sa_DataArray {
- void (*read_handle)(struct __pyx_obj_3_sa_DataArray *, FILE *);
- void (*write_handle)(struct __pyx_obj_3_sa_DataArray *, FILE *);
-};
-static struct __pyx_vtabstruct_3_sa_DataArray *__pyx_vtabptr_3_sa_DataArray;
-
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":10
- * cdef int ALIGNMENT_CODE = 1 << 16
*
- * cdef class Alignment: # <<<<<<<<<<<<<<
- * cdef IntList links
- * cdef IntList sent_index
+ * cdef class BiLex: # <<<<<<<<<<<<<<
+ * cdef FloatList col1
+ * cdef FloatList col2
*/
-struct __pyx_vtabstruct_3_sa_Alignment {
- int (*link)(struct __pyx_obj_3_sa_Alignment *, int, int);
- PyObject *(*_unlink)(struct __pyx_obj_3_sa_Alignment *, int, int *, int *);
- int *(*_get_sent_links)(struct __pyx_obj_3_sa_Alignment *, int, int *);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex {
+ PyObject *(*compute_from_data)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *, struct __pyx_obj_4cdec_2sa_3_sa_DataArray *, struct __pyx_obj_4cdec_2sa_3_sa_Alignment *);
+ PyObject *(*_add_node)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, struct __pyx_t_4cdec_2sa_3_sa__node *, int *, float, int *);
+ PyObject *(*write_wordlist)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, PyObject *, FILE *);
+ PyObject *(*read_wordlist)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, PyObject *, PyObject *, FILE *);
+ PyObject *(*swap)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, int, int);
+ PyObject *(*qsort)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, int, int, PyObject *);
};
-static struct __pyx_vtabstruct_3_sa_Alignment *__pyx_vtabptr_3_sa_Alignment;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *__pyx_vtabptr_4cdec_2sa_3_sa_BiLex;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":4
- * from libc.string cimport strsep, strcpy, strlen
- *
- * cdef class Phrase: # <<<<<<<<<<<<<<
+/* "/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":8
+ * char* stringmap_word(StrMap *vocab, int i)
*
- * def __cinit__(self, words):
+ * cdef class StringMap: # <<<<<<<<<<<<<<
+ * cdef StrMap *vocab
+ * cdef char *word(self, int i)
*/
-struct __pyx_vtabstruct_3_sa_Phrase {
- int (*chunkpos)(struct __pyx_obj_3_sa_Phrase *, int);
- int (*chunklen)(struct __pyx_obj_3_sa_Phrase *, int);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap {
+ char *(*word)(struct __pyx_obj_4cdec_2sa_3_sa_StringMap *, int);
+ int (*index)(struct __pyx_obj_4cdec_2sa_3_sa_StringMap *, char *);
};
-static struct __pyx_vtabstruct_3_sa_Phrase *__pyx_vtabptr_3_sa_Phrase;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *__pyx_vtabptr_4cdec_2sa_3_sa_StringMap;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":84
- * # in the suffix array; if discontiguous, it is the set of
- * # actual locations (packed into an array)
- * cdef class PhraseLocation: # <<<<<<<<<<<<<<
- * cdef int sa_low
- * cdef int sa_high
+/* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":6
+ * from libc.stdio cimport FILE, fclose, fopen
+ *
+ * cdef class SuffixArray: # <<<<<<<<<<<<<<
+ * cdef DataArray darray
+ * cdef IntList sa
*/
-struct __pyx_vtabstruct_3_sa_PhraseLocation {
- int (*contains)(struct __pyx_obj_3_sa_PhraseLocation *, int);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray {
+ int (*__pyx___search_high)(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *, int, int, int, int);
+ int (*__pyx___search_low)(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *, int, int, int, int);
+ PyObject *(*__pyx___get_range)(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *, int, int, int, int, int);
+ PyObject *(*__pyx___lookup_helper)(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *, int, int, int, int);
};
-static struct __pyx_vtabstruct_3_sa_PhraseLocation *__pyx_vtabptr_3_sa_PhraseLocation;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *__pyx_vtabptr_4cdec_2sa_3_sa_SuffixArray;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":47
- *
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":7
+ * cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1
*
- * cdef class BiLex: # <<<<<<<<<<<<<<
- * cdef FloatList col1
- * cdef FloatList col2
+ * cdef class Alphabet: # <<<<<<<<<<<<<<
+ * cdef readonly StringMap terminals, nonterminals
+ * cdef int first_nonterminal, last_nonterminal
*/
-struct __pyx_vtabstruct_3_sa_BiLex {
- PyObject *(*compute_from_data)(struct __pyx_obj_3_sa_BiLex *, struct __pyx_obj_3_sa_SuffixArray *, struct __pyx_obj_3_sa_DataArray *, struct __pyx_obj_3_sa_Alignment *);
- PyObject *(*_add_node)(struct __pyx_obj_3_sa_BiLex *, struct __pyx_t_3_sa__node *, int *, float, int *);
- PyObject *(*write_wordlist)(struct __pyx_obj_3_sa_BiLex *, PyObject *, FILE *);
- PyObject *(*read_wordlist)(struct __pyx_obj_3_sa_BiLex *, PyObject *, PyObject *, FILE *);
- PyObject *(*swap)(struct __pyx_obj_3_sa_BiLex *, int, int);
- PyObject *(*qsort)(struct __pyx_obj_3_sa_BiLex *, int, int, PyObject *);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet {
+ int (*isvar)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int);
+ int (*isword)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int);
+ int (*getindex)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int);
+ int (*setindex)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int, int);
+ int (*clearindex)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int);
+ int (*match)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int, int);
+ char *(*tocat)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int);
+ int (*fromcat)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, char *);
+ char *(*tostring)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int);
+ int (*fromstring)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, char *, int);
};
-static struct __pyx_vtabstruct_3_sa_BiLex *__pyx_vtabptr_3_sa_BiLex;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *__pyx_vtabptr_4cdec_2sa_3_sa_Alphabet;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":9
- * from libc.string cimport memset, memcpy
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":109
+ * trie_node_to_map(edge.node, result, prefix, include_zeros)
*
- * cdef class IntList: # <<<<<<<<<<<<<<
+ * cdef class TrieMap: # <<<<<<<<<<<<<<
*
- * def __cinit__(self, int size=0, int increment=1, int initial_len=0):
+ * cdef _Trie_Node** root
*/
-struct __pyx_vtabstruct_3_sa_IntList {
- void (*set)(struct __pyx_obj_3_sa_IntList *, int, int);
- void (*_append)(struct __pyx_obj_3_sa_IntList *, int);
- void (*_extend)(struct __pyx_obj_3_sa_IntList *, struct __pyx_obj_3_sa_IntList *);
- void (*_extend_arr)(struct __pyx_obj_3_sa_IntList *, int *, int);
- void (*_clear)(struct __pyx_obj_3_sa_IntList *);
- void (*write_handle)(struct __pyx_obj_3_sa_IntList *, FILE *);
- void (*read_handle)(struct __pyx_obj_3_sa_IntList *, FILE *);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap {
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *(*_insert)(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *, int *, int);
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *(*_contains)(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *, int *, int);
};
-static struct __pyx_vtabstruct_3_sa_IntList *__pyx_vtabptr_3_sa_IntList;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *__pyx_vtabptr_4cdec_2sa_3_sa_TrieMap;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":109
- * trie_node_to_map(edge.node, result, prefix, include_zeros)
- *
- * cdef class TrieMap: # <<<<<<<<<<<<<<
+/* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":23
+ * return ' '.join('%s=%s' % feat for feat in self)
*
- * cdef _Trie_Node** root
+ * cdef class Scorer: # <<<<<<<<<<<<<<
+ * cdef models
+ * def __init__(self, *models):
*/
-struct __pyx_vtabstruct_3_sa_TrieMap {
- struct __pyx_t_3_sa__Trie_Node *(*_insert)(struct __pyx_obj_3_sa_TrieMap *, int *, int);
- struct __pyx_t_3_sa__Trie_Node *(*_contains)(struct __pyx_obj_3_sa_TrieMap *, int *, int);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_Scorer {
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *(*score)(struct __pyx_obj_4cdec_2sa_3_sa_Scorer *, PyObject *);
};
-static struct __pyx_vtabstruct_3_sa_TrieMap *__pyx_vtabptr_3_sa_TrieMap;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Scorer *__pyx_vtabptr_4cdec_2sa_3_sa_Scorer;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":188
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":188
*
*
* cdef class Precomputation: # <<<<<<<<<<<<<<
@@ -1804,44 +1801,70 @@ static struct __pyx_vtabstruct_3_sa_TrieMap *__pyx_vtabptr_3_sa_TrieMap;
* cdef int precompute_secondary_rank
*/
-struct __pyx_vtabstruct_3_sa_Precomputation {
- PyObject *(*read_map)(struct __pyx_obj_3_sa_Precomputation *, FILE *);
- PyObject *(*write_map)(struct __pyx_obj_3_sa_Precomputation *, PyObject *, FILE *);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_Precomputation {
+ PyObject *(*read_map)(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *, FILE *);
+ PyObject *(*write_map)(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *, PyObject *, FILE *);
};
-static struct __pyx_vtabstruct_3_sa_Precomputation *__pyx_vtabptr_3_sa_Precomputation;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Precomputation *__pyx_vtabptr_4cdec_2sa_3_sa_Precomputation;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":23
- * return ' '.join('%s=%s' % feat for feat in self)
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":9
+ * from libc.string cimport memset, memcpy
*
- * cdef class Scorer: # <<<<<<<<<<<<<<
- * cdef models
- * def __init__(self, *models):
+ * cdef class IntList: # <<<<<<<<<<<<<<
+ *
+ * def __cinit__(self, int size=0, int increment=1, int initial_len=0):
*/
-struct __pyx_vtabstruct_3_sa_Scorer {
- struct __pyx_obj_3_sa_FeatureVector *(*score)(struct __pyx_obj_3_sa_Scorer *, PyObject *);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList {
+ void (*set)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, int, int);
+ void (*_append)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, int);
+ void (*_extend)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, struct __pyx_obj_4cdec_2sa_3_sa_IntList *);
+ void (*_extend_arr)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, int *, int);
+ void (*_clear)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *);
+ void (*write_handle)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, FILE *);
+ void (*read_handle)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, FILE *);
+};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *__pyx_vtabptr_4cdec_2sa_3_sa_IntList;
+
+
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList {
+ void (*set)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, int, float);
+ void (*write_handle)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *);
+ void (*read_handle)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *);
};
-static struct __pyx_vtabstruct_3_sa_Scorer *__pyx_vtabptr_3_sa_Scorer;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtabptr_4cdec_2sa_3_sa_FloatList;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":9
- * from libc.string cimport memset, strcpy, strlen
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":253
*
- * cdef class FloatList: # <<<<<<<<<<<<<<
*
- * def __cinit__(self, int size=0, int increment=1, int initial_len=0):
+ * cdef class HieroCachingRuleFactory: # <<<<<<<<<<<<<<
+ * '''This RuleFactory implements a caching
+ * method using TrieTable, which makes phrase
*/
-struct __pyx_vtabstruct_3_sa_FloatList {
- void (*set)(struct __pyx_obj_3_sa_FloatList *, int, float);
- void (*write_handle)(struct __pyx_obj_3_sa_FloatList *, FILE *);
- void (*read_handle)(struct __pyx_obj_3_sa_FloatList *, FILE *);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory {
+ PyObject *(*set_idmap)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_DataArray *);
+ int *(*baeza_yates_helper)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int, int, int, int *, int, int, int, int, int *);
+ long (*compare_matchings_set)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int, struct __pyx_t_4cdec_2sa_3_sa_Matching *, int, int);
+ long (*compare_matchings)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_t_4cdec_2sa_3_sa_Matching *, struct __pyx_t_4cdec_2sa_3_sa_Matching *, int, int);
+ int *(*merge_helper)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int, int, int, int *, int, int, int, int, int *);
+ void (*sort_phrase_loc)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_IntList *, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *);
+ PyObject *(*intersect_helper)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *, int);
+ PyObject *(*loc2str)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *);
+ struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *(*intersect)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, PyObject *, PyObject *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *);
+ int (*find_fixpoint)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, PyObject *, int *, int *, int *, int *, int, int, int *, int *, int *, int *, int, int, int, int, int, int, int, int, int, int, int);
+ PyObject *(*find_projection)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int *, int *, int *);
+ int *(*int_arr_extend)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int *, int *, int *, int);
+ PyObject *(*extract_phrases)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int *, int *, int, int, int, int *, int *, int *, int, int, int);
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *(*create_alignments)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int *, int, struct __pyx_obj_4cdec_2sa_3_sa_IntList *, struct __pyx_obj_4cdec_2sa_3_sa_IntList *);
+ PyObject *(*extract)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, struct __pyx_t_4cdec_2sa_3_sa_Matching *, int *, int);
};
-static struct __pyx_vtabstruct_3_sa_FloatList *__pyx_vtabptr_3_sa_FloatList;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_vtabptr_4cdec_2sa_3_sa_HieroCachingRuleFactory;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":354
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":354
*
*
* cdef class VEB: # <<<<<<<<<<<<<<
@@ -1849,95 +1872,72 @@ static struct __pyx_vtabstruct_3_sa_FloatList *__pyx_vtabptr_3_sa_FloatList;
* cdef int _findsucc(self, int i)
*/
-struct __pyx_vtabstruct_3_sa_VEB {
- int (*_findsucc)(struct __pyx_obj_3_sa_VEB *, int);
- int (*_insert)(struct __pyx_obj_3_sa_VEB *, int);
- int (*_first)(struct __pyx_obj_3_sa_VEB *);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB {
+ int (*_findsucc)(struct __pyx_obj_4cdec_2sa_3_sa_VEB *, int);
+ int (*_insert)(struct __pyx_obj_4cdec_2sa_3_sa_VEB *, int);
+ int (*_first)(struct __pyx_obj_4cdec_2sa_3_sa_VEB *);
};
-static struct __pyx_vtabstruct_3_sa_VEB *__pyx_vtabptr_3_sa_VEB;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *__pyx_vtabptr_4cdec_2sa_3_sa_VEB;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":7
- * cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":4
+ * from libc.string cimport strsep, strcpy, strlen
*
- * cdef class Alphabet: # <<<<<<<<<<<<<<
- * cdef readonly StringMap terminals, nonterminals
- * cdef int first_nonterminal, last_nonterminal
+ * cdef class Phrase: # <<<<<<<<<<<<<<
+ *
+ * def __cinit__(self, words):
*/
-struct __pyx_vtabstruct_3_sa_Alphabet {
- int (*isvar)(struct __pyx_obj_3_sa_Alphabet *, int);
- int (*isword)(struct __pyx_obj_3_sa_Alphabet *, int);
- int (*getindex)(struct __pyx_obj_3_sa_Alphabet *, int);
- int (*setindex)(struct __pyx_obj_3_sa_Alphabet *, int, int);
- int (*clearindex)(struct __pyx_obj_3_sa_Alphabet *, int);
- int (*match)(struct __pyx_obj_3_sa_Alphabet *, int, int);
- char *(*tocat)(struct __pyx_obj_3_sa_Alphabet *, int);
- int (*fromcat)(struct __pyx_obj_3_sa_Alphabet *, char *);
- char *(*tostring)(struct __pyx_obj_3_sa_Alphabet *, int);
- int (*fromstring)(struct __pyx_obj_3_sa_Alphabet *, char *, int);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase {
+ int (*chunkpos)(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, int);
+ int (*chunklen)(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, int);
};
-static struct __pyx_vtabstruct_3_sa_Alphabet *__pyx_vtabptr_3_sa_Alphabet;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtabptr_4cdec_2sa_3_sa_Phrase;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":6
- * from libc.stdio cimport FILE, fclose, fopen
- *
- * cdef class SuffixArray: # <<<<<<<<<<<<<<
- * cdef DataArray darray
- * cdef IntList sa
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":109
+ * # in the suffix array; if discontiguous, it is the set of
+ * # actual locations (packed into an array)
+ * cdef class PhraseLocation: # <<<<<<<<<<<<<<
+ * cdef int sa_low
+ * cdef int sa_high
*/
-struct __pyx_vtabstruct_3_sa_SuffixArray {
- int (*__pyx___search_high)(struct __pyx_obj_3_sa_SuffixArray *, int, int, int, int);
- int (*__pyx___search_low)(struct __pyx_obj_3_sa_SuffixArray *, int, int, int, int);
- PyObject *(*__pyx___get_range)(struct __pyx_obj_3_sa_SuffixArray *, int, int, int, int, int);
- PyObject *(*__pyx___lookup_helper)(struct __pyx_obj_3_sa_SuffixArray *, int, int, int, int);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_PhraseLocation {
+ int (*contains)(struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *, int);
};
-static struct __pyx_vtabstruct_3_sa_SuffixArray *__pyx_vtabptr_3_sa_SuffixArray;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_PhraseLocation *__pyx_vtabptr_4cdec_2sa_3_sa_PhraseLocation;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":8
- * char* stringmap_word(StrMap *vocab, int i)
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":9
+ * from libc.string cimport memset, strcpy
*
- * cdef class StringMap: # <<<<<<<<<<<<<<
- * cdef StrMap *vocab
- * cdef char *word(self, int i)
+ * cdef class DataArray: # <<<<<<<<<<<<<<
+ * cdef public word2id
+ * cdef public id2word
*/
-struct __pyx_vtabstruct_3_sa_StringMap {
- char *(*word)(struct __pyx_obj_3_sa_StringMap *, int);
- int (*index)(struct __pyx_obj_3_sa_StringMap *, char *);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray {
+ void (*read_handle)(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *, FILE *);
+ void (*write_handle)(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *, FILE *);
};
-static struct __pyx_vtabstruct_3_sa_StringMap *__pyx_vtabptr_3_sa_StringMap;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray *__pyx_vtabptr_4cdec_2sa_3_sa_DataArray;
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":228
- *
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":10
+ * cdef int ALIGNMENT_CODE = 1 << 16
*
- * cdef class HieroCachingRuleFactory: # <<<<<<<<<<<<<<
- * '''This RuleFactory implements a caching
- * method using TrieTable, which makes phrase
+ * cdef class Alignment: # <<<<<<<<<<<<<<
+ * cdef IntList links
+ * cdef IntList sent_index
*/
-struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory {
- PyObject *(*set_idmap)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_3_sa_DataArray *);
- int *(*baeza_yates_helper)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, int, int *, int, int, int, int *, int, int, int, int, int *);
- long (*compare_matchings_set)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, int, int *, int, struct __pyx_t_3_sa_Matching *, int, int);
- long (*compare_matchings)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_t_3_sa_Matching *, struct __pyx_t_3_sa_Matching *, int, int);
- int *(*merge_helper)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, int, int *, int, int, int, int *, int, int, int, int, int *);
- void (*sort_phrase_loc)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_3_sa_IntList *, struct __pyx_obj_3_sa_PhraseLocation *, struct __pyx_obj_3_sa_Phrase *);
- PyObject *(*intersect_helper)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_3_sa_Phrase *, struct __pyx_obj_3_sa_Phrase *, struct __pyx_obj_3_sa_PhraseLocation *, struct __pyx_obj_3_sa_PhraseLocation *, int);
- PyObject *(*loc2str)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_3_sa_PhraseLocation *);
- struct __pyx_obj_3_sa_PhraseLocation *(*intersect)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, PyObject *, PyObject *, struct __pyx_obj_3_sa_Phrase *);
- int (*find_fixpoint)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, PyObject *, int *, int *, int *, int *, int, int, int *, int *, int *, int *, int, int, int, int, int, int, int, int, int, int, int);
- PyObject *(*find_projection)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, int, int *, int *, int *, int *);
- int *(*int_arr_extend)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int *, int *, int *, int);
- PyObject *(*extract_phrases)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, int, int *, int *, int *, int, int, int, int *, int *, int *, int, int, int);
- struct __pyx_obj_3_sa_IntList *(*create_alignments)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int *, int, struct __pyx_obj_3_sa_IntList *, struct __pyx_obj_3_sa_IntList *);
- PyObject *(*extract)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_3_sa_Phrase *, struct __pyx_t_3_sa_Matching *, int *, int);
+struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment {
+ int (*link)(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *, int, int);
+ PyObject *(*_unlink)(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *, int, int *, int *);
+ int *(*_get_sent_links)(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *, int, int *);
};
-static struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *__pyx_vtabptr_3_sa_HieroCachingRuleFactory;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *__pyx_vtabptr_4cdec_2sa_3_sa_Alignment;
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
@@ -2473,111 +2473,112 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
/* Module declarations from 'libc.math' */
-/* Module declarations from '_sa' */
-static PyTypeObject *__pyx_ptype_3_sa_HieroCachingRuleFactory = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_9_decode_sentence = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_17_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_20_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_3_compute_stats = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_12_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_29_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa_IntList = 0;
-static PyTypeObject *__pyx_ptype_3_sa_VEBIterator = 0;
-static PyTypeObject *__pyx_ptype_3_sa_BiLex = 0;
-static PyTypeObject *__pyx_ptype_3_sa_VEB = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_11_encode_words = 0;
-static PyTypeObject *__pyx_ptype_3_sa_LCP = 0;
-static PyTypeObject *__pyx_ptype_3_sa_DataArray = 0;
-static PyTypeObject *__pyx_ptype_3_sa_BitSetIterator = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_23_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa_Precomputation = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_18_alignments = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_14_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa_SuffixArray = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_16___str__ = 0;
-static PyTypeObject *__pyx_ptype_3_sa_Alphabet = 0;
-static PyTypeObject *__pyx_ptype_3_sa_Rule = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_6_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_21_add_instance = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_2_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa_PhraseLocation = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_15___iter__ = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_22_form_rule = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_25_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_24_fmt_rule = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_28___str__ = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_1_read_bitext = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_13_decode_words = 0;
-static PyTypeObject *__pyx_ptype_3_sa_FeatureVector = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_7_decode_lattice = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_19_input = 0;
-static PyTypeObject *__pyx_ptype_3_sa_Scorer = 0;
-static PyTypeObject *__pyx_ptype_3_sa_Alignment = 0;
-static PyTypeObject *__pyx_ptype_3_sa_BitSet = 0;
-static PyTypeObject *__pyx_ptype_3_sa_Sampler = 0;
-static PyTypeObject *__pyx_ptype_3_sa_StringMap = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_26_get_f_phrases = 0;
-static PyTypeObject *__pyx_ptype_3_sa_TrieNode = 0;
-static PyTypeObject *__pyx_ptype_3_sa_ExtendedTrieNode = 0;
-static PyTypeObject *__pyx_ptype_3_sa_TrieMap = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_8_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_4_make_lattice = 0;
-static PyTypeObject *__pyx_ptype_3_sa_Phrase = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_27___iter__ = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct____iter__ = 0;
-static PyTypeObject *__pyx_ptype_3_sa_TrieTable = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_5_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa___pyx_scope_struct_10_genexpr = 0;
-static PyTypeObject *__pyx_ptype_3_sa_FloatList = 0;
-static int __pyx_v_3_sa_ALIGNMENT_CODE;
-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];
-static int __pyx_v_3_sa_INDEX_SHIFT;
-static int __pyx_v_3_sa_INDEX_MASK;
-static struct __pyx_obj_3_sa_Alphabet *__pyx_v_3_sa_ALPHABET = 0;
-static int __pyx_v_3_sa_PRECOMPUTE;
-static int __pyx_v_3_sa_MERGE;
-static int __pyx_v_3_sa_BAEZA_YATES;
-static int __pyx_v_3_sa_EPSILON;
-static struct __pyx_obj_3_sa_StringMap *__pyx_v_3_sa_FD = 0;
-static char *__pyx_f_3_sa_sym_tostring(int); /*proto*/
-static int __pyx_f_3_sa_sym_isvar(int); /*proto*/
-static int __pyx_f_3_sa_sym_getindex(int); /*proto*/
-static struct __pyx_t_3_sa__node *__pyx_f_3_sa_new_node(int); /*proto*/
-static PyObject *__pyx_f_3_sa_del_node(struct __pyx_t_3_sa__node *); /*proto*/
-static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *, int); /*proto*/
-static void __pyx_f_3_sa__init_lower_mask(void); /*proto*/
-static struct __pyx_t_3_sa__BitSet *__pyx_f_3_sa_new_BitSet(void); /*proto*/
-static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *, int); /*proto*/
-static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *, int); /*proto*/
-static int __pyx_f_3_sa_bitset_contains(struct __pyx_t_3_sa__BitSet *, int); /*proto*/
-static PyObject *__pyx_f_3_sa_dec2bin(long); /*proto*/
-static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int); /*proto*/
-static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *, int); /*proto*/
-static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *); /*proto*/
-static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *, int); /*proto*/
-static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *, int); /*proto*/
-static int __pyx_f_3_sa_sym_setindex(int, int); /*proto*/
-static int __pyx_f_3_sa_sym_fromstring(char *, int); /*proto*/
-static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_new_trie_node(void); /*proto*/
-static struct __pyx_t_3_sa__Trie_Edge *__pyx_f_3_sa_new_trie_edge(int); /*proto*/
-static PyObject *__pyx_f_3_sa_free_trie_node(struct __pyx_t_3_sa__Trie_Node *); /*proto*/
-static PyObject *__pyx_f_3_sa_free_trie_edge(struct __pyx_t_3_sa__Trie_Edge *); /*proto*/
-static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_sa__Trie_Node *, int); /*proto*/
-static PyObject *__pyx_f_3_sa_trie_node_data_append(struct __pyx_t_3_sa__Trie_Node *, int); /*proto*/
-static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3_sa__Trie_Node *, int); /*proto*/
-static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *, PyObject *, PyObject *, int); /*proto*/
-static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *, PyObject *, PyObject *, int); /*proto*/
-static void __pyx_f_3_sa_assign_matching(struct __pyx_t_3_sa_Matching *, int *, int, int, int *); /*proto*/
-static int *__pyx_f_3_sa_append_combined_matching(int *, struct __pyx_t_3_sa_Matching *, struct __pyx_t_3_sa_Matching *, int, int, int *); /*proto*/
-static int *__pyx_f_3_sa_extend_arr(int *, int *, int *, int); /*proto*/
-static int __pyx_f_3_sa_median(int, int, int); /*proto*/
-static void __pyx_f_3_sa_find_comparable_matchings(int, int, int *, int, int, int *, int *); /*proto*/
-#define __Pyx_MODULE_NAME "_sa"
-int __pyx_module_is_main__sa = 0;
-
-/* Implementation of '_sa' */
+/* Module declarations from 'cdec.sa._sa' */
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_FeatureVector = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_SuffixArray = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_LCP = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_OnlineStats = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_IntList = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_Phrase = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_TrieNode = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_Alignment = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_19_input = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_Rule = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_Precomputation = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_TrieMap = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_VEBIterator = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_FloatList = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_StringMap = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_TrieTable = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_VEB = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_Scorer = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_Sampler = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_Alphabet = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_BiLex = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_DataArray = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_BitSetIterator = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_HieroCachingRuleFactory = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct____iter__ = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa_BitSet = 0;
+static PyTypeObject *__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence = 0;
+static int __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE;
+static int __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE;
+static int __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS;
+static int __pyx_v_4cdec_2sa_3_sa_LOWER_MASK[32];
+static int __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT;
+static int __pyx_v_4cdec_2sa_3_sa_INDEX_MASK;
+static struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_4cdec_2sa_3_sa_ALPHABET = 0;
+static int __pyx_v_4cdec_2sa_3_sa_PRECOMPUTE;
+static int __pyx_v_4cdec_2sa_3_sa_MERGE;
+static int __pyx_v_4cdec_2sa_3_sa_BAEZA_YATES;
+static int __pyx_v_4cdec_2sa_3_sa_EPSILON;
+static struct __pyx_obj_4cdec_2sa_3_sa_StringMap *__pyx_v_4cdec_2sa_3_sa_FD = 0;
+static char *__pyx_f_4cdec_2sa_3_sa_sym_tostring(int); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_sym_isvar(int); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_sym_getindex(int); /*proto*/
+static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int); /*proto*/
+static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__node *); /*proto*/
+static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node *, int); /*proto*/
+static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void); /*proto*/
+static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet(void); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa__BitSet *, int); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__BitSet *, int); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa__BitSet *, int); /*proto*/
+static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long); /*proto*/
+static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB *, int); /*proto*/
+static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__VEB *); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VEB *, int); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VEB *, int); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_sym_setindex(int, int); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_sym_fromstring(char *, int); /*proto*/
+static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie_node(void); /*proto*/
+static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie_edge(int); /*proto*/
+static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *); /*proto*/
+static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *); /*proto*/
+static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_find(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *, int); /*proto*/
+static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *, int); /*proto*/
+static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_insert(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *, int); /*proto*/
+static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *, PyObject *, PyObject *, int); /*proto*/
+static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *, PyObject *, PyObject *, int); /*proto*/
+static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa_Matching *, int *, int, int, int *); /*proto*/
+static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *, struct __pyx_t_4cdec_2sa_3_sa_Matching *, struct __pyx_t_4cdec_2sa_3_sa_Matching *, int, int, int *); /*proto*/
+static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *, int *, int *, int); /*proto*/
+static int __pyx_f_4cdec_2sa_3_sa_median(int, int, int); /*proto*/
+static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int, int, int *, int, int, int *, int *); /*proto*/
+#define __Pyx_MODULE_NAME "cdec.sa._sa"
+int __pyx_module_is_main_cdec__sa___sa = 0;
+
+/* Implementation of 'cdec.sa._sa' */
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_range;
@@ -2591,291 +2592,316 @@ static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_cmp;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_max;
-static PyObject *__pyx_pf_3_sa_monitor_cpu(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_3_sa_2gzip_or_text(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_filename); /* proto */
-static int __pyx_pf_3_sa_9FloatList___cinit__(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, int __pyx_v_size, int __pyx_v_increment, int __pyx_v_initial_len); /* proto */
-static void __pyx_pf_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_3_sa_FloatList *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static int __pyx_pf_3_sa_9FloatList_6__setitem__(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val); /* proto */
-static Py_ssize_t __pyx_pf_3_sa_9FloatList_8__len__(struct __pyx_obj_3_sa_FloatList *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_9FloatList_10append(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, float __pyx_v_val); /* proto */
-static PyObject *__pyx_pf_3_sa_9FloatList_12write(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9FloatList_14read(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static int __pyx_pf_3_sa_7IntList___cinit__(struct __pyx_obj_3_sa_IntList *__pyx_v_self, int __pyx_v_size, int __pyx_v_increment, int __pyx_v_initial_len); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_4index(struct __pyx_obj_3_sa_IntList *__pyx_v_self, int __pyx_v_val); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_8_doquicksort(struct __pyx_obj_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_10sort(struct __pyx_obj_3_sa_IntList *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_12reset(struct __pyx_obj_3_sa_IntList *__pyx_v_self); /* proto */
-static void __pyx_pf_3_sa_7IntList_14__dealloc__(struct __pyx_obj_3_sa_IntList *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_16__iter__(struct __pyx_obj_3_sa_IntList *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
-static int __pyx_pf_3_sa_7IntList_21__setitem__(struct __pyx_obj_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val); /* proto */
-static Py_ssize_t __pyx_pf_3_sa_7IntList_23__len__(struct __pyx_obj_3_sa_IntList *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_25get_size(struct __pyx_obj_3_sa_IntList *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_27append(struct __pyx_obj_3_sa_IntList *__pyx_v_self, int __pyx_v_val); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_29extend(struct __pyx_obj_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_31write(struct __pyx_obj_3_sa_IntList *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_7IntList_33read(struct __pyx_obj_3_sa_IntList *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static int __pyx_pf_3_sa_9StringMap___cinit__(struct __pyx_obj_3_sa_StringMap *__pyx_v_self); /* proto */
-static void __pyx_pf_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_3_sa_StringMap *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text, PyObject *__pyx_v_side, int __pyx_v_use_sent_id); /* proto */
-static Py_ssize_t __pyx_pf_3_sa_9DataArray_2__len__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_4get_sentence_id(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_8get_id(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_word); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_10__getitem__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_loc); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_loc); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_16read_text(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_11read_bitext_genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_18read_bitext(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename, int __pyx_v_side); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_22read_binary(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_24write_binary(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_f); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_28write_enhanced(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_7word2id___get__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_9DataArray_7word2id_2__set__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static int __pyx_pf_3_sa_9DataArray_7word2id_4__del__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_7id2word___get__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_9DataArray_7id2word_2__set__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static int __pyx_pf_3_sa_9DataArray_7id2word_4__del__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_4data___get__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_9DataArray_4data_2__set__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static int __pyx_pf_3_sa_9DataArray_4data_4__del__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_7sent_id___get__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_9DataArray_7sent_id_2__set__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static int __pyx_pf_3_sa_9DataArray_7sent_id_4__del__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_9DataArray_10sent_index___get__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_9DataArray_10sent_index_2__set__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static int __pyx_pf_3_sa_9DataArray_10sent_index_4__del__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_obj_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_link); /* proto */
-static PyObject *__pyx_pf_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, int __pyx_v_sent_id); /* proto */
-static int __pyx_pf_3_sa_9Alignment_4__cinit__(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text); /* proto */
-static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9Alignment_8read_binary(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9Alignment_12write_binary(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_from_text, PyObject *__pyx_v_from_data, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_earray, PyObject *__pyx_v_fsarray, PyObject *__pyx_v_alignment); /* proto */
-static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_eword); /* proto */
-static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_fword); /* proto */
-static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_fword, PyObject *__pyx_v_eword, PyObject *__pyx_v_col); /* proto */
-static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_BitSetIterator *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_6BitSet___cinit__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self); /* proto */
-static void __pyx_pf_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_6BitSet_4__iter__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_6BitSet_6insert(struct __pyx_obj_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static PyObject *__pyx_pf_3_sa_6BitSet_8findsucc(struct __pyx_obj_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static PyObject *__pyx_pf_3_sa_6BitSet_10__str__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_6BitSet_12min(struct __pyx_obj_3_sa_BitSet *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_6BitSet_14max(struct __pyx_obj_3_sa_BitSet *__pyx_v_self); /* proto */
-static Py_ssize_t __pyx_pf_3_sa_6BitSet_16__len__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_6BitSet_18__contains__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBIterator *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_3VEB___cinit__(struct __pyx_obj_3_sa_VEB *__pyx_v_self, int __pyx_v_size); /* proto */
-static void __pyx_pf_3_sa_3VEB_2__dealloc__(struct __pyx_obj_3_sa_VEB *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_3VEB_4__iter__(struct __pyx_obj_3_sa_VEB *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_3VEB_6insert(struct __pyx_obj_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static PyObject *__pyx_pf_3_sa_3VEB_8findsucc(struct __pyx_obj_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static Py_ssize_t __pyx_pf_3_sa_3VEB_10__len__(struct __pyx_obj_3_sa_VEB *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_3VEB_12__contains__(struct __pyx_obj_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self, struct __pyx_obj_3_sa_SuffixArray *__pyx_v_sa); /* proto */
-static PyObject *__pyx_pf_3_sa_3LCP_2compute_stats(struct __pyx_obj_3_sa_LCP *__pyx_v_self, int __pyx_v_max_n); /* proto */
-static int __pyx_pf_3_sa_8Alphabet___cinit__(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self); /* proto */
-static void __pyx_pf_3_sa_8Alphabet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_3_sa_Alphabet *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_8Alphabet_9terminals___get__(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_8Alphabet_12nonterminals___get__(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sym); /* proto */
-static PyObject *__pyx_pf_3_sa_12make_lattice_genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_3_sa_12make_lattice_3genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_3_sa_6make_lattice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_words); /* proto */
-static PyObject *__pyx_pf_3_sa_14decode_lattice_genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_3_sa_8decode_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_10decode_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_12encode_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_14decode_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 */
-static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_6Phrase_10arity(struct __pyx_obj_3_sa_Phrase *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_6Phrase_12getvarpos(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static PyObject *__pyx_pf_3_sa_6Phrase_14getvar(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static PyObject *__pyx_pf_3_sa_6Phrase_16clen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_k); /* proto */
-static PyObject *__pyx_pf_3_sa_6Phrase_18getchunk(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_ci); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_monitor_cpu(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_2gzip_or_text(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_filename); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, int __pyx_v_size, int __pyx_v_increment, int __pyx_v_initial_len); /* proto */
+static void __pyx_pf_4cdec_2sa_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9FloatList_6__setitem__(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val); /* proto */
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9FloatList_8__len__(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, float __pyx_v_val); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, int __pyx_v_size, int __pyx_v_increment, int __pyx_v_initial_len); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, int __pyx_v_val); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_10sort(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_12reset(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self); /* proto */
+static void __pyx_pf_4cdec_2sa_3_sa_7IntList_14__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_16__iter__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_7IntList_21__setitem__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val); /* proto */
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_7IntList_23__len__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_25get_size(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_27append(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, int __pyx_v_val); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_29extend(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_33read(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9StringMap___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_StringMap *__pyx_v_self); /* proto */
+static void __pyx_pf_4cdec_2sa_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_StringMap *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text, PyObject *__pyx_v_side, int __pyx_v_use_sent_id); /* proto */
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9DataArray_2__len__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_4get_sentence_id(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_word); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_10__getitem__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_loc); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_loc); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_11read_bitext_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename, int __pyx_v_side); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_f); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id___get__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word___get__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_4data___get__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_4data_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_4data_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id___get__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_10sent_index___get__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_10sent_index_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_10sent_index_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_link); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, int __pyx_v_sent_id); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_from_text, PyObject *__pyx_v_from_data, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_earray, PyObject *__pyx_v_fsarray, PyObject *__pyx_v_alignment); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_6get_e_id(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_eword); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_8get_f_id(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_fword); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10read_text(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14get_score(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_fword, PyObject *__pyx_v_eword, PyObject *__pyx_v_col); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_text(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_6BitSet___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self); /* proto */
+static void __pyx_pf_4cdec_2sa_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_6insert(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_8findsucc(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_10__str__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_12min(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_14max(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self); /* proto */
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6BitSet_16__len__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_6BitSet_18__contains__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_3VEB___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self, int __pyx_v_size); /* proto */
+static void __pyx_pf_4cdec_2sa_3_sa_3VEB_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_6insert(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_8findsucc(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_3VEB_10__len__(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_3VEB_12__contains__(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_LCP *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_sa); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_3LCP_2compute_stats(struct __pyx_obj_4cdec_2sa_3_sa_LCP *__pyx_v_self, int __pyx_v_max_n); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self); /* proto */
+static void __pyx_pf_4cdec_2sa_3_sa_8Alphabet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_8Alphabet_9terminals___get__(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_8Alphabet_12nonterminals___get__(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sym); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_12make_lattice_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_12make_lattice_3genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6make_lattice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_words); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14decode_lattice_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_8decode_lattice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lattice); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_15decode_sentence_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_10decode_sentence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lattice); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_12encode_words_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_12encode_words(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_words); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_12decode_words_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14decode_words(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_syms); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_words); /* proto */
+static void __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_10arity(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_16clen(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_k); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_ci); /* proto */
#if PY_MAJOR_VERSION < 3
-static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
#endif
-static Py_hash_t __pyx_pf_3_sa_6Phrase_22__hash__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self); /* proto */
-static Py_ssize_t __pyx_pf_3_sa_6Phrase_24__len__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_6Phrase_26__getitem__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static PyObject *__pyx_pf_3_sa_6Phrase_28__iter__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_6Phrase_31subst(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_children); /* proto */
-static PyObject *__pyx_pf_3_sa_6Phrase_5words___get__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_4Rule___cinit__(struct __pyx_obj_3_sa_Rule *__pyx_v_self, int __pyx_v_lhs, struct __pyx_obj_3_sa_Phrase *__pyx_v_f, struct __pyx_obj_3_sa_Phrase *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_word_alignments); /* proto */
-static Py_hash_t __pyx_pf_3_sa_4Rule_2__hash__(struct __pyx_obj_3_sa_Rule *__pyx_v_self); /* proto */
+static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self); /* proto */
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_24__len__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_26__getitem__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_28__iter__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_children); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_5words___get__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self, int __pyx_v_lhs, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_f, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_word_alignments); /* proto */
+static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_4Rule_2__hash__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self); /* proto */
#if PY_MAJOR_VERSION < 3
-static int __pyx_pf_3_sa_4Rule_4__cmp__(struct __pyx_obj_3_sa_Rule *__pyx_v_self, struct __pyx_obj_3_sa_Rule *__pyx_v_other); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_other); /* proto */
#endif
-static PyObject *__pyx_pf_3_sa_4Rule_6fmerge(struct __pyx_obj_3_sa_Rule *__pyx_v_self, struct __pyx_obj_3_sa_Phrase *__pyx_v_f); /* proto */
-static PyObject *__pyx_pf_3_sa_4Rule_8arity(struct __pyx_obj_3_sa_Rule *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_4Rule_7__str___genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_4Rule_12alignments(struct __pyx_obj_3_sa_Rule *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_4Rule_1f___get__(struct __pyx_obj_3_sa_Rule *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_4Rule_1e___get__(struct __pyx_obj_3_sa_Rule *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_7TrieMap___cinit__(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self, int __pyx_v_alphabet_size); /* proto */
-static void __pyx_pf_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_pattern); /* proto */
-static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_pattern); /* proto */
-static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
-static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precomputation *__pyx_v_self, PyObject *__pyx_v_fsarray, PyObject *__pyx_v_from_stats, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_precompute_rank, PyObject *__pyx_v_precompute_secondary_rank, PyObject *__pyx_v_max_length, PyObject *__pyx_v_max_nonterminals, PyObject *__pyx_v_train_max_initial_size, PyObject *__pyx_v_train_min_gap_size); /* proto */
-static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_sa_Precomputation *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3_sa_Precomputation *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_sa_Precomputation *__pyx_v_self, PyObject *__pyx_v_stats, struct __pyx_obj_3_sa_SuffixArray *__pyx_v_sarray); /* proto */
-static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text, PyObject *__pyx_v_side); /* proto */
-static PyObject *__pyx_pf_3_sa_11SuffixArray_2__getitem__(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
-static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_side); /* proto */
-static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_i, int __pyx_v_j, int __pyx_v_h, struct __pyx_obj_3_sa_IntList *__pyx_v_isa, PyObject *__pyx_v_pad); /* proto */
-static PyObject *__pyx_pf_3_sa_11SuffixArray_8write_text(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_binary(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_11SuffixArray_12write_binary(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
-static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_word, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high); /* proto */
-static int __pyx_pf_3_sa_8TrieNode___cinit__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_8TrieNode_8children___get__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_8TrieNode_8children_2__set__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static int __pyx_pf_3_sa_8TrieNode_8children_4__del__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_phrase, PyObject *__pyx_v_phrase_location, PyObject *__pyx_v_suffix_link); /* proto */
-static PyObject *__pyx_pf_3_sa_16ExtendedTrieNode_6phrase___get__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_16ExtendedTrieNode_6phrase_2__set__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static int __pyx_pf_3_sa_16ExtendedTrieNode_6phrase_4__del__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location___get__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location_2__set__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static int __pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location_4__del__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link___get__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link_2__set__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static int __pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link_4__del__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_9TrieTable___cinit__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_extended); /* proto */
-static PyObject *__pyx_pf_3_sa_9TrieTable_8extended___get__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_9TrieTable_8extended_2__set__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static PyObject *__pyx_pf_3_sa_9TrieTable_5count___get__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_9TrieTable_5count_2__set__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static PyObject *__pyx_pf_3_sa_9TrieTable_4root___get__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_9TrieTable_4root_2__set__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-static int __pyx_pf_3_sa_9TrieTable_4root_4__del__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_self, int __pyx_v_sa_low, int __pyx_v_sa_high, int __pyx_v_arr_low, int __pyx_v_arr_high, PyObject *__pyx_v_arr, int __pyx_v_num_subpatterns); /* proto */
-static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx_v_self, int __pyx_v_sample_size, struct __pyx_obj_3_sa_SuffixArray *__pyx_v_fsarray); /* proto */
-static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *__pyx_v_self, struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_phrase_location); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_f); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_8arity(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_7__str___genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_12alignments(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_1f___get__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_1e___get__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self, int __pyx_v_alphabet_size); /* proto */
+static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_pattern); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_pattern); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_self, PyObject *__pyx_v_fsarray, PyObject *__pyx_v_from_stats, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_precompute_rank, PyObject *__pyx_v_precompute_secondary_rank, PyObject *__pyx_v_max_length, PyObject *__pyx_v_max_nonterminals, PyObject *__pyx_v_train_max_initial_size, PyObject *__pyx_v_train_min_gap_size); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_self, PyObject *__pyx_v_stats, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_sarray); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text, PyObject *__pyx_v_side); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_2__getitem__(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_side); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_i, int __pyx_v_j, int __pyx_v_h, struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_isa, PyObject *__pyx_v_pad); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_8write_text(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_word, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_3_sa_Alignment *__pyx_v_alignment, float __pyx_v_by_slack_factor, char *__pyx_v_category, PyObject *__pyx_v_max_chunks, unsigned int __pyx_v_max_initial_size, unsigned int __pyx_v_max_length, unsigned int __pyx_v_max_nonterminals, PyObject *__pyx_v_max_target_chunks, PyObject *__pyx_v_max_target_length, unsigned int __pyx_v_min_gap_size, PyObject *__pyx_v_precompute_file, unsigned int __pyx_v_precompute_secondary_rank, unsigned int __pyx_v_precompute_rank, int __pyx_v_require_aligned_terminal, int __pyx_v_require_aligned_chunks, unsigned int __pyx_v_train_max_initial_size, unsigned int __pyx_v_train_min_gap_size, int __pyx_v_tight_phrases, int __pyx_v_use_baeza_yates, int __pyx_v_use_collocations, int __pyx_v_use_index); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_3_sa_SuffixArray *__pyx_v_fsarray, struct __pyx_obj_3_sa_DataArray *__pyx_v_edarray, struct __pyx_obj_3_sa_Sampler *__pyx_v_sampler, struct __pyx_obj_3_sa_Scorer *__pyx_v_scorer); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_pattern); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_pattern); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collocation(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_phrase); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_frontier, PyObject *__pyx_v_res, PyObject *__pyx_v_fwords); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_away(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_skip, PyObject *__pyx_v_i, PyObject *__pyx_v_spanlen, PyObject *__pyx_v_pathlen, PyObject *__pyx_v_fwords, PyObject *__pyx_v_next_states, PyObject *__pyx_v_reachable_buffer); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_ifrom, PyObject *__pyx_v_dist); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_ifrom, PyObject *__pyx_v_ito); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v__columns, PyObject *__pyx_v_curr_idx, PyObject *__pyx_v_min_dist); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_f___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_e___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children___get__(struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_phrase, PyObject *__pyx_v_phrase_location, PyObject *__pyx_v_suffix_link); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase___get__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location___get__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link___get__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_extended); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9TrieTable_8extended___get__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_8extended_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9TrieTable_5count___get__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_5count_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root___get__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_self, int __pyx_v_sa_low, int __pyx_v_sa_high, int __pyx_v_arr_low, int __pyx_v_arr_high, PyObject *__pyx_v_arr, int __pyx_v_num_subpatterns); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Sampler *__pyx_v_self, int __pyx_v_sample_size, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_fsarray); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec_2sa_3_sa_Sampler *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_phrase_location); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_alignment, float __pyx_v_by_slack_factor, char *__pyx_v_category, PyObject *__pyx_v_max_chunks, unsigned int __pyx_v_max_initial_size, unsigned int __pyx_v_max_length, unsigned int __pyx_v_max_nonterminals, PyObject *__pyx_v_max_target_chunks, PyObject *__pyx_v_max_target_length, unsigned int __pyx_v_min_gap_size, PyObject *__pyx_v_precompute_file, unsigned int __pyx_v_precompute_secondary_rank, unsigned int __pyx_v_precompute_rank, int __pyx_v_require_aligned_terminal, int __pyx_v_require_aligned_chunks, unsigned int __pyx_v_train_max_initial_size, unsigned int __pyx_v_train_min_gap_size, int __pyx_v_tight_phrases, int __pyx_v_use_baeza_yates, int __pyx_v_use_collocations, int __pyx_v_use_index); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_fsarray, struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_edarray, struct __pyx_obj_4cdec_2sa_3_sa_Sampler *__pyx_v_sampler, struct __pyx_obj_4cdec_2sa_3_sa_Scorer *__pyx_v_scorer); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_pattern); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_pattern); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomputed_collocation(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_phrase); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_frontier, PyObject *__pyx_v_res, PyObject *__pyx_v_fwords); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_away(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_skip, PyObject *__pyx_v_i, PyObject *__pyx_v_spanlen, PyObject *__pyx_v_pathlen, PyObject *__pyx_v_fwords, PyObject *__pyx_v_next_states, PyObject *__pyx_v_reachable_buffer); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_ifrom, PyObject *__pyx_v_dist); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_ifrom, PyObject *__pyx_v_ito); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_states(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v__columns, PyObject *__pyx_v_curr_idx, PyObject *__pyx_v_min_dist); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda5(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_5input_2genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_22input(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_meta); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(PyObject *__pyx_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_f_j, PyObject *__pyx_v_e_i, PyObject *__pyx_v_e_j, PyObject *__pyx_v_min_bound, PyObject *__pyx_v_wc, PyObject *__pyx_v_links, PyObject *__pyx_v_nt, PyObject *__pyx_v_nt_open); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(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 PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_2genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_22input(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_meta, PyObject *__pyx_v_ctx_name); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(PyObject *__pyx_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_f_j, PyObject *__pyx_v_e_i, PyObject *__pyx_v_e_j, PyObject *__pyx_v_min_bound, PyObject *__pyx_v_wc, PyObject *__pyx_v_links, PyObject *__pyx_v_nt, PyObject *__pyx_v_nt_open); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instance(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_words, PyObject *__pyx_v_e_words, PyObject *__pyx_v_alignment, PyObject *__pyx_v_ctx_name); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_9form_rule_2genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_e_i, PyObject *__pyx_v_f_span, PyObject *__pyx_v_e_span, PyObject *__pyx_v_nt, PyObject *__pyx_v_al); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8fmt_rule_genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_29fmt_rule(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_a); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_31dump_online_stats(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_33dump_online_rules(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_35online_ctx_lookup(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f, PyObject *__pyx_v_e); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(PyObject *__pyx_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_f_j, PyObject *__pyx_v_lex_i, PyObject *__pyx_v_lex_j, PyObject *__pyx_v_wc, PyObject *__pyx_v_ntc, PyObject *__pyx_v_syms); /* proto */
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_37get_f_phrases(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_words); /* proto */
-static PyObject *__pyx_pf_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
-static PyObject *__pyx_pf_3_sa_18span_inc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
-static PyObject *__pyx_pf_3_sa_20span_dec(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* 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 */
-static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str___genexpr(PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str__(struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self); /* proto */
-static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_self, PyObject *__pyx_v_models); /* proto */
-static PyObject *__pyx_tp_new_3_sa_HieroCachingRuleFactory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_9_decode_sentence(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_17_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_20_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_3_compute_stats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_12_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_29_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_IntList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_VEBIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_BiLex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_VEB(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_11_encode_words(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_LCP(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_DataArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_BitSetIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_23_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_Precomputation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_18_alignments(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_14_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_SuffixArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_16___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_Alphabet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_Rule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_21_add_instance(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_PhraseLocation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_15___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_22_form_rule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_25_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_24_fmt_rule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_28___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_1_read_bitext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_13_decode_words(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_FeatureVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_7_decode_lattice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_19_input(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_Scorer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_Alignment(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_BitSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_Sampler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_StringMap(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_26_get_f_phrases(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_TrieNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_ExtendedTrieNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_TrieMap(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_4_make_lattice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_Phrase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_27___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_TrieTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_10_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_3_sa_FloatList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_2genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_e_i, PyObject *__pyx_v_f_span, PyObject *__pyx_v_e_span, PyObject *__pyx_v_nt, PyObject *__pyx_v_al); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_a); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_lookup(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_ctx_name); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(PyObject *__pyx_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_f_j, PyObject *__pyx_v_lex_i, PyObject *__pyx_v_lex_j, PyObject *__pyx_v_wc, PyObject *__pyx_v_ntc, PyObject *__pyx_v_syms); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phrases(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_words); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_35drop_ctx(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_ctx_name); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_self, unsigned int __pyx_v_name, float __pyx_v_value); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_4__iter__(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str___genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str__(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_self); /* proto */
+static int __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(struct __pyx_obj_4cdec_2sa_3_sa_Scorer *__pyx_v_self, PyObject *__pyx_v_models); /* proto */
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_FeatureVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_SuffixArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_LCP(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_OnlineStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_IntList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Phrase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_TrieNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_ExtendedTrieNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Alignment(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_19_input(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Rule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Precomputation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_TrieMap(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_VEBIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_FloatList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_StringMap(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_16___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_TrieTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_VEB(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_PhraseLocation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Scorer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Sampler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Alphabet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_BiLex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_DataArray(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_BitSetIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_HieroCachingRuleFactory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_28___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_BitSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static char __pyx_k_1[] = ".gz";
static char __pyx_k_2[] = "Requested index %d of %d-length FloatList";
static char __pyx_k_3[] = "IntList[";
@@ -2931,8 +2957,6 @@ static char __pyx_k_96[] = "Suffix array construction took %f seconds";
static char __pyx_k_97[] = "Unexpected condition found in q3sort: sort from %d to %d";
static char __pyx_k__0[] = "0";
static char __pyx_k__1[] = "1";
-static char __pyx_k__E[] = "E";
-static char __pyx_k__F[] = "F";
static char __pyx_k__a[] = "a";
static char __pyx_k__e[] = "e";
static char __pyx_k__f[] = "f";
@@ -2944,64 +2968,59 @@ static char __pyx_k__r[] = "r";
static char __pyx_k__w[] = "w";
static char __pyx_k__x[] = "x";
static char __pyx_k__y[] = "y";
-static char __pyx_k_102[] = "Sampling strategy: uniform, max sample size = %d";
-static char __pyx_k_103[] = "Sampling strategy: no sampling";
-static char __pyx_k_105[] = "require_aligned_terminal";
-static char __pyx_k_106[] = "require_aligned_chunks";
-static char __pyx_k_107[] = "[X]";
-static char __pyx_k_108[] = "Must specify an alignment object";
-static char __pyx_k_110[] = "HieroCachingRuleFactory.__cinit__.<locals>.<lambda>";
-static char __pyx_k_111[] = "Reading precomputed data from file %s... ";
-static char __pyx_k_112[] = "Precomputation done with max nonterminals %d, decoder uses %d";
-static char __pyx_k_113[] = "Precomputation done with max terminals %d, decoder uses %d";
-static char __pyx_k_114[] = "Precomputation done with max initial size %d, decoder uses %d";
-static char __pyx_k_115[] = "Precomputation done with min gap size %d, decoder uses %d";
-static char __pyx_k_116[] = "Converting %d hash keys on precomputed inverted index... ";
-static char __pyx_k_117[] = "Converting %d hash keys on precomputed collocations... ";
-static char __pyx_k_118[] = "Processing precomputations took %f seconds";
-static char __pyx_k_119[] = "{";
- static char __pyx_k_120[] = "(";
-static char __pyx_k_121[] = "}";
-static char __pyx_k_122[] = "get_precomputed_collocation";
-static char __pyx_k_123[] = "double binary";
-static char __pyx_k_124[] = "HieroCachingRuleFactory.input.<locals>.lambda4.<locals>.<lambda>";
-static char __pyx_k_125[] = "Keyword trie error";
-static char __pyx_k_127[] = "HieroCachingRuleFactory.input.<locals>.<lambda>";
-static char __pyx_k_128[] = "get_all_nodes_isteps_away";
-static char __pyx_k_129[] = "Total time for rule lookup, extraction, and scoring = %f seconds";
-static char __pyx_k_130[] = " Extract time = %f seconds";
-static char __pyx_k_131[] = " Intersect time = %f seconds";
-static char __pyx_k_132[] = "No aligned terminals";
-static char __pyx_k_133[] = "Unaligned chunk";
-static char __pyx_k_134[] = "Gaps are not tight phrases";
-static char __pyx_k_135[] = "Inside edges of preceding subphrase are not tight";
-static char __pyx_k_136[] = "Inside edges of following subphrase are not tight";
-static char __pyx_k_137[] = "Subphrase [%d, %d] failed integrity check";
-static char __pyx_k_138[] = "Didn't extract anything from [%d, %d] -> [%d, %d]";
-static char __pyx_k_139[] = "Unable to extract basic phrase";
-static char __pyx_k_143[] = "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi";
-static char __pyx_k_144[] = "HieroCachingRuleFactory.add_instance.<locals>.extract";
-static char __pyx_k_146[] = "HieroCachingRuleFactory.form_rule.<locals>.<lambda>";
-static char __pyx_k_149[] = "{0}-{1}";
-static char __pyx_k_150[] = "[X] ||| {0} ||| {1} ||| {2}";
-static char __pyx_k_151[] = "------------------------------";
-static char __pyx_k_153[] = " Online Stats ";
-static char __pyx_k_157[] = " : ";
-static char __pyx_k_163[] = "OnlineFeatureContext";
-static char __pyx_k_166[] = "HieroCachingRuleFactory.get_f_phrases.<locals>.extract";
-static char __pyx_k_167[] = "%s=%s";
-static char __pyx_k_169[] = "/Users/vchahun/Sandbox/cdec/python/src/sa/_sa.pyx";
-static char __pyx_k_172[] = "cdec.sa";
-static char __pyx_k_176[] = "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi";
-static char __pyx_k_187[] = "*EPS*";
-static char __pyx_k__FE[] = "FE";
+static char __pyx_k_101[] = "OnlineStats.__cinit__.<locals>.<lambda>";
+static char __pyx_k_102[] = "cdec.sa._sa";
+static char __pyx_k_104[] = "Sampling strategy: uniform, max sample size = %d";
+static char __pyx_k_105[] = "Sampling strategy: no sampling";
+static char __pyx_k_107[] = "require_aligned_terminal";
+static char __pyx_k_108[] = "require_aligned_chunks";
+static char __pyx_k_109[] = "[X]";
+static char __pyx_k_110[] = "Must specify an alignment object";
+static char __pyx_k_112[] = "Reading precomputed data from file %s... ";
+static char __pyx_k_113[] = "Precomputation done with max nonterminals %d, decoder uses %d";
+static char __pyx_k_114[] = "Precomputation done with max terminals %d, decoder uses %d";
+static char __pyx_k_115[] = "Precomputation done with max initial size %d, decoder uses %d";
+static char __pyx_k_116[] = "Precomputation done with min gap size %d, decoder uses %d";
+static char __pyx_k_117[] = "Converting %d hash keys on precomputed inverted index... ";
+static char __pyx_k_118[] = "Converting %d hash keys on precomputed collocations... ";
+static char __pyx_k_119[] = "Processing precomputations took %f seconds";
+static char __pyx_k_120[] = "{";
+ static char __pyx_k_121[] = "(";
+static char __pyx_k_122[] = "}";
+static char __pyx_k_123[] = "get_precomputed_collocation";
+static char __pyx_k_124[] = "double binary";
+static char __pyx_k_125[] = "HieroCachingRuleFactory.input.<locals>.lambda4.<locals>.<lambda>";
+static char __pyx_k_126[] = "Keyword trie error";
+static char __pyx_k_128[] = "HieroCachingRuleFactory.input.<locals>.<lambda>";
+static char __pyx_k_129[] = "get_all_nodes_isteps_away";
+static char __pyx_k_130[] = "Total time for rule lookup, extraction, and scoring = %f seconds";
+static char __pyx_k_131[] = " Extract time = %f seconds";
+static char __pyx_k_132[] = " Intersect time = %f seconds";
+static char __pyx_k_133[] = "No aligned terminals";
+static char __pyx_k_134[] = "Unaligned chunk";
+static char __pyx_k_135[] = "Gaps are not tight phrases";
+static char __pyx_k_136[] = "Inside edges of preceding subphrase are not tight";
+static char __pyx_k_137[] = "Inside edges of following subphrase are not tight";
+static char __pyx_k_138[] = "Subphrase [%d, %d] failed integrity check";
+static char __pyx_k_139[] = "Didn't extract anything from [%d, %d] -> [%d, %d]";
+static char __pyx_k_140[] = "Unable to extract basic phrase";
+static char __pyx_k_144[] = "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi";
+static char __pyx_k_145[] = "HieroCachingRuleFactory.add_instance.<locals>.extract";
+static char __pyx_k_147[] = "HieroCachingRuleFactory.form_rule.<locals>.<lambda>";
+static char __pyx_k_150[] = "{0}-{1}";
+static char __pyx_k_151[] = "[X] ||| {0} ||| {1} ||| {2}";
+static char __pyx_k_152[] = "OnlineFeatureContext";
+static char __pyx_k_155[] = "HieroCachingRuleFactory.get_f_phrases.<locals>.extract";
+static char __pyx_k_156[] = "%s=%s";
+static char __pyx_k_158[] = "/home/mdenkows/cdec/python/cdec/sa/_sa.pyx";
+static char __pyx_k_161[] = "cdec.sa";
+static char __pyx_k_165[] = "/home/mdenkows/cdec/python/cdec/sa/sym.pxi";
+static char __pyx_k_176[] = "*EPS*";
static char __pyx_k__al[] = "al";
-static char __pyx_k__fe[] = "fe";
static char __pyx_k__gc[] = "gc";
static char __pyx_k__nt[] = "nt";
static char __pyx_k__sa[] = "sa";
static char __pyx_k__wc[] = "wc";
-static char __pyx_k___sa[] = "_sa";
static char __pyx_k__arr[] = "arr";
static char __pyx_k__cmp[] = "cmp";
static char __pyx_k__col[] = "col";
@@ -3132,10 +3151,10 @@ static char __pyx_k__arr_high[] = "arr_high";
static char __pyx_k__bilex_fe[] = "bilex_fe";
static char __pyx_k__category[] = "category";
static char __pyx_k__children[] = "children";
+static char __pyx_k__ctx_name[] = "ctx_name";
static char __pyx_k__curr_idx[] = "curr_idx";
static char __pyx_k__extended[] = "extended";
static char __pyx_k__filename[] = "filename";
-static char __pyx_k__fmt_rule[] = "fmt_rule";
static char __pyx_k__frontier[] = "frontier";
static char __pyx_k__get_e_id[] = "get_e_id";
static char __pyx_k__get_f_id[] = "get_f_id";
@@ -3168,8 +3187,11 @@ static char __pyx_k__new_lex_i[] = "new_lex_i";
static char __pyx_k__new_lex_j[] = "new_lex_j";
static char __pyx_k__paircount[] = "paircount";
static char __pyx_k__partition[] = "partition";
+static char __pyx_k__phrases_e[] = "phrases_e";
+static char __pyx_k__phrases_f[] = "phrases_f";
static char __pyx_k__reachable[] = "reachable";
static char __pyx_k__read_text[] = "read_text";
+static char __pyx_k__samples_f[] = "samples_f";
static char __pyx_k__use_index[] = "use_index";
static char __pyx_k__IndexError[] = "IndexError";
static char __pyx_k__ValueError[] = "ValueError";
@@ -3181,6 +3203,8 @@ static char __pyx_k__itervalues[] = "itervalues";
static char __pyx_k__max_chunks[] = "max_chunks";
static char __pyx_k__max_length[] = "max_length";
static char __pyx_k__namedtuple[] = "namedtuple";
+static char __pyx_k__phrases_al[] = "phrases_al";
+static char __pyx_k__phrases_fe[] = "phrases_fe";
static char __pyx_k__plus_links[] = "plus_links";
static char __pyx_k__precompute[] = "precompute";
static char __pyx_k__span_check[] = "span_check";
@@ -3236,7 +3260,6 @@ static char __pyx_k__max_initial_size[] = "max_initial_size";
static char __pyx_k__max_nonterminals[] = "max_nonterminals";
static char __pyx_k__reachable_buffer[] = "reachable_buffer";
static char __pyx_k__use_collocations[] = "use_collocations";
-static char __pyx_k__dump_online_rules[] = "dump_online_rules";
static char __pyx_k__max_target_chunks[] = "max_target_chunks";
static char __pyx_k__max_target_length[] = "max_target_length";
static char __pyx_k__online_ctx_lookup[] = "online_ctx_lookup";
@@ -3244,13 +3267,13 @@ static char __pyx_k__train_min_gap_size[] = "train_min_gap_size";
static char __pyx_k__pattern2phrase_plus[] = "pattern2phrase_plus";
static PyObject *__pyx_kp_s_1;
static PyObject *__pyx_kp_s_10;
-static PyObject *__pyx_kp_s_102;
-static PyObject *__pyx_kp_s_103;
-static PyObject *__pyx_n_s_105;
-static PyObject *__pyx_n_s_106;
-static PyObject *__pyx_kp_s_108;
-static PyObject *__pyx_n_s_110;
-static PyObject *__pyx_kp_s_111;
+static PyObject *__pyx_n_s_101;
+static PyObject *__pyx_n_s_102;
+static PyObject *__pyx_kp_s_104;
+static PyObject *__pyx_kp_s_105;
+static PyObject *__pyx_n_s_107;
+static PyObject *__pyx_n_s_108;
+static PyObject *__pyx_kp_s_110;
static PyObject *__pyx_kp_s_112;
static PyObject *__pyx_kp_s_113;
static PyObject *__pyx_kp_s_114;
@@ -3261,13 +3284,13 @@ static PyObject *__pyx_kp_s_118;
static PyObject *__pyx_kp_s_119;
static PyObject *__pyx_kp_s_120;
static PyObject *__pyx_kp_s_121;
-static PyObject *__pyx_n_s_122;
-static PyObject *__pyx_kp_s_123;
-static PyObject *__pyx_n_s_124;
-static PyObject *__pyx_kp_s_125;
-static PyObject *__pyx_n_s_127;
+static PyObject *__pyx_kp_s_122;
+static PyObject *__pyx_n_s_123;
+static PyObject *__pyx_kp_s_124;
+static PyObject *__pyx_n_s_125;
+static PyObject *__pyx_kp_s_126;
static PyObject *__pyx_n_s_128;
-static PyObject *__pyx_kp_s_129;
+static PyObject *__pyx_n_s_129;
static PyObject *__pyx_kp_s_130;
static PyObject *__pyx_kp_s_131;
static PyObject *__pyx_kp_s_132;
@@ -3279,21 +3302,19 @@ static PyObject *__pyx_kp_s_137;
static PyObject *__pyx_kp_s_138;
static PyObject *__pyx_kp_s_139;
static PyObject *__pyx_kp_s_14;
-static PyObject *__pyx_kp_s_143;
-static PyObject *__pyx_n_s_144;
-static PyObject *__pyx_n_s_146;
-static PyObject *__pyx_kp_s_149;
+static PyObject *__pyx_kp_s_140;
+static PyObject *__pyx_kp_s_144;
+static PyObject *__pyx_n_s_145;
+static PyObject *__pyx_n_s_147;
static PyObject *__pyx_kp_s_15;
static PyObject *__pyx_kp_s_150;
static PyObject *__pyx_kp_s_151;
-static PyObject *__pyx_kp_s_153;
-static PyObject *__pyx_kp_s_157;
-static PyObject *__pyx_n_s_163;
-static PyObject *__pyx_n_s_166;
-static PyObject *__pyx_kp_s_167;
-static PyObject *__pyx_kp_s_169;
-static PyObject *__pyx_kp_s_172;
-static PyObject *__pyx_kp_s_176;
+static PyObject *__pyx_n_s_152;
+static PyObject *__pyx_n_s_155;
+static PyObject *__pyx_kp_s_156;
+static PyObject *__pyx_kp_s_158;
+static PyObject *__pyx_kp_s_161;
+static PyObject *__pyx_kp_s_165;
static PyObject *__pyx_kp_s_19;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_s_23;
@@ -3346,12 +3367,9 @@ static PyObject *__pyx_kp_s_97;
static PyObject *__pyx_kp_s__0;
static PyObject *__pyx_kp_s__1;
static PyObject *__pyx_n_s__Counter;
-static PyObject *__pyx_n_s__E;
static PyObject *__pyx_n_s__END_OF_FILE;
static PyObject *__pyx_n_s__END_OF_LINE;
static PyObject *__pyx_n_s__Exception;
-static PyObject *__pyx_n_s__F;
-static PyObject *__pyx_n_s__FE;
static PyObject *__pyx_n_s__FeatureContext;
static PyObject *__pyx_n_s__GzipFile;
static PyObject *__pyx_n_s__INCREMENT;
@@ -3371,7 +3389,6 @@ static PyObject *__pyx_n_s____pyx_vtable__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s___columns;
static PyObject *__pyx_n_s___doquicksort;
-static PyObject *__pyx_n_s___sa;
static PyObject *__pyx_n_s__a;
static PyObject *__pyx_n_s__advance;
static PyObject *__pyx_n_s__al;
@@ -3396,6 +3413,7 @@ static PyObject *__pyx_n_s__cmp;
static PyObject *__pyx_n_s__col;
static PyObject *__pyx_n_s__collect;
static PyObject *__pyx_n_s__collections;
+static PyObject *__pyx_n_s__ctx_name;
static PyObject *__pyx_n_s__curr_idx;
static PyObject *__pyx_n_s__debug;
static PyObject *__pyx_n_s__decode_lattice;
@@ -3403,7 +3421,6 @@ 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__dump_online_rules;
static PyObject *__pyx_n_s__e;
static PyObject *__pyx_n_s__e_i;
static PyObject *__pyx_n_s__e_j;
@@ -3427,9 +3444,7 @@ static PyObject *__pyx_n_s__f_span;
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__fe;
static PyObject *__pyx_n_s__filename;
-static PyObject *__pyx_n_s__fmt_rule;
static PyObject *__pyx_n_s__form_rule;
static PyObject *__pyx_n_s__format;
static PyObject *__pyx_n_s__fphrase;
@@ -3532,6 +3547,10 @@ static PyObject *__pyx_n_s__pattern2phrase;
static PyObject *__pyx_n_s__pattern2phrase_plus;
static PyObject *__pyx_n_s__phrase;
static PyObject *__pyx_n_s__phrase_location;
+static PyObject *__pyx_n_s__phrases_al;
+static PyObject *__pyx_n_s__phrases_e;
+static PyObject *__pyx_n_s__phrases_f;
+static PyObject *__pyx_n_s__phrases_fe;
static PyObject *__pyx_n_s__plus_links;
static PyObject *__pyx_n_s__pop;
static PyObject *__pyx_n_s__precompute;
@@ -3557,6 +3576,7 @@ static PyObject *__pyx_n_s__sa_low;
static PyObject *__pyx_n_s__sample;
static PyObject *__pyx_n_s__sample_size;
static PyObject *__pyx_n_s__sampler;
+static PyObject *__pyx_n_s__samples_f;
static PyObject *__pyx_n_s__sarray;
static PyObject *__pyx_n_s__scorer;
static PyObject *__pyx_n_s__scores;
@@ -3615,7 +3635,7 @@ static PyObject *__pyx_int_10;
static PyObject *__pyx_int_20;
static PyObject *__pyx_int_1000;
static PyObject *__pyx_k_43;
-static PyObject *__pyx_k_101;
+static PyObject *__pyx_k_103;
static PyObject *__pyx_k_slice_22;
static PyObject *__pyx_k_tuple_11;
static PyObject *__pyx_k_tuple_12;
@@ -3661,63 +3681,54 @@ static PyObject *__pyx_k_tuple_84;
static PyObject *__pyx_k_tuple_95;
static PyObject *__pyx_k_tuple_98;
static PyObject *__pyx_k_tuple_99;
-static PyObject *__pyx_k_slice_140;
-static PyObject *__pyx_k_slice_145;
-static PyObject *__pyx_k_slice_147;
+static PyObject *__pyx_k_slice_141;
+static PyObject *__pyx_k_slice_146;
static PyObject *__pyx_k_slice_148;
+static PyObject *__pyx_k_slice_149;
static PyObject *__pyx_k_tuple_100;
-static PyObject *__pyx_k_tuple_104;
-static PyObject *__pyx_k_tuple_109;
-static PyObject *__pyx_k_tuple_126;
-static PyObject *__pyx_k_tuple_141;
-static PyObject *__pyx_k_tuple_152;
-static PyObject *__pyx_k_tuple_154;
-static PyObject *__pyx_k_tuple_155;
-static PyObject *__pyx_k_tuple_156;
-static PyObject *__pyx_k_tuple_158;
+static PyObject *__pyx_k_tuple_106;
+static PyObject *__pyx_k_tuple_111;
+static PyObject *__pyx_k_tuple_127;
+static PyObject *__pyx_k_tuple_142;
+static PyObject *__pyx_k_tuple_153;
static PyObject *__pyx_k_tuple_159;
-static PyObject *__pyx_k_tuple_160;
-static PyObject *__pyx_k_tuple_161;
static PyObject *__pyx_k_tuple_162;
-static PyObject *__pyx_k_tuple_164;
+static PyObject *__pyx_k_tuple_163;
+static PyObject *__pyx_k_tuple_166;
+static PyObject *__pyx_k_tuple_168;
static PyObject *__pyx_k_tuple_170;
-static PyObject *__pyx_k_tuple_173;
+static PyObject *__pyx_k_tuple_172;
static PyObject *__pyx_k_tuple_174;
static PyObject *__pyx_k_tuple_177;
static PyObject *__pyx_k_tuple_179;
static PyObject *__pyx_k_tuple_181;
-static PyObject *__pyx_k_tuple_183;
-static PyObject *__pyx_k_tuple_185;
-static PyObject *__pyx_k_tuple_188;
-static PyObject *__pyx_k_tuple_190;
-static PyObject *__pyx_k_tuple_192;
-static PyObject *__pyx_k_codeobj_142;
-static PyObject *__pyx_k_codeobj_165;
-static PyObject *__pyx_k_codeobj_168;
+static PyObject *__pyx_k_codeobj_143;
+static PyObject *__pyx_k_codeobj_154;
+static PyObject *__pyx_k_codeobj_157;
+static PyObject *__pyx_k_codeobj_160;
+static PyObject *__pyx_k_codeobj_164;
+static PyObject *__pyx_k_codeobj_167;
+static PyObject *__pyx_k_codeobj_169;
static PyObject *__pyx_k_codeobj_171;
+static PyObject *__pyx_k_codeobj_173;
static PyObject *__pyx_k_codeobj_175;
static PyObject *__pyx_k_codeobj_178;
static PyObject *__pyx_k_codeobj_180;
static PyObject *__pyx_k_codeobj_182;
-static PyObject *__pyx_k_codeobj_184;
-static PyObject *__pyx_k_codeobj_186;
-static PyObject *__pyx_k_codeobj_189;
-static PyObject *__pyx_k_codeobj_191;
-static PyObject *__pyx_k_codeobj_193;
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_1monitor_cpu(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_1monitor_cpu = {__Pyx_NAMESTR("monitor_cpu"), (PyCFunction)__pyx_pw_3_sa_1monitor_cpu, METH_NOARGS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_1monitor_cpu(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_1monitor_cpu(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_1monitor_cpu = {__Pyx_NAMESTR("monitor_cpu"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_1monitor_cpu, METH_NOARGS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_1monitor_cpu(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("monitor_cpu (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_monitor_cpu(__pyx_self);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_monitor_cpu(__pyx_self);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "_sa.pyx":5
+/* "cdec/sa/_sa.pyx":5
* import gzip
*
* def monitor_cpu(): # <<<<<<<<<<<<<<
@@ -3725,7 +3736,7 @@ static PyObject *__pyx_pw_3_sa_1monitor_cpu(PyObject *__pyx_self, CYTHON_UNUSED
* resource.getrusage(resource.RUSAGE_SELF).ru_stime)
*/
-static PyObject *__pyx_pf_3_sa_monitor_cpu(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_monitor_cpu(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -3737,7 +3748,7 @@ static PyObject *__pyx_pf_3_sa_monitor_cpu(CYTHON_UNUSED PyObject *__pyx_self) {
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("monitor_cpu", 0);
- /* "_sa.pyx":6
+ /* "cdec/sa/_sa.pyx":6
*
* def monitor_cpu():
* return (resource.getrusage(resource.RUSAGE_SELF).ru_utime+ # <<<<<<<<<<<<<<
@@ -3768,7 +3779,7 @@ static PyObject *__pyx_pf_3_sa_monitor_cpu(CYTHON_UNUSED PyObject *__pyx_self) {
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "_sa.pyx":7
+ /* "cdec/sa/_sa.pyx":7
* def monitor_cpu():
* return (resource.getrusage(resource.RUSAGE_SELF).ru_utime+
* resource.getrusage(resource.RUSAGE_SELF).ru_stime) # <<<<<<<<<<<<<<
@@ -3812,7 +3823,7 @@ static PyObject *__pyx_pf_3_sa_monitor_cpu(CYTHON_UNUSED PyObject *__pyx_self) {
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.monitor_cpu", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.monitor_cpu", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -3821,9 +3832,9 @@ static PyObject *__pyx_pf_3_sa_monitor_cpu(CYTHON_UNUSED PyObject *__pyx_self) {
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_3gzip_or_text(PyObject *__pyx_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_3gzip_or_text = {__Pyx_NAMESTR("gzip_or_text"), (PyCFunction)__pyx_pw_3_sa_3gzip_or_text, METH_O, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_3gzip_or_text(PyObject *__pyx_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_3gzip_or_text(PyObject *__pyx_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_3gzip_or_text = {__Pyx_NAMESTR("gzip_or_text"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_3gzip_or_text, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_3gzip_or_text(PyObject *__pyx_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -3836,16 +3847,16 @@ static PyObject *__pyx_pw_3_sa_3gzip_or_text(PyObject *__pyx_self, PyObject *__p
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.gzip_or_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.gzip_or_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_2gzip_or_text(__pyx_self, ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_2gzip_or_text(__pyx_self, ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "_sa.pyx":9
+/* "cdec/sa/_sa.pyx":9
* resource.getrusage(resource.RUSAGE_SELF).ru_stime)
*
* def gzip_or_text(char* filename): # <<<<<<<<<<<<<<
@@ -3853,7 +3864,7 @@ static PyObject *__pyx_pw_3_sa_3gzip_or_text(PyObject *__pyx_self, PyObject *__p
* return gzip.GzipFile(filename)
*/
-static PyObject *__pyx_pf_3_sa_2gzip_or_text(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_2gzip_or_text(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_filename) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -3865,7 +3876,7 @@ static PyObject *__pyx_pf_3_sa_2gzip_or_text(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("gzip_or_text", 0);
- /* "_sa.pyx":10
+ /* "cdec/sa/_sa.pyx":10
*
* def gzip_or_text(char* filename):
* if filename.endswith('.gz'): # <<<<<<<<<<<<<<
@@ -3878,7 +3889,7 @@ static PyObject *__pyx_pf_3_sa_2gzip_or_text(CYTHON_UNUSED PyObject *__pyx_self,
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
if ((__pyx_t_2 != 0)) {
- /* "_sa.pyx":11
+ /* "cdec/sa/_sa.pyx":11
* def gzip_or_text(char* filename):
* if filename.endswith('.gz'):
* return gzip.GzipFile(filename) # <<<<<<<<<<<<<<
@@ -3909,7 +3920,7 @@ static PyObject *__pyx_pf_3_sa_2gzip_or_text(CYTHON_UNUSED PyObject *__pyx_self,
}
/*else*/ {
- /* "_sa.pyx":13
+ /* "cdec/sa/_sa.pyx":13
* return gzip.GzipFile(filename)
* else:
* return open(filename) # <<<<<<<<<<<<<<
@@ -3939,7 +3950,7 @@ static PyObject *__pyx_pf_3_sa_2gzip_or_text(CYTHON_UNUSED PyObject *__pyx_self,
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.gzip_or_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.gzip_or_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -3948,8 +3959,8 @@ static PyObject *__pyx_pf_3_sa_2gzip_or_text(CYTHON_UNUSED PyObject *__pyx_self,
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_size;
int __pyx_v_increment;
int __pyx_v_initial_len;
@@ -4022,16 +4033,16 @@ static int __pyx_pw_3_sa_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.FloatList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FloatList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9FloatList___cinit__(((struct __pyx_obj_3_sa_FloatList *)__pyx_v_self), __pyx_v_size, __pyx_v_increment, __pyx_v_initial_len);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_v_self), __pyx_v_size, __pyx_v_increment, __pyx_v_initial_len);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":11
+/* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":11
* cdef class FloatList:
*
* def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<<
@@ -4039,13 +4050,13 @@ static int __pyx_pw_3_sa_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject
* size = initial_len
*/
-static int __pyx_pf_3_sa_9FloatList___cinit__(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, int __pyx_v_size, int __pyx_v_increment, int __pyx_v_initial_len) {
+static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, int __pyx_v_size, int __pyx_v_increment, int __pyx_v_initial_len) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":12
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":12
*
* def __cinit__(self, int size=0, int increment=1, int initial_len=0):
* if initial_len > size: # <<<<<<<<<<<<<<
@@ -4055,7 +4066,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":13
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":13
* def __cinit__(self, int size=0, int increment=1, int initial_len=0):
* if initial_len > size:
* size = initial_len # <<<<<<<<<<<<<<
@@ -4067,7 +4078,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":14
* if initial_len > size:
* size = initial_len
* self.size = size # <<<<<<<<<<<<<<
@@ -4076,7 +4087,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":15
* size = initial_len
* self.size = size
* self.increment = increment # <<<<<<<<<<<<<<
@@ -4085,7 +4096,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":16
* self.size = size
* self.increment = increment
* self.len = initial_len # <<<<<<<<<<<<<<
@@ -4094,7 +4105,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":17
* self.increment = increment
* self.len = initial_len
* self.arr = <float*> malloc(size*sizeof(float)) # <<<<<<<<<<<<<<
@@ -4103,7 +4114,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":18
* self.len = initial_len
* self.arr = <float*> malloc(size*sizeof(float))
* memset(self.arr, 0, initial_len*sizeof(float)) # <<<<<<<<<<<<<<
@@ -4118,15 +4129,15 @@ static int __pyx_pf_3_sa_9FloatList___cinit__(struct __pyx_obj_3_sa_FloatList *_
}
/* Python wrapper */
-static void __pyx_pw_3_sa_9FloatList_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_3_sa_9FloatList_3__dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pw_4cdec_2sa_3_sa_9FloatList_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_4cdec_2sa_3_sa_9FloatList_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_pf_3_sa_9FloatList_2__dealloc__(((struct __pyx_obj_3_sa_FloatList *)__pyx_v_self));
+ __pyx_pf_4cdec_2sa_3_sa_9FloatList_2__dealloc__(((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":20
+/* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":20
* memset(self.arr, 0, initial_len*sizeof(float))
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -4134,11 +4145,11 @@ static void __pyx_pw_3_sa_9FloatList_3__dealloc__(PyObject *__pyx_v_self) {
*
*/
-static void __pyx_pf_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_3_sa_FloatList *__pyx_v_self) {
+static void __pyx_pf_4cdec_2sa_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":21
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":21
*
* def __dealloc__(self):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -4151,17 +4162,17 @@ static void __pyx_pf_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_3_sa_FloatLis
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9FloatList_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_9FloatList_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9FloatList_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9FloatList_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9FloatList_4__getitem__(((struct __pyx_obj_3_sa_FloatList *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":23
+/* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":23
* free(self.arr)
*
* def __getitem__(self, i): # <<<<<<<<<<<<<<
@@ -4169,7 +4180,7 @@ static PyObject *__pyx_pw_3_sa_9FloatList_5__getitem__(PyObject *__pyx_v_self, P
* if i<0:
*/
-static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_v_j = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -4184,7 +4195,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":24
*
* def __getitem__(self, i):
* j = i # <<<<<<<<<<<<<<
@@ -4194,7 +4205,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":25
* def __getitem__(self, i):
* j = i
* if i<0: # <<<<<<<<<<<<<<
@@ -4206,7 +4217,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":26
* j = i
* if i<0:
* j = self.len + i # <<<<<<<<<<<<<<
@@ -4225,7 +4236,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":27
* if i<0:
* j = self.len + i
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -4248,7 +4259,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":28
* j = self.len + i
* if j<0 or j>=self.len:
* raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len)) # <<<<<<<<<<<<<<
@@ -4283,7 +4294,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":29
* if j<0 or j>=self.len:
* raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len))
* return self.arr[j] # <<<<<<<<<<<<<<
@@ -4303,7 +4314,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_Flo
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.FloatList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FloatList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_j);
@@ -4312,7 +4323,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":31
* return self.arr[j]
*
* cdef void set(self, int i, float v): # <<<<<<<<<<<<<<
@@ -4320,7 +4331,7 @@ static PyObject *__pyx_pf_3_sa_9FloatList_4__getitem__(struct __pyx_obj_3_sa_Flo
* if i<0:
*/
-static void __pyx_f_3_sa_9FloatList_set(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, int __pyx_v_i, float __pyx_v_v) {
+static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, int __pyx_v_i, float __pyx_v_v) {
int __pyx_v_j;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -4334,7 +4345,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":32
*
* cdef void set(self, int i, float v):
* j = i # <<<<<<<<<<<<<<
@@ -4343,7 +4354,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":33
* cdef void set(self, int i, float v):
* j = i
* if i<0: # <<<<<<<<<<<<<<
@@ -4353,7 +4364,7 @@ static void __pyx_f_3_sa_9FloatList_set(struct __pyx_obj_3_sa_FloatList *__pyx_v
__pyx_t_1 = ((__pyx_v_i < 0) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":34
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":34
* j = i
* if i<0:
* j = self.len + i # <<<<<<<<<<<<<<
@@ -4365,7 +4376,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":35
* if i<0:
* j = self.len + i
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -4381,7 +4392,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":36
* j = self.len + i
* if j<0 or j>=self.len:
* raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len)) # <<<<<<<<<<<<<<
@@ -4418,7 +4429,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":37
* if j<0 or j>=self.len:
* raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len))
* self.arr[j] = v # <<<<<<<<<<<<<<
@@ -4432,23 +4443,23 @@ static void __pyx_f_3_sa_9FloatList_set(struct __pyx_obj_3_sa_FloatList *__pyx_v
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_WriteUnraisable("_sa.FloatList.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.FloatList.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9FloatList_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_3_sa_9FloatList_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val) {
+static int __pyx_pw_4cdec_2sa_3_sa_9FloatList_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9FloatList_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9FloatList_6__setitem__(((struct __pyx_obj_3_sa_FloatList *)__pyx_v_self), ((PyObject *)__pyx_v_i), ((PyObject *)__pyx_v_val));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9FloatList_6__setitem__(((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_v_self), ((PyObject *)__pyx_v_i), ((PyObject *)__pyx_v_val));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":39
+/* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":39
* self.arr[j] = v
*
* def __setitem__(self, i, val): # <<<<<<<<<<<<<<
@@ -4456,7 +4467,7 @@ static int __pyx_pw_3_sa_9FloatList_7__setitem__(PyObject *__pyx_v_self, PyObjec
*
*/
-static int __pyx_pf_3_sa_9FloatList_6__setitem__(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val) {
+static int __pyx_pf_4cdec_2sa_3_sa_9FloatList_6__setitem__(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -4466,7 +4477,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":40
*
* def __setitem__(self, i, val):
* self.set(i, val) # <<<<<<<<<<<<<<
@@ -4475,12 +4486,12 @@ static int __pyx_pf_3_sa_9FloatList_6__setitem__(struct __pyx_obj_3_sa_FloatList
*/
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_v_val); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- ((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->set(__pyx_v_self, __pyx_t_1, __pyx_t_2);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->set(__pyx_v_self, __pyx_t_1, __pyx_t_2);
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.FloatList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FloatList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -4488,17 +4499,17 @@ static int __pyx_pf_3_sa_9FloatList_6__setitem__(struct __pyx_obj_3_sa_FloatList
}
/* Python wrapper */
-static Py_ssize_t __pyx_pw_3_sa_9FloatList_9__len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_pw_3_sa_9FloatList_9__len__(PyObject *__pyx_v_self) {
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_9FloatList_9__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_9FloatList_9__len__(PyObject *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9FloatList_8__len__(((struct __pyx_obj_3_sa_FloatList *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9FloatList_8__len__(((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":42
+/* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":42
* self.set(i, val)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -4506,12 +4517,12 @@ static Py_ssize_t __pyx_pw_3_sa_9FloatList_9__len__(PyObject *__pyx_v_self) {
*
*/
-static Py_ssize_t __pyx_pf_3_sa_9FloatList_8__len__(struct __pyx_obj_3_sa_FloatList *__pyx_v_self) {
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9FloatList_8__len__(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":43
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":43
*
* def __len__(self):
* return self.len # <<<<<<<<<<<<<<
@@ -4528,8 +4539,8 @@ static Py_ssize_t __pyx_pf_3_sa_9FloatList_8__len__(struct __pyx_obj_3_sa_FloatL
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9FloatList_11append(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
-static PyObject *__pyx_pw_3_sa_9FloatList_11append(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9FloatList_11append(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9FloatList_11append(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
float __pyx_v_val;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -4542,16 +4553,16 @@ static PyObject *__pyx_pw_3_sa_9FloatList_11append(PyObject *__pyx_v_self, PyObj
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.FloatList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FloatList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9FloatList_10append(((struct __pyx_obj_3_sa_FloatList *)__pyx_v_self), ((float)__pyx_v_val));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_v_self), ((float)__pyx_v_val));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":45
+/* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":45
* return self.len
*
* def append(self, float val): # <<<<<<<<<<<<<<
@@ -4559,13 +4570,13 @@ static PyObject *__pyx_pw_3_sa_9FloatList_11append(PyObject *__pyx_v_self, PyObj
* self.size = self.size + self.increment
*/
-static PyObject *__pyx_pf_3_sa_9FloatList_10append(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, float __pyx_v_val) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, float __pyx_v_val) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("append", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":46
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":46
*
* def append(self, float val):
* if self.len == self.size: # <<<<<<<<<<<<<<
@@ -4575,7 +4586,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":47
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":47
* def append(self, float val):
* if self.len == self.size:
* self.size = self.size + self.increment # <<<<<<<<<<<<<<
@@ -4584,7 +4595,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -4596,7 +4607,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -4605,7 +4616,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -4620,7 +4631,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":52
* self.len = self.len + 1
*
* cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -4628,11 +4639,11 @@ static PyObject *__pyx_pf_3_sa_9FloatList_10append(struct __pyx_obj_3_sa_FloatLi
* fwrite(self.arr, sizeof(float), self.len, f)
*/
-static void __pyx_f_3_sa_9FloatList_write_handle(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, FILE *__pyx_v_f) {
+static void __pyx_f_4cdec_2sa_3_sa_9FloatList_write_handle(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, FILE *__pyx_v_f) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":53
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":53
*
* cdef void write_handle(self, FILE* f):
* fwrite(&(self.len), sizeof(float), 1, f) # <<<<<<<<<<<<<<
@@ -4641,7 +4652,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":54
* cdef void write_handle(self, FILE* f):
* fwrite(&(self.len), sizeof(float), 1, f)
* fwrite(self.arr, sizeof(float), self.len, f) # <<<<<<<<<<<<<<
@@ -4654,8 +4665,8 @@ static void __pyx_f_3_sa_9FloatList_write_handle(struct __pyx_obj_3_sa_FloatList
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9FloatList_13write(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9FloatList_13write(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9FloatList_13write(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9FloatList_13write(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -4668,16 +4679,16 @@ static PyObject *__pyx_pw_3_sa_9FloatList_13write(PyObject *__pyx_v_self, PyObje
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.FloatList.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FloatList.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9FloatList_12write(((struct __pyx_obj_3_sa_FloatList *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":56
+/* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":56
* fwrite(self.arr, sizeof(float), self.len, f)
*
* def write(self, char* filename): # <<<<<<<<<<<<<<
@@ -4685,13 +4696,13 @@ static PyObject *__pyx_pw_3_sa_9FloatList_13write(PyObject *__pyx_v_self, PyObje
* f = fopen(filename, "w")
*/
-static PyObject *__pyx_pf_3_sa_9FloatList_12write(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":58
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":58
* def write(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -4700,16 +4711,16 @@ 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/mdenkows/cdec/python/cdec/sa/float_list.pxi":59
* cdef FILE* f
* f = fopen(filename, "w")
* self.write_handle(f) # <<<<<<<<<<<<<<
* fclose(f)
*
*/
- ((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/float_list.pxi":60
* f = fopen(filename, "w")
* self.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -4724,7 +4735,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":62
* fclose(f)
*
* cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -4732,12 +4743,12 @@ static PyObject *__pyx_pf_3_sa_9FloatList_12write(struct __pyx_obj_3_sa_FloatLis
* fread(&(self.len), sizeof(float), 1, f)
*/
-static void __pyx_f_3_sa_9FloatList_read_handle(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, FILE *__pyx_v_f) {
+static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, FILE *__pyx_v_f) {
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("read_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":63
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":63
*
* cdef void read_handle(self, FILE* f):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -4746,7 +4757,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":64
* cdef void read_handle(self, FILE* f):
* free(self.arr)
* fread(&(self.len), sizeof(float), 1, f) # <<<<<<<<<<<<<<
@@ -4755,7 +4766,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":65
* free(self.arr)
* fread(&(self.len), sizeof(float), 1, f)
* self.arr = <float*> malloc(self.len * sizeof(float)) # <<<<<<<<<<<<<<
@@ -4764,7 +4775,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/mdenkows/cdec/python/cdec/sa/float_list.pxi":66
* fread(&(self.len), sizeof(float), 1, f)
* self.arr = <float*> malloc(self.len * sizeof(float))
* self.size = self.len # <<<<<<<<<<<<<<
@@ -4774,7 +4785,7 @@ static void __pyx_f_3_sa_9FloatList_read_handle(struct __pyx_obj_3_sa_FloatList
__pyx_t_1 = __pyx_v_self->len;
__pyx_v_self->size = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":67
+ /* "/home/mdenkows/cdec/python/cdec/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) # <<<<<<<<<<<<<<
@@ -4787,8 +4798,8 @@ static void __pyx_f_3_sa_9FloatList_read_handle(struct __pyx_obj_3_sa_FloatList
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9FloatList_15read(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9FloatList_15read(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9FloatList_15read(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9FloatList_15read(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -4801,16 +4812,16 @@ static PyObject *__pyx_pw_3_sa_9FloatList_15read(PyObject *__pyx_v_self, PyObjec
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.FloatList.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FloatList.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9FloatList_14read(((struct __pyx_obj_3_sa_FloatList *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":69
+/* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":69
* fread(self.arr, sizeof(float), self.len, f)
*
* def read(self, char* filename): # <<<<<<<<<<<<<<
@@ -4818,13 +4829,13 @@ static PyObject *__pyx_pw_3_sa_9FloatList_15read(PyObject *__pyx_v_self, PyObjec
* f = fopen(filename, "r")
*/
-static PyObject *__pyx_pf_3_sa_9FloatList_14read(struct __pyx_obj_3_sa_FloatList *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/float_list.pxi":71
+ /* "/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":71
* def read(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -4833,15 +4844,15 @@ 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/mdenkows/cdec/python/cdec/sa/float_list.pxi":72
* cdef FILE* f
* f = fopen(filename, "r")
* self.read_handle(f) # <<<<<<<<<<<<<<
* fclose(f)
*/
- ((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/float_list.pxi":73
* f = fopen(filename, "r")
* self.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -4855,8 +4866,8 @@ static PyObject *__pyx_pf_3_sa_9FloatList_14read(struct __pyx_obj_3_sa_FloatList
}
/* Python wrapper */
-static int __pyx_pw_3_sa_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_size;
int __pyx_v_increment;
int __pyx_v_initial_len;
@@ -4929,16 +4940,16 @@ static int __pyx_pw_3_sa_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *_
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.IntList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_7IntList___cinit__(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self), __pyx_v_size, __pyx_v_increment, __pyx_v_initial_len);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self), __pyx_v_size, __pyx_v_increment, __pyx_v_initial_len);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":11
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":11
* cdef class IntList:
*
* def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<<
@@ -4946,13 +4957,13 @@ static int __pyx_pw_3_sa_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *_
* size = initial_len
*/
-static int __pyx_pf_3_sa_7IntList___cinit__(struct __pyx_obj_3_sa_IntList *__pyx_v_self, int __pyx_v_size, int __pyx_v_increment, int __pyx_v_initial_len) {
+static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, int __pyx_v_size, int __pyx_v_increment, int __pyx_v_initial_len) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":12
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":12
*
* def __cinit__(self, int size=0, int increment=1, int initial_len=0):
* if initial_len > size: # <<<<<<<<<<<<<<
@@ -4962,7 +4973,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":13
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":13
* def __cinit__(self, int size=0, int increment=1, int initial_len=0):
* if initial_len > size:
* size = initial_len # <<<<<<<<<<<<<<
@@ -4974,7 +4985,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":14
* if initial_len > size:
* size = initial_len
* self.size = size # <<<<<<<<<<<<<<
@@ -4983,7 +4994,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":15
* size = initial_len
* self.size = size
* self.increment = increment # <<<<<<<<<<<<<<
@@ -4992,7 +5003,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":16
* self.size = size
* self.increment = increment
* self.len = initial_len # <<<<<<<<<<<<<<
@@ -5001,7 +5012,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":17
* self.increment = increment
* self.len = initial_len
* self.arr = <int*> malloc(size*sizeof(int)) # <<<<<<<<<<<<<<
@@ -5010,7 +5021,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":18
* self.len = initial_len
* self.arr = <int*> malloc(size*sizeof(int))
* memset(self.arr, 0, initial_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -5025,17 +5036,17 @@ static int __pyx_pf_3_sa_7IntList___cinit__(struct __pyx_obj_3_sa_IntList *__pyx
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_3__str__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_3__str__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_3__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_3__str__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7IntList_2__str__(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":20
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":20
* memset(self.arr, 0, initial_len*sizeof(int))
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -5043,7 +5054,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_3__str__(PyObject *__pyx_v_self) {
* ret = "IntList["
*/
-static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self) {
PyObject *__pyx_v_ret = NULL;
int __pyx_v_idx;
PyObject *__pyx_r = NULL;
@@ -5058,7 +5069,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":22
* def __str__(self):
* cdef unsigned i
* ret = "IntList[" # <<<<<<<<<<<<<<
@@ -5068,7 +5079,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":23
* cdef unsigned i
* ret = "IntList["
* for idx in range(self.size): # <<<<<<<<<<<<<<
@@ -5079,7 +5090,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":24
* ret = "IntList["
* for idx in range(self.size):
* if idx>0: # <<<<<<<<<<<<<<
@@ -5089,7 +5100,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
__pyx_t_3 = ((__pyx_v_idx > 0) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":25
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":25
* for idx in range(self.size):
* if idx>0:
* ret += "," # <<<<<<<<<<<<<<
@@ -5105,7 +5116,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":26
* if idx>0:
* ret += ","
* ret += str(self.arr[idx]) # <<<<<<<<<<<<<<
@@ -5130,7 +5141,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":27
* ret += ","
* ret += str(self.arr[idx])
* ret += "]" # <<<<<<<<<<<<<<
@@ -5143,7 +5154,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":28
* ret += str(self.arr[idx])
* ret += "]"
* ret += "len=" # <<<<<<<<<<<<<<
@@ -5156,7 +5167,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":29
* ret += "]"
* ret += "len="
* ret += str(self.len) # <<<<<<<<<<<<<<
@@ -5180,7 +5191,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":30
* ret += "len="
* ret += str(self.len)
* return ret # <<<<<<<<<<<<<<
@@ -5197,7 +5208,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.IntList.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_ret);
@@ -5207,8 +5218,8 @@ static PyObject *__pyx_pf_3_sa_7IntList_2__str__(struct __pyx_obj_3_sa_IntList *
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_5index(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_5index(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_5index(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_5index(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
int __pyx_v_val;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -5221,16 +5232,16 @@ static PyObject *__pyx_pw_3_sa_7IntList_5index(PyObject *__pyx_v_self, PyObject
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.IntList.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_7IntList_4index(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self), ((int)__pyx_v_val));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_4index(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self), ((int)__pyx_v_val));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":32
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":32
* return ret
*
* def index(self, int val): # <<<<<<<<<<<<<<
@@ -5238,7 +5249,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_5index(PyObject *__pyx_v_self, PyObject
* for i in range(self.len):
*/
-static PyObject *__pyx_pf_3_sa_7IntList_4index(struct __pyx_obj_3_sa_IntList *__pyx_v_self, int __pyx_v_val) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, int __pyx_v_val) {
unsigned int __pyx_v_i;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -5252,7 +5263,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":34
* def index(self, int val):
* cdef unsigned i
* for i in range(self.len): # <<<<<<<<<<<<<<
@@ -5263,7 +5274,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":35
* cdef unsigned i
* for i in range(self.len):
* if self.arr[i] == val: # <<<<<<<<<<<<<<
@@ -5273,7 +5284,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_4index(struct __pyx_obj_3_sa_IntList *__
__pyx_t_3 = (((__pyx_v_self->arr[__pyx_v_i]) == __pyx_v_val) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":36
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":36
* for i in range(self.len):
* if self.arr[i] == val:
* return i # <<<<<<<<<<<<<<
@@ -5291,7 +5302,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":37
* if self.arr[i] == val:
* return i
* raise ValueError('%s not in IntList' % val) # <<<<<<<<<<<<<<
@@ -5320,7 +5331,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_4index(struct __pyx_obj_3_sa_IntList *__
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.IntList.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -5329,8 +5340,8 @@ static PyObject *__pyx_pf_3_sa_7IntList_4index(struct __pyx_obj_3_sa_IntList *__
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_7partition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_7partition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_7partition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_7partition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_start = 0;
PyObject *__pyx_v_end = 0;
int __pyx_lineno = 0;
@@ -5378,16 +5389,16 @@ static PyObject *__pyx_pw_3_sa_7IntList_7partition(PyObject *__pyx_v_self, PyObj
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("partition", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.IntList.partition", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.partition", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_7IntList_6partition(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self), __pyx_v_start, __pyx_v_end);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self), __pyx_v_start, __pyx_v_end);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":39
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":39
* raise ValueError('%s not in IntList' % val)
*
* def partition(self,start,end): # <<<<<<<<<<<<<<
@@ -5395,7 +5406,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_7partition(PyObject *__pyx_v_self, PyObj
* bottom = start-1
*/
-static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end) {
PyObject *__pyx_v_pivot = NULL;
PyObject *__pyx_v_bottom = NULL;
PyObject *__pyx_v_top = NULL;
@@ -5413,7 +5424,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":40
*
* def partition(self,start,end):
* pivot = self.arr[end] # <<<<<<<<<<<<<<
@@ -5426,7 +5437,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":41
* def partition(self,start,end):
* pivot = self.arr[end]
* bottom = start-1 # <<<<<<<<<<<<<<
@@ -5438,7 +5449,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":42
* pivot = self.arr[end]
* bottom = start-1
* top = end # <<<<<<<<<<<<<<
@@ -5448,7 +5459,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":43
* bottom = start-1
* top = end
* done = 0 # <<<<<<<<<<<<<<
@@ -5457,7 +5468,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":44
* top = end
* done = 0
* while not done: # <<<<<<<<<<<<<<
@@ -5468,7 +5479,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_t_3 = ((!(__pyx_v_done != 0)) != 0);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":45
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":45
* done = 0
* while not done:
* while not done: # <<<<<<<<<<<<<<
@@ -5479,7 +5490,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_t_3 = ((!(__pyx_v_done != 0)) != 0);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":46
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":46
* while not done:
* while not done:
* bottom += 1 # <<<<<<<<<<<<<<
@@ -5492,7 +5503,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":47
* while not done:
* bottom += 1
* if bottom == top: # <<<<<<<<<<<<<<
@@ -5504,7 +5515,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":48
* bottom += 1
* if bottom == top:
* done = 1 # <<<<<<<<<<<<<<
@@ -5513,7 +5524,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":49
* if bottom == top:
* done = 1
* break # <<<<<<<<<<<<<<
@@ -5525,7 +5536,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":50
* done = 1
* break
* if self.arr[bottom] > pivot: # <<<<<<<<<<<<<<
@@ -5541,7 +5552,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":51
* break
* if self.arr[bottom] > pivot:
* self.arr[top] = self.arr[bottom] # <<<<<<<<<<<<<<
@@ -5552,7 +5563,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":52
* if self.arr[bottom] > pivot:
* self.arr[top] = self.arr[bottom]
* break # <<<<<<<<<<<<<<
@@ -5566,7 +5577,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":53
* self.arr[top] = self.arr[bottom]
* break
* while not done: # <<<<<<<<<<<<<<
@@ -5577,7 +5588,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_t_3 = ((!(__pyx_v_done != 0)) != 0);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":54
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":54
* break
* while not done:
* top -= 1 # <<<<<<<<<<<<<<
@@ -5590,7 +5601,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":55
* while not done:
* top -= 1
* if top == bottom: # <<<<<<<<<<<<<<
@@ -5602,7 +5613,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":56
* top -= 1
* if top == bottom:
* done = 1 # <<<<<<<<<<<<<<
@@ -5611,7 +5622,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":57
* if top == bottom:
* done = 1
* break # <<<<<<<<<<<<<<
@@ -5623,7 +5634,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":58
* done = 1
* break
* if self.arr[top] < pivot: # <<<<<<<<<<<<<<
@@ -5639,7 +5650,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":59
* break
* if self.arr[top] < pivot:
* self.arr[bottom] = self.arr[top] # <<<<<<<<<<<<<<
@@ -5650,7 +5661,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":60
* if self.arr[top] < pivot:
* self.arr[bottom] = self.arr[top]
* break # <<<<<<<<<<<<<<
@@ -5665,7 +5676,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":61
* self.arr[bottom] = self.arr[top]
* break
* self.arr[top] = pivot # <<<<<<<<<<<<<<
@@ -5676,7 +5687,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":62
* break
* self.arr[top] = pivot
* return top # <<<<<<<<<<<<<<
@@ -5693,7 +5704,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.IntList.partition", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.partition", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_pivot);
@@ -5705,8 +5716,8 @@ static PyObject *__pyx_pf_3_sa_7IntList_6partition(struct __pyx_obj_3_sa_IntList
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_9_doquicksort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_9_doquicksort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_9_doquicksort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_9_doquicksort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_start = 0;
PyObject *__pyx_v_end = 0;
int __pyx_lineno = 0;
@@ -5754,16 +5765,16 @@ static PyObject *__pyx_pw_3_sa_7IntList_9_doquicksort(PyObject *__pyx_v_self, Py
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("_doquicksort", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.IntList._doquicksort", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList._doquicksort", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_7IntList_8_doquicksort(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self), __pyx_v_start, __pyx_v_end);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self), __pyx_v_start, __pyx_v_end);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":64
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":64
* return top
*
* def _doquicksort(self,start,end): # <<<<<<<<<<<<<<
@@ -5771,7 +5782,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_9_doquicksort(PyObject *__pyx_v_self, Py
* split = self.partition(start,end)
*/
-static PyObject *__pyx_pf_3_sa_7IntList_8_doquicksort(struct __pyx_obj_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end) {
PyObject *__pyx_v_split = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -5784,7 +5795,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":65
*
* def _doquicksort(self,start,end):
* if start < end: # <<<<<<<<<<<<<<
@@ -5796,7 +5807,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":66
* def _doquicksort(self,start,end):
* if start < end:
* split = self.partition(start,end) # <<<<<<<<<<<<<<
@@ -5820,7 +5831,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":67
* if start < end:
* split = self.partition(start,end)
* self._doquicksort(start,split-1) # <<<<<<<<<<<<<<
@@ -5845,7 +5856,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":68
* split = self.partition(start,end)
* self._doquicksort(start,split-1)
* self._doquicksort(split+1,end) # <<<<<<<<<<<<<<
@@ -5873,7 +5884,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":70
* self._doquicksort(split+1,end)
* else:
* return # <<<<<<<<<<<<<<
@@ -5892,7 +5903,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_8_doquicksort(struct __pyx_obj_3_sa_IntL
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.IntList._doquicksort", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList._doquicksort", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_split);
@@ -5902,17 +5913,17 @@ static PyObject *__pyx_pf_3_sa_7IntList_8_doquicksort(struct __pyx_obj_3_sa_IntL
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_11sort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_11sort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_11sort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_11sort(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sort (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7IntList_10sort(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_10sort(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":72
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":72
* return
*
* def sort(self): # <<<<<<<<<<<<<<
@@ -5920,7 +5931,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_11sort(PyObject *__pyx_v_self, CYTHON_UN
*
*/
-static PyObject *__pyx_pf_3_sa_7IntList_10sort(struct __pyx_obj_3_sa_IntList *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_10sort(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -5931,7 +5942,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":73
*
* def sort(self):
* self._doquicksort(0,self.len-1) # <<<<<<<<<<<<<<
@@ -5962,7 +5973,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_10sort(struct __pyx_obj_3_sa_IntList *__
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.IntList.sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -5971,17 +5982,17 @@ static PyObject *__pyx_pf_3_sa_7IntList_10sort(struct __pyx_obj_3_sa_IntList *__
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reset (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7IntList_12reset(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_12reset(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":75
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":75
* self._doquicksort(0,self.len-1)
*
* def reset(self): # <<<<<<<<<<<<<<
@@ -5989,12 +6000,12 @@ static PyObject *__pyx_pw_3_sa_7IntList_13reset(PyObject *__pyx_v_self, CYTHON_U
*
*/
-static PyObject *__pyx_pf_3_sa_7IntList_12reset(struct __pyx_obj_3_sa_IntList *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_12reset(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reset", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":76
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":76
*
* def reset(self):
* self.len = 0 # <<<<<<<<<<<<<<
@@ -6010,15 +6021,15 @@ static PyObject *__pyx_pf_3_sa_7IntList_12reset(struct __pyx_obj_3_sa_IntList *_
}
/* Python wrapper */
-static void __pyx_pw_3_sa_7IntList_15__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_3_sa_7IntList_15__dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pw_4cdec_2sa_3_sa_7IntList_15__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_4cdec_2sa_3_sa_7IntList_15__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_pf_3_sa_7IntList_14__dealloc__(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self));
+ __pyx_pf_4cdec_2sa_3_sa_7IntList_14__dealloc__(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":78
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":78
* self.len = 0
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -6026,11 +6037,11 @@ static void __pyx_pw_3_sa_7IntList_15__dealloc__(PyObject *__pyx_v_self) {
*
*/
-static void __pyx_pf_3_sa_7IntList_14__dealloc__(struct __pyx_obj_3_sa_IntList *__pyx_v_self) {
+static void __pyx_pf_4cdec_2sa_3_sa_7IntList_14__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":79
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":79
*
* def __dealloc__(self):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -6041,20 +6052,20 @@ static void __pyx_pf_3_sa_7IntList_14__dealloc__(struct __pyx_obj_3_sa_IntList *
__Pyx_RefNannyFinishContext();
}
-static PyObject *__pyx_gb_3_sa_7IntList_18generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_17__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_17__iter__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_17__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_17__iter__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7IntList_16__iter__(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_16__iter__(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":81
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":81
* free(self.arr)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -6062,15 +6073,15 @@ static PyObject *__pyx_pw_3_sa_7IntList_17__iter__(PyObject *__pyx_v_self) {
* for i in range(self.len):
*/
-static PyObject *__pyx_pf_3_sa_7IntList_16__iter__(struct __pyx_obj_3_sa_IntList *__pyx_v_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_16__iter__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____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____iter__ *)__pyx_tp_new_3_sa___pyx_scope_struct____iter__(__pyx_ptype_3_sa___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct____iter__(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -6080,7 +6091,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_16__iter__(struct __pyx_obj_3_sa_IntList
__Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
__Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
{
- __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_7IntList_18generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_7IntList_18generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -6089,7 +6100,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_16__iter__(struct __pyx_obj_3_sa_IntList
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.IntList.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -6098,9 +6109,9 @@ static PyObject *__pyx_pf_3_sa_7IntList_16__iter__(struct __pyx_obj_3_sa_IntList
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_7IntList_18generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
int __pyx_t_1;
int __pyx_t_2;
@@ -6120,7 +6131,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":83
* def __iter__(self):
* cdef int i
* for i in range(self.len): # <<<<<<<<<<<<<<
@@ -6131,7 +6142,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":84
* cdef int i
* for i in range(self.len):
* yield self.arr[i] # <<<<<<<<<<<<<<
@@ -6168,17 +6179,17 @@ static PyObject *__pyx_gb_3_sa_7IntList_18generator(__pyx_GeneratorObject *__pyx
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_20__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_20__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_20__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_20__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7IntList_19__getitem__(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self), ((PyObject *)__pyx_v_index));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self), ((PyObject *)__pyx_v_index));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":86
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":86
* yield self.arr[i]
*
* def __getitem__(self, index): # <<<<<<<<<<<<<<
@@ -6186,7 +6197,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_20__getitem__(PyObject *__pyx_v_self, Py
* if isinstance(index, int):
*/
-static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_index) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_index) {
int __pyx_v_i;
int __pyx_v_j;
int __pyx_v_k;
@@ -6208,7 +6219,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":88
* def __getitem__(self, index):
* cdef int i, j, k
* if isinstance(index, int): # <<<<<<<<<<<<<<
@@ -6219,7 +6230,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":89
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":89
* cdef int i, j, k
* if isinstance(index, int):
* j = index # <<<<<<<<<<<<<<
@@ -6229,7 +6240,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":90
* if isinstance(index, int):
* j = index
* if j < 0: # <<<<<<<<<<<<<<
@@ -6239,7 +6250,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_2 = ((__pyx_v_j < 0) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":91
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":91
* j = index
* if j < 0:
* j = self.len + j # <<<<<<<<<<<<<<
@@ -6251,7 +6262,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":92
* if j < 0:
* j = self.len + j
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -6267,7 +6278,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
}
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":93
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":93
* j = self.len + j
* if j<0 or j>=self.len:
* raise IndexError("Requested index %d of %d-length IntList" % (index, self.len)) # <<<<<<<<<<<<<<
@@ -6302,7 +6313,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":94
* if j<0 or j>=self.len:
* raise IndexError("Requested index %d of %d-length IntList" % (index, self.len))
* return self.arr[j] # <<<<<<<<<<<<<<
@@ -6318,7 +6329,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":95
* raise IndexError("Requested index %d of %d-length IntList" % (index, self.len))
* return self.arr[j]
* elif isinstance(index, slice): # <<<<<<<<<<<<<<
@@ -6329,7 +6340,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_2 = (__pyx_t_4 != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":96
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":96
* return self.arr[j]
* elif isinstance(index, slice):
* i = index.start # <<<<<<<<<<<<<<
@@ -6342,7 +6353,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_i = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":97
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":97
* elif isinstance(index, slice):
* i = index.start
* j = index.stop # <<<<<<<<<<<<<<
@@ -6355,7 +6366,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_j = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":98
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":98
* i = index.start
* j = index.stop
* if i < 0: # <<<<<<<<<<<<<<
@@ -6365,7 +6376,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_2 = ((__pyx_v_i < 0) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":99
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":99
* j = index.stop
* if i < 0:
* i = self.len + i # <<<<<<<<<<<<<<
@@ -6377,7 +6388,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":100
* if i < 0:
* i = self.len + i
* if j < 0: # <<<<<<<<<<<<<<
@@ -6387,7 +6398,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__pyx_t_2 = ((__pyx_v_j < 0) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":101
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":101
* i = self.len + i
* if j < 0:
* j = self.len + j # <<<<<<<<<<<<<<
@@ -6399,7 +6410,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":102
* if j < 0:
* j = self.len + j
* if i < 0 or i >= self.len or j < 0 or j > self.len: # <<<<<<<<<<<<<<
@@ -6427,7 +6438,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
}
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":103
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":103
* j = self.len + j
* if i < 0 or i >= self.len or j < 0 or j > self.len:
* raise IndexError("Requested index %d:%d of %d-length IntList" % (index.start, index.stop, self.len)) # <<<<<<<<<<<<<<
@@ -6469,7 +6480,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":104
* if i < 0 or i >= self.len or j < 0 or j > self.len:
* raise IndexError("Requested index %d:%d of %d-length IntList" % (index.start, index.stop, self.len))
* result = () # <<<<<<<<<<<<<<
@@ -6479,7 +6490,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":105
* raise IndexError("Requested index %d:%d of %d-length IntList" % (index.start, index.stop, self.len))
* result = ()
* for k from i <= k < j: # <<<<<<<<<<<<<<
@@ -6489,7 +6500,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":106
* result = ()
* for k from i <= k < j:
* result = result + (self.arr[k],) # <<<<<<<<<<<<<<
@@ -6511,7 +6522,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":107
* for k from i <= k < j:
* result = result + (self.arr[k],)
* return result # <<<<<<<<<<<<<<
@@ -6526,7 +6537,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":109
* return result
* else:
* raise TypeError("Illegal key type %s for IntList" % type(index)) # <<<<<<<<<<<<<<
@@ -6556,7 +6567,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("_sa.IntList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
@@ -6565,7 +6576,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":111
* raise TypeError("Illegal key type %s for IntList" % type(index))
*
* cdef void set(self, int i, int val): # <<<<<<<<<<<<<<
@@ -6573,7 +6584,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_19__getitem__(struct __pyx_obj_3_sa_IntL
* if i<0:
*/
-static void __pyx_f_3_sa_7IntList_set(struct __pyx_obj_3_sa_IntList *__pyx_v_self, int __pyx_v_i, int __pyx_v_val) {
+static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, int __pyx_v_i, int __pyx_v_val) {
int __pyx_v_j;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -6587,7 +6598,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":112
*
* cdef void set(self, int i, int val):
* j = i # <<<<<<<<<<<<<<
@@ -6596,7 +6607,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":113
* cdef void set(self, int i, int val):
* j = i
* if i<0: # <<<<<<<<<<<<<<
@@ -6606,7 +6617,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":114
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":114
* j = i
* if i<0:
* j = self.len + i # <<<<<<<<<<<<<<
@@ -6618,7 +6629,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":115
* if i<0:
* j = self.len + i
* if j<0 or j>=self.len: # <<<<<<<<<<<<<<
@@ -6634,7 +6645,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":116
* j = self.len + i
* if j<0 or j>=self.len:
* raise IndexError("Requested index %d of %d-length IntList" % (i, self.len)) # <<<<<<<<<<<<<<
@@ -6671,7 +6682,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":117
* if j<0 or j>=self.len:
* raise IndexError("Requested index %d of %d-length IntList" % (i, self.len))
* self.arr[j] = val # <<<<<<<<<<<<<<
@@ -6685,23 +6696,23 @@ static void __pyx_f_3_sa_7IntList_set(struct __pyx_obj_3_sa_IntList *__pyx_v_sel
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_WriteUnraisable("_sa.IntList.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.IntList.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static int __pyx_pw_3_sa_7IntList_22__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val); /*proto*/
-static int __pyx_pw_3_sa_7IntList_22__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val) {
+static int __pyx_pw_4cdec_2sa_3_sa_7IntList_22__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_7IntList_22__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7IntList_21__setitem__(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self), ((PyObject *)__pyx_v_i), ((PyObject *)__pyx_v_val));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_21__setitem__(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self), ((PyObject *)__pyx_v_i), ((PyObject *)__pyx_v_val));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":119
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":119
* self.arr[j] = val
*
* def __setitem__(self, i, val): # <<<<<<<<<<<<<<
@@ -6709,7 +6720,7 @@ static int __pyx_pw_3_sa_7IntList_22__setitem__(PyObject *__pyx_v_self, PyObject
*
*/
-static int __pyx_pf_3_sa_7IntList_21__setitem__(struct __pyx_obj_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val) {
+static int __pyx_pf_4cdec_2sa_3_sa_7IntList_21__setitem__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_val) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -6719,7 +6730,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":120
*
* def __setitem__(self, i, val):
* self.set(i, val) # <<<<<<<<<<<<<<
@@ -6728,12 +6739,12 @@ static int __pyx_pf_3_sa_7IntList_21__setitem__(struct __pyx_obj_3_sa_IntList *_
*/
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_v_val); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->set(__pyx_v_self, __pyx_t_1, __pyx_t_2);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->set(__pyx_v_self, __pyx_t_1, __pyx_t_2);
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.IntList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -6741,17 +6752,17 @@ static int __pyx_pf_3_sa_7IntList_21__setitem__(struct __pyx_obj_3_sa_IntList *_
}
/* Python wrapper */
-static Py_ssize_t __pyx_pw_3_sa_7IntList_24__len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_pw_3_sa_7IntList_24__len__(PyObject *__pyx_v_self) {
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_7IntList_24__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_7IntList_24__len__(PyObject *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7IntList_23__len__(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_23__len__(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":122
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":122
* self.set(i, val)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -6759,12 +6770,12 @@ static Py_ssize_t __pyx_pw_3_sa_7IntList_24__len__(PyObject *__pyx_v_self) {
*
*/
-static Py_ssize_t __pyx_pf_3_sa_7IntList_23__len__(struct __pyx_obj_3_sa_IntList *__pyx_v_self) {
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_7IntList_23__len__(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":123
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":123
*
* def __len__(self):
* return self.len # <<<<<<<<<<<<<<
@@ -6781,17 +6792,17 @@ static Py_ssize_t __pyx_pf_3_sa_7IntList_23__len__(struct __pyx_obj_3_sa_IntList
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_26get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_26get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_26get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_26get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_size (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7IntList_25get_size(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_25get_size(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":125
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":125
* return self.len
*
* def get_size(self): # <<<<<<<<<<<<<<
@@ -6799,7 +6810,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_26get_size(PyObject *__pyx_v_self, CYTHO
*
*/
-static PyObject *__pyx_pf_3_sa_7IntList_25get_size(struct __pyx_obj_3_sa_IntList *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_25get_size(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -6808,7 +6819,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":126
*
* def get_size(self):
* return self.size # <<<<<<<<<<<<<<
@@ -6826,7 +6837,7 @@ static PyObject *__pyx_pf_3_sa_7IntList_25get_size(struct __pyx_obj_3_sa_IntList
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.IntList.get_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.get_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -6835,8 +6846,8 @@ static PyObject *__pyx_pf_3_sa_7IntList_25get_size(struct __pyx_obj_3_sa_IntList
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_28append(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_28append(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_28append(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_28append(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
int __pyx_v_val;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -6849,16 +6860,16 @@ static PyObject *__pyx_pw_3_sa_7IntList_28append(PyObject *__pyx_v_self, PyObjec
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.IntList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_7IntList_27append(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self), ((int)__pyx_v_val));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_27append(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self), ((int)__pyx_v_val));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":128
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":128
* return self.size
*
* def append(self, int val): # <<<<<<<<<<<<<<
@@ -6866,19 +6877,19 @@ static PyObject *__pyx_pw_3_sa_7IntList_28append(PyObject *__pyx_v_self, PyObjec
*
*/
-static PyObject *__pyx_pf_3_sa_7IntList_27append(struct __pyx_obj_3_sa_IntList *__pyx_v_self, int __pyx_v_val) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_27append(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, int __pyx_v_val) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("append", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":129
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":129
*
* def append(self, int val):
* self._append(val) # <<<<<<<<<<<<<<
*
* cdef void _append(self, int val):
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_val);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_val);
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
__Pyx_XGIVEREF(__pyx_r);
@@ -6886,7 +6897,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":131
* self._append(val)
*
* cdef void _append(self, int val): # <<<<<<<<<<<<<<
@@ -6894,12 +6905,12 @@ static PyObject *__pyx_pf_3_sa_7IntList_27append(struct __pyx_obj_3_sa_IntList *
* self.size = self.size + self.increment
*/
-static void __pyx_f_3_sa_7IntList__append(struct __pyx_obj_3_sa_IntList *__pyx_v_self, int __pyx_v_val) {
+static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, int __pyx_v_val) {
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("_append", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":132
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":132
*
* cdef void _append(self, int val):
* if self.len == self.size: # <<<<<<<<<<<<<<
@@ -6909,7 +6920,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":133
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":133
* cdef void _append(self, int val):
* if self.len == self.size:
* self.size = self.size + self.increment # <<<<<<<<<<<<<<
@@ -6918,7 +6929,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -6930,7 +6941,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -6939,7 +6950,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -6952,17 +6963,17 @@ static void __pyx_f_3_sa_7IntList__append(struct __pyx_obj_3_sa_IntList *__pyx_v
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_30extend(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_30extend(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_30extend(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_30extend(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("extend (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7IntList_29extend(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self), ((PyObject *)__pyx_v_other));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_29extend(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self), ((PyObject *)__pyx_v_other));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":138
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":138
* self.len = self.len + 1
*
* def extend(self, other): # <<<<<<<<<<<<<<
@@ -6970,7 +6981,7 @@ static PyObject *__pyx_pw_3_sa_7IntList_30extend(PyObject *__pyx_v_self, PyObjec
*
*/
-static PyObject *__pyx_pf_3_sa_7IntList_29extend(struct __pyx_obj_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_other) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_29extend(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
@@ -6978,20 +6989,20 @@ 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/mdenkows/cdec/python/cdec/sa/int_list.pxi":139
*
* def extend(self, other):
* self._extend(other) # <<<<<<<<<<<<<<
*
* cdef void _extend(self, IntList other):
*/
- if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_extend(__pyx_v_self, ((struct __pyx_obj_3_sa_IntList *)__pyx_v_other));
+ if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_extend(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_other));
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.IntList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -6999,7 +7010,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":141
* self._extend(other)
*
* cdef void _extend(self, IntList other): # <<<<<<<<<<<<<<
@@ -7007,23 +7018,23 @@ static PyObject *__pyx_pf_3_sa_7IntList_29extend(struct __pyx_obj_3_sa_IntList *
*
*/
-static void __pyx_f_3_sa_7IntList__extend(struct __pyx_obj_3_sa_IntList *__pyx_v_self, struct __pyx_obj_3_sa_IntList *__pyx_v_other) {
+static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_other) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_extend", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":142
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":142
*
* cdef void _extend(self, IntList other):
* self._extend_arr(other.arr, other.len) # <<<<<<<<<<<<<<
*
* cdef void _extend_arr(self, int* other, int other_len):
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_extend_arr(__pyx_v_self, __pyx_v_other->arr, __pyx_v_other->len);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_extend_arr(__pyx_v_self, __pyx_v_other->arr, __pyx_v_other->len);
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":144
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":144
* self._extend_arr(other.arr, other.len)
*
* cdef void _extend_arr(self, int* other, int other_len): # <<<<<<<<<<<<<<
@@ -7031,12 +7042,12 @@ static void __pyx_f_3_sa_7IntList__extend(struct __pyx_obj_3_sa_IntList *__pyx_v
* self.size = self.len + other_len
*/
-static void __pyx_f_3_sa_7IntList__extend_arr(struct __pyx_obj_3_sa_IntList *__pyx_v_self, int *__pyx_v_other, int __pyx_v_other_len) {
+static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, int *__pyx_v_other, int __pyx_v_other_len) {
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("_extend_arr", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":145
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":145
*
* cdef void _extend_arr(self, int* other, int other_len):
* if self.size < self.len + other_len: # <<<<<<<<<<<<<<
@@ -7046,7 +7057,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)) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":146
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":146
* cdef void _extend_arr(self, int* other, int other_len):
* if self.size < self.len + other_len:
* self.size = self.len + other_len # <<<<<<<<<<<<<<
@@ -7055,7 +7066,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -7067,7 +7078,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -7076,7 +7087,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -7088,7 +7099,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":151
* self.len = self.len + other_len
*
* cdef void _clear(self): # <<<<<<<<<<<<<<
@@ -7096,11 +7107,11 @@ static void __pyx_f_3_sa_7IntList__extend_arr(struct __pyx_obj_3_sa_IntList *__p
* self.len = 0
*/
-static void __pyx_f_3_sa_7IntList__clear(struct __pyx_obj_3_sa_IntList *__pyx_v_self) {
+static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_clear", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":152
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":152
*
* cdef void _clear(self):
* free(self.arr) # <<<<<<<<<<<<<<
@@ -7109,7 +7120,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":153
* cdef void _clear(self):
* free(self.arr)
* self.len = 0 # <<<<<<<<<<<<<<
@@ -7118,7 +7129,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":154
* free(self.arr)
* self.len = 0
* self.size = 0 # <<<<<<<<<<<<<<
@@ -7127,7 +7138,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":155
* self.len = 0
* self.size = 0
* self.arr = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -7139,7 +7150,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":157
* self.arr = <int*> malloc(0)
*
* cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -7147,11 +7158,11 @@ static void __pyx_f_3_sa_7IntList__clear(struct __pyx_obj_3_sa_IntList *__pyx_v_
* fwrite(self.arr, sizeof(int), self.len, f)
*/
-static void __pyx_f_3_sa_7IntList_write_handle(struct __pyx_obj_3_sa_IntList *__pyx_v_self, FILE *__pyx_v_f) {
+static void __pyx_f_4cdec_2sa_3_sa_7IntList_write_handle(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, FILE *__pyx_v_f) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":158
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":158
*
* cdef void write_handle(self, FILE* f):
* fwrite(&(self.len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -7160,7 +7171,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":159
* cdef void write_handle(self, FILE* f):
* fwrite(&(self.len), sizeof(int), 1, f)
* fwrite(self.arr, sizeof(int), self.len, f) # <<<<<<<<<<<<<<
@@ -7173,8 +7184,8 @@ static void __pyx_f_3_sa_7IntList_write_handle(struct __pyx_obj_3_sa_IntList *__
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_32write(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_32write(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_32write(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_32write(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -7187,16 +7198,16 @@ static PyObject *__pyx_pw_3_sa_7IntList_32write(PyObject *__pyx_v_self, PyObject
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.IntList.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_7IntList_31write(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_31write(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":161
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":161
* fwrite(self.arr, sizeof(int), self.len, f)
*
* def write(self, char* filename): # <<<<<<<<<<<<<<
@@ -7204,13 +7215,13 @@ static PyObject *__pyx_pw_3_sa_7IntList_32write(PyObject *__pyx_v_self, PyObject
* f = fopen(filename, "w")
*/
-static PyObject *__pyx_pf_3_sa_7IntList_31write(struct __pyx_obj_3_sa_IntList *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":163
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":163
* def write(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -7219,16 +7230,16 @@ 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/mdenkows/cdec/python/cdec/sa/int_list.pxi":164
* cdef FILE* f
* f = fopen(filename, "w")
* self.write_handle(f) # <<<<<<<<<<<<<<
* fclose(f)
*
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/int_list.pxi":165
* f = fopen(filename, "w")
* self.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -7243,7 +7254,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":167
* fclose(f)
*
* cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -7251,12 +7262,12 @@ static PyObject *__pyx_pf_3_sa_7IntList_31write(struct __pyx_obj_3_sa_IntList *_
* fread(&(self.len), sizeof(int), 1, f)
*/
-static void __pyx_f_3_sa_7IntList_read_handle(struct __pyx_obj_3_sa_IntList *__pyx_v_self, FILE *__pyx_v_f) {
+static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, FILE *__pyx_v_f) {
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("read_handle", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":168
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":168
*
* cdef void read_handle(self, FILE* f):
* (self.arr) # <<<<<<<<<<<<<<
@@ -7265,7 +7276,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":169
* cdef void read_handle(self, FILE* f):
* (self.arr)
* fread(&(self.len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -7274,7 +7285,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":170
* (self.arr)
* fread(&(self.len), sizeof(int), 1, f)
* self.arr = <int*> malloc(self.len * sizeof(int)) # <<<<<<<<<<<<<<
@@ -7283,7 +7294,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/mdenkows/cdec/python/cdec/sa/int_list.pxi":171
* fread(&(self.len), sizeof(int), 1, f)
* self.arr = <int*> malloc(self.len * sizeof(int))
* self.size = self.len # <<<<<<<<<<<<<<
@@ -7293,7 +7304,7 @@ static void __pyx_f_3_sa_7IntList_read_handle(struct __pyx_obj_3_sa_IntList *__p
__pyx_t_1 = __pyx_v_self->len;
__pyx_v_self->size = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":172
+ /* "/home/mdenkows/cdec/python/cdec/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) # <<<<<<<<<<<<<<
@@ -7306,8 +7317,8 @@ static void __pyx_f_3_sa_7IntList_read_handle(struct __pyx_obj_3_sa_IntList *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7IntList_34read(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_7IntList_34read(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_34read(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7IntList_34read(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -7320,16 +7331,16 @@ static PyObject *__pyx_pw_3_sa_7IntList_34read(PyObject *__pyx_v_self, PyObject
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.IntList.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.IntList.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_7IntList_33read(((struct __pyx_obj_3_sa_IntList *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7IntList_33read(((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":174
+/* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":174
* fread(self.arr, sizeof(int), self.len, f)
*
* def read(self, char* filename): # <<<<<<<<<<<<<<
@@ -7337,13 +7348,13 @@ static PyObject *__pyx_pw_3_sa_7IntList_34read(PyObject *__pyx_v_self, PyObject
* f = fopen(filename, "r")
*/
-static PyObject *__pyx_pf_3_sa_7IntList_33read(struct __pyx_obj_3_sa_IntList *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_33read(struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/int_list.pxi":176
+ /* "/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":176
* def read(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -7352,15 +7363,15 @@ 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/mdenkows/cdec/python/cdec/sa/int_list.pxi":177
* cdef FILE* f
* f = fopen(filename, "r")
* self.read_handle(f) # <<<<<<<<<<<<<<
* fclose(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/int_list.pxi":178
* f = fopen(filename, "r")
* self.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -7374,20 +7385,20 @@ static PyObject *__pyx_pf_3_sa_7IntList_33read(struct __pyx_obj_3_sa_IntList *__
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9StringMap_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_9StringMap_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_9StringMap_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9StringMap_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
- __pyx_r = __pyx_pf_3_sa_9StringMap___cinit__(((struct __pyx_obj_3_sa_StringMap *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9StringMap___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":13
+/* "/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":13
* cdef int index(self, char *s)
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -7395,12 +7406,12 @@ static int __pyx_pw_3_sa_9StringMap_1__cinit__(PyObject *__pyx_v_self, PyObject
*
*/
-static int __pyx_pf_3_sa_9StringMap___cinit__(struct __pyx_obj_3_sa_StringMap *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_9StringMap___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_StringMap *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":14
+ /* "/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":14
*
* def __cinit__(self):
* self.vocab = stringmap_new() # <<<<<<<<<<<<<<
@@ -7415,15 +7426,15 @@ static int __pyx_pf_3_sa_9StringMap___cinit__(struct __pyx_obj_3_sa_StringMap *_
}
/* Python wrapper */
-static void __pyx_pw_3_sa_9StringMap_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_3_sa_9StringMap_3__dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pw_4cdec_2sa_3_sa_9StringMap_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_4cdec_2sa_3_sa_9StringMap_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_pf_3_sa_9StringMap_2__dealloc__(((struct __pyx_obj_3_sa_StringMap *)__pyx_v_self));
+ __pyx_pf_4cdec_2sa_3_sa_9StringMap_2__dealloc__(((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":16
+/* "/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":16
* self.vocab = stringmap_new()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -7431,11 +7442,11 @@ static void __pyx_pw_3_sa_9StringMap_3__dealloc__(PyObject *__pyx_v_self) {
*
*/
-static void __pyx_pf_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_3_sa_StringMap *__pyx_v_self) {
+static void __pyx_pf_4cdec_2sa_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_StringMap *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":17
+ /* "/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":17
*
* def __dealloc__(self):
* stringmap_delete(self.vocab) # <<<<<<<<<<<<<<
@@ -7447,7 +7458,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/mdenkows/cdec/python/cdec/sa/str_map.pxi":19
* stringmap_delete(self.vocab)
*
* cdef char *word(self, int i): # <<<<<<<<<<<<<<
@@ -7455,12 +7466,12 @@ static void __pyx_pf_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_3_sa_StringMa
*
*/
-static char *__pyx_f_3_sa_9StringMap_word(struct __pyx_obj_3_sa_StringMap *__pyx_v_self, int __pyx_v_i) {
+static char *__pyx_f_4cdec_2sa_3_sa_9StringMap_word(struct __pyx_obj_4cdec_2sa_3_sa_StringMap *__pyx_v_self, int __pyx_v_i) {
char *__pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("word", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":20
+ /* "/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":20
*
* cdef char *word(self, int i):
* return stringmap_word(self.vocab, i) # <<<<<<<<<<<<<<
@@ -7476,19 +7487,19 @@ 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/mdenkows/cdec/python/cdec/sa/str_map.pxi":22
* return stringmap_word(self.vocab, i)
*
* cdef int index(self, char *s): # <<<<<<<<<<<<<<
* return stringmap_index(self.vocab, s)
*/
-static int __pyx_f_3_sa_9StringMap_index(struct __pyx_obj_3_sa_StringMap *__pyx_v_self, char *__pyx_v_s) {
+static int __pyx_f_4cdec_2sa_3_sa_9StringMap_index(struct __pyx_obj_4cdec_2sa_3_sa_StringMap *__pyx_v_self, char *__pyx_v_s) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("index", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/str_map.pxi":23
+ /* "/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":23
*
* cdef int index(self, char *s):
* return stringmap_index(self.vocab, s) # <<<<<<<<<<<<<<
@@ -7503,8 +7514,8 @@ static int __pyx_f_3_sa_9StringMap_index(struct __pyx_obj_3_sa_StringMap *__pyx_
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_from_binary = 0;
PyObject *__pyx_v_from_text = 0;
PyObject *__pyx_v_side = 0;
@@ -7519,7 +7530,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":17
* cdef bint use_sent_id
*
* def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False): # <<<<<<<<<<<<<<
@@ -7589,16 +7600,16 @@ static int __pyx_pw_3_sa_9DataArray_1__cinit__(PyObject *__pyx_v_self, PyObject
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.DataArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9DataArray___cinit__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), __pyx_v_from_binary, __pyx_v_from_text, __pyx_v_side, __pyx_v_use_sent_id);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), __pyx_v_from_binary, __pyx_v_from_text, __pyx_v_side, __pyx_v_use_sent_id);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text, PyObject *__pyx_v_side, int __pyx_v_use_sent_id) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text, PyObject *__pyx_v_side, int __pyx_v_use_sent_id) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -7611,7 +7622,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":18
*
* def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False):
* self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1} # <<<<<<<<<<<<<<
@@ -7628,7 +7639,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":19
* def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False):
* self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1}
* self.id2word = ["END_OF_FILE", "END_OF_LINE"] # <<<<<<<<<<<<<<
@@ -7649,52 +7660,52 @@ 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/mdenkows/cdec/python/cdec/sa/data_array.pxi":20
* self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1}
* self.id2word = ["END_OF_FILE", "END_OF_LINE"]
* self.data = IntList(1000,1000) # <<<<<<<<<<<<<<
* self.sent_id = IntList(1000,1000)
* self.sent_index = IntList(1000,1000)
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->data);
__Pyx_DECREF(((PyObject *)__pyx_v_self->data));
- __pyx_v_self->data = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->data = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":21
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":21
* self.id2word = ["END_OF_FILE", "END_OF_LINE"]
* self.data = IntList(1000,1000)
* self.sent_id = IntList(1000,1000) # <<<<<<<<<<<<<<
* self.sent_index = IntList(1000,1000)
* self.use_sent_id = use_sent_id
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->sent_id);
__Pyx_DECREF(((PyObject *)__pyx_v_self->sent_id));
- __pyx_v_self->sent_id = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->sent_id = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":22
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":22
* self.data = IntList(1000,1000)
* self.sent_id = IntList(1000,1000)
* self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<<
* self.use_sent_id = use_sent_id
* if from_binary:
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->sent_index);
__Pyx_DECREF(((PyObject *)__pyx_v_self->sent_index));
- __pyx_v_self->sent_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":23
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":23
* self.sent_id = IntList(1000,1000)
* self.sent_index = IntList(1000,1000)
* self.use_sent_id = use_sent_id # <<<<<<<<<<<<<<
@@ -7703,7 +7714,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":24
* self.sent_index = IntList(1000,1000)
* self.use_sent_id = use_sent_id
* if from_binary: # <<<<<<<<<<<<<<
@@ -7713,7 +7724,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":25
* self.use_sent_id = use_sent_id
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -7735,7 +7746,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":26
* if from_binary:
* self.read_binary(from_binary)
* elif from_text: # <<<<<<<<<<<<<<
@@ -7745,7 +7756,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":27
* self.read_binary(from_binary)
* elif from_text:
* if side: # <<<<<<<<<<<<<<
@@ -7755,7 +7766,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":28
* elif from_text:
* if side:
* self.read_bitext(from_text, (0 if side == 'source' else 1)) # <<<<<<<<<<<<<<
@@ -7791,7 +7802,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":30
* self.read_bitext(from_text, (0 if side == 'source' else 1))
* else:
* self.read_text(from_text) # <<<<<<<<<<<<<<
@@ -7822,7 +7833,7 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.DataArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -7830,17 +7841,17 @@ static int __pyx_pf_3_sa_9DataArray___cinit__(struct __pyx_obj_3_sa_DataArray *_
}
/* Python wrapper */
-static Py_ssize_t __pyx_pw_3_sa_9DataArray_3__len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_pw_3_sa_9DataArray_3__len__(PyObject *__pyx_v_self) {
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_9DataArray_3__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_9DataArray_3__len__(PyObject *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_2__len__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_2__len__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":32
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":32
* self.read_text(from_text)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -7848,7 +7859,7 @@ static Py_ssize_t __pyx_pw_3_sa_9DataArray_3__len__(PyObject *__pyx_v_self) {
*
*/
-static Py_ssize_t __pyx_pf_3_sa_9DataArray_2__len__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9DataArray_2__len__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -7858,7 +7869,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":33
*
* def __len__(self):
* return len(self.data) # <<<<<<<<<<<<<<
@@ -7876,7 +7887,7 @@ static Py_ssize_t __pyx_pf_3_sa_9DataArray_2__len__(struct __pyx_obj_3_sa_DataAr
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.DataArray.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -7884,17 +7895,17 @@ static Py_ssize_t __pyx_pf_3_sa_9DataArray_2__len__(struct __pyx_obj_3_sa_DataAr
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_5get_sentence_id(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_5get_sentence_id(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_5get_sentence_id(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_5get_sentence_id(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_sentence_id (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_4get_sentence_id(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_4get_sentence_id(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":35
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":35
* return len(self.data)
*
* def get_sentence_id(self, i): # <<<<<<<<<<<<<<
@@ -7902,7 +7913,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_5get_sentence_id(PyObject *__pyx_v_sel
*
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_4get_sentence_id(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_4get_sentence_id(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
@@ -7912,7 +7923,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":36
*
* def get_sentence_id(self, i):
* return self.sent_id.arr[i] # <<<<<<<<<<<<<<
@@ -7931,7 +7942,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_4get_sentence_id(struct __pyx_obj_3_sa
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.DataArray.get_sentence_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.get_sentence_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -7940,17 +7951,17 @@ static PyObject *__pyx_pf_3_sa_9DataArray_4get_sentence_id(struct __pyx_obj_3_sa
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_7get_sentence(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_7get_sentence(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_7get_sentence(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_7get_sentence(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_sentence (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_6get_sentence(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":38
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":38
* return self.sent_id.arr[i]
*
* def get_sentence(self, i): # <<<<<<<<<<<<<<
@@ -7958,7 +7969,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_7get_sentence(PyObject *__pyx_v_self,
* sent = []
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_i) {
int __pyx_v_start;
int __pyx_v_stop;
PyObject *__pyx_v_sent = NULL;
@@ -7975,7 +7986,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":40
* def get_sentence(self, i):
* cdef int j, start, stop
* sent = [] # <<<<<<<<<<<<<<
@@ -7987,7 +7998,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_Da
__pyx_v_sent = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":41
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":41
* cdef int j, start, stop
* sent = []
* start = self.sent_index.arr[i] # <<<<<<<<<<<<<<
@@ -7997,7 +8008,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":42
* sent = []
* start = self.sent_index.arr[i]
* stop = self.sent_index.arr[i+1] # <<<<<<<<<<<<<<
@@ -8010,7 +8021,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":43
* start = self.sent_index.arr[i]
* stop = self.sent_index.arr[i+1]
* for i from start <= i < stop: # <<<<<<<<<<<<<<
@@ -8025,7 +8036,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":44
* stop = self.sent_index.arr[i+1]
* for i from start <= i < stop:
* sent.append(self.id2word[self.data.arr[i]]) # <<<<<<<<<<<<<<
@@ -8040,7 +8051,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":43
* start = self.sent_index.arr[i]
* stop = self.sent_index.arr[i+1]
* for i from start <= i < stop: # <<<<<<<<<<<<<<
@@ -8053,7 +8064,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":45
* for i from start <= i < stop:
* sent.append(self.id2word[self.data.arr[i]])
* return sent # <<<<<<<<<<<<<<
@@ -8069,7 +8080,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_Da
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.DataArray.get_sentence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.get_sentence", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_sent);
@@ -8080,17 +8091,17 @@ static PyObject *__pyx_pf_3_sa_9DataArray_6get_sentence(struct __pyx_obj_3_sa_Da
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_9get_id(PyObject *__pyx_v_self, PyObject *__pyx_v_word); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_9get_id(PyObject *__pyx_v_self, PyObject *__pyx_v_word) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_9get_id(PyObject *__pyx_v_self, PyObject *__pyx_v_word); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_9get_id(PyObject *__pyx_v_self, PyObject *__pyx_v_word) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_id (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_8get_id(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_word));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_word));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":47
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":47
* return sent
*
* def get_id(self, word): # <<<<<<<<<<<<<<
@@ -8098,7 +8109,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_9get_id(PyObject *__pyx_v_self, PyObje
* self.word2id[word] = len(self.id2word)
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_8get_id(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_word) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_word) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -8110,7 +8121,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":48
*
* def get_id(self, word):
* if not word in self.word2id: # <<<<<<<<<<<<<<
@@ -8121,7 +8132,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_8get_id(struct __pyx_obj_3_sa_DataArra
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":49
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":49
* def get_id(self, word):
* if not word in self.word2id:
* self.word2id[word] = len(self.id2word) # <<<<<<<<<<<<<<
@@ -8137,7 +8148,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":50
* if not word in self.word2id:
* self.word2id[word] = len(self.id2word)
* self.id2word.append(word) # <<<<<<<<<<<<<<
@@ -8151,7 +8162,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":51
* self.word2id[word] = len(self.id2word)
* self.id2word.append(word)
* return self.word2id[word] # <<<<<<<<<<<<<<
@@ -8169,7 +8180,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_8get_id(struct __pyx_obj_3_sa_DataArra
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.DataArray.get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -8178,17 +8189,17 @@ static PyObject *__pyx_pf_3_sa_9DataArray_8get_id(struct __pyx_obj_3_sa_DataArra
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_loc); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_loc) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_loc); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_loc) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_10__getitem__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_loc));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_10__getitem__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_loc));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":53
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":53
* return self.word2id[word]
*
* def __getitem__(self, loc): # <<<<<<<<<<<<<<
@@ -8196,7 +8207,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_11__getitem__(PyObject *__pyx_v_self,
*
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_10__getitem__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_loc) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_10__getitem__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_loc) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
@@ -8206,7 +8217,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":54
*
* def __getitem__(self, loc):
* return self.id2word[self.data.arr[loc]] # <<<<<<<<<<<<<<
@@ -8225,7 +8236,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_10__getitem__(struct __pyx_obj_3_sa_Da
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.DataArray.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -8234,17 +8245,17 @@ static PyObject *__pyx_pf_3_sa_9DataArray_10__getitem__(struct __pyx_obj_3_sa_Da
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_13get_sentence_bounds(PyObject *__pyx_v_self, PyObject *__pyx_v_loc); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_13get_sentence_bounds(PyObject *__pyx_v_self, PyObject *__pyx_v_loc) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_13get_sentence_bounds(PyObject *__pyx_v_self, PyObject *__pyx_v_loc); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_13get_sentence_bounds(PyObject *__pyx_v_self, PyObject *__pyx_v_loc) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_sentence_bounds (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_12get_sentence_bounds(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_loc));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_loc));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":56
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":56
* return self.id2word[self.data.arr[loc]]
*
* def get_sentence_bounds(self, loc): # <<<<<<<<<<<<<<
@@ -8252,7 +8263,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_13get_sentence_bounds(PyObject *__pyx_
* return (self.sent_index.arr[sid], self.sent_index.arr[sid+1])
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_loc) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_loc) {
int __pyx_v_sid;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -8265,7 +8276,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":57
*
* def get_sentence_bounds(self, loc):
* cdef int sid = self.sent_id.arr[loc] # <<<<<<<<<<<<<<
@@ -8275,7 +8286,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":58
* def get_sentence_bounds(self, loc):
* cdef int sid = self.sent_id.arr[loc]
* return (self.sent_index.arr[sid], self.sent_index.arr[sid+1]) # <<<<<<<<<<<<<<
@@ -8305,7 +8316,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_obj
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.DataArray.get_sentence_bounds", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.get_sentence_bounds", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -8314,8 +8325,8 @@ static PyObject *__pyx_pf_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_obj
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_15write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_15write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_15write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_15write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -8328,16 +8339,16 @@ static PyObject *__pyx_pw_3_sa_9DataArray_15write_text(PyObject *__pyx_v_self, P
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.DataArray.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9DataArray_14write_text(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":60
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":60
* return (self.sent_index.arr[sid], self.sent_index.arr[sid+1])
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -8345,7 +8356,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_15write_text(PyObject *__pyx_v_self, P
* for w_id in self.data:
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_v_f = NULL;
PyObject *__pyx_v_w_id = NULL;
PyObject *__pyx_r = NULL;
@@ -8369,7 +8380,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":61
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -8409,7 +8420,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":62
* def write_text(self, char* filename):
* with open(filename, "w") as f:
* for w_id in self.data: # <<<<<<<<<<<<<<
@@ -8454,7 +8465,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":63
* with open(filename, "w") as f:
* for w_id in self.data:
* if w_id > 1: # <<<<<<<<<<<<<<
@@ -8466,7 +8477,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":64
* for w_id in self.data:
* if w_id > 1:
* f.write("%s " % self.get_word(w_id)) # <<<<<<<<<<<<<<
@@ -8503,7 +8514,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":65
* if w_id > 1:
* f.write("%s " % self.get_word(w_id))
* if w_id == 1: # <<<<<<<<<<<<<<
@@ -8515,7 +8526,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":66
* f.write("%s " % self.get_word(w_id))
* if w_id == 1:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -8545,7 +8556,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":61
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -8553,7 +8564,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
* if w_id > 1:
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.DataArray.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_12, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_12);
@@ -8633,7 +8644,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
- __Pyx_AddTraceback("_sa.DataArray.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_f);
@@ -8644,8 +8655,8 @@ static PyObject *__pyx_pf_3_sa_9DataArray_14write_text(struct __pyx_obj_3_sa_Dat
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_17read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_17read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_17read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_17read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -8658,16 +8669,16 @@ static PyObject *__pyx_pw_3_sa_9DataArray_17read_text(PyObject *__pyx_v_self, Py
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.DataArray.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9DataArray_16read_text(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":68
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":68
* f.write("\n")
*
* def read_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -8675,7 +8686,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_17read_text(PyObject *__pyx_v_self, Py
* self.read_text_data(fp)
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_16read_text(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_v_fp = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -8695,7 +8706,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":69
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -8735,7 +8746,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":70
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp:
* self.read_text_data(fp) # <<<<<<<<<<<<<<
@@ -8764,7 +8775,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":69
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -8772,7 +8783,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_16read_text(struct __pyx_obj_3_sa_Data
*
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.DataArray.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_t_2);
@@ -8851,7 +8862,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_16read_text(struct __pyx_obj_3_sa_Data
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_AddTraceback("_sa.DataArray.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_fp);
@@ -8861,8 +8872,8 @@ static PyObject *__pyx_pf_3_sa_9DataArray_16read_text(struct __pyx_obj_3_sa_Data
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_19read_bitext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_19read_bitext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_19read_bitext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_19read_bitext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
char *__pyx_v_filename;
int __pyx_v_side;
int __pyx_lineno = 0;
@@ -8910,17 +8921,17 @@ static PyObject *__pyx_pw_3_sa_9DataArray_19read_bitext(PyObject *__pyx_v_self,
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("read_bitext", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.DataArray.read_bitext", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.read_bitext", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9DataArray_18read_bitext(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), __pyx_v_filename, __pyx_v_side);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), __pyx_v_filename, __pyx_v_side);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_9DataArray_11read_bitext_2generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/data_array.pxi":74
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
@@ -8928,25 +8939,25 @@ static PyObject *__pyx_gb_3_sa_9DataArray_11read_bitext_2generator6(__pyx_Genera
*
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_11read_bitext_genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_11read_bitext_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_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_2_genexpr *)__pyx_tp_new_3_sa___pyx_scope_struct_2_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_2_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_1_read_bitext *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *) __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_9DataArray_11read_bitext_2generator6, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_9DataArray_11read_bitext_2generator6, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -8955,7 +8966,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_11read_bitext_genexpr(PyObject *__pyx_
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.DataArray.read_bitext.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.read_bitext.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -8964,9 +8975,9 @@ static PyObject *__pyx_pf_3_sa_9DataArray_11read_bitext_genexpr(PyObject *__pyx_
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_9DataArray_11read_bitext_2generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_9DataArray_11read_bitext_2generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -9070,7 +9081,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":72
* self.read_text_data(fp)
*
* def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<<
@@ -9078,8 +9089,8 @@ static PyObject *__pyx_gb_3_sa_9DataArray_11read_bitext_2generator6(__pyx_Genera
* data = (line.split(' ||| ')[side] for line in fp)
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_18read_bitext(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename, int __pyx_v_side) {
- struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename, int __pyx_v_side) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *__pyx_cur_scope;
PyObject *__pyx_v_data = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -9098,7 +9109,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_18read_bitext(struct __pyx_obj_3_sa_Da
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_bitext", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *)__pyx_tp_new_3_sa___pyx_scope_struct_1_read_bitext(__pyx_ptype_3_sa___pyx_scope_struct_1_read_bitext, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -9106,7 +9117,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":73
*
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -9147,19 +9158,19 @@ 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/mdenkows/cdec/python/cdec/sa/data_array.pxi":74
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
* self.read_text_data(data)
*
*/
- __pyx_t_1 = __pyx_pf_3_sa_9DataArray_11read_bitext_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_9DataArray_11read_bitext_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_data = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":75
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":75
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp)
* self.read_text_data(data) # <<<<<<<<<<<<<<
@@ -9188,7 +9199,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":73
*
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -9196,7 +9207,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_18read_bitext(struct __pyx_obj_3_sa_Da
* self.read_text_data(data)
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.DataArray.read_bitext", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.read_bitext", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_t_2);
@@ -9275,7 +9286,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_18read_bitext(struct __pyx_obj_3_sa_Da
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_AddTraceback("_sa.DataArray.read_bitext", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.read_bitext", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_data);
@@ -9286,17 +9297,17 @@ static PyObject *__pyx_pf_3_sa_9DataArray_18read_bitext(struct __pyx_obj_3_sa_Da
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_21read_text_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_21read_text_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_21read_text_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_21read_text_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_text_data (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_20read_text_data(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_data));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_data));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":77
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":77
* self.read_text_data(data)
*
* def read_text_data(self, data): # <<<<<<<<<<<<<<
@@ -9304,7 +9315,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_21read_text_data(PyObject *__pyx_v_sel
* for line_num, line in enumerate(data):
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_data) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_data) {
int __pyx_v_word_count;
PyObject *__pyx_v_line_num = NULL;
PyObject *__pyx_v_line = NULL;
@@ -9327,7 +9338,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":78
*
* def read_text_data(self, data):
* cdef int word_count = 0 # <<<<<<<<<<<<<<
@@ -9336,7 +9347,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":79
* def read_text_data(self, data):
* cdef int word_count = 0
* for line_num, line in enumerate(data): # <<<<<<<<<<<<<<
@@ -9391,7 +9402,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":80
* cdef int word_count = 0
* for line_num, line in enumerate(data):
* self.sent_index.append(word_count) # <<<<<<<<<<<<<<
@@ -9405,7 +9416,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":81
* for line_num, line in enumerate(data):
* self.sent_index.append(word_count)
* for word in line.split(): # <<<<<<<<<<<<<<
@@ -9456,7 +9467,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":82
* self.sent_index.append(word_count)
* for word in line.split():
* self.data.append(self.get_id(word)) # <<<<<<<<<<<<<<
@@ -9479,7 +9490,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":83
* for word in line.split():
* self.data.append(self.get_id(word))
* if self.use_sent_id: # <<<<<<<<<<<<<<
@@ -9489,7 +9500,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
__pyx_t_11 = (__pyx_v_self->use_sent_id != 0);
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":84
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":84
* self.data.append(self.get_id(word))
* if self.use_sent_id:
* self.sent_id.append(line_num) # <<<<<<<<<<<<<<
@@ -9503,7 +9514,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":85
* if self.use_sent_id:
* self.sent_id.append(line_num)
* word_count = word_count + 1 # <<<<<<<<<<<<<<
@@ -9514,7 +9525,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":86
* self.sent_id.append(line_num)
* word_count = word_count + 1
* self.data.append(1) # <<<<<<<<<<<<<<
@@ -9525,7 +9536,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":87
* word_count = word_count + 1
* self.data.append(1)
* if self.use_sent_id: # <<<<<<<<<<<<<<
@@ -9535,7 +9546,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
__pyx_t_11 = (__pyx_v_self->use_sent_id != 0);
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":88
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":88
* self.data.append(1)
* if self.use_sent_id:
* self.sent_id.append(line_num) # <<<<<<<<<<<<<<
@@ -9549,7 +9560,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":89
* if self.use_sent_id:
* self.sent_id.append(line_num)
* word_count = word_count + 1 # <<<<<<<<<<<<<<
@@ -9561,7 +9572,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":90
* self.sent_id.append(line_num)
* word_count = word_count + 1
* self.data.append(0) # <<<<<<<<<<<<<<
@@ -9572,7 +9583,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":91
* word_count = word_count + 1
* self.data.append(0)
* self.sent_index.append(word_count) # <<<<<<<<<<<<<<
@@ -9595,7 +9606,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("_sa.DataArray.read_text_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.read_text_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_line_num);
@@ -9607,8 +9618,8 @@ static PyObject *__pyx_pf_3_sa_9DataArray_20read_text_data(struct __pyx_obj_3_sa
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_23read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_23read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_23read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_23read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -9621,16 +9632,16 @@ static PyObject *__pyx_pw_3_sa_9DataArray_23read_binary(PyObject *__pyx_v_self,
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.DataArray.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9DataArray_22read_binary(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":94
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":94
*
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -9638,13 +9649,13 @@ static PyObject *__pyx_pw_3_sa_9DataArray_23read_binary(PyObject *__pyx_v_self,
* f = fopen(filename, "r")
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_22read_binary(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":96
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":96
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -9653,16 +9664,16 @@ 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/mdenkows/cdec/python/cdec/sa/data_array.pxi":97
* cdef FILE* f
* f = fopen(filename, "r")
* self.read_handle(f) # <<<<<<<<<<<<<<
* fclose(f)
*
*/
- ((struct __pyx_vtabstruct_3_sa_DataArray *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/data_array.pxi":98
* f = fopen(filename, "r")
* self.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -9677,7 +9688,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":100
* fclose(f)
*
* cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -9685,7 +9696,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_22read_binary(struct __pyx_obj_3_sa_Da
* cdef unsigned i
*/
-static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, FILE *__pyx_v_f) {
+static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, FILE *__pyx_v_f) {
int __pyx_v_num_words;
int __pyx_v_word_len;
CYTHON_UNUSED unsigned int __pyx_v_i;
@@ -9702,34 +9713,34 @@ 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/mdenkows/cdec/python/cdec/sa/data_array.pxi":105
* cdef char* word
*
* self.data.read_handle(f) # <<<<<<<<<<<<<<
* self.sent_index.read_handle(f)
* self.sent_id.read_handle(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->data->__pyx_vtab)->read_handle(__pyx_v_self->data, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/data_array.pxi":106
*
* self.data.read_handle(f)
* self.sent_index.read_handle(f) # <<<<<<<<<<<<<<
* self.sent_id.read_handle(f)
* fread(&(num_words), sizeof(int), 1, f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->read_handle(__pyx_v_self->sent_index, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->read_handle(__pyx_v_self->sent_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":107
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":107
* self.data.read_handle(f)
* self.sent_index.read_handle(f)
* self.sent_id.read_handle(f) # <<<<<<<<<<<<<<
* fread(&(num_words), sizeof(int), 1, f)
* for i in range(num_words):
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_id->__pyx_vtab)->read_handle(__pyx_v_self->sent_id, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_id->__pyx_vtab)->read_handle(__pyx_v_self->sent_id, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":108
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":108
* self.sent_index.read_handle(f)
* self.sent_id.read_handle(f)
* fread(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -9738,7 +9749,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":109
* self.sent_id.read_handle(f)
* fread(&(num_words), sizeof(int), 1, f)
* for i in range(num_words): # <<<<<<<<<<<<<<
@@ -9749,7 +9760,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":110
* fread(&(num_words), sizeof(int), 1, f)
* for i in range(num_words):
* fread(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -9758,7 +9769,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -9767,7 +9778,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/mdenkows/cdec/python/cdec/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) # <<<<<<<<<<<<<<
@@ -9776,7 +9787,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/mdenkows/cdec/python/cdec/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) # <<<<<<<<<<<<<<
@@ -9795,7 +9806,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":114
* fread(word, sizeof(char), word_len, f)
* self.word2id[word] = len(self.id2word)
* self.id2word.append(word) # <<<<<<<<<<<<<<
@@ -9809,7 +9820,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":115
* self.word2id[word] = len(self.id2word)
* self.id2word.append(word)
* free(word) # <<<<<<<<<<<<<<
@@ -9819,7 +9830,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":116
* self.id2word.append(word)
* free(word)
* if len(self.sent_id) == 0: # <<<<<<<<<<<<<<
@@ -9833,7 +9844,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
__pyx_t_6 = ((__pyx_t_4 == 0) != 0);
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":117
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":117
* free(word)
* if len(self.sent_id) == 0:
* self.use_sent_id = False # <<<<<<<<<<<<<<
@@ -9845,7 +9856,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":119
* self.use_sent_id = False
* else:
* self.use_sent_id = True # <<<<<<<<<<<<<<
@@ -9860,12 +9871,12 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_WriteUnraisable("_sa.DataArray.read_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.DataArray.read_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":121
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":121
* self.use_sent_id = True
*
* cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<<
@@ -9873,7 +9884,7 @@ static void __pyx_f_3_sa_9DataArray_read_handle(struct __pyx_obj_3_sa_DataArray
* cdef int num_words
*/
-static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, FILE *__pyx_v_f) {
+static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, FILE *__pyx_v_f) {
int __pyx_v_word_len;
int __pyx_v_num_words;
PyObject *__pyx_v_word = NULL;
@@ -9889,34 +9900,34 @@ 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/mdenkows/cdec/python/cdec/sa/data_array.pxi":125
* cdef int num_words
*
* self.data.write_handle(f) # <<<<<<<<<<<<<<
* self.sent_index.write_handle(f)
* self.sent_id.write_handle(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->data->__pyx_vtab)->write_handle(__pyx_v_self->data, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/data_array.pxi":126
*
* self.data.write_handle(f)
* self.sent_index.write_handle(f) # <<<<<<<<<<<<<<
* self.sent_id.write_handle(f)
* num_words = len(self.id2word) - 2
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->write_handle(__pyx_v_self->sent_index, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->write_handle(__pyx_v_self->sent_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":127
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":127
* self.data.write_handle(f)
* self.sent_index.write_handle(f)
* self.sent_id.write_handle(f) # <<<<<<<<<<<<<<
* num_words = len(self.id2word) - 2
* fwrite(&(num_words), sizeof(int), 1, f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_id->__pyx_vtab)->write_handle(__pyx_v_self->sent_id, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_id->__pyx_vtab)->write_handle(__pyx_v_self->sent_id, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":128
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":128
* self.sent_index.write_handle(f)
* self.sent_id.write_handle(f)
* num_words = len(self.id2word) - 2 # <<<<<<<<<<<<<<
@@ -9929,7 +9940,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":129
* self.sent_id.write_handle(f)
* num_words = len(self.id2word) - 2
* fwrite(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -9938,7 +9949,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":130
* num_words = len(self.id2word) - 2
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in self.id2word[2:]: # <<<<<<<<<<<<<<
@@ -9986,7 +9997,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":131
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in self.id2word[2:]:
* word_len = len(word) + 1 # <<<<<<<<<<<<<<
@@ -9996,7 +10007,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":132
* for word in self.id2word[2:]:
* word_len = len(word) + 1
* fwrite(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -10005,7 +10016,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/mdenkows/cdec/python/cdec/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) # <<<<<<<<<<<<<<
@@ -10021,15 +10032,15 @@ static void __pyx_f_3_sa_9DataArray_write_handle(struct __pyx_obj_3_sa_DataArray
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_WriteUnraisable("_sa.DataArray.write_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.DataArray.write_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_word);
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_25write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_25write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_25write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_25write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -10042,16 +10053,16 @@ static PyObject *__pyx_pw_3_sa_9DataArray_25write_binary(PyObject *__pyx_v_self,
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.DataArray.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9DataArray_24write_binary(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":135
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":135
* fwrite(<char *>word, sizeof(char), word_len, f)
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -10059,13 +10070,13 @@ static PyObject *__pyx_pw_3_sa_9DataArray_25write_binary(PyObject *__pyx_v_self,
* f = fopen(filename, "w")
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_24write_binary(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":137
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":137
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -10074,16 +10085,16 @@ 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/mdenkows/cdec/python/cdec/sa/data_array.pxi":138
* cdef FILE* f
* f = fopen(filename, "w")
* self.write_handle(f) # <<<<<<<<<<<<<<
* fclose(f)
*
*/
- ((struct __pyx_vtabstruct_3_sa_DataArray *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/data_array.pxi":139
* f = fopen(filename, "w")
* self.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -10099,17 +10110,17 @@ static PyObject *__pyx_pf_3_sa_9DataArray_24write_binary(struct __pyx_obj_3_sa_D
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_27write_enhanced_handle(PyObject *__pyx_v_self, PyObject *__pyx_v_f); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_27write_enhanced_handle(PyObject *__pyx_v_self, PyObject *__pyx_v_f) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_27write_enhanced_handle(PyObject *__pyx_v_self, PyObject *__pyx_v_f); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_27write_enhanced_handle(PyObject *__pyx_v_self, PyObject *__pyx_v_f) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_enhanced_handle (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_26write_enhanced_handle(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_f));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_f));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":141
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":141
* fclose(f)
*
* def write_enhanced_handle(self, f): # <<<<<<<<<<<<<<
@@ -10117,7 +10128,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_27write_enhanced_handle(PyObject *__py
* f.write("%d " %i)
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_f) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_f) {
PyObject *__pyx_v_i = NULL;
PyObject *__pyx_v_word = NULL;
PyObject *__pyx_r = NULL;
@@ -10133,7 +10144,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":142
*
* def write_enhanced_handle(self, f):
* for i in self.data: # <<<<<<<<<<<<<<
@@ -10178,7 +10189,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":143
* def write_enhanced_handle(self, f):
* for i in self.data:
* f.write("%d " %i) # <<<<<<<<<<<<<<
@@ -10202,7 +10213,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":144
* for i in self.data:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -10216,7 +10227,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":145
* f.write("%d " %i)
* f.write("\n")
* for i in self.sent_index: # <<<<<<<<<<<<<<
@@ -10261,7 +10272,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":146
* f.write("\n")
* for i in self.sent_index:
* f.write("%d " %i) # <<<<<<<<<<<<<<
@@ -10285,7 +10296,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":147
* for i in self.sent_index:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -10299,7 +10310,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":148
* f.write("%d " %i)
* f.write("\n")
* for i in self.sent_id: # <<<<<<<<<<<<<<
@@ -10344,7 +10355,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":149
* f.write("\n")
* for i in self.sent_id:
* f.write("%d " %i) # <<<<<<<<<<<<<<
@@ -10368,7 +10379,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":150
* for i in self.sent_id:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -10382,7 +10393,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":151
* f.write("%d " %i)
* f.write("\n")
* for word in self.id2word: # <<<<<<<<<<<<<<
@@ -10427,7 +10438,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":152
* f.write("\n")
* for word in self.id2word:
* f.write("%s %d " % (word, self.word2id[word])) # <<<<<<<<<<<<<<
@@ -10462,7 +10473,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":153
* for word in self.id2word:
* f.write("%s %d " % (word, self.word2id[word]))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -10483,7 +10494,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("_sa.DataArray.write_enhanced_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.write_enhanced_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_i);
@@ -10494,8 +10505,8 @@ static PyObject *__pyx_pf_3_sa_9DataArray_26write_enhanced_handle(struct __pyx_o
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_29write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_29write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_29write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_29write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -10508,16 +10519,16 @@ static PyObject *__pyx_pw_3_sa_9DataArray_29write_enhanced(PyObject *__pyx_v_sel
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.DataArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9DataArray_28write_enhanced(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":155
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":155
* f.write("\n")
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -10525,7 +10536,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_29write_enhanced(PyObject *__pyx_v_sel
* self.write_enhanced_handle(self, f)
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_28write_enhanced(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_v_f = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -10545,7 +10556,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":156
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -10584,7 +10595,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":157
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* self.write_enhanced_handle(self, f) # <<<<<<<<<<<<<<
@@ -10614,14 +10625,14 @@ 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/mdenkows/cdec/python/cdec/sa/data_array.pxi":156
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
* self.write_enhanced_handle(self, f)
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.DataArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_t_1);
@@ -10700,7 +10711,7 @@ static PyObject *__pyx_pf_3_sa_9DataArray_28write_enhanced(struct __pyx_obj_3_sa
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_AddTraceback("_sa.DataArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_f);
@@ -10710,17 +10721,17 @@ static PyObject *__pyx_pf_3_sa_9DataArray_28write_enhanced(struct __pyx_obj_3_sa
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_7word2id_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_7word2id_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_7word2id_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_7word2id_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_7word2id___get__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id___get__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":10
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":10
*
* cdef class DataArray:
* cdef public word2id # <<<<<<<<<<<<<<
@@ -10728,7 +10739,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_7word2id_1__get__(PyObject *__pyx_v_se
* cdef public IntList data
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_7word2id___get__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id___get__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -10745,17 +10756,17 @@ static PyObject *__pyx_pf_3_sa_9DataArray_7word2id___get__(struct __pyx_obj_3_sa
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_7word2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_7word2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7word2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7word2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_7word2id_2__set__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray_7word2id_2__set__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
@@ -10771,17 +10782,17 @@ static int __pyx_pf_3_sa_9DataArray_7word2id_2__set__(struct __pyx_obj_3_sa_Data
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_7word2id_5__del__(PyObject *__pyx_v_self); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_7word2id_5__del__(PyObject *__pyx_v_self) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7word2id_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7word2id_5__del__(PyObject *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_7word2id_4__del__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray_7word2id_4__del__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
@@ -10797,17 +10808,17 @@ static int __pyx_pf_3_sa_9DataArray_7word2id_4__del__(struct __pyx_obj_3_sa_Data
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_7id2word_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_7id2word_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_7id2word_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_7id2word_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_7id2word___get__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word___get__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":11
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":11
* cdef class DataArray:
* cdef public word2id
* cdef public id2word # <<<<<<<<<<<<<<
@@ -10815,7 +10826,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_7id2word_1__get__(PyObject *__pyx_v_se
* cdef public IntList sent_id
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_7id2word___get__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word___get__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -10832,17 +10843,17 @@ static PyObject *__pyx_pf_3_sa_9DataArray_7id2word___get__(struct __pyx_obj_3_sa
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_7id2word_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_7id2word_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7id2word_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7id2word_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_7id2word_2__set__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray_7id2word_2__set__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
@@ -10858,17 +10869,17 @@ static int __pyx_pf_3_sa_9DataArray_7id2word_2__set__(struct __pyx_obj_3_sa_Data
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_7id2word_5__del__(PyObject *__pyx_v_self); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_7id2word_5__del__(PyObject *__pyx_v_self) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7id2word_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7id2word_5__del__(PyObject *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_7id2word_4__del__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray_7id2word_4__del__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
@@ -10884,17 +10895,17 @@ static int __pyx_pf_3_sa_9DataArray_7id2word_4__del__(struct __pyx_obj_3_sa_Data
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_4data_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_4data_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_4data___get__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_4data___get__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":12
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":12
* cdef public word2id
* cdef public id2word
* cdef public IntList data # <<<<<<<<<<<<<<
@@ -10902,7 +10913,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_4data_1__get__(PyObject *__pyx_v_self)
* cdef public IntList sent_index
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_4data___get__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_4data___get__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -10919,34 +10930,34 @@ static PyObject *__pyx_pf_3_sa_9DataArray_4data___get__(struct __pyx_obj_3_sa_Da
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_4data_2__set__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_4data_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray_4data_2__set__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_4data_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__set__", 0);
- if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
__Pyx_GOTREF(__pyx_v_self->data);
__Pyx_DECREF(((PyObject *)__pyx_v_self->data));
- __pyx_v_self->data = ((struct __pyx_obj_3_sa_IntList *)__pyx_v_value);
+ __pyx_v_self->data = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_value);
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.DataArray.data.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.data.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -10954,17 +10965,17 @@ static int __pyx_pf_3_sa_9DataArray_4data_2__set__(struct __pyx_obj_3_sa_DataArr
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_4data_5__del__(PyObject *__pyx_v_self) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_4data_5__del__(PyObject *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_4data_4__del__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_4data_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray_4data_4__del__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_4data_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
@@ -10972,7 +10983,7 @@ static int __pyx_pf_3_sa_9DataArray_4data_4__del__(struct __pyx_obj_3_sa_DataArr
__Pyx_GIVEREF(Py_None);
__Pyx_GOTREF(__pyx_v_self->data);
__Pyx_DECREF(((PyObject *)__pyx_v_self->data));
- __pyx_v_self->data = ((struct __pyx_obj_3_sa_IntList *)Py_None);
+ __pyx_v_self->data = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None);
__pyx_r = 0;
__Pyx_RefNannyFinishContext();
@@ -10980,17 +10991,17 @@ static int __pyx_pf_3_sa_9DataArray_4data_4__del__(struct __pyx_obj_3_sa_DataArr
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_7sent_id_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_7sent_id_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_7sent_id_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_7sent_id_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_7sent_id___get__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id___get__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":13
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":13
* cdef public id2word
* cdef public IntList data
* cdef public IntList sent_id # <<<<<<<<<<<<<<
@@ -10998,7 +11009,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_7sent_id_1__get__(PyObject *__pyx_v_se
* cdef bint use_sent_id
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_7sent_id___get__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id___get__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -11015,34 +11026,34 @@ static PyObject *__pyx_pf_3_sa_9DataArray_7sent_id___get__(struct __pyx_obj_3_sa
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_7sent_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_7sent_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7sent_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7sent_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_7sent_id_2__set__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray_7sent_id_2__set__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__set__", 0);
- if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
__Pyx_GOTREF(__pyx_v_self->sent_id);
__Pyx_DECREF(((PyObject *)__pyx_v_self->sent_id));
- __pyx_v_self->sent_id = ((struct __pyx_obj_3_sa_IntList *)__pyx_v_value);
+ __pyx_v_self->sent_id = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_value);
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.DataArray.sent_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.sent_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -11050,17 +11061,17 @@ static int __pyx_pf_3_sa_9DataArray_7sent_id_2__set__(struct __pyx_obj_3_sa_Data
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_7sent_id_5__del__(PyObject *__pyx_v_self); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_7sent_id_5__del__(PyObject *__pyx_v_self) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7sent_id_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_7sent_id_5__del__(PyObject *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_7sent_id_4__del__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray_7sent_id_4__del__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
@@ -11068,7 +11079,7 @@ static int __pyx_pf_3_sa_9DataArray_7sent_id_4__del__(struct __pyx_obj_3_sa_Data
__Pyx_GIVEREF(Py_None);
__Pyx_GOTREF(__pyx_v_self->sent_id);
__Pyx_DECREF(((PyObject *)__pyx_v_self->sent_id));
- __pyx_v_self->sent_id = ((struct __pyx_obj_3_sa_IntList *)Py_None);
+ __pyx_v_self->sent_id = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None);
__pyx_r = 0;
__Pyx_RefNannyFinishContext();
@@ -11076,17 +11087,17 @@ static int __pyx_pf_3_sa_9DataArray_7sent_id_4__del__(struct __pyx_obj_3_sa_Data
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9DataArray_10sent_index_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_9DataArray_10sent_index_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_10sent_index_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_10sent_index_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_10sent_index___get__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_10sent_index___get__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":14
+/* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":14
* cdef public IntList data
* cdef public IntList sent_id
* cdef public IntList sent_index # <<<<<<<<<<<<<<
@@ -11094,7 +11105,7 @@ static PyObject *__pyx_pw_3_sa_9DataArray_10sent_index_1__get__(PyObject *__pyx_
*
*/
-static PyObject *__pyx_pf_3_sa_9DataArray_10sent_index___get__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_10sent_index___get__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -11111,34 +11122,34 @@ static PyObject *__pyx_pf_3_sa_9DataArray_10sent_index___get__(struct __pyx_obj_
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_10sent_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_10sent_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_10sent_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_10sent_index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_10sent_index_2__set__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_10sent_index_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray_10sent_index_2__set__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_10sent_index_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__set__", 0);
- if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
__Pyx_GOTREF(__pyx_v_self->sent_index);
__Pyx_DECREF(((PyObject *)__pyx_v_self->sent_index));
- __pyx_v_self->sent_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_v_value);
+ __pyx_v_self->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_value);
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.DataArray.sent_index.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.DataArray.sent_index.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -11146,17 +11157,17 @@ static int __pyx_pf_3_sa_9DataArray_10sent_index_2__set__(struct __pyx_obj_3_sa_
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9DataArray_10sent_index_5__del__(PyObject *__pyx_v_self); /*proto*/
-static int __pyx_pw_3_sa_9DataArray_10sent_index_5__del__(PyObject *__pyx_v_self) {
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_10sent_index_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9DataArray_10sent_index_5__del__(PyObject *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9DataArray_10sent_index_4__del__(((struct __pyx_obj_3_sa_DataArray *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9DataArray_10sent_index_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9DataArray_10sent_index_4__del__(struct __pyx_obj_3_sa_DataArray *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_10sent_index_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
@@ -11164,26 +11175,26 @@ static int __pyx_pf_3_sa_9DataArray_10sent_index_4__del__(struct __pyx_obj_3_sa_
__Pyx_GIVEREF(Py_None);
__Pyx_GOTREF(__pyx_v_self->sent_index);
__Pyx_DECREF(((PyObject *)__pyx_v_self->sent_index));
- __pyx_v_self->sent_index = ((struct __pyx_obj_3_sa_IntList *)Py_None);
+ __pyx_v_self->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None);
__pyx_r = 0;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_f_3_sa_9Alignment_link(CYTHON_UNUSED struct __pyx_obj_3_sa_Alignment *__pyx_v_self, int __pyx_v_i, int __pyx_v_j) {
+static int __pyx_f_4cdec_2sa_3_sa_9Alignment_link(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, int __pyx_v_i, int __pyx_v_j) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("link", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":16
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":16
* cdef int link(self, int i, int j):
* """Integerizes an alignment link pair"""
* return i * ALIGNMENT_CODE + j # <<<<<<<<<<<<<<
*
* def unlink(self, link):
*/
- __pyx_r = ((__pyx_v_i * __pyx_v_3_sa_ALIGNMENT_CODE) + __pyx_v_j);
+ __pyx_r = ((__pyx_v_i * __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE) + __pyx_v_j);
goto __pyx_L0;
__pyx_r = 0;
@@ -11193,18 +11204,18 @@ static int __pyx_f_3_sa_9Alignment_link(CYTHON_UNUSED struct __pyx_obj_3_sa_Alig
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9Alignment_1unlink(PyObject *__pyx_v_self, PyObject *__pyx_v_link); /*proto*/
-static char __pyx_doc_3_sa_9Alignment_unlink[] = "De-integerizes an alignment link pair";
-static PyObject *__pyx_pw_3_sa_9Alignment_1unlink(PyObject *__pyx_v_self, PyObject *__pyx_v_link) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_1unlink(PyObject *__pyx_v_self, PyObject *__pyx_v_link); /*proto*/
+static char __pyx_doc_4cdec_2sa_3_sa_9Alignment_unlink[] = "De-integerizes an alignment link pair";
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_1unlink(PyObject *__pyx_v_self, PyObject *__pyx_v_link) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("unlink (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9Alignment_unlink(((struct __pyx_obj_3_sa_Alignment *)__pyx_v_self), ((PyObject *)__pyx_v_link));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9Alignment_unlink(((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)__pyx_v_self), ((PyObject *)__pyx_v_link));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":18
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":18
* return i * ALIGNMENT_CODE + j
*
* def unlink(self, link): # <<<<<<<<<<<<<<
@@ -11212,7 +11223,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_1unlink(PyObject *__pyx_v_self, PyObje
* return (link / ALIGNMENT_CODE, link % ALIGNMENT_CODE)
*/
-static PyObject *__pyx_pf_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_obj_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_link) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_link) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -11223,7 +11234,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":20
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":20
* def unlink(self, link):
* """De-integerizes an alignment link pair"""
* return (link / ALIGNMENT_CODE, link % ALIGNMENT_CODE) # <<<<<<<<<<<<<<
@@ -11231,12 +11242,12 @@ static PyObject *__pyx_pf_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_obj_
* cdef _unlink(self, int link, int* f, int* e):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_3_sa_ALIGNMENT_CODE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_link, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromLong(__pyx_v_3_sa_ALIGNMENT_CODE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = PyNumber_Remainder(__pyx_v_link, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -11259,7 +11270,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_obj_
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.Alignment.unlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.unlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -11267,7 +11278,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":22
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":22
* return (link / ALIGNMENT_CODE, link % ALIGNMENT_CODE)
*
* cdef _unlink(self, int link, int* f, int* e): # <<<<<<<<<<<<<<
@@ -11275,7 +11286,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_obj_
* e[0] = link % ALIGNMENT_CODE
*/
-static PyObject *__pyx_f_3_sa_9Alignment__unlink(CYTHON_UNUSED struct __pyx_obj_3_sa_Alignment *__pyx_v_self, int __pyx_v_link, int *__pyx_v_f, int *__pyx_v_e) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_9Alignment__unlink(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, int __pyx_v_link, int *__pyx_v_f, int *__pyx_v_e) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
@@ -11283,14 +11294,14 @@ static PyObject *__pyx_f_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":23
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":23
*
* cdef _unlink(self, int link, int* f, int* e):
* f[0] = link / ALIGNMENT_CODE # <<<<<<<<<<<<<<
* e[0] = link % ALIGNMENT_CODE
*
*/
- if (unlikely(__pyx_v_3_sa_ALIGNMENT_CODE == 0)) {
+ if (unlikely(__pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE == 0)) {
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
#endif
@@ -11300,7 +11311,7 @@ static PyObject *__pyx_f_3_sa_9Alignment__unlink(CYTHON_UNUSED struct __pyx_obj_
#endif
{__pyx_filename = __pyx_f[4]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- else if (sizeof(int) == sizeof(long) && unlikely(__pyx_v_3_sa_ALIGNMENT_CODE == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_link))) {
+ else if (sizeof(int) == sizeof(long) && unlikely(__pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_link))) {
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
#endif
@@ -11310,16 +11321,16 @@ static PyObject *__pyx_f_3_sa_9Alignment__unlink(CYTHON_UNUSED struct __pyx_obj_
#endif
{__pyx_filename = __pyx_f[4]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- (__pyx_v_f[0]) = __Pyx_div_int(__pyx_v_link, __pyx_v_3_sa_ALIGNMENT_CODE);
+ (__pyx_v_f[0]) = __Pyx_div_int(__pyx_v_link, __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":24
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":24
* cdef _unlink(self, int link, int* f, int* e):
* f[0] = link / ALIGNMENT_CODE
* e[0] = link % ALIGNMENT_CODE # <<<<<<<<<<<<<<
*
* def get_sent_links(self, int sent_id):
*/
- if (unlikely(__pyx_v_3_sa_ALIGNMENT_CODE == 0)) {
+ if (unlikely(__pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE == 0)) {
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
#endif
@@ -11329,12 +11340,12 @@ static PyObject *__pyx_f_3_sa_9Alignment__unlink(CYTHON_UNUSED struct __pyx_obj_
#endif
{__pyx_filename = __pyx_f[4]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- (__pyx_v_e[0]) = __Pyx_mod_int(__pyx_v_link, __pyx_v_3_sa_ALIGNMENT_CODE);
+ (__pyx_v_e[0]) = __Pyx_mod_int(__pyx_v_link, __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE);
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.Alignment._unlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment._unlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -11343,8 +11354,8 @@ static PyObject *__pyx_f_3_sa_9Alignment__unlink(CYTHON_UNUSED struct __pyx_obj_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9Alignment_3get_sent_links(PyObject *__pyx_v_self, PyObject *__pyx_arg_sent_id); /*proto*/
-static PyObject *__pyx_pw_3_sa_9Alignment_3get_sent_links(PyObject *__pyx_v_self, PyObject *__pyx_arg_sent_id) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_3get_sent_links(PyObject *__pyx_v_self, PyObject *__pyx_arg_sent_id); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_3get_sent_links(PyObject *__pyx_v_self, PyObject *__pyx_arg_sent_id) {
int __pyx_v_sent_id;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -11357,16 +11368,16 @@ static PyObject *__pyx_pw_3_sa_9Alignment_3get_sent_links(PyObject *__pyx_v_self
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Alignment.get_sent_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.get_sent_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9Alignment_2get_sent_links(((struct __pyx_obj_3_sa_Alignment *)__pyx_v_self), ((int)__pyx_v_sent_id));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)__pyx_v_self), ((int)__pyx_v_sent_id));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":26
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":26
* e[0] = link % ALIGNMENT_CODE
*
* def get_sent_links(self, int sent_id): # <<<<<<<<<<<<<<
@@ -11374,8 +11385,8 @@ static PyObject *__pyx_pw_3_sa_9Alignment_3get_sent_links(PyObject *__pyx_v_self
* cdef int* arr
*/
-static PyObject *__pyx_pf_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, int __pyx_v_sent_id) {
- struct __pyx_obj_3_sa_IntList *__pyx_v_sent_links = 0;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, int __pyx_v_sent_id) {
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_sent_links = 0;
int *__pyx_v_arr;
int __pyx_v_arr_len;
PyObject *__pyx_r = NULL;
@@ -11386,37 +11397,37 @@ 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":30
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":30
* cdef int* arr
* cdef int arr_len
* sent_links = IntList() # <<<<<<<<<<<<<<
* arr = self._get_sent_links(sent_id, &arr_len)
* sent_links._extend_arr(arr, arr_len*2)
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_v_sent_links = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_sent_links = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":31
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":31
* cdef int arr_len
* sent_links = IntList()
* arr = self._get_sent_links(sent_id, &arr_len) # <<<<<<<<<<<<<<
* sent_links._extend_arr(arr, arr_len*2)
* free(arr)
*/
- __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));
+ __pyx_v_arr = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_self->__pyx_vtab)->_get_sent_links(__pyx_v_self, __pyx_v_sent_id, (&__pyx_v_arr_len));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":32
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":32
* sent_links = IntList()
* arr = self._get_sent_links(sent_id, &arr_len)
* sent_links._extend_arr(arr, arr_len*2) # <<<<<<<<<<<<<<
* free(arr)
* return sent_links
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_sent_links->__pyx_vtab)->_extend_arr(__pyx_v_sent_links, __pyx_v_arr, (__pyx_v_arr_len * 2));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":33
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":33
* arr = self._get_sent_links(sent_id, &arr_len)
* sent_links._extend_arr(arr, arr_len*2)
* free(arr) # <<<<<<<<<<<<<<
@@ -11425,7 +11436,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":34
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":34
* sent_links._extend_arr(arr, arr_len*2)
* free(arr)
* return sent_links # <<<<<<<<<<<<<<
@@ -11441,7 +11452,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_3_sa_
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.Alignment.get_sent_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.get_sent_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_sent_links);
@@ -11450,7 +11461,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":36
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":36
* return sent_links
*
* cdef int* _get_sent_links(self, int sent_id, int* num_links): # <<<<<<<<<<<<<<
@@ -11458,7 +11469,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_2get_sent_links(struct __pyx_obj_3_sa_
* cdef int i, start, end
*/
-static int *__pyx_f_3_sa_9Alignment__get_sent_links(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, int __pyx_v_sent_id, int *__pyx_v_num_links) {
+static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, int __pyx_v_sent_id, int *__pyx_v_num_links) {
int *__pyx_v_sent_links;
int __pyx_v_i;
int __pyx_v_start;
@@ -11472,7 +11483,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":39
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":39
* cdef int* sent_links
* cdef int i, start, end
* start = self.sent_index.arr[sent_id] # <<<<<<<<<<<<<<
@@ -11481,7 +11492,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":40
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":40
* cdef int i, start, end
* start = self.sent_index.arr[sent_id]
* end = self.sent_index.arr[sent_id+1] # <<<<<<<<<<<<<<
@@ -11490,7 +11501,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":41
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":41
* start = self.sent_index.arr[sent_id]
* end = self.sent_index.arr[sent_id+1]
* num_links[0] = end - start # <<<<<<<<<<<<<<
@@ -11499,7 +11510,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":42
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":42
* end = self.sent_index.arr[sent_id+1]
* num_links[0] = end - start
* sent_links = <int*> malloc(2*num_links[0]*sizeof(int)) # <<<<<<<<<<<<<<
@@ -11508,7 +11519,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":43
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":43
* num_links[0] = end - start
* sent_links = <int*> malloc(2*num_links[0]*sizeof(int))
* for i from 0 <= i < num_links[0]: # <<<<<<<<<<<<<<
@@ -11518,19 +11529,19 @@ 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":44
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":44
* 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) # <<<<<<<<<<<<<<
* return sent_links
*
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_Alignment *)__pyx_v_self->__pyx_vtab)->_unlink(__pyx_v_self, (__pyx_v_self->links->arr[(__pyx_v_start + __pyx_v_i)]), (__pyx_v_sent_links + (2 * __pyx_v_i)), ((__pyx_v_sent_links + (2 * __pyx_v_i)) + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_self->__pyx_vtab)->_unlink(__pyx_v_self, (__pyx_v_self->links->arr[(__pyx_v_start + __pyx_v_i)]), (__pyx_v_sent_links + (2 * __pyx_v_i)), ((__pyx_v_sent_links + (2 * __pyx_v_i)) + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":45
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":45
* for i from 0 <= i < num_links[0]:
* self._unlink(self.links.arr[start + i], sent_links + (2*i), sent_links + (2*i) + 1)
* return sent_links # <<<<<<<<<<<<<<
@@ -11544,7 +11555,7 @@ static int *__pyx_f_3_sa_9Alignment__get_sent_links(struct __pyx_obj_3_sa_Alignm
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_WriteUnraisable("_sa.Alignment._get_sent_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.Alignment._get_sent_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -11552,8 +11563,8 @@ static int *__pyx_f_3_sa_9Alignment__get_sent_links(struct __pyx_obj_3_sa_Alignm
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9Alignment_5__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_9Alignment_5__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_9Alignment_5__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9Alignment_5__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_from_binary = 0;
PyObject *__pyx_v_from_text = 0;
int __pyx_lineno = 0;
@@ -11566,7 +11577,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":47
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":47
* return sent_links
*
* def __cinit__(self, from_binary=None, from_text=None): # <<<<<<<<<<<<<<
@@ -11615,16 +11626,16 @@ static int __pyx_pw_3_sa_9Alignment_5__cinit__(PyObject *__pyx_v_self, PyObject
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Alignment.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9Alignment_4__cinit__(((struct __pyx_obj_3_sa_Alignment *)__pyx_v_self), __pyx_v_from_binary, __pyx_v_from_text);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)__pyx_v_self), __pyx_v_from_binary, __pyx_v_from_text);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9Alignment_4__cinit__(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text) {
+static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -11636,37 +11647,37 @@ 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":48
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":48
*
* def __cinit__(self, from_binary=None, from_text=None):
* self.links = IntList(1000,1000) # <<<<<<<<<<<<<<
* self.sent_index = IntList(1000,1000)
* if from_binary:
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->links);
__Pyx_DECREF(((PyObject *)__pyx_v_self->links));
- __pyx_v_self->links = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->links = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":49
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":49
* def __cinit__(self, from_binary=None, from_text=None):
* self.links = IntList(1000,1000)
* self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<<
* if from_binary:
* self.read_binary(from_binary)
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->sent_index);
__Pyx_DECREF(((PyObject *)__pyx_v_self->sent_index));
- __pyx_v_self->sent_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":50
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":50
* self.links = IntList(1000,1000)
* self.sent_index = IntList(1000,1000)
* if from_binary: # <<<<<<<<<<<<<<
@@ -11676,7 +11687,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 = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":51
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":51
* self.sent_index = IntList(1000,1000)
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -11698,7 +11709,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":52
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":52
* if from_binary:
* self.read_binary(from_binary)
* elif from_text: # <<<<<<<<<<<<<<
@@ -11708,7 +11719,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 = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":53
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":53
* self.read_binary(from_binary)
* elif from_text:
* self.read_text(from_text) # <<<<<<<<<<<<<<
@@ -11737,7 +11748,7 @@ static int __pyx_pf_3_sa_9Alignment_4__cinit__(struct __pyx_obj_3_sa_Alignment *
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.Alignment.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -11745,8 +11756,8 @@ static int __pyx_pf_3_sa_9Alignment_4__cinit__(struct __pyx_obj_3_sa_Alignment *
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9Alignment_7read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9Alignment_7read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_7read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_7read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -11759,16 +11770,16 @@ static PyObject *__pyx_pw_3_sa_9Alignment_7read_text(PyObject *__pyx_v_self, PyO
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Alignment.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9Alignment_6read_text(((struct __pyx_obj_3_sa_Alignment *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":55
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":55
* self.read_text(from_text)
*
* def read_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -11776,7 +11787,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_7read_text(PyObject *__pyx_v_self, PyO
* for line in f:
*/
-static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_v_f = NULL;
PyObject *__pyx_v_line = NULL;
PyObject *__pyx_v_pairs = NULL;
@@ -11810,7 +11821,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":56
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":56
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -11850,7 +11861,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":57
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":57
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f:
* for line in f: # <<<<<<<<<<<<<<
@@ -11895,7 +11906,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":58
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":58
* with gzip_or_text(filename) as f:
* for line in f:
* self.sent_index.append(len(self.links)) # <<<<<<<<<<<<<<
@@ -11913,7 +11924,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":59
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":59
* for line in f:
* self.sent_index.append(len(self.links))
* pairs = line.split() # <<<<<<<<<<<<<<
@@ -11929,7 +11940,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":60
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":60
* self.sent_index.append(len(self.links))
* pairs = line.split()
* for pair in pairs: # <<<<<<<<<<<<<<
@@ -11974,7 +11985,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":61
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":61
* pairs = line.split()
* for pair in pairs:
* (i, j) = map(int, pair.split('-')) # <<<<<<<<<<<<<<
@@ -12055,7 +12066,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":62
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":62
* for pair in pairs:
* (i, j) = map(int, pair.split('-'))
* self.links.append(self.link(i, j)) # <<<<<<<<<<<<<<
@@ -12064,7 +12075,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
*/
__pyx_t_16 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__pyx_t_17 = __Pyx_PyInt_AsInt(__pyx_v_j); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_12 = PyInt_FromLong(((struct __pyx_vtabstruct_3_sa_Alignment *)__pyx_v_self->__pyx_vtab)->link(__pyx_v_self, __pyx_t_16, __pyx_t_17)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_12 = PyInt_FromLong(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_self->__pyx_vtab)->link(__pyx_v_self, __pyx_t_16, __pyx_t_17)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_12);
__pyx_t_13 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->links), __pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_13);
@@ -12075,7 +12086,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":63
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":63
* (i, j) = map(int, pair.split('-'))
* self.links.append(self.link(i, j))
* self.sent_index.append(len(self.links)) # <<<<<<<<<<<<<<
@@ -12105,7 +12116,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":56
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":56
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -12113,7 +12124,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
* self.sent_index.append(len(self.links))
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.Alignment.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_t_1);
@@ -12194,7 +12205,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
__Pyx_XDECREF(__pyx_t_14);
- __Pyx_AddTraceback("_sa.Alignment.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_f);
@@ -12209,8 +12220,8 @@ static PyObject *__pyx_pf_3_sa_9Alignment_6read_text(struct __pyx_obj_3_sa_Align
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9Alignment_9read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9Alignment_9read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_9read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_9read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -12223,16 +12234,16 @@ static PyObject *__pyx_pw_3_sa_9Alignment_9read_binary(PyObject *__pyx_v_self, P
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Alignment.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9Alignment_8read_binary(((struct __pyx_obj_3_sa_Alignment *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":65
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":65
* self.sent_index.append(len(self.links))
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -12240,13 +12251,13 @@ static PyObject *__pyx_pw_3_sa_9Alignment_9read_binary(PyObject *__pyx_v_self, P
* f = fopen(filename, "r")
*/
-static PyObject *__pyx_pf_3_sa_9Alignment_8read_binary(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":67
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":67
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -12255,25 +12266,25 @@ 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":68
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":68
* cdef FILE* f
* f = fopen(filename, "r")
* self.links.read_handle(f) # <<<<<<<<<<<<<<
* self.sent_index.read_handle(f)
* fclose(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->links->__pyx_vtab)->read_handle(__pyx_v_self->links, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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":69
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":69
* f = fopen(filename, "r")
* self.links.read_handle(f)
* self.sent_index.read_handle(f) # <<<<<<<<<<<<<<
* fclose(f)
*
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->read_handle(__pyx_v_self->sent_index, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->read_handle(__pyx_v_self->sent_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":70
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":70
* self.links.read_handle(f)
* self.sent_index.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -12289,8 +12300,8 @@ static PyObject *__pyx_pf_3_sa_9Alignment_8read_binary(struct __pyx_obj_3_sa_Ali
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9Alignment_11write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9Alignment_11write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_11write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_11write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -12303,16 +12314,16 @@ static PyObject *__pyx_pw_3_sa_9Alignment_11write_text(PyObject *__pyx_v_self, P
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Alignment.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9Alignment_10write_text(((struct __pyx_obj_3_sa_Alignment *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":72
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":72
* fclose(f)
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -12320,7 +12331,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_11write_text(PyObject *__pyx_v_self, P
* sent_num = 0
*/
-static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_v_f = NULL;
PyObject *__pyx_v_sent_num = NULL;
PyObject *__pyx_v_i = NULL;
@@ -12347,7 +12358,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":73
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":73
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -12387,7 +12398,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":74
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":74
* def write_text(self, char* filename):
* with open(filename, "w") as f:
* sent_num = 0 # <<<<<<<<<<<<<<
@@ -12397,7 +12408,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":75
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":75
* with open(filename, "w") as f:
* sent_num = 0
* for i, link in enumerate(self.links): # <<<<<<<<<<<<<<
@@ -12452,7 +12463,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":76
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":76
* sent_num = 0
* for i, link in enumerate(self.links):
* while i >= self.sent_index[sent_num]: # <<<<<<<<<<<<<<
@@ -12468,7 +12479,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":77
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":77
* for i, link in enumerate(self.links):
* while i >= self.sent_index[sent_num]:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -12482,7 +12493,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":78
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":78
* while i >= self.sent_index[sent_num]:
* f.write("\n")
* sent_num = sent_num + 1 # <<<<<<<<<<<<<<
@@ -12496,7 +12507,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":79
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":79
* f.write("\n")
* sent_num = sent_num + 1
* f.write("%d-%d " % self.unlink(link)) # <<<<<<<<<<<<<<
@@ -12533,7 +12544,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":80
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":80
* sent_num = sent_num + 1
* f.write("%d-%d " % self.unlink(link))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -12559,7 +12570,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":73
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":73
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -12567,7 +12578,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
* for i, link in enumerate(self.links):
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.Alignment.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_4);
@@ -12648,7 +12659,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
- __Pyx_AddTraceback("_sa.Alignment.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_f);
@@ -12661,8 +12672,8 @@ static PyObject *__pyx_pf_3_sa_9Alignment_10write_text(struct __pyx_obj_3_sa_Ali
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9Alignment_13write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9Alignment_13write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_13write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_13write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -12675,16 +12686,16 @@ static PyObject *__pyx_pw_3_sa_9Alignment_13write_binary(PyObject *__pyx_v_self,
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Alignment.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9Alignment_12write_binary(((struct __pyx_obj_3_sa_Alignment *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":82
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":82
* f.write("\n")
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -12692,13 +12703,13 @@ static PyObject *__pyx_pw_3_sa_9Alignment_13write_binary(PyObject *__pyx_v_self,
* f = fopen(filename, "w")
*/
-static PyObject *__pyx_pf_3_sa_9Alignment_12write_binary(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":84
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":84
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -12707,25 +12718,25 @@ 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":85
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":85
* cdef FILE* f
* f = fopen(filename, "w")
* self.links.write_handle(f) # <<<<<<<<<<<<<<
* self.sent_index.write_handle(f)
* fclose(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->links->__pyx_vtab)->write_handle(__pyx_v_self->links, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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":86
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":86
* f = fopen(filename, "w")
* self.links.write_handle(f)
* self.sent_index.write_handle(f) # <<<<<<<<<<<<<<
* fclose(f)
*
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->write_handle(__pyx_v_self->sent_index, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->write_handle(__pyx_v_self->sent_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":87
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":87
* self.links.write_handle(f)
* self.sent_index.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -12741,8 +12752,8 @@ static PyObject *__pyx_pf_3_sa_9Alignment_12write_binary(struct __pyx_obj_3_sa_A
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9Alignment_15write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_9Alignment_15write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_15write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_15write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -12755,26 +12766,25 @@ static PyObject *__pyx_pw_3_sa_9Alignment_15write_enhanced(PyObject *__pyx_v_sel
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Alignment.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9Alignment_14write_enhanced(((struct __pyx_obj_3_sa_Alignment *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":89
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":89
* fclose(f)
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
* with open(filename, "w") as f:
- * sent_num = 1
+ * for link in self.links:
*/
-static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_v_f = NULL;
- CYTHON_UNUSED long __pyx_v_sent_num;
PyObject *__pyx_v_link = NULL;
PyObject *__pyx_v_i = NULL;
PyObject *__pyx_r = NULL;
@@ -12797,12 +12807,12 @@ 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":90
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":90
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
- * sent_num = 1
* for link in self.links:
+ * f.write("%d " % link)
*/
/*with:*/ {
__pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -12837,18 +12847,9 @@ 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":91
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":91
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
- * sent_num = 1 # <<<<<<<<<<<<<<
- * for link in self.links:
- * f.write("%d " % link)
- */
- __pyx_v_sent_num = 1;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":92
- * with open(filename, "w") as f:
- * sent_num = 1
* for link in self.links: # <<<<<<<<<<<<<<
* f.write("%d " % link)
* f.write("\n")
@@ -12857,7 +12858,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
__pyx_t_4 = ((PyObject *)__pyx_v_self->links); __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
} else {
- __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(((PyObject *)__pyx_v_self->links)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(((PyObject *)__pyx_v_self->links)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
}
@@ -12865,23 +12866,23 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_4)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
#endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_4)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
#endif
} else {
__pyx_t_1 = __pyx_t_9(__pyx_t_4);
if (unlikely(!__pyx_t_1)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ else {__pyx_filename = __pyx_f[4]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
}
break;
}
@@ -12891,23 +12892,23 @@ 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":93
- * sent_num = 1
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":92
+ * with open(filename, "w") as f:
* for link in self.links:
* f.write("%d " % link) # <<<<<<<<<<<<<<
* f.write("\n")
* for i in self.sent_index:
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s__write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), __pyx_v_link); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), __pyx_v_link); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_10);
PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_2));
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
@@ -12915,21 +12916,21 @@ 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":94
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":93
* for link in self.links:
* f.write("%d " % link)
* f.write("\n") # <<<<<<<<<<<<<<
* for i in self.sent_index:
* f.write("%d " % i)
*/
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s__write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s__write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_40), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_40), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_2);
__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":95
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":94
* f.write("%d " % link)
* f.write("\n")
* for i in self.sent_index: # <<<<<<<<<<<<<<
@@ -12940,7 +12941,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
__pyx_t_2 = ((PyObject *)__pyx_v_self->sent_index); __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
} else {
- __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->sent_index)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self->sent_index)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
@@ -12948,23 +12949,23 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
#endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_9(__pyx_t_2);
if (unlikely(!__pyx_t_4)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ else {__pyx_filename = __pyx_f[4]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
}
break;
}
@@ -12974,23 +12975,23 @@ 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":96
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":95
* f.write("\n")
* for i in self.sent_index:
* f.write("%d " % i) # <<<<<<<<<<<<<<
* f.write("\n")
*
*/
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s__write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s__write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), __pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_10 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), __pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_10));
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_10));
__Pyx_GIVEREF(((PyObject *)__pyx_t_10));
__pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
@@ -12998,16 +12999,16 @@ 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":97
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":96
* for i in self.sent_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
*
* def alignment(self, i):
*/
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s__write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s__write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
@@ -13022,15 +13023,15 @@ 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":90
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":90
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
- * sent_num = 1
* for link in self.links:
+ * f.write("%d " % link)
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.Alignment.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_GOTREF(__pyx_t_2);
@@ -13109,7 +13110,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("_sa.Alignment.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_f);
@@ -13121,18 +13122,18 @@ static PyObject *__pyx_pf_3_sa_9Alignment_14write_enhanced(struct __pyx_obj_3_sa
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9Alignment_17alignment(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static char __pyx_doc_3_sa_9Alignment_16alignment[] = "Return all (e,f) pairs for sentence i";
-static PyObject *__pyx_pw_3_sa_9Alignment_17alignment(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_17alignment(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static char __pyx_doc_4cdec_2sa_3_sa_9Alignment_16alignment[] = "Return all (e,f) pairs for sentence i";
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9Alignment_17alignment(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("alignment (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9Alignment_16alignment(((struct __pyx_obj_3_sa_Alignment *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":99
+/* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":98
* f.write("\n")
*
* def alignment(self, i): # <<<<<<<<<<<<<<
@@ -13140,7 +13141,7 @@ static PyObject *__pyx_pw_3_sa_9Alignment_17alignment(PyObject *__pyx_v_self, Py
* cdef int j, start, end
*/
-static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_self, PyObject *__pyx_v_i) {
int __pyx_v_j;
int __pyx_v_start;
int __pyx_v_end;
@@ -13158,42 +13159,42 @@ 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":102
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":101
* """Return all (e,f) pairs for sentence i"""
* cdef int j, start, end
* result = [] # <<<<<<<<<<<<<<
* start = self.sent_index.arr[i]
* end = self.sent_index.arr[i+1]
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_result = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":103
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":102
* cdef int j, start, end
* result = []
* start = self.sent_index.arr[i] # <<<<<<<<<<<<<<
* end = self.sent_index.arr[i+1]
* for j from start <= j < end:
*/
- __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 = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_start = (__pyx_v_self->sent_index->arr[__pyx_t_2]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":104
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":103
* result = []
* start = self.sent_index.arr[i]
* end = self.sent_index.arr[i+1] # <<<<<<<<<<<<<<
* for j from start <= j < end:
* result.append(self.unlink(self.links.arr[j]))
*/
- __pyx_t_1 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__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":105
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":104
* start = self.sent_index.arr[i]
* end = self.sent_index.arr[i+1]
* for j from start <= j < end: # <<<<<<<<<<<<<<
@@ -13203,30 +13204,30 @@ 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":106
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":105
* end = self.sent_index.arr[i+1]
* for j from start <= j < end:
* result.append(self.unlink(self.links.arr[j])) # <<<<<<<<<<<<<<
* return result
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__unlink); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__unlink); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyInt_FromLong((__pyx_v_self->links->arr[__pyx_v_j])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong((__pyx_v_self->links->arr[__pyx_v_j])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":107
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":106
* for j from start <= j < end:
* result.append(self.unlink(self.links.arr[j]))
* return result # <<<<<<<<<<<<<<
@@ -13242,7 +13243,7 @@ static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alig
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.Alignment.alignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alignment.alignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
@@ -13251,7 +13252,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":15
* int val
*
* cdef _node* new_node(int key): # <<<<<<<<<<<<<<
@@ -13259,22 +13260,22 @@ static PyObject *__pyx_pf_3_sa_9Alignment_16alignment(struct __pyx_obj_3_sa_Alig
* n = <_node*> malloc(sizeof(_node))
*/
-static struct __pyx_t_3_sa__node *__pyx_f_3_sa_new_node(int __pyx_v_key) {
- struct __pyx_t_3_sa__node *__pyx_v_n;
- struct __pyx_t_3_sa__node *__pyx_r;
+static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int __pyx_v_key) {
+ struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_v_n;
+ struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("new_node", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":17
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":17
* cdef _node* new_node(int key):
* cdef _node* n
* n = <_node*> malloc(sizeof(_node)) # <<<<<<<<<<<<<<
* n.smaller = NULL
* n.bigger = NULL
*/
- __pyx_v_n = ((struct __pyx_t_3_sa__node *)malloc((sizeof(struct __pyx_t_3_sa__node))));
+ __pyx_v_n = ((struct __pyx_t_4cdec_2sa_3_sa__node *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__node))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":18
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":18
* cdef _node* n
* n = <_node*> malloc(sizeof(_node))
* n.smaller = NULL # <<<<<<<<<<<<<<
@@ -13283,7 +13284,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":19
* n = <_node*> malloc(sizeof(_node))
* n.smaller = NULL
* n.bigger = NULL # <<<<<<<<<<<<<<
@@ -13292,7 +13293,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":20
* n.smaller = NULL
* n.bigger = NULL
* n.key = key # <<<<<<<<<<<<<<
@@ -13301,7 +13302,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":21
* n.bigger = NULL
* n.key = key
* n.val = 0 # <<<<<<<<<<<<<<
@@ -13310,7 +13311,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":22
* n.key = key
* n.val = 0
* return n # <<<<<<<<<<<<<<
@@ -13326,7 +13327,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":25
*
*
* cdef del_node(_node* n): # <<<<<<<<<<<<<<
@@ -13334,7 +13335,7 @@ static struct __pyx_t_3_sa__node *__pyx_f_3_sa_new_node(int __pyx_v_key) {
* del_node(n.smaller)
*/
-static PyObject *__pyx_f_3_sa_del_node(struct __pyx_t_3_sa__node *__pyx_v_n) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_v_n) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -13344,7 +13345,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":26
*
* cdef del_node(_node* n):
* if n.smaller != NULL: # <<<<<<<<<<<<<<
@@ -13354,21 +13355,21 @@ 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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":27
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":27
* cdef del_node(_node* n):
* if n.smaller != NULL:
* del_node(n.smaller) # <<<<<<<<<<<<<<
* if n.bigger != NULL:
* del_node(n.bigger)
*/
- __pyx_t_2 = __pyx_f_3_sa_del_node(__pyx_v_n->smaller); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4cdec_2sa_3_sa_del_node(__pyx_v_n->smaller); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L3;
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":28
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":28
* if n.smaller != NULL:
* del_node(n.smaller)
* if n.bigger != NULL: # <<<<<<<<<<<<<<
@@ -13378,21 +13379,21 @@ 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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":29
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":29
* del_node(n.smaller)
* if n.bigger != NULL:
* del_node(n.bigger) # <<<<<<<<<<<<<<
* free(n)
*
*/
- __pyx_t_2 = __pyx_f_3_sa_del_node(__pyx_v_n->bigger); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4cdec_2sa_3_sa_del_node(__pyx_v_n->bigger); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L4;
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":30
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":30
* if n.bigger != NULL:
* del_node(n.bigger)
* free(n) # <<<<<<<<<<<<<<
@@ -13405,7 +13406,7 @@ static PyObject *__pyx_f_3_sa_del_node(struct __pyx_t_3_sa__node *__pyx_v_n) {
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.del_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.del_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -13413,7 +13414,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":32
* free(n)
*
* cdef int* get_val(_node* n, int key): # <<<<<<<<<<<<<<
@@ -13421,13 +13422,13 @@ static PyObject *__pyx_f_3_sa_del_node(struct __pyx_t_3_sa__node *__pyx_v_n) {
* return &n.val
*/
-static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx_v_key) {
+static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_v_n, int __pyx_v_key) {
int *__pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_val", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":33
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":33
*
* cdef int* get_val(_node* n, int key):
* if key == n.key: # <<<<<<<<<<<<<<
@@ -13437,7 +13438,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":34
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":34
* cdef int* get_val(_node* n, int key):
* if key == n.key:
* return &n.val # <<<<<<<<<<<<<<
@@ -13449,7 +13450,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":35
* if key == n.key:
* return &n.val
* elif key < n.key: # <<<<<<<<<<<<<<
@@ -13459,7 +13460,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":36
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":36
* return &n.val
* elif key < n.key:
* if n.smaller == NULL: # <<<<<<<<<<<<<<
@@ -13469,16 +13470,16 @@ 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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":37
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":37
* elif key < n.key:
* if n.smaller == NULL:
* n.smaller = new_node(key) # <<<<<<<<<<<<<<
* return &(n.smaller.val)
* return get_val(n.smaller, key)
*/
- __pyx_v_n->smaller = __pyx_f_3_sa_new_node(__pyx_v_key);
+ __pyx_v_n->smaller = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_key);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":38
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":38
* if n.smaller == NULL:
* n.smaller = new_node(key)
* return &(n.smaller.val) # <<<<<<<<<<<<<<
@@ -13491,20 +13492,20 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":39
* n.smaller = new_node(key)
* return &(n.smaller.val)
* return get_val(n.smaller, key) # <<<<<<<<<<<<<<
* else:
* if n.bigger == NULL:
*/
- __pyx_r = __pyx_f_3_sa_get_val(__pyx_v_n->smaller, __pyx_v_key);
+ __pyx_r = __pyx_f_4cdec_2sa_3_sa_get_val(__pyx_v_n->smaller, __pyx_v_key);
goto __pyx_L0;
goto __pyx_L3;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":41
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":41
* return get_val(n.smaller, key)
* else:
* if n.bigger == NULL: # <<<<<<<<<<<<<<
@@ -13514,16 +13515,16 @@ 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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":42
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":42
* else:
* if n.bigger == NULL:
* n.bigger = new_node(key) # <<<<<<<<<<<<<<
* return &(n.bigger.val)
* return get_val(n.bigger, key)
*/
- __pyx_v_n->bigger = __pyx_f_3_sa_new_node(__pyx_v_key);
+ __pyx_v_n->bigger = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_key);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":43
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":43
* if n.bigger == NULL:
* n.bigger = new_node(key)
* return &(n.bigger.val) # <<<<<<<<<<<<<<
@@ -13536,14 +13537,14 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":44
* n.bigger = new_node(key)
* return &(n.bigger.val)
* return get_val(n.bigger, key) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_r = __pyx_f_3_sa_get_val(__pyx_v_n->bigger, __pyx_v_key);
+ __pyx_r = __pyx_f_4cdec_2sa_3_sa_get_val(__pyx_v_n->bigger, __pyx_v_key);
goto __pyx_L0;
}
__pyx_L3:;
@@ -13555,8 +13556,8 @@ static int *__pyx_f_3_sa_get_val(struct __pyx_t_3_sa__node *__pyx_v_n, int __pyx
}
/* Python wrapper */
-static int __pyx_pw_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_from_text = 0;
PyObject *__pyx_v_from_data = 0;
PyObject *__pyx_v_from_binary = 0;
@@ -13573,7 +13574,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":54
* cdef id2eword, id2fword, eword2id, fword2id
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<<
@@ -13584,7 +13585,7 @@ static int __pyx_pw_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__p
values[1] = __pyx_k_43;
values[2] = ((PyObject *)Py_None);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":55
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":55
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None,
* earray=None, fsarray=None, alignment=None): # <<<<<<<<<<<<<<
@@ -13666,16 +13667,16 @@ static int __pyx_pw_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__p
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.BiLex.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_5BiLex___cinit__(((struct __pyx_obj_3_sa_BiLex *)__pyx_v_self), __pyx_v_from_text, __pyx_v_from_data, __pyx_v_from_binary, __pyx_v_earray, __pyx_v_fsarray, __pyx_v_alignment);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), __pyx_v_from_text, __pyx_v_from_data, __pyx_v_from_binary, __pyx_v_earray, __pyx_v_fsarray, __pyx_v_alignment);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":54
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":54
* cdef id2eword, id2fword, eword2id, fword2id
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<<
@@ -13683,7 +13684,7 @@ static int __pyx_pw_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyObject *__p
* self.id2eword = []
*/
-static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_from_text, PyObject *__pyx_v_from_data, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_earray, PyObject *__pyx_v_fsarray, PyObject *__pyx_v_alignment) {
+static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_from_text, PyObject *__pyx_v_from_data, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_earray, PyObject *__pyx_v_fsarray, PyObject *__pyx_v_alignment) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -13695,7 +13696,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":56
* def __cinit__(self, from_text=None, from_data=False, from_binary=None,
* earray=None, fsarray=None, alignment=None):
* self.id2eword = [] # <<<<<<<<<<<<<<
@@ -13710,7 +13711,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":57
* earray=None, fsarray=None, alignment=None):
* self.id2eword = []
* self.id2fword = [] # <<<<<<<<<<<<<<
@@ -13725,7 +13726,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":58
* self.id2eword = []
* self.id2fword = []
* self.eword2id = {} # <<<<<<<<<<<<<<
@@ -13740,7 +13741,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":59
* self.id2fword = []
* self.eword2id = {}
* self.fword2id = {} # <<<<<<<<<<<<<<
@@ -13755,67 +13756,67 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":60
* self.eword2id = {}
* self.fword2id = {}
* self.e_index = IntList() # <<<<<<<<<<<<<<
* self.f_index = IntList()
* self.col1 = FloatList()
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->e_index);
__Pyx_DECREF(((PyObject *)__pyx_v_self->e_index));
- __pyx_v_self->e_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":61
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":61
* self.fword2id = {}
* self.e_index = IntList()
* self.f_index = IntList() # <<<<<<<<<<<<<<
* self.col1 = FloatList()
* self.col2 = FloatList()
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->f_index);
__Pyx_DECREF(((PyObject *)__pyx_v_self->f_index));
- __pyx_v_self->f_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":62
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":62
* self.e_index = IntList()
* self.f_index = IntList()
* self.col1 = FloatList() # <<<<<<<<<<<<<<
* self.col2 = FloatList()
* if from_binary:
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->col1);
__Pyx_DECREF(((PyObject *)__pyx_v_self->col1));
- __pyx_v_self->col1 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_1);
+ __pyx_v_self->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":63
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":63
* self.f_index = IntList()
* self.col1 = FloatList()
* self.col2 = FloatList() # <<<<<<<<<<<<<<
* if from_binary:
* self.read_binary(from_binary)
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->col2);
__Pyx_DECREF(((PyObject *)__pyx_v_self->col2));
- __pyx_v_self->col2 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_1);
+ __pyx_v_self->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":64
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":64
* self.col1 = FloatList()
* self.col2 = FloatList()
* if from_binary: # <<<<<<<<<<<<<<
@@ -13825,7 +13826,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":65
* self.col2 = FloatList()
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -13847,7 +13848,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":66
* if from_binary:
* self.read_binary(from_binary)
* elif from_data: # <<<<<<<<<<<<<<
@@ -13857,24 +13858,24 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":67
* self.read_binary(from_binary)
* elif from_data:
* self.compute_from_data(fsarray, earray, alignment) # <<<<<<<<<<<<<<
* else:
* self.read_text(from_text)
*/
- if (!(likely(((__pyx_v_fsarray) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_fsarray, __pyx_ptype_3_sa_SuffixArray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (!(likely(((__pyx_v_earray) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_earray, __pyx_ptype_3_sa_DataArray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (!(likely(((__pyx_v_alignment) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_alignment, __pyx_ptype_3_sa_Alignment))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->compute_from_data(__pyx_v_self, ((struct __pyx_obj_3_sa_SuffixArray *)__pyx_v_fsarray), ((struct __pyx_obj_3_sa_DataArray *)__pyx_v_earray), ((struct __pyx_obj_3_sa_Alignment *)__pyx_v_alignment)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_fsarray) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_fsarray, __pyx_ptype_4cdec_2sa_3_sa_SuffixArray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_earray) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_earray, __pyx_ptype_4cdec_2sa_3_sa_DataArray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_alignment) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_alignment, __pyx_ptype_4cdec_2sa_3_sa_Alignment))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->compute_from_data(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_fsarray), ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_v_earray), ((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)__pyx_v_alignment)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L3;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":69
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":69
* self.compute_from_data(fsarray, earray, alignment)
* else:
* self.read_text(from_text) # <<<<<<<<<<<<<<
@@ -13902,14 +13903,14 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.BiLex.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":72
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":72
*
*
* cdef compute_from_data(self, SuffixArray fsa, DataArray eda, Alignment aa): # <<<<<<<<<<<<<<
@@ -13917,7 +13918,7 @@ static int __pyx_pf_3_sa_5BiLex___cinit__(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
* cdef int *fsent, *esent, *alignment, *links, *ealigned, *faligned
*/
-static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, struct __pyx_obj_3_sa_SuffixArray *__pyx_v_fsa, struct __pyx_obj_3_sa_DataArray *__pyx_v_eda, struct __pyx_obj_3_sa_Alignment *__pyx_v_aa) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_fsa, struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_eda, struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_aa) {
int __pyx_v_sent_id;
int __pyx_v_num_links;
int __pyx_v_l;
@@ -13935,7 +13936,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
int *__pyx_v_links;
int *__pyx_v_ealigned;
int *__pyx_v_faligned;
- struct __pyx_t_3_sa__node **__pyx_v_dict;
+ struct __pyx_t_4cdec_2sa_3_sa__node **__pyx_v_dict;
int *__pyx_v_fmargin;
int *__pyx_v_emargin;
int *__pyx_v_count;
@@ -13963,7 +13964,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":79
* cdef int null_word
*
* null_word = 0 # <<<<<<<<<<<<<<
@@ -13972,7 +13973,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":80
*
* null_word = 0
* for word in fsa.darray.id2word: # I miss list comprehensions # <<<<<<<<<<<<<<
@@ -14017,7 +14018,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":81
* null_word = 0
* for word in fsa.darray.id2word: # I miss list comprehensions
* self.id2fword.append(word) # <<<<<<<<<<<<<<
@@ -14030,7 +14031,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":82
* for word in fsa.darray.id2word: # I miss list comprehensions
* self.id2fword.append(word)
* self.id2fword[null_word] = "NULL" # <<<<<<<<<<<<<<
@@ -14039,7 +14040,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, 1, 1) < 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":83
* self.id2fword.append(word)
* self.id2fword[null_word] = "NULL"
* for id, word in enumerate(self.id2fword): # <<<<<<<<<<<<<<
@@ -14094,7 +14095,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":84
* self.id2fword[null_word] = "NULL"
* for id, word in enumerate(self.id2fword):
* self.fword2id[word] = id # <<<<<<<<<<<<<<
@@ -14106,7 +14107,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":86
* self.fword2id[word] = id
*
* for word in eda.id2word: # <<<<<<<<<<<<<<
@@ -14151,7 +14152,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":87
*
* for word in eda.id2word:
* self.id2eword.append(word) # <<<<<<<<<<<<<<
@@ -14164,7 +14165,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":88
* for word in eda.id2word:
* self.id2eword.append(word)
* self.id2eword[null_word] = "NULL" # <<<<<<<<<<<<<<
@@ -14173,7 +14174,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, 1, 1) < 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":89
* self.id2eword.append(word)
* self.id2eword[null_word] = "NULL"
* for id, word in enumerate(self.id2eword): # <<<<<<<<<<<<<<
@@ -14228,7 +14229,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":90
* self.id2eword[null_word] = "NULL"
* for id, word in enumerate(self.id2eword):
* self.eword2id[word] = id # <<<<<<<<<<<<<<
@@ -14240,7 +14241,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":92
* self.eword2id[word] = id
*
* num_pairs = 0 # <<<<<<<<<<<<<<
@@ -14249,7 +14250,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":94
* num_pairs = 0
*
* V_E = len(eda.id2word) # <<<<<<<<<<<<<<
@@ -14262,7 +14263,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":95
*
* V_E = len(eda.id2word)
* V_F = len(fsa.darray.id2word) # <<<<<<<<<<<<<<
@@ -14275,7 +14276,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":96
* V_E = len(eda.id2word)
* V_F = len(fsa.darray.id2word)
* fmargin = <int*> malloc(V_F*sizeof(int)) # <<<<<<<<<<<<<<
@@ -14284,7 +14285,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":97
* V_F = len(fsa.darray.id2word)
* fmargin = <int*> malloc(V_F*sizeof(int))
* emargin = <int*> malloc(V_E*sizeof(int)) # <<<<<<<<<<<<<<
@@ -14293,7 +14294,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -14302,7 +14303,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -14311,25 +14312,25 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":101
* memset(emargin, 0, V_E*sizeof(int))
*
* dict = <_node**> malloc(V_F*sizeof(_node*)) # <<<<<<<<<<<<<<
* memset(dict, 0, V_F*sizeof(_node*))
*
*/
- __pyx_v_dict = ((struct __pyx_t_3_sa__node **)malloc((__pyx_v_V_F * (sizeof(struct __pyx_t_3_sa__node *)))));
+ __pyx_v_dict = ((struct __pyx_t_4cdec_2sa_3_sa__node **)malloc((__pyx_v_V_F * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__node *)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":102
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":102
*
* dict = <_node**> malloc(V_F*sizeof(_node*))
* memset(dict, 0, V_F*sizeof(_node*)) # <<<<<<<<<<<<<<
*
* num_sents = len(fsa.darray.sent_index)
*/
- memset(__pyx_v_dict, 0, (__pyx_v_V_F * (sizeof(struct __pyx_t_3_sa__node *))));
+ memset(__pyx_v_dict, 0, (__pyx_v_V_F * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__node *))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":104
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":104
* memset(dict, 0, V_F*sizeof(_node*))
*
* num_sents = len(fsa.darray.sent_index) # <<<<<<<<<<<<<<
@@ -14345,7 +14346,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":105
*
* num_sents = len(fsa.darray.sent_index)
* for sent_id from 0 <= sent_id < num_sents-1: # <<<<<<<<<<<<<<
@@ -14358,7 +14359,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":107
* for sent_id from 0 <= sent_id < num_sents-1:
*
* fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id] # <<<<<<<<<<<<<<
@@ -14367,7 +14368,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":108
*
* fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id]
* I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1 # <<<<<<<<<<<<<<
@@ -14376,7 +14377,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":109
* fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id]
* I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1
* faligned = <int*> malloc(I*sizeof(int)) # <<<<<<<<<<<<<<
@@ -14385,7 +14386,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":110
* I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1
* faligned = <int*> malloc(I*sizeof(int))
* memset(faligned, 0, I*sizeof(int)) # <<<<<<<<<<<<<<
@@ -14394,7 +14395,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":112
* memset(faligned, 0, I*sizeof(int))
*
* esent = eda.data.arr + eda.sent_index.arr[sent_id] # <<<<<<<<<<<<<<
@@ -14403,7 +14404,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":113
*
* esent = eda.data.arr + eda.sent_index.arr[sent_id]
* J = eda.sent_index.arr[sent_id+1] - eda.sent_index.arr[sent_id] - 1 # <<<<<<<<<<<<<<
@@ -14412,7 +14413,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":114
* esent = eda.data.arr + eda.sent_index.arr[sent_id]
* J = eda.sent_index.arr[sent_id+1] - eda.sent_index.arr[sent_id] - 1
* ealigned = <int*> malloc(J*sizeof(int)) # <<<<<<<<<<<<<<
@@ -14421,7 +14422,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -14430,16 +14431,16 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":117
* memset(ealigned, 0, J*sizeof(int))
*
* links = aa._get_sent_links(sent_id, &num_links) # <<<<<<<<<<<<<<
*
* for l from 0 <= l < num_links:
*/
- __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));
+ __pyx_v_links = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_aa->__pyx_vtab)->_get_sent_links(__pyx_v_aa, __pyx_v_sent_id, (&__pyx_v_num_links));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":119
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":119
* links = aa._get_sent_links(sent_id, &num_links)
*
* for l from 0 <= l < num_links: # <<<<<<<<<<<<<<
@@ -14449,7 +14450,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":120
*
* for l from 0 <= l < num_links:
* i = links[l*2] # <<<<<<<<<<<<<<
@@ -14458,7 +14459,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":121
* for l from 0 <= l < num_links:
* i = links[l*2]
* j = links[l*2+1] # <<<<<<<<<<<<<<
@@ -14467,7 +14468,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":122
* i = links[l*2]
* j = links[l*2+1]
* if i >= I or j >= J: # <<<<<<<<<<<<<<
@@ -14483,7 +14484,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":123
* j = links[l*2+1]
* if i >= I or j >= J:
* raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1)) # <<<<<<<<<<<<<<
@@ -14535,7 +14536,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":124
* if i >= I or j >= J:
* raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1))
* f_i = fsent[i] # <<<<<<<<<<<<<<
@@ -14544,7 +14545,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":125
* raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1))
* f_i = fsent[i]
* e_j = esent[j] # <<<<<<<<<<<<<<
@@ -14553,7 +14554,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":126
* f_i = fsent[i]
* e_j = esent[j]
* fmargin[f_i] = fmargin[f_i]+1 # <<<<<<<<<<<<<<
@@ -14562,7 +14563,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":127
* e_j = esent[j]
* fmargin[f_i] = fmargin[f_i]+1
* emargin[e_j] = emargin[e_j]+1 # <<<<<<<<<<<<<<
@@ -14571,7 +14572,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":128
* fmargin[f_i] = fmargin[f_i]+1
* emargin[e_j] = emargin[e_j]+1
* if dict[f_i] == NULL: # <<<<<<<<<<<<<<
@@ -14581,16 +14582,16 @@ 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) != 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":129
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":129
* emargin[e_j] = emargin[e_j]+1
* if dict[f_i] == NULL:
* dict[f_i] = new_node(e_j) # <<<<<<<<<<<<<<
* dict[f_i].val = 1
* num_pairs = num_pairs + 1
*/
- (__pyx_v_dict[__pyx_v_f_i]) = __pyx_f_3_sa_new_node(__pyx_v_e_j);
+ (__pyx_v_dict[__pyx_v_f_i]) = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_e_j);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":130
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":130
* if dict[f_i] == NULL:
* dict[f_i] = new_node(e_j)
* dict[f_i].val = 1 # <<<<<<<<<<<<<<
@@ -14599,7 +14600,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":131
* dict[f_i] = new_node(e_j)
* dict[f_i].val = 1
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -14611,16 +14612,16 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":133
* num_pairs = num_pairs + 1
* else:
* count = get_val(dict[f_i], e_j) # <<<<<<<<<<<<<<
* if count[0] == 0:
* num_pairs = num_pairs + 1
*/
- __pyx_v_count = __pyx_f_3_sa_get_val((__pyx_v_dict[__pyx_v_f_i]), __pyx_v_e_j);
+ __pyx_v_count = __pyx_f_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/bilex.pxi":134
* else:
* count = get_val(dict[f_i], e_j)
* if count[0] == 0: # <<<<<<<<<<<<<<
@@ -14630,7 +14631,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) != 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":135
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":135
* count = get_val(dict[f_i], e_j)
* if count[0] == 0:
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -14642,7 +14643,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":136
* if count[0] == 0:
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1 # <<<<<<<<<<<<<<
@@ -14653,7 +14654,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":138
* count[0] = count[0] + 1
* # add count
* faligned[i] = 1 # <<<<<<<<<<<<<<
@@ -14662,7 +14663,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":139
* # add count
* faligned[i] = 1
* ealigned[j] = 1 # <<<<<<<<<<<<<<
@@ -14672,7 +14673,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":140
* faligned[i] = 1
* ealigned[j] = 1
* for i from 0 <= i < I: # <<<<<<<<<<<<<<
@@ -14682,7 +14683,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":141
* ealigned[j] = 1
* for i from 0 <= i < I:
* if faligned[i] == 0: # <<<<<<<<<<<<<<
@@ -14692,7 +14693,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) != 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":142
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":142
* for i from 0 <= i < I:
* if faligned[i] == 0:
* f_i = fsent[i] # <<<<<<<<<<<<<<
@@ -14701,7 +14702,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":143
* if faligned[i] == 0:
* f_i = fsent[i]
* fmargin[f_i] = fmargin[f_i] + 1 # <<<<<<<<<<<<<<
@@ -14710,7 +14711,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":144
* f_i = fsent[i]
* fmargin[f_i] = fmargin[f_i] + 1
* emargin[null_word] = emargin[null_word] + 1 # <<<<<<<<<<<<<<
@@ -14719,7 +14720,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":145
* fmargin[f_i] = fmargin[f_i] + 1
* emargin[null_word] = emargin[null_word] + 1
* if dict[f_i] == NULL: # <<<<<<<<<<<<<<
@@ -14729,16 +14730,16 @@ 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) != 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":146
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":146
* emargin[null_word] = emargin[null_word] + 1
* if dict[f_i] == NULL:
* dict[f_i] = new_node(null_word) # <<<<<<<<<<<<<<
* dict[f_i].val = 1
* num_pairs = num_pairs + 1
*/
- (__pyx_v_dict[__pyx_v_f_i]) = __pyx_f_3_sa_new_node(__pyx_v_null_word);
+ (__pyx_v_dict[__pyx_v_f_i]) = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_null_word);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":147
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":147
* if dict[f_i] == NULL:
* dict[f_i] = new_node(null_word)
* dict[f_i].val = 1 # <<<<<<<<<<<<<<
@@ -14747,7 +14748,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":148
* dict[f_i] = new_node(null_word)
* dict[f_i].val = 1
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -14759,16 +14760,16 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":150
* num_pairs = num_pairs + 1
* else:
* count = get_val(dict[f_i], null_word) # <<<<<<<<<<<<<<
* if count[0] == 0:
* num_pairs = num_pairs + 1
*/
- __pyx_v_count = __pyx_f_3_sa_get_val((__pyx_v_dict[__pyx_v_f_i]), __pyx_v_null_word);
+ __pyx_v_count = __pyx_f_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/bilex.pxi":151
* else:
* count = get_val(dict[f_i], null_word)
* if count[0] == 0: # <<<<<<<<<<<<<<
@@ -14778,7 +14779,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) != 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":152
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":152
* count = get_val(dict[f_i], null_word)
* if count[0] == 0:
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -14790,7 +14791,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":153
* if count[0] == 0:
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1 # <<<<<<<<<<<<<<
@@ -14805,7 +14806,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":154
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1
* for j from 0 <= j < J: # <<<<<<<<<<<<<<
@@ -14815,7 +14816,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":155
* count[0] = count[0] + 1
* for j from 0 <= j < J:
* if ealigned[j] == 0: # <<<<<<<<<<<<<<
@@ -14825,7 +14826,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) != 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":156
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":156
* for j from 0 <= j < J:
* if ealigned[j] == 0:
* e_j = esent[j] # <<<<<<<<<<<<<<
@@ -14834,7 +14835,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":157
* if ealigned[j] == 0:
* e_j = esent[j]
* fmargin[null_word] = fmargin[null_word] + 1 # <<<<<<<<<<<<<<
@@ -14843,7 +14844,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":158
* e_j = esent[j]
* fmargin[null_word] = fmargin[null_word] + 1
* emargin[e_j] = emargin[e_j] + 1 # <<<<<<<<<<<<<<
@@ -14852,7 +14853,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":159
* fmargin[null_word] = fmargin[null_word] + 1
* emargin[e_j] = emargin[e_j] + 1
* if dict[null_word] == NULL: # <<<<<<<<<<<<<<
@@ -14862,16 +14863,16 @@ 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) != 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":160
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":160
* emargin[e_j] = emargin[e_j] + 1
* if dict[null_word] == NULL:
* dict[null_word] = new_node(e_j) # <<<<<<<<<<<<<<
* dict[null_word].val = 1
* num_pairs = num_pairs + 1
*/
- (__pyx_v_dict[__pyx_v_null_word]) = __pyx_f_3_sa_new_node(__pyx_v_e_j);
+ (__pyx_v_dict[__pyx_v_null_word]) = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_e_j);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":161
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":161
* if dict[null_word] == NULL:
* dict[null_word] = new_node(e_j)
* dict[null_word].val = 1 # <<<<<<<<<<<<<<
@@ -14880,7 +14881,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":162
* dict[null_word] = new_node(e_j)
* dict[null_word].val = 1
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -14892,16 +14893,16 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":164
* num_pairs = num_pairs + 1
* else:
* count = get_val(dict[null_word], e_j) # <<<<<<<<<<<<<<
* if count[0] == 0:
* num_pairs = num_pairs + 1
*/
- __pyx_v_count = __pyx_f_3_sa_get_val((__pyx_v_dict[__pyx_v_null_word]), __pyx_v_e_j);
+ __pyx_v_count = __pyx_f_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/bilex.pxi":165
* else:
* count = get_val(dict[null_word], e_j)
* if count[0] == 0: # <<<<<<<<<<<<<<
@@ -14911,7 +14912,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) != 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":166
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":166
* count = get_val(dict[null_word], e_j)
* if count[0] == 0:
* num_pairs = num_pairs + 1 # <<<<<<<<<<<<<<
@@ -14923,7 +14924,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":167
* if count[0] == 0:
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1 # <<<<<<<<<<<<<<
@@ -14938,7 +14939,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":168
* num_pairs = num_pairs + 1
* count[0] = count[0] + 1
* free(links) # <<<<<<<<<<<<<<
@@ -14947,7 +14948,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":169
* count[0] = count[0] + 1
* free(links)
* free(faligned) # <<<<<<<<<<<<<<
@@ -14956,7 +14957,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":170
* free(links)
* free(faligned)
* free(ealigned) # <<<<<<<<<<<<<<
@@ -14966,7 +14967,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":171
* free(faligned)
* free(ealigned)
* self.f_index = IntList(initial_len=V_F) # <<<<<<<<<<<<<<
@@ -14979,16 +14980,16 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_GOTREF(__pyx_t_13);
if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __pyx_t_13 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
__Pyx_GIVEREF(__pyx_t_13);
__Pyx_GOTREF(__pyx_v_self->f_index);
__Pyx_DECREF(((PyObject *)__pyx_v_self->f_index));
- __pyx_v_self->f_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_13);
+ __pyx_v_self->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_13);
__pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":172
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":172
* free(ealigned)
* self.f_index = IntList(initial_len=V_F)
* self.e_index = IntList(initial_len=num_pairs) # <<<<<<<<<<<<<<
@@ -15001,16 +15002,16 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_GOTREF(__pyx_t_12);
if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
__Pyx_GIVEREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_v_self->e_index);
__Pyx_DECREF(((PyObject *)__pyx_v_self->e_index));
- __pyx_v_self->e_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_12);
+ __pyx_v_self->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":173
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":173
* self.f_index = IntList(initial_len=V_F)
* self.e_index = IntList(initial_len=num_pairs)
* self.col1 = FloatList(initial_len=num_pairs) # <<<<<<<<<<<<<<
@@ -15023,16 +15024,16 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_GOTREF(__pyx_t_13);
if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_13) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __pyx_t_13 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
__Pyx_GIVEREF(__pyx_t_13);
__Pyx_GOTREF(__pyx_v_self->col1);
__Pyx_DECREF(((PyObject *)__pyx_v_self->col1));
- __pyx_v_self->col1 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_13);
+ __pyx_v_self->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_13);
__pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":174
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":174
* self.e_index = IntList(initial_len=num_pairs)
* self.col1 = FloatList(initial_len=num_pairs)
* self.col2 = FloatList(initial_len=num_pairs) # <<<<<<<<<<<<<<
@@ -15045,16 +15046,16 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_GOTREF(__pyx_t_12);
if (PyDict_SetItem(__pyx_t_13, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
__Pyx_GIVEREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_v_self->col2);
__Pyx_DECREF(((PyObject *)__pyx_v_self->col2));
- __pyx_v_self->col2 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_12);
+ __pyx_v_self->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":176
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":176
* self.col2 = FloatList(initial_len=num_pairs)
*
* num_pairs = 0 # <<<<<<<<<<<<<<
@@ -15063,7 +15064,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":177
*
* num_pairs = 0
* for i from 0 <= i < V_F: # <<<<<<<<<<<<<<
@@ -15073,16 +15074,16 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":179
* for i from 0 <= i < V_F:
* #self.f_index[i] = num_pairs
* self.f_index.set(i, num_pairs) # <<<<<<<<<<<<<<
* if dict[i] != NULL:
* self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin)
*/
- ((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);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->set(__pyx_v_self->f_index, __pyx_v_i, __pyx_v_num_pairs);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":180
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":180
* #self.f_index[i] = num_pairs
* self.f_index.set(i, num_pairs)
* if dict[i] != NULL: # <<<<<<<<<<<<<<
@@ -15092,25 +15093,25 @@ 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) != 0);
if (__pyx_t_10) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":181
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":181
* self.f_index.set(i, num_pairs)
* if dict[i] != NULL:
* self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin) # <<<<<<<<<<<<<<
* del_node(dict[i])
* free(fmargin)
*/
- __pyx_t_12 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->_add_node(__pyx_v_self, (__pyx_v_dict[__pyx_v_i]), (&__pyx_v_num_pairs), ((double)(__pyx_v_fmargin[__pyx_v_i])), __pyx_v_emargin); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->_add_node(__pyx_v_self, (__pyx_v_dict[__pyx_v_i]), (&__pyx_v_num_pairs), ((double)(__pyx_v_fmargin[__pyx_v_i])), __pyx_v_emargin); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__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/mdenkows/cdec/python/cdec/sa/bilex.pxi":182
* if dict[i] != NULL:
* self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin)
* del_node(dict[i]) # <<<<<<<<<<<<<<
* free(fmargin)
* free(emargin)
*/
- __pyx_t_12 = __pyx_f_3_sa_del_node((__pyx_v_dict[__pyx_v_i])); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __pyx_f_4cdec_2sa_3_sa_del_node((__pyx_v_dict[__pyx_v_i])); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
goto __pyx_L30;
@@ -15118,7 +15119,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":183
* self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin)
* del_node(dict[i])
* free(fmargin) # <<<<<<<<<<<<<<
@@ -15127,7 +15128,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":184
* del_node(dict[i])
* free(fmargin)
* free(emargin) # <<<<<<<<<<<<<<
@@ -15136,7 +15137,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":185
* free(fmargin)
* free(emargin)
* free(dict) # <<<<<<<<<<<<<<
@@ -15145,7 +15146,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":186
* free(emargin)
* free(dict)
* return # <<<<<<<<<<<<<<
@@ -15165,7 +15166,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
- __Pyx_AddTraceback("_sa.BiLex.compute_from_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.compute_from_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_word);
@@ -15176,7 +15177,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":189
*
*
* cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin): # <<<<<<<<<<<<<<
@@ -15184,7 +15185,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_compute_from_data(struct __pyx_obj_3_sa_BiL
* if n.smaller != NULL:
*/
-static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, struct __pyx_t_3_sa__node *__pyx_v_n, int *__pyx_v_num_pairs, float __pyx_v_fmargin, int *__pyx_v_emargin) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_v_n, int *__pyx_v_num_pairs, float __pyx_v_fmargin, int *__pyx_v_emargin) {
int __pyx_v_loc;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -15195,7 +15196,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":191
* cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin):
* cdef int loc
* if n.smaller != NULL: # <<<<<<<<<<<<<<
@@ -15205,21 +15206,21 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
__pyx_t_1 = ((__pyx_v_n->smaller != NULL) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":192
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":192
* cdef int loc
* if n.smaller != NULL:
* self._add_node(n.smaller, num_pairs, fmargin, emargin) # <<<<<<<<<<<<<<
* loc = num_pairs[0]
* self.e_index.set(loc, n.key)
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->_add_node(__pyx_v_self, __pyx_v_n->smaller, __pyx_v_num_pairs, __pyx_v_fmargin, __pyx_v_emargin); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->_add_node(__pyx_v_self, __pyx_v_n->smaller, __pyx_v_num_pairs, __pyx_v_fmargin, __pyx_v_emargin); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L3;
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":193
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":193
* if n.smaller != NULL:
* self._add_node(n.smaller, num_pairs, fmargin, emargin)
* loc = num_pairs[0] # <<<<<<<<<<<<<<
@@ -15228,16 +15229,16 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":194
* self._add_node(n.smaller, num_pairs, fmargin, emargin)
* loc = num_pairs[0]
* self.e_index.set(loc, n.key) # <<<<<<<<<<<<<<
* self.col1.set(loc, float(n.val)/fmargin)
* self.col2.set(loc, float(n.val)/float(emargin[n.key]))
*/
- ((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);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->set(__pyx_v_self->e_index, __pyx_v_loc, __pyx_v_n->key);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":195
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":195
* loc = num_pairs[0]
* self.e_index.set(loc, n.key)
* self.col1.set(loc, float(n.val)/fmargin) # <<<<<<<<<<<<<<
@@ -15254,9 +15255,9 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
#endif
{__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->set(__pyx_v_self->col1, __pyx_v_loc, (((double)__pyx_v_n->val) / __pyx_v_fmargin));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":196
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":196
* self.e_index.set(loc, n.key)
* self.col1.set(loc, float(n.val)/fmargin)
* self.col2.set(loc, float(n.val)/float(emargin[n.key])) # <<<<<<<<<<<<<<
@@ -15273,9 +15274,9 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
#endif
{__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- ((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]))));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->set(__pyx_v_self->col2, __pyx_v_loc, (((double)__pyx_v_n->val) / ((double)(__pyx_v_emargin[__pyx_v_n->key]))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":197
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":197
* self.col1.set(loc, float(n.val)/fmargin)
* self.col2.set(loc, float(n.val)/float(emargin[n.key]))
* num_pairs[0] = loc + 1 # <<<<<<<<<<<<<<
@@ -15284,7 +15285,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":198
* self.col2.set(loc, float(n.val)/float(emargin[n.key]))
* num_pairs[0] = loc + 1
* if n.bigger != NULL: # <<<<<<<<<<<<<<
@@ -15294,14 +15295,14 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
__pyx_t_1 = ((__pyx_v_n->bigger != NULL) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":199
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":199
* num_pairs[0] = loc + 1
* if n.bigger != NULL:
* self._add_node(n.bigger, num_pairs, fmargin, emargin) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->_add_node(__pyx_v_self, __pyx_v_n->bigger, __pyx_v_num_pairs, __pyx_v_fmargin, __pyx_v_emargin); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->_add_node(__pyx_v_self, __pyx_v_n->bigger, __pyx_v_num_pairs, __pyx_v_fmargin, __pyx_v_emargin); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L4;
@@ -15312,7 +15313,7 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.BiLex._add_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex._add_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -15321,8 +15322,8 @@ static PyObject *__pyx_f_3_sa_5BiLex__add_node(struct __pyx_obj_3_sa_BiLex *__py
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_5BiLex_3write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_5BiLex_3write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_3write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_3write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -15335,16 +15336,16 @@ static PyObject *__pyx_pw_3_sa_5BiLex_3write_binary(PyObject *__pyx_v_self, PyOb
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.BiLex.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_5BiLex_2write_binary(((struct __pyx_obj_3_sa_BiLex *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":202
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":202
*
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -15352,7 +15353,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_3write_binary(PyObject *__pyx_v_self, PyOb
* f = fopen(filename, "w")
*/
-static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -15363,7 +15364,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":204
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -15372,43 +15373,43 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":205
* cdef FILE* f
* f = fopen(filename, "w")
* self.f_index.write_handle(f) # <<<<<<<<<<<<<<
* self.e_index.write_handle(f)
* self.col1.write_handle(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->write_handle(__pyx_v_self->f_index, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->write_handle(__pyx_v_self->f_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":206
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":206
* f = fopen(filename, "w")
* self.f_index.write_handle(f)
* self.e_index.write_handle(f) # <<<<<<<<<<<<<<
* self.col1.write_handle(f)
* self.col2.write_handle(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->write_handle(__pyx_v_self->e_index, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->write_handle(__pyx_v_self->e_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":207
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":207
* self.f_index.write_handle(f)
* self.e_index.write_handle(f)
* self.col1.write_handle(f) # <<<<<<<<<<<<<<
* self.col2.write_handle(f)
* self.write_wordlist(self.id2fword, f)
*/
- ((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->write_handle(__pyx_v_self->col1, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/bilex.pxi":208
* self.e_index.write_handle(f)
* self.col1.write_handle(f)
* self.col2.write_handle(f) # <<<<<<<<<<<<<<
* self.write_wordlist(self.id2fword, f)
* self.write_wordlist(self.id2eword, f)
*/
- ((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->write_handle(__pyx_v_self->col2, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/bilex.pxi":209
* self.col1.write_handle(f)
* self.col2.write_handle(f)
* self.write_wordlist(self.id2fword, f) # <<<<<<<<<<<<<<
@@ -15417,12 +15418,12 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
*/
__pyx_t_1 = __pyx_v_self->id2fword;
__Pyx_INCREF(__pyx_t_1);
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->write_wordlist(__pyx_v_self, __pyx_t_1, __pyx_v_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->write_wordlist(__pyx_v_self, __pyx_t_1, __pyx_v_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":210
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":210
* self.col2.write_handle(f)
* self.write_wordlist(self.id2fword, f)
* self.write_wordlist(self.id2eword, f) # <<<<<<<<<<<<<<
@@ -15431,12 +15432,12 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
*/
__pyx_t_2 = __pyx_v_self->id2eword;
__Pyx_INCREF(__pyx_t_2);
- __pyx_t_1 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->write_wordlist(__pyx_v_self, __pyx_t_2, __pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->write_wordlist(__pyx_v_self, __pyx_t_2, __pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 210; __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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":211
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":211
* self.write_wordlist(self.id2fword, f)
* self.write_wordlist(self.id2eword, f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -15450,7 +15451,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.BiLex.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -15458,7 +15459,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":214
*
*
* cdef write_wordlist(self, wordlist, FILE* f): # <<<<<<<<<<<<<<
@@ -15466,7 +15467,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_2write_binary(struct __pyx_obj_3_sa_BiLex
* cdef int num_words
*/
-static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_obj_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_wordlist, FILE *__pyx_v_f) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_wordlist, FILE *__pyx_v_f) {
int __pyx_v_word_len;
int __pyx_v_num_words;
PyObject *__pyx_v_word = NULL;
@@ -15483,7 +15484,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":218
* cdef int num_words
*
* num_words = len(wordlist) # <<<<<<<<<<<<<<
@@ -15493,7 +15494,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":219
*
* num_words = len(wordlist)
* fwrite(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -15502,7 +15503,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":220
* num_words = len(wordlist)
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in wordlist: # <<<<<<<<<<<<<<
@@ -15547,7 +15548,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":221
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in wordlist:
* word_len = len(word) + 1 # <<<<<<<<<<<<<<
@@ -15557,7 +15558,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":222
* for word in wordlist:
* word_len = len(word) + 1
* fwrite(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -15566,7 +15567,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":223
* word_len = len(word) + 1
* fwrite(&(word_len), sizeof(int), 1, f)
* fwrite(<char *>word, sizeof(char), word_len, f) # <<<<<<<<<<<<<<
@@ -15583,7 +15584,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.BiLex.write_wordlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.write_wordlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_word);
@@ -15592,7 +15593,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":226
*
*
* cdef read_wordlist(self, word2id, id2word, FILE* f): # <<<<<<<<<<<<<<
@@ -15600,7 +15601,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED struct __pyx_o
* cdef int word_len
*/
-static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_obj_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_word2id, PyObject *__pyx_v_id2word, FILE *__pyx_v_f) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_word2id, PyObject *__pyx_v_id2word, FILE *__pyx_v_f) {
int __pyx_v_num_words;
int __pyx_v_word_len;
char *__pyx_v_word;
@@ -15616,7 +15617,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":231
* cdef char* word
*
* fread(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -15625,7 +15626,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":232
*
* fread(&(num_words), sizeof(int), 1, f)
* for i from 0 <= i < num_words: # <<<<<<<<<<<<<<
@@ -15635,7 +15636,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":233
* fread(&(num_words), sizeof(int), 1, f)
* for i from 0 <= i < num_words:
* fread(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -15644,7 +15645,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -15653,7 +15654,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/mdenkows/cdec/python/cdec/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) # <<<<<<<<<<<<<<
@@ -15662,7 +15663,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":236
* word = <char*> malloc (word_len * sizeof(char))
* fread(word, sizeof(char), word_len, f)
* word2id[word] = len(id2word) # <<<<<<<<<<<<<<
@@ -15678,7 +15679,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":237
* fread(word, sizeof(char), word_len, f)
* word2id[word] = len(id2word)
* id2word.append(word) # <<<<<<<<<<<<<<
@@ -15692,7 +15693,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":238
* word2id[word] = len(id2word)
* id2word.append(word)
* free(word) # <<<<<<<<<<<<<<
@@ -15707,7 +15708,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.BiLex.read_wordlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.read_wordlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -15716,8 +15717,8 @@ static PyObject *__pyx_f_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struct __pyx_ob
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_5BiLex_5read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_5BiLex_5read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_5read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_5read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -15730,16 +15731,16 @@ static PyObject *__pyx_pw_3_sa_5BiLex_5read_binary(PyObject *__pyx_v_self, PyObj
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.BiLex.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_5BiLex_4read_binary(((struct __pyx_obj_3_sa_BiLex *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":240
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":240
* free(word)
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -15747,7 +15748,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_5read_binary(PyObject *__pyx_v_self, PyObj
* f = fopen(filename, "r")
*/
-static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -15759,7 +15760,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":242
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -15768,43 +15769,43 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":243
* cdef FILE* f
* f = fopen(filename, "r")
* self.f_index.read_handle(f) # <<<<<<<<<<<<<<
* self.e_index.read_handle(f)
* self.col1.read_handle(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->read_handle(__pyx_v_self->f_index, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->read_handle(__pyx_v_self->f_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":244
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":244
* f = fopen(filename, "r")
* self.f_index.read_handle(f)
* self.e_index.read_handle(f) # <<<<<<<<<<<<<<
* self.col1.read_handle(f)
* self.col2.read_handle(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->read_handle(__pyx_v_self->e_index, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->read_handle(__pyx_v_self->e_index, __pyx_v_f);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":245
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":245
* self.f_index.read_handle(f)
* self.e_index.read_handle(f)
* self.col1.read_handle(f) # <<<<<<<<<<<<<<
* self.col2.read_handle(f)
* self.read_wordlist(self.fword2id, self.id2fword, f)
*/
- ((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->read_handle(__pyx_v_self->col1, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/bilex.pxi":246
* self.e_index.read_handle(f)
* self.col1.read_handle(f)
* self.col2.read_handle(f) # <<<<<<<<<<<<<<
* self.read_wordlist(self.fword2id, self.id2fword, f)
* self.read_wordlist(self.eword2id, self.id2eword, f)
*/
- ((struct __pyx_vtabstruct_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->read_handle(__pyx_v_self->col2, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/bilex.pxi":247
* self.col1.read_handle(f)
* self.col2.read_handle(f)
* self.read_wordlist(self.fword2id, self.id2fword, f) # <<<<<<<<<<<<<<
@@ -15815,13 +15816,13 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
__Pyx_INCREF(__pyx_t_1);
__pyx_t_2 = __pyx_v_self->id2fword;
__Pyx_INCREF(__pyx_t_2);
- __pyx_t_3 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->read_wordlist(__pyx_v_self, __pyx_t_1, __pyx_t_2, __pyx_v_f); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->read_wordlist(__pyx_v_self, __pyx_t_1, __pyx_t_2, __pyx_v_f); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":248
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":248
* self.col2.read_handle(f)
* self.read_wordlist(self.fword2id, self.id2fword, f)
* self.read_wordlist(self.eword2id, self.id2eword, f) # <<<<<<<<<<<<<<
@@ -15832,13 +15833,13 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
__Pyx_INCREF(__pyx_t_3);
__pyx_t_2 = __pyx_v_self->id2eword;
__Pyx_INCREF(__pyx_t_2);
- __pyx_t_1 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->read_wordlist(__pyx_v_self, __pyx_t_3, __pyx_t_2, __pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->read_wordlist(__pyx_v_self, __pyx_t_3, __pyx_t_2, __pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":249
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":249
* self.read_wordlist(self.fword2id, self.id2fword, f)
* self.read_wordlist(self.eword2id, self.id2eword, f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -15853,7 +15854,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.BiLex.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -15862,17 +15863,17 @@ static PyObject *__pyx_pf_3_sa_5BiLex_4read_binary(struct __pyx_obj_3_sa_BiLex *
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_5BiLex_7get_e_id(PyObject *__pyx_v_self, PyObject *__pyx_v_eword); /*proto*/
-static PyObject *__pyx_pw_3_sa_5BiLex_7get_e_id(PyObject *__pyx_v_self, PyObject *__pyx_v_eword) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_7get_e_id(PyObject *__pyx_v_self, PyObject *__pyx_v_eword); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_7get_e_id(PyObject *__pyx_v_self, PyObject *__pyx_v_eword) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_e_id (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_5BiLex_6get_e_id(((struct __pyx_obj_3_sa_BiLex *)__pyx_v_self), ((PyObject *)__pyx_v_eword));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex_6get_e_id(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), ((PyObject *)__pyx_v_eword));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":252
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":252
*
*
* def get_e_id(self, eword): # <<<<<<<<<<<<<<
@@ -15880,7 +15881,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_7get_e_id(PyObject *__pyx_v_self, PyObject
* e_id = len(self.id2eword)
*/
-static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_eword) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_6get_e_id(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_eword) {
PyObject *__pyx_v_e_id = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -15893,7 +15894,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":253
*
* def get_e_id(self, eword):
* if eword not in self.eword2id: # <<<<<<<<<<<<<<
@@ -15904,7 +15905,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":254
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":254
* def get_e_id(self, eword):
* if eword not in self.eword2id:
* e_id = len(self.id2eword) # <<<<<<<<<<<<<<
@@ -15920,7 +15921,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
__pyx_v_e_id = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":255
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":255
* if eword not in self.eword2id:
* e_id = len(self.id2eword)
* self.id2eword.append(eword) # <<<<<<<<<<<<<<
@@ -15931,7 +15932,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":256
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":256
* e_id = len(self.id2eword)
* self.id2eword.append(eword)
* self.eword2id[eword] = e_id # <<<<<<<<<<<<<<
@@ -15943,7 +15944,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":257
* self.id2eword.append(eword)
* self.eword2id[eword] = e_id
* return self.eword2id[eword] # <<<<<<<<<<<<<<
@@ -15961,7 +15962,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.BiLex.get_e_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.get_e_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_e_id);
@@ -15971,17 +15972,17 @@ static PyObject *__pyx_pf_3_sa_5BiLex_6get_e_id(struct __pyx_obj_3_sa_BiLex *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_5BiLex_9get_f_id(PyObject *__pyx_v_self, PyObject *__pyx_v_fword); /*proto*/
-static PyObject *__pyx_pw_3_sa_5BiLex_9get_f_id(PyObject *__pyx_v_self, PyObject *__pyx_v_fword) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_9get_f_id(PyObject *__pyx_v_self, PyObject *__pyx_v_fword); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_9get_f_id(PyObject *__pyx_v_self, PyObject *__pyx_v_fword) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_f_id (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_5BiLex_8get_f_id(((struct __pyx_obj_3_sa_BiLex *)__pyx_v_self), ((PyObject *)__pyx_v_fword));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex_8get_f_id(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), ((PyObject *)__pyx_v_fword));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":260
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":260
*
*
* def get_f_id(self, fword): # <<<<<<<<<<<<<<
@@ -15989,7 +15990,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_9get_f_id(PyObject *__pyx_v_self, PyObject
* f_id = len(self.id2fword)
*/
-static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_fword) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_8get_f_id(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_fword) {
PyObject *__pyx_v_f_id = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -16002,7 +16003,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":261
*
* def get_f_id(self, fword):
* if fword not in self.fword2id: # <<<<<<<<<<<<<<
@@ -16013,7 +16014,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":262
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":262
* def get_f_id(self, fword):
* if fword not in self.fword2id:
* f_id = len(self.id2fword) # <<<<<<<<<<<<<<
@@ -16029,7 +16030,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
__pyx_v_f_id = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":263
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":263
* if fword not in self.fword2id:
* f_id = len(self.id2fword)
* self.id2fword.append(fword) # <<<<<<<<<<<<<<
@@ -16040,7 +16041,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":264
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":264
* f_id = len(self.id2fword)
* self.id2fword.append(fword)
* self.fword2id[fword] = f_id # <<<<<<<<<<<<<<
@@ -16052,7 +16053,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":265
* self.id2fword.append(fword)
* self.fword2id[fword] = f_id
* return self.fword2id[fword] # <<<<<<<<<<<<<<
@@ -16070,7 +16071,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.BiLex.get_f_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.get_f_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_f_id);
@@ -16080,8 +16081,8 @@ static PyObject *__pyx_pf_3_sa_5BiLex_8get_f_id(struct __pyx_obj_3_sa_BiLex *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_5BiLex_11read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_5BiLex_11read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_11read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_11read_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -16094,16 +16095,16 @@ static PyObject *__pyx_pw_3_sa_5BiLex_11read_text(PyObject *__pyx_v_self, PyObje
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.BiLex.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_5BiLex_10read_text(((struct __pyx_obj_3_sa_BiLex *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex_10read_text(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":268
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":268
*
*
* def read_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -16111,14 +16112,14 @@ static PyObject *__pyx_pw_3_sa_5BiLex_11read_text(PyObject *__pyx_v_self, PyObje
* cdef IntList fcount
*/
-static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10read_text(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_v_i = 0;
PyObject *__pyx_v_j = 0;
PyObject *__pyx_v_e_id = 0;
PyObject *__pyx_v_f_id = 0;
PyObject *__pyx_v_n_f = 0;
PyObject *__pyx_v_N = 0;
- struct __pyx_obj_3_sa_IntList *__pyx_v_fcount = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_fcount = 0;
PyObject *__pyx_v_f = NULL;
PyObject *__pyx_v_line = NULL;
PyObject *__pyx_v_fword = NULL;
@@ -16158,19 +16159,19 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":272
* cdef IntList fcount
*
* fcount = IntList() # <<<<<<<<<<<<<<
* with gzip_or_text(filename) as f:
* # first loop merely establishes size of array objects
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_v_fcount = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_fcount = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":273
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":273
*
* fcount = IntList()
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -16210,7 +16211,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":275
* with gzip_or_text(filename) as f:
* # first loop merely establishes size of array objects
* for line in f: # <<<<<<<<<<<<<<
@@ -16255,7 +16256,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":276
* # first loop merely establishes size of array objects
* for line in f:
* (fword, eword, score1, score2) = line.split() # <<<<<<<<<<<<<<
@@ -16342,7 +16343,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":277
* for line in f:
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword) # <<<<<<<<<<<<<<
@@ -16364,7 +16365,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":278
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword)
* e_id = self.get_e_id(eword) # <<<<<<<<<<<<<<
@@ -16386,7 +16387,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":279
* f_id = self.get_f_id(fword)
* e_id = self.get_e_id(eword)
* while f_id >= len(fcount): # <<<<<<<<<<<<<<
@@ -16403,7 +16404,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":280
* e_id = self.get_e_id(eword)
* while f_id >= len(fcount):
* fcount.append(0) # <<<<<<<<<<<<<<
@@ -16415,7 +16416,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":281
* while f_id >= len(fcount):
* fcount.append(0)
* fcount.arr[f_id] = fcount.arr[f_id] + 1 # <<<<<<<<<<<<<<
@@ -16428,7 +16429,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":284
*
* # Allocate space for dictionary in arrays
* N = 0 # <<<<<<<<<<<<<<
@@ -16438,7 +16439,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":285
* # Allocate space for dictionary in arrays
* N = 0
* n_f = len(fcount) # <<<<<<<<<<<<<<
@@ -16451,7 +16452,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":286
* N = 0
* n_f = len(fcount)
* self.f_index = IntList(initial_len=n_f+1) # <<<<<<<<<<<<<<
@@ -16464,16 +16465,16 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_GOTREF(__pyx_t_12);
if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_v_self->f_index);
__Pyx_DECREF(((PyObject *)__pyx_v_self->f_index));
- __pyx_v_self->f_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_12);
+ __pyx_v_self->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":287
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":287
* n_f = len(fcount)
* self.f_index = IntList(initial_len=n_f+1)
* for i from 0 <= i < n_f: # <<<<<<<<<<<<<<
@@ -16488,7 +16489,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -16499,7 +16500,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":289
* for i from 0 <= i < n_f:
* self.f_index.arr[i] = N
* N = N + fcount.arr[i] # <<<<<<<<<<<<<<
@@ -16516,7 +16517,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":290
* self.f_index.arr[i] = N
* N = N + fcount.arr[i]
* fcount.arr[i] = 0 # <<<<<<<<<<<<<<
@@ -16528,7 +16529,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":287
* n_f = len(fcount)
* self.f_index = IntList(initial_len=n_f+1)
* for i from 0 <= i < n_f: # <<<<<<<<<<<<<<
@@ -16541,7 +16542,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":291
* N = N + fcount.arr[i]
* fcount.arr[i] = 0
* self.f_index.arr[n_f] = N # <<<<<<<<<<<<<<
@@ -16552,7 +16553,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":292
* fcount.arr[i] = 0
* self.f_index.arr[n_f] = N
* self.e_index = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -16562,16 +16563,16 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_v_N) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_v_self->e_index);
__Pyx_DECREF(((PyObject *)__pyx_v_self->e_index));
- __pyx_v_self->e_index = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_12);
+ __pyx_v_self->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":293
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":293
* self.f_index.arr[n_f] = N
* self.e_index = IntList(initial_len=N)
* self.col1 = FloatList(initial_len=N) # <<<<<<<<<<<<<<
@@ -16581,16 +16582,16 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_12));
if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__initial_len), __pyx_v_N) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->col1);
__Pyx_DECREF(((PyObject *)__pyx_v_self->col1));
- __pyx_v_self->col1 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_1);
+ __pyx_v_self->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":294
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":294
* self.e_index = IntList(initial_len=N)
* self.col1 = FloatList(initial_len=N)
* self.col2 = FloatList(initial_len=N) # <<<<<<<<<<<<<<
@@ -16600,16 +16601,16 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_v_N) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
- __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_FloatList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_v_self->col2);
__Pyx_DECREF(((PyObject *)__pyx_v_self->col2));
- __pyx_v_self->col2 = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_12);
+ __pyx_v_self->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":297
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":297
*
* # Re-read file, placing words into buckets
* f.seek(0) # <<<<<<<<<<<<<<
@@ -16623,7 +16624,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":298
* # Re-read file, placing words into buckets
* f.seek(0)
* for line in f: # <<<<<<<<<<<<<<
@@ -16668,7 +16669,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":299
* f.seek(0)
* for line in f:
* (fword, eword, score1, score2) = line.split() # <<<<<<<<<<<<<<
@@ -16755,7 +16756,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":300
* for line in f:
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword) # <<<<<<<<<<<<<<
@@ -16777,7 +16778,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":301
* (fword, eword, score1, score2) = line.split()
* f_id = self.get_f_id(fword)
* e_id = self.get_e_id(eword) # <<<<<<<<<<<<<<
@@ -16799,7 +16800,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/mdenkows/cdec/python/cdec/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] # <<<<<<<<<<<<<<
@@ -16814,7 +16815,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -16825,7 +16826,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/mdenkows/cdec/python/cdec/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) # <<<<<<<<<<<<<<
@@ -16845,7 +16846,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/mdenkows/cdec/python/cdec/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) # <<<<<<<<<<<<<<
@@ -16858,7 +16859,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":306
* self.e_index.arr[index] = int(e_id)
* self.col1[index] = float(score1)
* self.col2[index] = float(score2) # <<<<<<<<<<<<<<
@@ -16886,7 +16887,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":273
*
* fcount = IntList()
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -16894,7 +16895,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
* for line in f:
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.BiLex.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_2);
@@ -16966,7 +16967,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":309
*
* # Sort buckets by eword
* for b from 0 <= b < n_f: # <<<<<<<<<<<<<<
@@ -16982,7 +16983,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":310
* # Sort buckets by eword
* for b from 0 <= b < n_f:
* i = self.f_index.arr[b] # <<<<<<<<<<<<<<
@@ -16996,7 +16997,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":311
* for b from 0 <= b < n_f:
* i = self.f_index.arr[b]
* j = self.f_index.arr[b+1] # <<<<<<<<<<<<<<
@@ -17013,7 +17014,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":312
* i = self.f_index.arr[b]
* j = self.f_index.arr[b+1]
* self.qsort(i,j, "") # <<<<<<<<<<<<<<
@@ -17022,13 +17023,13 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
*/
__pyx_t_20 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_24 = __Pyx_PyInt_AsInt(__pyx_v_j); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->qsort(__pyx_v_self, __pyx_t_20, __pyx_t_24, ((PyObject *)__pyx_kp_s_47)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->qsort(__pyx_v_self, __pyx_t_20, __pyx_t_24, ((PyObject *)__pyx_kp_s_47)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__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/mdenkows/cdec/python/cdec/sa/bilex.pxi":309
*
* # Sort buckets by eword
* for b from 0 <= b < n_f: # <<<<<<<<<<<<<<
@@ -17051,7 +17052,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
- __Pyx_AddTraceback("_sa.BiLex.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_i);
@@ -17074,7 +17075,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":315
*
*
* cdef swap(self, int i, int j): # <<<<<<<<<<<<<<
@@ -17082,7 +17083,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_10read_text(struct __pyx_obj_3_sa_BiLex *_
* cdef float ftmp
*/
-static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, int __pyx_v_i, int __pyx_v_j) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, int __pyx_v_i, int __pyx_v_j) {
int __pyx_v_itmp;
float __pyx_v_ftmp;
PyObject *__pyx_r = NULL;
@@ -17090,7 +17091,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":319
* cdef float ftmp
*
* if i == j: # <<<<<<<<<<<<<<
@@ -17100,7 +17101,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":320
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":320
*
* if i == j:
* return # <<<<<<<<<<<<<<
@@ -17114,7 +17115,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":322
* return
*
* itmp = self.e_index.arr[i] # <<<<<<<<<<<<<<
@@ -17123,7 +17124,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":323
*
* itmp = self.e_index.arr[i]
* self.e_index.arr[i] = self.e_index.arr[j] # <<<<<<<<<<<<<<
@@ -17132,7 +17133,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -17141,7 +17142,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":326
* self.e_index.arr[j] = itmp
*
* ftmp = self.col1.arr[i] # <<<<<<<<<<<<<<
@@ -17150,7 +17151,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":327
*
* ftmp = self.col1.arr[i]
* self.col1.arr[i] = self.col1.arr[j] # <<<<<<<<<<<<<<
@@ -17159,7 +17160,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":328
* ftmp = self.col1.arr[i]
* self.col1.arr[i] = self.col1.arr[j]
* self.col1.arr[j] = ftmp # <<<<<<<<<<<<<<
@@ -17168,7 +17169,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":330
* self.col1.arr[j] = ftmp
*
* ftmp = self.col2.arr[i] # <<<<<<<<<<<<<<
@@ -17177,7 +17178,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":331
*
* ftmp = self.col2.arr[i]
* self.col2.arr[i] = self.col2.arr[j] # <<<<<<<<<<<<<<
@@ -17186,7 +17187,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":332
* ftmp = self.col2.arr[i]
* self.col2.arr[i] = self.col2.arr[j]
* self.col2.arr[j] = ftmp # <<<<<<<<<<<<<<
@@ -17202,7 +17203,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":335
*
*
* cdef qsort(self, int i, int j, pad): # <<<<<<<<<<<<<<
@@ -17210,7 +17211,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_swap(struct __pyx_obj_3_sa_BiLex *__pyx_v_s
*
*/
-static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, int __pyx_v_i, int __pyx_v_j, PyObject *__pyx_v_pad) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, int __pyx_v_i, int __pyx_v_j, PyObject *__pyx_v_pad) {
int __pyx_v_pval;
int __pyx_v_p;
long __pyx_v_k;
@@ -17225,7 +17226,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":338
* cdef int pval, p
*
* if i > j: # <<<<<<<<<<<<<<
@@ -17235,7 +17236,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":339
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":339
*
* if i > j:
* raise Exception("Sort error in CLex") # <<<<<<<<<<<<<<
@@ -17251,7 +17252,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":340
* if i > j:
* raise Exception("Sort error in CLex")
* if i == j: #empty interval # <<<<<<<<<<<<<<
@@ -17261,7 +17262,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":341
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":341
* raise Exception("Sort error in CLex")
* if i == j: #empty interval
* return # <<<<<<<<<<<<<<
@@ -17275,7 +17276,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":342
* if i == j: #empty interval
* return
* if i == j-1: # singleton interval # <<<<<<<<<<<<<<
@@ -17285,7 +17286,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)) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":343
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":343
* return
* if i == j-1: # singleton interval
* return # <<<<<<<<<<<<<<
@@ -17299,7 +17300,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":345
* return
*
* p = (i+j)/2 # <<<<<<<<<<<<<<
@@ -17308,7 +17309,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":346
*
* p = (i+j)/2
* pval = self.e_index.arr[p] # <<<<<<<<<<<<<<
@@ -17317,18 +17318,18 @@ 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/mdenkows/cdec/python/cdec/sa/bilex.pxi":347
* p = (i+j)/2
* pval = self.e_index.arr[p]
* self.swap(i, p) # <<<<<<<<<<<<<<
* p = i
* for k from i+1 <= k < j:
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->swap(__pyx_v_self, __pyx_v_i, __pyx_v_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->swap(__pyx_v_self, __pyx_v_i, __pyx_v_p); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":348
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":348
* pval = self.e_index.arr[p]
* self.swap(i, p)
* p = i # <<<<<<<<<<<<<<
@@ -17337,7 +17338,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":349
* self.swap(i, p)
* p = i
* for k from i+1 <= k < j: # <<<<<<<<<<<<<<
@@ -17347,7 +17348,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":350
* p = i
* for k from i+1 <= k < j:
* if pval >= self.e_index.arr[k]: # <<<<<<<<<<<<<<
@@ -17357,29 +17358,29 @@ 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])) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":351
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":351
* for k from i+1 <= k < j:
* if pval >= self.e_index.arr[k]:
* self.swap(p+1, k) # <<<<<<<<<<<<<<
* self.swap(p, p+1)
* p = p + 1
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->swap(__pyx_v_self, (__pyx_v_p + 1), __pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->swap(__pyx_v_self, (__pyx_v_p + 1), __pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":352
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":352
* if pval >= self.e_index.arr[k]:
* self.swap(p+1, k)
* self.swap(p, p+1) # <<<<<<<<<<<<<<
* p = p + 1
* self.qsort(i,p, pad+" ")
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->swap(__pyx_v_self, __pyx_v_p, (__pyx_v_p + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->swap(__pyx_v_self, __pyx_v_p, (__pyx_v_p + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":353
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":353
* self.swap(p+1, k)
* self.swap(p, p+1)
* p = p + 1 # <<<<<<<<<<<<<<
@@ -17392,7 +17393,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":354
* self.swap(p, p+1)
* p = p + 1
* self.qsort(i,p, pad+" ") # <<<<<<<<<<<<<<
@@ -17401,12 +17402,12 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
*/
__pyx_t_2 = PyNumber_Add(__pyx_v_pad, ((PyObject *)__pyx_kp_s_50)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->qsort(__pyx_v_self, __pyx_v_i, __pyx_v_p, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->qsort(__pyx_v_self, __pyx_v_i, __pyx_v_p, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":355
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":355
* p = p + 1
* self.qsort(i,p, pad+" ")
* self.qsort(p+1,j, pad+" ") # <<<<<<<<<<<<<<
@@ -17415,7 +17416,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
*/
__pyx_t_4 = PyNumber_Add(__pyx_v_pad, ((PyObject *)__pyx_kp_s_50)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->qsort(__pyx_v_self, (__pyx_v_p + 1), __pyx_v_j, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex *)__pyx_v_self->__pyx_vtab)->qsort(__pyx_v_self, (__pyx_v_p + 1), __pyx_v_j, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -17425,7 +17426,7 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.BiLex.qsort", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.qsort", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -17434,8 +17435,8 @@ static PyObject *__pyx_f_3_sa_5BiLex_qsort(struct __pyx_obj_3_sa_BiLex *__pyx_v_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_5BiLex_13write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_5BiLex_13write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_13write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_13write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -17448,16 +17449,16 @@ static PyObject *__pyx_pw_3_sa_5BiLex_13write_enhanced(PyObject *__pyx_v_self, P
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.BiLex.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_5BiLex_12write_enhanced(((struct __pyx_obj_3_sa_BiLex *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex_12write_enhanced(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":358
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":358
*
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -17465,7 +17466,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_13write_enhanced(PyObject *__pyx_v_self, P
* for i in self.f_index:
*/
-static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_v_f = NULL;
PyObject *__pyx_v_i = NULL;
PyObject *__pyx_v_s1 = NULL;
@@ -17494,7 +17495,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":359
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -17534,7 +17535,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":360
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* for i in self.f_index: # <<<<<<<<<<<<<<
@@ -17579,7 +17580,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":361
* with open(filename, "w") as f:
* for i in self.f_index:
* f.write("%d " % i) # <<<<<<<<<<<<<<
@@ -17603,7 +17604,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":362
* for i in self.f_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -17617,7 +17618,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":363
* f.write("%d " % i)
* f.write("\n")
* for i, s1, s2 in zip(self.e_index, self.col1, self.col2): # <<<<<<<<<<<<<<
@@ -17741,7 +17742,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -17777,7 +17778,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/mdenkows/cdec/python/cdec/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") # <<<<<<<<<<<<<<
@@ -17791,7 +17792,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":366
* f.write("%d %f %f " % (i, s1, s2))
* f.write("\n")
* for i, w in enumerate(self.id2fword): # <<<<<<<<<<<<<<
@@ -17846,7 +17847,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":367
* f.write("\n")
* for i, w in enumerate(self.id2fword):
* f.write("%d %s " % (i, w)) # <<<<<<<<<<<<<<
@@ -17880,7 +17881,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":368
* for i, w in enumerate(self.id2fword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -17894,7 +17895,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":369
* f.write("%d %s " % (i, w))
* f.write("\n")
* for i, w in enumerate(self.id2eword): # <<<<<<<<<<<<<<
@@ -17949,7 +17950,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":370
* f.write("\n")
* for i, w in enumerate(self.id2eword):
* f.write("%d %s " % (i, w)) # <<<<<<<<<<<<<<
@@ -17983,7 +17984,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":371
* for i, w in enumerate(self.id2eword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -18009,7 +18010,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":359
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -18017,7 +18018,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
* f.write("%d " % i)
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.BiLex.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_2);
@@ -18098,7 +18099,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
- __Pyx_AddTraceback("_sa.BiLex.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_f);
@@ -18112,8 +18113,8 @@ static PyObject *__pyx_pf_3_sa_5BiLex_12write_enhanced(struct __pyx_obj_3_sa_BiL
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_5BiLex_15get_score(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_5BiLex_15get_score(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_15get_score(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_15get_score(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_fword = 0;
PyObject *__pyx_v_eword = 0;
PyObject *__pyx_v_col = 0;
@@ -18170,16 +18171,16 @@ static PyObject *__pyx_pw_3_sa_5BiLex_15get_score(PyObject *__pyx_v_self, PyObje
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("get_score", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.BiLex.get_score", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.get_score", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_5BiLex_14get_score(((struct __pyx_obj_3_sa_BiLex *)__pyx_v_self), __pyx_v_fword, __pyx_v_eword, __pyx_v_col);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex_14get_score(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), __pyx_v_fword, __pyx_v_eword, __pyx_v_col);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":374
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":374
*
*
* def get_score(self, fword, eword, col): # <<<<<<<<<<<<<<
@@ -18187,7 +18188,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_15get_score(PyObject *__pyx_v_self, PyObje
*
*/
-static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_fword, PyObject *__pyx_v_eword, PyObject *__pyx_v_col) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14get_score(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, PyObject *__pyx_v_fword, PyObject *__pyx_v_eword, PyObject *__pyx_v_col) {
PyObject *__pyx_v_e_id = 0;
PyObject *__pyx_v_f_id = 0;
PyObject *__pyx_v_low = 0;
@@ -18206,7 +18207,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":377
* cdef e_id, f_id, low, high, midpoint, val
*
* if eword not in self.eword2id: # <<<<<<<<<<<<<<
@@ -18217,7 +18218,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":378
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":378
*
* if eword not in self.eword2id:
* return None # <<<<<<<<<<<<<<
@@ -18232,7 +18233,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":379
* if eword not in self.eword2id:
* return None
* if fword not in self.fword2id: # <<<<<<<<<<<<<<
@@ -18243,7 +18244,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":380
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":380
* return None
* if fword not in self.fword2id:
* return None # <<<<<<<<<<<<<<
@@ -18258,7 +18259,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":381
* if fword not in self.fword2id:
* return None
* f_id = self.fword2id[fword] # <<<<<<<<<<<<<<
@@ -18270,7 +18271,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_f_id = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":382
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":382
* return None
* f_id = self.fword2id[fword]
* e_id = self.eword2id[eword] # <<<<<<<<<<<<<<
@@ -18282,7 +18283,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(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":383
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":383
* f_id = self.fword2id[fword]
* e_id = self.eword2id[eword]
* low = self.f_index.arr[f_id] # <<<<<<<<<<<<<<
@@ -18295,7 +18296,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_low = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":384
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":384
* e_id = self.eword2id[eword]
* low = self.f_index.arr[f_id]
* high = self.f_index.arr[f_id+1] # <<<<<<<<<<<<<<
@@ -18311,7 +18312,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_high = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":385
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":385
* low = self.f_index.arr[f_id]
* high = self.f_index.arr[f_id+1]
* while high - low > 0: # <<<<<<<<<<<<<<
@@ -18327,7 +18328,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (!__pyx_t_1) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":386
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":386
* high = self.f_index.arr[f_id+1]
* while high - low > 0:
* midpoint = (low+high)/2 # <<<<<<<<<<<<<<
@@ -18343,7 +18344,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_midpoint = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":387
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":387
* while high - low > 0:
* midpoint = (low+high)/2
* val = self.e_index.arr[midpoint] # <<<<<<<<<<<<<<
@@ -18357,7 +18358,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_v_val = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":388
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":388
* midpoint = (low+high)/2
* val = self.e_index.arr[midpoint]
* if val == e_id: # <<<<<<<<<<<<<<
@@ -18369,7 +18370,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":389
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":389
* val = self.e_index.arr[midpoint]
* if val == e_id:
* if col == 0: # <<<<<<<<<<<<<<
@@ -18381,7 +18382,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":390
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":390
* if val == e_id:
* if col == 0:
* return self.col1.arr[midpoint] # <<<<<<<<<<<<<<
@@ -18399,7 +18400,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":391
* if col == 0:
* return self.col1.arr[midpoint]
* if col == 1: # <<<<<<<<<<<<<<
@@ -18411,7 +18412,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":392
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":392
* return self.col1.arr[midpoint]
* if col == 1:
* return self.col2.arr[midpoint] # <<<<<<<<<<<<<<
@@ -18432,7 +18433,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":393
* if col == 1:
* return self.col2.arr[midpoint]
* if val > e_id: # <<<<<<<<<<<<<<
@@ -18444,7 +18445,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":394
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":394
* return self.col2.arr[midpoint]
* if val > e_id:
* high = midpoint # <<<<<<<<<<<<<<
@@ -18458,7 +18459,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":395
* if val > e_id:
* high = midpoint
* if val < e_id: # <<<<<<<<<<<<<<
@@ -18470,7 +18471,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":396
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":396
* high = midpoint
* if val < e_id:
* low = midpoint + 1 # <<<<<<<<<<<<<<
@@ -18487,7 +18488,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":397
* if val < e_id:
* low = midpoint + 1
* return None # <<<<<<<<<<<<<<
@@ -18504,7 +18505,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.BiLex.get_score", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.get_score", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_e_id);
@@ -18519,9 +18520,9 @@ static PyObject *__pyx_pf_3_sa_5BiLex_14get_score(struct __pyx_obj_3_sa_BiLex *_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_5BiLex_17write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static char __pyx_doc_3_sa_5BiLex_16write_text[] = "Note: does not guarantee writing the dictionary in the original order";
-static PyObject *__pyx_pw_3_sa_5BiLex_17write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_17write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static char __pyx_doc_4cdec_2sa_3_sa_5BiLex_16write_text[] = "Note: does not guarantee writing the dictionary in the original order";
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5BiLex_17write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -18534,16 +18535,16 @@ static PyObject *__pyx_pw_3_sa_5BiLex_17write_text(PyObject *__pyx_v_self, PyObj
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.BiLex.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_5BiLex_16write_text(((struct __pyx_obj_3_sa_BiLex *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_text(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":400
+/* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":400
*
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -18551,7 +18552,7 @@ static PyObject *__pyx_pw_3_sa_5BiLex_17write_text(PyObject *__pyx_v_self, PyObj
* cdef i, N, e_id, f_id
*/
-static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_text(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_v_i = 0;
PyObject *__pyx_v_N = 0;
PyObject *__pyx_v_e_id = 0;
@@ -18580,7 +18581,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":404
* cdef i, N, e_id, f_id
*
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -18620,7 +18621,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":405
*
* with open(filename, "w") as f:
* N = len(self.e_index) # <<<<<<<<<<<<<<
@@ -18636,7 +18637,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":406
* with open(filename, "w") as f:
* N = len(self.e_index)
* f_id = 0 # <<<<<<<<<<<<<<
@@ -18646,7 +18647,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":407
* N = len(self.e_index)
* f_id = 0
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -18661,7 +18662,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":408
* f_id = 0
* for i from 0 <= i < N:
* while self.f_index.arr[f_id+1] == i: # <<<<<<<<<<<<<<
@@ -18681,7 +18682,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":409
* for i from 0 <= i < N:
* while self.f_index.arr[f_id+1] == i:
* f_id = f_id + 1 # <<<<<<<<<<<<<<
@@ -18695,7 +18696,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/mdenkows/cdec/python/cdec/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] # <<<<<<<<<<<<<<
@@ -18709,7 +18710,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":411
* f_id = f_id + 1
* e_id = self.e_index.arr[i]
* score1 = self.col1.arr[i] # <<<<<<<<<<<<<<
@@ -18723,7 +18724,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":412
* e_id = self.e_index.arr[i]
* score1 = self.col1.arr[i]
* score2 = self.col2.arr[i] # <<<<<<<<<<<<<<
@@ -18736,7 +18737,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -18777,7 +18778,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":407
* N = len(self.e_index)
* f_id = 0
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -18800,7 +18801,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/mdenkows/cdec/python/cdec/sa/bilex.pxi":404
* cdef i, N, e_id, f_id
*
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -18808,7 +18809,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
* f_id = 0
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.BiLex.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_12, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_t_12);
@@ -18887,7 +18888,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_12);
- __Pyx_AddTraceback("_sa.BiLex.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BiLex.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_i);
@@ -18902,7 +18903,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/mdenkows/cdec/python/cdec/sa/veb.pxi":21
* cdef int LOWER_MASK[32]
*
* cdef void _init_lower_mask(): # <<<<<<<<<<<<<<
@@ -18910,7 +18911,7 @@ static PyObject *__pyx_pf_3_sa_5BiLex_16write_text(struct __pyx_obj_3_sa_BiLex *
* cdef int mask = 0
*/
-static void __pyx_f_3_sa__init_lower_mask(void) {
+static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) {
unsigned int __pyx_v_i;
int __pyx_v_mask;
__Pyx_RefNannyDeclarations
@@ -18918,7 +18919,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/mdenkows/cdec/python/cdec/sa/veb.pxi":23
* cdef void _init_lower_mask():
* cdef unsigned i
* cdef int mask = 0 # <<<<<<<<<<<<<<
@@ -18927,18 +18928,18 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":24
* cdef unsigned i
* cdef int mask = 0
* for i in range(MIN_BOTTOM_SIZE): # <<<<<<<<<<<<<<
* mask = (mask << 1) + 1
* LOWER_MASK[i] = mask
*/
- __pyx_t_1 = __pyx_v_3_sa_MIN_BOTTOM_SIZE;
+ __pyx_t_1 = __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE;
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/mdenkows/cdec/python/cdec/sa/veb.pxi":25
* cdef int mask = 0
* for i in range(MIN_BOTTOM_SIZE):
* mask = (mask << 1) + 1 # <<<<<<<<<<<<<<
@@ -18947,20 +18948,20 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":26
* for i in range(MIN_BOTTOM_SIZE):
* mask = (mask << 1) + 1
* LOWER_MASK[i] = mask # <<<<<<<<<<<<<<
*
* _init_lower_mask()
*/
- (__pyx_v_3_sa_LOWER_MASK[__pyx_v_i]) = __pyx_v_mask;
+ (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[__pyx_v_i]) = __pyx_v_mask;
}
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":37
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":37
*
*
* cdef _BitSet* new_BitSet(): # <<<<<<<<<<<<<<
@@ -18968,22 +18969,22 @@ static void __pyx_f_3_sa__init_lower_mask(void) {
*
*/
-static struct __pyx_t_3_sa__BitSet *__pyx_f_3_sa_new_BitSet(void) {
- struct __pyx_t_3_sa__BitSet *__pyx_v_b;
- struct __pyx_t_3_sa__BitSet *__pyx_r;
+static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet(void) {
+ struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_v_b;
+ struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("new_BitSet", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":40
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":40
* cdef _BitSet* b
*
* b = <_BitSet*> malloc(sizeof(_BitSet)) # <<<<<<<<<<<<<<
* b.bitset = 0
* b.min_val = -1
*/
- __pyx_v_b = ((struct __pyx_t_3_sa__BitSet *)malloc((sizeof(struct __pyx_t_3_sa__BitSet))));
+ __pyx_v_b = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__BitSet))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":41
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":41
*
* b = <_BitSet*> malloc(sizeof(_BitSet))
* b.bitset = 0 # <<<<<<<<<<<<<<
@@ -18992,7 +18993,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/mdenkows/cdec/python/cdec/sa/veb.pxi":42
* b = <_BitSet*> malloc(sizeof(_BitSet))
* b.bitset = 0
* b.min_val = -1 # <<<<<<<<<<<<<<
@@ -19001,7 +19002,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/mdenkows/cdec/python/cdec/sa/veb.pxi":43
* b.bitset = 0
* b.min_val = -1
* b.max_val = -1 # <<<<<<<<<<<<<<
@@ -19010,7 +19011,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/mdenkows/cdec/python/cdec/sa/veb.pxi":44
* b.min_val = -1
* b.max_val = -1
* b.size = 0 # <<<<<<<<<<<<<<
@@ -19019,7 +19020,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/mdenkows/cdec/python/cdec/sa/veb.pxi":45
* b.max_val = -1
* b.size = 0
* return b # <<<<<<<<<<<<<<
@@ -19035,7 +19036,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/mdenkows/cdec/python/cdec/sa/veb.pxi":48
*
*
* cdef int bitset_findsucc(_BitSet* b, int i): # <<<<<<<<<<<<<<
@@ -19043,7 +19044,7 @@ static struct __pyx_t_3_sa__BitSet *__pyx_f_3_sa_new_BitSet(void) {
* cdef int low, high, mid
*/
-static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b, int __pyx_v_i) {
+static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_v_b, int __pyx_v_i) {
int __pyx_v_bitset;
int __pyx_v_mask;
int __pyx_v_low;
@@ -19056,7 +19057,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/mdenkows/cdec/python/cdec/sa/veb.pxi":52
* cdef int low, high, mid
*
* if b.max_val == -1 or i >= b.max_val: # <<<<<<<<<<<<<<
@@ -19072,7 +19073,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/mdenkows/cdec/python/cdec/sa/veb.pxi":53
*
* if b.max_val == -1 or i >= b.max_val:
* return -1 # <<<<<<<<<<<<<<
@@ -19085,7 +19086,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/mdenkows/cdec/python/cdec/sa/veb.pxi":54
* if b.max_val == -1 or i >= b.max_val:
* return -1
* if i < b.min_val: # <<<<<<<<<<<<<<
@@ -19095,7 +19096,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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":55
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":55
* return -1
* if i < b.min_val:
* return b.min_val # <<<<<<<<<<<<<<
@@ -19108,16 +19109,16 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":57
* return b.min_val
*
* bitset = b.bitset & ~LOWER_MASK[i] # <<<<<<<<<<<<<<
* low = i+1
* high = b.max_val+1
*/
- __pyx_v_bitset = (__pyx_v_b->bitset & (~(__pyx_v_3_sa_LOWER_MASK[__pyx_v_i])));
+ __pyx_v_bitset = (__pyx_v_b->bitset & (~(__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[__pyx_v_i])));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":58
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":58
*
* bitset = b.bitset & ~LOWER_MASK[i]
* low = i+1 # <<<<<<<<<<<<<<
@@ -19126,7 +19127,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/mdenkows/cdec/python/cdec/sa/veb.pxi":59
* bitset = b.bitset & ~LOWER_MASK[i]
* low = i+1
* high = b.max_val+1 # <<<<<<<<<<<<<<
@@ -19135,7 +19136,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/mdenkows/cdec/python/cdec/sa/veb.pxi":60
* low = i+1
* high = b.max_val+1
* while low < high-1: # <<<<<<<<<<<<<<
@@ -19146,7 +19147,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)) != 0);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":61
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":61
* high = b.max_val+1
* while low < high-1:
* mid = (high + low)/2 # <<<<<<<<<<<<<<
@@ -19155,16 +19156,16 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":62
* while low < high-1:
* mid = (high + low)/2
* mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1]) # <<<<<<<<<<<<<<
* if bitset & mask == 0:
* low = mid
*/
- __pyx_v_mask = (~((__pyx_v_3_sa_LOWER_MASK[(__pyx_v_high - 1)]) ^ (__pyx_v_3_sa_LOWER_MASK[(__pyx_v_mid - 1)])));
+ __pyx_v_mask = (~((__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_high - 1)]) ^ (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_mid - 1)])));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":63
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":63
* mid = (high + low)/2
* mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1])
* if bitset & mask == 0: # <<<<<<<<<<<<<<
@@ -19174,7 +19175,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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":64
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":64
* mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1])
* if bitset & mask == 0:
* low = mid # <<<<<<<<<<<<<<
@@ -19186,7 +19187,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/mdenkows/cdec/python/cdec/sa/veb.pxi":66
* low = mid
* else:
* bitset = bitset & mask # <<<<<<<<<<<<<<
@@ -19195,7 +19196,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/mdenkows/cdec/python/cdec/sa/veb.pxi":67
* else:
* bitset = bitset & mask
* high = mid # <<<<<<<<<<<<<<
@@ -19207,7 +19208,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/mdenkows/cdec/python/cdec/sa/veb.pxi":68
* bitset = bitset & mask
* high = mid
* return low # <<<<<<<<<<<<<<
@@ -19223,7 +19224,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/mdenkows/cdec/python/cdec/sa/veb.pxi":71
*
*
* cdef int bitset_insert(_BitSet* b, int i): # <<<<<<<<<<<<<<
@@ -19231,14 +19232,14 @@ static int __pyx_f_3_sa_bitset_findsucc(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
*
*/
-static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, int __pyx_v_i) {
+static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_v_b, int __pyx_v_i) {
int __pyx_v_val;
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("bitset_insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":74
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":74
* cdef int val
*
* val = 1 << i # <<<<<<<<<<<<<<
@@ -19247,7 +19248,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/mdenkows/cdec/python/cdec/sa/veb.pxi":75
*
* val = 1 << i
* if b.bitset & val == 0: # <<<<<<<<<<<<<<
@@ -19257,7 +19258,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":76
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":76
* val = 1 << i
* if b.bitset & val == 0:
* b.bitset = b.bitset | val # <<<<<<<<<<<<<<
@@ -19266,7 +19267,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/mdenkows/cdec/python/cdec/sa/veb.pxi":77
* if b.bitset & val == 0:
* b.bitset = b.bitset | val
* if b.size == 0: # <<<<<<<<<<<<<<
@@ -19276,7 +19277,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":78
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":78
* b.bitset = b.bitset | val
* if b.size == 0:
* b.min_val = i # <<<<<<<<<<<<<<
@@ -19285,7 +19286,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/mdenkows/cdec/python/cdec/sa/veb.pxi":79
* if b.size == 0:
* b.min_val = i
* b.max_val = i # <<<<<<<<<<<<<<
@@ -19297,7 +19298,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/mdenkows/cdec/python/cdec/sa/veb.pxi":81
* b.max_val = i
* else:
* if i < b.min_val: # <<<<<<<<<<<<<<
@@ -19307,7 +19308,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":82
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":82
* else:
* if i < b.min_val:
* b.min_val = i # <<<<<<<<<<<<<<
@@ -19319,7 +19320,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/mdenkows/cdec/python/cdec/sa/veb.pxi":83
* if i < b.min_val:
* b.min_val = i
* if i > b.max_val: # <<<<<<<<<<<<<<
@@ -19329,7 +19330,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":84
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":84
* b.min_val = i
* if i > b.max_val:
* b.max_val = i # <<<<<<<<<<<<<<
@@ -19343,7 +19344,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/mdenkows/cdec/python/cdec/sa/veb.pxi":85
* if i > b.max_val:
* b.max_val = i
* b.size = b.size + 1 # <<<<<<<<<<<<<<
@@ -19352,7 +19353,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/mdenkows/cdec/python/cdec/sa/veb.pxi":86
* b.max_val = i
* b.size = b.size + 1
* return 1 # <<<<<<<<<<<<<<
@@ -19365,7 +19366,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/mdenkows/cdec/python/cdec/sa/veb.pxi":87
* b.size = b.size + 1
* return 1
* return 0 # <<<<<<<<<<<<<<
@@ -19381,7 +19382,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/mdenkows/cdec/python/cdec/sa/veb.pxi":90
*
*
* cdef int bitset_contains(_BitSet* b, int i): # <<<<<<<<<<<<<<
@@ -19389,14 +19390,14 @@ static int __pyx_f_3_sa_bitset_insert(struct __pyx_t_3_sa__BitSet *__pyx_v_b, in
*
*/
-static int __pyx_f_3_sa_bitset_contains(struct __pyx_t_3_sa__BitSet *__pyx_v_b, int __pyx_v_i) {
+static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_v_b, int __pyx_v_i) {
int __pyx_v_val;
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("bitset_contains", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":93
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":93
* cdef int val
*
* val = 1 << i # <<<<<<<<<<<<<<
@@ -19405,7 +19406,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/mdenkows/cdec/python/cdec/sa/veb.pxi":94
*
* val = 1 << i
* if b.bitset & val == 0: # <<<<<<<<<<<<<<
@@ -19415,7 +19416,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":95
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":95
* val = 1 << i
* if b.bitset & val == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -19428,7 +19429,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/mdenkows/cdec/python/cdec/sa/veb.pxi":97
* return 0
* else:
* return 1 # <<<<<<<<<<<<<<
@@ -19447,17 +19448,17 @@ static int __pyx_f_3_sa_bitset_contains(struct __pyx_t_3_sa__BitSet *__pyx_v_b,
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_14BitSetIterator_1__next__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_14BitSetIterator_1__next__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_14BitSetIterator_1__next__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_14BitSetIterator_1__next__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_14BitSetIterator___next__(((struct __pyx_obj_3_sa_BitSetIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(((struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":104
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":104
* cdef int next_val
*
* def __next__(self): # <<<<<<<<<<<<<<
@@ -19465,7 +19466,7 @@ static PyObject *__pyx_pw_3_sa_14BitSetIterator_1__next__(PyObject *__pyx_v_self
*
*/
-static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_BitSetIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator *__pyx_v_self) {
int __pyx_v_ret_val;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -19477,7 +19478,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/mdenkows/cdec/python/cdec/sa/veb.pxi":107
* cdef int ret_val
*
* if self.next_val == -1: # <<<<<<<<<<<<<<
@@ -19487,7 +19488,7 @@ static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_B
__pyx_t_1 = ((__pyx_v_self->next_val == -1) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":108
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":108
*
* if self.next_val == -1:
* raise StopIteration() # <<<<<<<<<<<<<<
@@ -19503,7 +19504,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/mdenkows/cdec/python/cdec/sa/veb.pxi":109
* if self.next_val == -1:
* raise StopIteration()
* ret_val = self.next_val # <<<<<<<<<<<<<<
@@ -19513,16 +19514,16 @@ static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_B
__pyx_t_3 = __pyx_v_self->next_val;
__pyx_v_ret_val = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":110
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":110
* raise StopIteration()
* ret_val = self.next_val
* self.next_val = bitset_findsucc(self.b, ret_val) # <<<<<<<<<<<<<<
* return ret_val
*
*/
- __pyx_v_self->next_val = __pyx_f_3_sa_bitset_findsucc(__pyx_v_self->b, __pyx_v_ret_val);
+ __pyx_v_self->next_val = __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(__pyx_v_self->b, __pyx_v_ret_val);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":111
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":111
* ret_val = self.next_val
* self.next_val = bitset_findsucc(self.b, ret_val)
* return ret_val # <<<<<<<<<<<<<<
@@ -19540,7 +19541,7 @@ static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_B
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.BitSetIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BitSetIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -19549,20 +19550,20 @@ static PyObject *__pyx_pf_3_sa_14BitSetIterator___next__(struct __pyx_obj_3_sa_B
}
/* Python wrapper */
-static int __pyx_pw_3_sa_6BitSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_6BitSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_6BitSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_6BitSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
- __pyx_r = __pyx_pf_3_sa_6BitSet___cinit__(((struct __pyx_obj_3_sa_BitSet *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6BitSet___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_BitSet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":122
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":122
* cdef _BitSet* b
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -19570,19 +19571,19 @@ static int __pyx_pw_3_sa_6BitSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__
*
*/
-static int __pyx_pf_3_sa_6BitSet___cinit__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_6BitSet___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":123
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":123
*
* def __cinit__(self):
* self.b = new_BitSet() # <<<<<<<<<<<<<<
*
* def __dealloc__(self):
*/
- __pyx_v_self->b = __pyx_f_3_sa_new_BitSet();
+ __pyx_v_self->b = __pyx_f_4cdec_2sa_3_sa_new_BitSet();
__pyx_r = 0;
__Pyx_RefNannyFinishContext();
@@ -19590,15 +19591,15 @@ static int __pyx_pf_3_sa_6BitSet___cinit__(struct __pyx_obj_3_sa_BitSet *__pyx_v
}
/* Python wrapper */
-static void __pyx_pw_3_sa_6BitSet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_3_sa_6BitSet_3__dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pw_4cdec_2sa_3_sa_6BitSet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_4cdec_2sa_3_sa_6BitSet_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_pf_3_sa_6BitSet_2__dealloc__(((struct __pyx_obj_3_sa_BitSet *)__pyx_v_self));
+ __pyx_pf_4cdec_2sa_3_sa_6BitSet_2__dealloc__(((struct __pyx_obj_4cdec_2sa_3_sa_BitSet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":125
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":125
* self.b = new_BitSet()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -19606,11 +19607,11 @@ static void __pyx_pw_3_sa_6BitSet_3__dealloc__(PyObject *__pyx_v_self) {
*
*/
-static void __pyx_pf_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self) {
+static void __pyx_pf_4cdec_2sa_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":126
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":126
*
* def __dealloc__(self):
* free(self.b) # <<<<<<<<<<<<<<
@@ -19623,17 +19624,17 @@ static void __pyx_pf_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_3_sa_BitSet *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6BitSet_5__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_6BitSet_5__iter__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_5__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_5__iter__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6BitSet_4__iter__(((struct __pyx_obj_3_sa_BitSet *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(((struct __pyx_obj_4cdec_2sa_3_sa_BitSet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":128
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":128
* free(self.b)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -19641,31 +19642,31 @@ static PyObject *__pyx_pw_3_sa_6BitSet_5__iter__(PyObject *__pyx_v_self) {
* it = BitSetIterator()
*/
-static PyObject *__pyx_pf_3_sa_6BitSet_4__iter__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self) {
- struct __pyx_obj_3_sa_BitSetIterator *__pyx_v_it = 0;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator *__pyx_v_it = 0;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
- struct __pyx_t_3_sa__BitSet *__pyx_t_2;
+ struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_t_2;
int __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":130
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":130
* def __iter__(self):
* cdef BitSetIterator it
* it = BitSetIterator() # <<<<<<<<<<<<<<
* it.b = self.b
* it.next_val = self.b.min_val
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_BitSetIterator)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_BitSetIterator)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_v_it = ((struct __pyx_obj_3_sa_BitSetIterator *)__pyx_t_1);
+ __pyx_v_it = ((struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":131
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":131
* cdef BitSetIterator it
* it = BitSetIterator()
* it.b = self.b # <<<<<<<<<<<<<<
@@ -19675,7 +19676,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_4__iter__(struct __pyx_obj_3_sa_BitSet *_
__pyx_t_2 = __pyx_v_self->b;
__pyx_v_it->b = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":132
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":132
* it = BitSetIterator()
* it.b = self.b
* it.next_val = self.b.min_val # <<<<<<<<<<<<<<
@@ -19685,7 +19686,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_4__iter__(struct __pyx_obj_3_sa_BitSet *_
__pyx_t_3 = __pyx_v_self->b->min_val;
__pyx_v_it->next_val = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":133
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":133
* it.b = self.b
* it.next_val = self.b.min_val
* return it # <<<<<<<<<<<<<<
@@ -19701,7 +19702,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_4__iter__(struct __pyx_obj_3_sa_BitSet *_
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.BitSet.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BitSet.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_it);
@@ -19711,17 +19712,17 @@ static PyObject *__pyx_pf_3_sa_6BitSet_4__iter__(struct __pyx_obj_3_sa_BitSet *_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6BitSet_7insert(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_6BitSet_7insert(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_7insert(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_7insert(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("insert (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6BitSet_6insert(((struct __pyx_obj_3_sa_BitSet *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6BitSet_6insert(((struct __pyx_obj_4cdec_2sa_3_sa_BitSet *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":135
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":135
* return it
*
* def insert(self, i): # <<<<<<<<<<<<<<
@@ -19729,7 +19730,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_7insert(PyObject *__pyx_v_self, PyObject
*
*/
-static PyObject *__pyx_pf_3_sa_6BitSet_6insert(struct __pyx_obj_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_6insert(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -19739,7 +19740,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/mdenkows/cdec/python/cdec/sa/veb.pxi":136
*
* def insert(self, i):
* return bitset_insert(self.b, i) # <<<<<<<<<<<<<<
@@ -19748,7 +19749,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_6insert(struct __pyx_obj_3_sa_BitSet *__p
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PyInt_FromLong(__pyx_f_3_sa_bitset_insert(__pyx_v_self->b, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_bitset_insert(__pyx_v_self->b, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -19758,7 +19759,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_6insert(struct __pyx_obj_3_sa_BitSet *__p
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.BitSet.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BitSet.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -19767,17 +19768,17 @@ static PyObject *__pyx_pf_3_sa_6BitSet_6insert(struct __pyx_obj_3_sa_BitSet *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6BitSet_9findsucc(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_6BitSet_9findsucc(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_9findsucc(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_9findsucc(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("findsucc (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6BitSet_8findsucc(((struct __pyx_obj_3_sa_BitSet *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6BitSet_8findsucc(((struct __pyx_obj_4cdec_2sa_3_sa_BitSet *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":138
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":138
* return bitset_insert(self.b, i)
*
* def findsucc(self, i): # <<<<<<<<<<<<<<
@@ -19785,7 +19786,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_9findsucc(PyObject *__pyx_v_self, PyObjec
*
*/
-static PyObject *__pyx_pf_3_sa_6BitSet_8findsucc(struct __pyx_obj_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_8findsucc(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -19795,7 +19796,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/mdenkows/cdec/python/cdec/sa/veb.pxi":139
*
* def findsucc(self, i):
* return bitset_findsucc(self.b, i) # <<<<<<<<<<<<<<
@@ -19804,7 +19805,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_8findsucc(struct __pyx_obj_3_sa_BitSet *_
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PyInt_FromLong(__pyx_f_3_sa_bitset_findsucc(__pyx_v_self->b, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_bitset_findsucc(__pyx_v_self->b, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -19814,7 +19815,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_8findsucc(struct __pyx_obj_3_sa_BitSet *_
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.BitSet.findsucc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BitSet.findsucc", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -19823,17 +19824,17 @@ static PyObject *__pyx_pf_3_sa_6BitSet_8findsucc(struct __pyx_obj_3_sa_BitSet *_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6BitSet_11__str__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_6BitSet_11__str__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_11__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_11__str__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6BitSet_10__str__(((struct __pyx_obj_3_sa_BitSet *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6BitSet_10__str__(((struct __pyx_obj_4cdec_2sa_3_sa_BitSet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":141
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":141
* return bitset_findsucc(self.b, i)
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -19841,7 +19842,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_11__str__(PyObject *__pyx_v_self) {
*
*/
-static PyObject *__pyx_pf_3_sa_6BitSet_10__str__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_10__str__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -19852,7 +19853,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/mdenkows/cdec/python/cdec/sa/veb.pxi":142
*
* def __str__(self):
* return dec2bin(self.b.bitset)+" ("+str(self.b.size)+","+str(self.b.min_val)+","+str(self.b.max_val)+")" # <<<<<<<<<<<<<<
@@ -19860,7 +19861,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_10__str__(struct __pyx_obj_3_sa_BitSet *_
* def min(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_3_sa_dec2bin(__pyx_v_self->b->bitset)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)__pyx_f_4cdec_2sa_3_sa_dec2bin(__pyx_v_self->b->bitset)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_kp_s_60)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
@@ -19926,7 +19927,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_10__str__(struct __pyx_obj_3_sa_BitSet *_
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.BitSet.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BitSet.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -19935,17 +19936,17 @@ static PyObject *__pyx_pf_3_sa_6BitSet_10__str__(struct __pyx_obj_3_sa_BitSet *_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6BitSet_13min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_6BitSet_13min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_13min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_13min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("min (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6BitSet_12min(((struct __pyx_obj_3_sa_BitSet *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6BitSet_12min(((struct __pyx_obj_4cdec_2sa_3_sa_BitSet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":144
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":144
* return dec2bin(self.b.bitset)+" ("+str(self.b.size)+","+str(self.b.min_val)+","+str(self.b.max_val)+")"
*
* def min(self): # <<<<<<<<<<<<<<
@@ -19953,7 +19954,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_13min(PyObject *__pyx_v_self, CYTHON_UNUS
*
*/
-static PyObject *__pyx_pf_3_sa_6BitSet_12min(struct __pyx_obj_3_sa_BitSet *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_12min(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -19962,7 +19963,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/mdenkows/cdec/python/cdec/sa/veb.pxi":145
*
* def min(self):
* return self.b.min_val # <<<<<<<<<<<<<<
@@ -19980,7 +19981,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_12min(struct __pyx_obj_3_sa_BitSet *__pyx
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.BitSet.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BitSet.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -19989,17 +19990,17 @@ static PyObject *__pyx_pf_3_sa_6BitSet_12min(struct __pyx_obj_3_sa_BitSet *__pyx
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6BitSet_15max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_6BitSet_15max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_15max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6BitSet_15max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("max (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6BitSet_14max(((struct __pyx_obj_3_sa_BitSet *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6BitSet_14max(((struct __pyx_obj_4cdec_2sa_3_sa_BitSet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":147
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":147
* return self.b.min_val
*
* def max(self): # <<<<<<<<<<<<<<
@@ -20007,7 +20008,7 @@ static PyObject *__pyx_pw_3_sa_6BitSet_15max(PyObject *__pyx_v_self, CYTHON_UNUS
*
*/
-static PyObject *__pyx_pf_3_sa_6BitSet_14max(struct __pyx_obj_3_sa_BitSet *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_14max(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -20016,7 +20017,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/mdenkows/cdec/python/cdec/sa/veb.pxi":148
*
* def max(self):
* return self.b.max_val # <<<<<<<<<<<<<<
@@ -20034,7 +20035,7 @@ static PyObject *__pyx_pf_3_sa_6BitSet_14max(struct __pyx_obj_3_sa_BitSet *__pyx
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.BitSet.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BitSet.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -20043,17 +20044,17 @@ static PyObject *__pyx_pf_3_sa_6BitSet_14max(struct __pyx_obj_3_sa_BitSet *__pyx
}
/* Python wrapper */
-static Py_ssize_t __pyx_pw_3_sa_6BitSet_17__len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_pw_3_sa_6BitSet_17__len__(PyObject *__pyx_v_self) {
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_6BitSet_17__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_6BitSet_17__len__(PyObject *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6BitSet_16__len__(((struct __pyx_obj_3_sa_BitSet *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6BitSet_16__len__(((struct __pyx_obj_4cdec_2sa_3_sa_BitSet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":150
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":150
* return self.b.max_val
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -20061,12 +20062,12 @@ static Py_ssize_t __pyx_pw_3_sa_6BitSet_17__len__(PyObject *__pyx_v_self) {
*
*/
-static Py_ssize_t __pyx_pf_3_sa_6BitSet_16__len__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self) {
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6BitSet_16__len__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":151
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":151
*
* def __len__(self):
* return self.b.size # <<<<<<<<<<<<<<
@@ -20083,17 +20084,17 @@ static Py_ssize_t __pyx_pf_3_sa_6BitSet_16__len__(struct __pyx_obj_3_sa_BitSet *
}
/* Python wrapper */
-static int __pyx_pw_3_sa_6BitSet_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static int __pyx_pw_3_sa_6BitSet_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static int __pyx_pw_4cdec_2sa_3_sa_6BitSet_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_6BitSet_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6BitSet_18__contains__(((struct __pyx_obj_3_sa_BitSet *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6BitSet_18__contains__(((struct __pyx_obj_4cdec_2sa_3_sa_BitSet *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":153
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":153
* return self.b.size
*
* def __contains__(self, i): # <<<<<<<<<<<<<<
@@ -20101,7 +20102,7 @@ static int __pyx_pw_3_sa_6BitSet_19__contains__(PyObject *__pyx_v_self, PyObject
*
*/
-static int __pyx_pf_3_sa_6BitSet_18__contains__(struct __pyx_obj_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i) {
+static int __pyx_pf_4cdec_2sa_3_sa_6BitSet_18__contains__(struct __pyx_obj_4cdec_2sa_3_sa_BitSet *__pyx_v_self, PyObject *__pyx_v_i) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -20112,7 +20113,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/mdenkows/cdec/python/cdec/sa/veb.pxi":154
*
* def __contains__(self, i):
* return bool(bitset_contains(self.b, i)) # <<<<<<<<<<<<<<
@@ -20120,7 +20121,7 @@ static int __pyx_pf_3_sa_6BitSet_18__contains__(struct __pyx_obj_3_sa_BitSet *__
*
*/
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PyInt_FromLong(__pyx_f_3_sa_bitset_contains(__pyx_v_self->b, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_bitset_contains(__pyx_v_self->b, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -20131,14 +20132,14 @@ static int __pyx_pf_3_sa_6BitSet_18__contains__(struct __pyx_obj_3_sa_BitSet *__
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.BitSet.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.BitSet.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":157
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":157
*
*
* cdef str dec2bin(long i): # <<<<<<<<<<<<<<
@@ -20146,7 +20147,7 @@ static int __pyx_pf_3_sa_6BitSet_18__contains__(struct __pyx_obj_3_sa_BitSet *__
* cdef unsigned d
*/
-static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) {
PyObject *__pyx_v_result = 0;
CYTHON_UNUSED unsigned int __pyx_v_d;
PyObject *__pyx_r = NULL;
@@ -20160,7 +20161,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/mdenkows/cdec/python/cdec/sa/veb.pxi":158
*
* cdef str dec2bin(long i):
* cdef str result = "" # <<<<<<<<<<<<<<
@@ -20170,28 +20171,28 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
__Pyx_INCREF(((PyObject *)__pyx_kp_s_47));
__pyx_v_result = __pyx_kp_s_47;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":160
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":160
* cdef str result = ""
* cdef unsigned d
* for d in range(MIN_BOTTOM_SIZE): # <<<<<<<<<<<<<<
* if i & LOWER_MASK[0] == 0:
* result = "0"+result
*/
- __pyx_t_1 = __pyx_v_3_sa_MIN_BOTTOM_SIZE;
+ __pyx_t_1 = __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE;
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/mdenkows/cdec/python/cdec/sa/veb.pxi":161
* cdef unsigned d
* for d in range(MIN_BOTTOM_SIZE):
* if i & LOWER_MASK[0] == 0: # <<<<<<<<<<<<<<
* result = "0"+result
* else:
*/
- __pyx_t_3 = (((__pyx_v_i & (__pyx_v_3_sa_LOWER_MASK[0])) == 0) != 0);
+ __pyx_t_3 = (((__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[0])) == 0) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":162
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":162
* for d in range(MIN_BOTTOM_SIZE):
* if i & LOWER_MASK[0] == 0:
* result = "0"+result # <<<<<<<<<<<<<<
@@ -20207,7 +20208,7 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":164
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":164
* result = "0"+result
* else:
* result = "1"+result # <<<<<<<<<<<<<<
@@ -20222,7 +20223,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/mdenkows/cdec/python/cdec/sa/veb.pxi":165
* else:
* result = "1"+result
* i = i >> 1 # <<<<<<<<<<<<<<
@@ -20232,7 +20233,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/mdenkows/cdec/python/cdec/sa/veb.pxi":166
* result = "1"+result
* i = i >> 1
* return result # <<<<<<<<<<<<<<
@@ -20248,7 +20249,7 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.dec2bin", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.dec2bin", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
@@ -20257,7 +20258,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/mdenkows/cdec/python/cdec/sa/veb.pxi":177
* void** bottom
*
* cdef _VEB* new_VEB(int n): # <<<<<<<<<<<<<<
@@ -20265,10 +20266,10 @@ static PyObject *__pyx_f_3_sa_dec2bin(long __pyx_v_i) {
* cdef int num_bits, num_top_bits, i
*/
-static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
- struct __pyx_t_3_sa__VEB *__pyx_v_veb;
+static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __pyx_v_n) {
+ struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_v_veb;
int __pyx_v_num_bits;
- struct __pyx_t_3_sa__VEB *__pyx_r;
+ struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_r;
__Pyx_RefNannyDeclarations
double __pyx_t_1;
double __pyx_t_2;
@@ -20278,16 +20279,16 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":181
* cdef int num_bits, num_top_bits, i
*
* veb = <_VEB*> malloc(sizeof(_VEB)) # <<<<<<<<<<<<<<
*
* num_bits = int(ceil(log(n) / log(2)))
*/
- __pyx_v_veb = ((struct __pyx_t_3_sa__VEB *)malloc((sizeof(struct __pyx_t_3_sa__VEB))));
+ __pyx_v_veb = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__VEB))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":183
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":183
* veb = <_VEB*> malloc(sizeof(_VEB))
*
* num_bits = int(ceil(log(n) / log(2))) # <<<<<<<<<<<<<<
@@ -20308,7 +20309,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/mdenkows/cdec/python/cdec/sa/veb.pxi":184
*
* num_bits = int(ceil(log(n) / log(2)))
* veb.num_bottom_bits = num_bits/2 # <<<<<<<<<<<<<<
@@ -20317,29 +20318,29 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":185
* num_bits = int(ceil(log(n) / log(2)))
* veb.num_bottom_bits = num_bits/2
* if veb.num_bottom_bits < MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
* veb.num_bottom_bits = MIN_BOTTOM_BITS
* veb.top_universe_size = (n >> veb.num_bottom_bits) + 1
*/
- __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits < __pyx_v_3_sa_MIN_BOTTOM_BITS) != 0);
+ __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits < __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":186
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":186
* veb.num_bottom_bits = num_bits/2
* if veb.num_bottom_bits < MIN_BOTTOM_BITS:
* veb.num_bottom_bits = MIN_BOTTOM_BITS # <<<<<<<<<<<<<<
* veb.top_universe_size = (n >> veb.num_bottom_bits) + 1
*
*/
- __pyx_v_veb->num_bottom_bits = __pyx_v_3_sa_MIN_BOTTOM_BITS;
+ __pyx_v_veb->num_bottom_bits = __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS;
goto __pyx_L3;
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":187
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":187
* if veb.num_bottom_bits < MIN_BOTTOM_BITS:
* veb.num_bottom_bits = MIN_BOTTOM_BITS
* veb.top_universe_size = (n >> veb.num_bottom_bits) + 1 # <<<<<<<<<<<<<<
@@ -20348,7 +20349,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/mdenkows/cdec/python/cdec/sa/veb.pxi":189
* veb.top_universe_size = (n >> veb.num_bottom_bits) + 1
*
* veb.bottom = <void**> malloc(veb.top_universe_size * sizeof(void*)) # <<<<<<<<<<<<<<
@@ -20357,7 +20358,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/mdenkows/cdec/python/cdec/sa/veb.pxi":190
*
* veb.bottom = <void**> malloc(veb.top_universe_size * sizeof(void*))
* memset(veb.bottom, 0, veb.top_universe_size * sizeof(void*)) # <<<<<<<<<<<<<<
@@ -20366,40 +20367,40 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":192
* memset(veb.bottom, 0, veb.top_universe_size * sizeof(void*))
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
* veb.top = new_VEB(veb.top_universe_size)
* else:
*/
- __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE) != 0);
+ __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":193
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":193
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* veb.top = new_VEB(veb.top_universe_size) # <<<<<<<<<<<<<<
* else:
* veb.top = new_BitSet()
*/
- __pyx_v_veb->top = __pyx_f_3_sa_new_VEB(__pyx_v_veb->top_universe_size);
+ __pyx_v_veb->top = __pyx_f_4cdec_2sa_3_sa_new_VEB(__pyx_v_veb->top_universe_size);
goto __pyx_L4;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":195
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":195
* veb.top = new_VEB(veb.top_universe_size)
* else:
* veb.top = new_BitSet() # <<<<<<<<<<<<<<
*
* veb.max_val = -1
*/
- __pyx_v_veb->top = __pyx_f_3_sa_new_BitSet();
+ __pyx_v_veb->top = __pyx_f_4cdec_2sa_3_sa_new_BitSet();
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":197
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":197
* veb.top = new_BitSet()
*
* veb.max_val = -1 # <<<<<<<<<<<<<<
@@ -20408,7 +20409,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/mdenkows/cdec/python/cdec/sa/veb.pxi":198
*
* veb.max_val = -1
* veb.min_val = -1 # <<<<<<<<<<<<<<
@@ -20417,7 +20418,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/mdenkows/cdec/python/cdec/sa/veb.pxi":199
* veb.max_val = -1
* veb.min_val = -1
* veb.size = 0 # <<<<<<<<<<<<<<
@@ -20426,7 +20427,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/mdenkows/cdec/python/cdec/sa/veb.pxi":200
* veb.min_val = -1
* veb.size = 0
* return veb # <<<<<<<<<<<<<<
@@ -20439,14 +20440,14 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_WriteUnraisable("_sa.new_VEB", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.new_VEB", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":203
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":203
*
*
* cdef int VEB_insert(_VEB* veb, int i): # <<<<<<<<<<<<<<
@@ -20454,9 +20455,9 @@ static struct __pyx_t_3_sa__VEB *__pyx_f_3_sa_new_VEB(int __pyx_v_n) {
* cdef _BitSet* subb
*/
-static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __pyx_v_i) {
- struct __pyx_t_3_sa__VEB *__pyx_v_subv;
- struct __pyx_t_3_sa__BitSet *__pyx_v_subb;
+static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_v_veb, int __pyx_v_i) {
+ struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_v_subv;
+ struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_v_subb;
int __pyx_v_a;
int __pyx_v_b;
int __pyx_v_tmp;
@@ -20468,7 +20469,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
int __pyx_t_4;
__Pyx_RefNannySetupContext("VEB_insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":208
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":208
* cdef int a, b, tmp
*
* if veb.size == 0: # <<<<<<<<<<<<<<
@@ -20478,7 +20479,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":209
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":209
*
* if veb.size == 0:
* veb.min_val = i # <<<<<<<<<<<<<<
@@ -20487,7 +20488,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/mdenkows/cdec/python/cdec/sa/veb.pxi":210
* if veb.size == 0:
* veb.min_val = i
* veb.max_val = i # <<<<<<<<<<<<<<
@@ -20498,7 +20499,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/mdenkows/cdec/python/cdec/sa/veb.pxi":211
* veb.min_val = i
* veb.max_val = i
* elif i == veb.min_val or i == veb.max_val: # <<<<<<<<<<<<<<
@@ -20514,7 +20515,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/mdenkows/cdec/python/cdec/sa/veb.pxi":212
* veb.max_val = i
* elif i == veb.min_val or i == veb.max_val:
* return 0 # <<<<<<<<<<<<<<
@@ -20527,7 +20528,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/mdenkows/cdec/python/cdec/sa/veb.pxi":214
* return 0
* else:
* if i < veb.min_val: # <<<<<<<<<<<<<<
@@ -20537,7 +20538,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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":215
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":215
* else:
* if i < veb.min_val:
* tmp = i # <<<<<<<<<<<<<<
@@ -20546,7 +20547,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/mdenkows/cdec/python/cdec/sa/veb.pxi":216
* if i < veb.min_val:
* tmp = i
* i = veb.min_val # <<<<<<<<<<<<<<
@@ -20556,7 +20557,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
__pyx_t_4 = __pyx_v_veb->min_val;
__pyx_v_i = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":217
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":217
* tmp = i
* i = veb.min_val
* veb.min_val = tmp # <<<<<<<<<<<<<<
@@ -20568,7 +20569,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/mdenkows/cdec/python/cdec/sa/veb.pxi":218
* i = veb.min_val
* veb.min_val = tmp
* a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<<
@@ -20577,16 +20578,16 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":219
* veb.min_val = tmp
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<<
* if veb.bottom[a] == NULL:
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
*/
- __pyx_v_b = (__pyx_v_i & (__pyx_v_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)]));
+ __pyx_v_b = (__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":220
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":220
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* if veb.bottom[a] == NULL: # <<<<<<<<<<<<<<
@@ -20596,123 +20597,123 @@ 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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":221
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":221
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* if veb.bottom[a] == NULL:
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
* subv = <_VEB*> veb.top
* VEB_insert(subv, a)
*/
- __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE) != 0);
+ __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":222
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":222
* if veb.bottom[a] == NULL:
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top # <<<<<<<<<<<<<<
* VEB_insert(subv, a)
* else:
*/
- __pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)__pyx_v_veb->top);
+ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)__pyx_v_veb->top);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":223
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":223
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top
* VEB_insert(subv, a) # <<<<<<<<<<<<<<
* else:
* subb = <_BitSet*> veb.top
*/
- __pyx_f_3_sa_VEB_insert(__pyx_v_subv, __pyx_v_a);
+ __pyx_f_4cdec_2sa_3_sa_VEB_insert(__pyx_v_subv, __pyx_v_a);
goto __pyx_L6;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":225
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":225
* VEB_insert(subv, a)
* else:
* subb = <_BitSet*> veb.top # <<<<<<<<<<<<<<
* bitset_insert(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
*/
- __pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)__pyx_v_veb->top);
+ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)__pyx_v_veb->top);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":226
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":226
* else:
* subb = <_BitSet*> veb.top
* bitset_insert(subb, a) # <<<<<<<<<<<<<<
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* veb.bottom[a] = new_VEB(1 << veb.num_bottom_bits)
*/
- __pyx_f_3_sa_bitset_insert(__pyx_v_subb, __pyx_v_a);
+ __pyx_f_4cdec_2sa_3_sa_bitset_insert(__pyx_v_subb, __pyx_v_a);
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":227
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":227
* subb = <_BitSet*> veb.top
* bitset_insert(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
* veb.bottom[a] = new_VEB(1 << veb.num_bottom_bits)
* else:
*/
- __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS) != 0);
+ __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":228
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":228
* bitset_insert(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* veb.bottom[a] = new_VEB(1 << veb.num_bottom_bits) # <<<<<<<<<<<<<<
* else:
* veb.bottom[a] = new_BitSet()
*/
- (__pyx_v_veb->bottom[__pyx_v_a]) = __pyx_f_3_sa_new_VEB((1 << __pyx_v_veb->num_bottom_bits));
+ (__pyx_v_veb->bottom[__pyx_v_a]) = __pyx_f_4cdec_2sa_3_sa_new_VEB((1 << __pyx_v_veb->num_bottom_bits));
goto __pyx_L7;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":230
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":230
* veb.bottom[a] = new_VEB(1 << veb.num_bottom_bits)
* else:
* veb.bottom[a] = new_BitSet() # <<<<<<<<<<<<<<
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a]
*/
- (__pyx_v_veb->bottom[__pyx_v_a]) = __pyx_f_3_sa_new_BitSet();
+ (__pyx_v_veb->bottom[__pyx_v_a]) = __pyx_f_4cdec_2sa_3_sa_new_BitSet();
}
__pyx_L7:;
goto __pyx_L5;
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":231
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":231
* else:
* veb.bottom[a] = new_BitSet()
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
* subv = <_VEB*> veb.bottom[a]
* if VEB_insert(subv, b) == 0:
*/
- __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS) != 0);
+ __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":232
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":232
* veb.bottom[a] = new_BitSet()
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<<
* if VEB_insert(subv, b) == 0:
* return 0
*/
- __pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a]));
+ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":233
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":233
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a]
* if VEB_insert(subv, b) == 0: # <<<<<<<<<<<<<<
* return 0
* else:
*/
- __pyx_t_3 = ((__pyx_f_3_sa_VEB_insert(__pyx_v_subv, __pyx_v_b) == 0) != 0);
+ __pyx_t_3 = ((__pyx_f_4cdec_2sa_3_sa_VEB_insert(__pyx_v_subv, __pyx_v_b) == 0) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":234
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":234
* subv = <_VEB*> veb.bottom[a]
* if VEB_insert(subv, b) == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -20728,26 +20729,26 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":236
* return 0
* else:
* subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<<
* if bitset_insert(subb, b) == 0:
* return 0
*/
- __pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a]));
+ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":237
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":237
* else:
* subb = <_BitSet*> veb.bottom[a]
* if bitset_insert(subb, b) == 0: # <<<<<<<<<<<<<<
* return 0
*
*/
- __pyx_t_3 = ((__pyx_f_3_sa_bitset_insert(__pyx_v_subb, __pyx_v_b) == 0) != 0);
+ __pyx_t_3 = ((__pyx_f_4cdec_2sa_3_sa_bitset_insert(__pyx_v_subb, __pyx_v_b) == 0) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":238
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":238
* subb = <_BitSet*> veb.bottom[a]
* if bitset_insert(subb, b) == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -20762,7 +20763,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/mdenkows/cdec/python/cdec/sa/veb.pxi":240
* return 0
*
* if i > veb.max_val: # <<<<<<<<<<<<<<
@@ -20772,7 +20773,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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":241
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":241
*
* if i > veb.max_val:
* veb.max_val = i # <<<<<<<<<<<<<<
@@ -20786,7 +20787,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/mdenkows/cdec/python/cdec/sa/veb.pxi":242
* if i > veb.max_val:
* veb.max_val = i
* veb.size = veb.size + 1 # <<<<<<<<<<<<<<
@@ -20795,7 +20796,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/mdenkows/cdec/python/cdec/sa/veb.pxi":243
* veb.max_val = i
* veb.size = veb.size + 1
* return 1 # <<<<<<<<<<<<<<
@@ -20811,7 +20812,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/mdenkows/cdec/python/cdec/sa/veb.pxi":246
*
*
* cdef del_VEB(_VEB* veb): # <<<<<<<<<<<<<<
@@ -20819,7 +20820,7 @@ static int __pyx_f_3_sa_VEB_insert(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __
*
*/
-static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_v_veb) {
int __pyx_v_i;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -20831,42 +20832,42 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":249
* cdef int i
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
* i = (<_VEB*> veb.top).min_val
* else:
*/
- __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE) != 0);
+ __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":250
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":250
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* i = (<_VEB*> veb.top).min_val # <<<<<<<<<<<<<<
* else:
* i = (<_BitSet*> veb.top).min_val
*/
- __pyx_t_2 = ((struct __pyx_t_3_sa__VEB *)__pyx_v_veb->top)->min_val;
+ __pyx_t_2 = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)__pyx_v_veb->top)->min_val;
__pyx_v_i = __pyx_t_2;
goto __pyx_L3;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":252
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":252
* i = (<_VEB*> veb.top).min_val
* else:
* i = (<_BitSet*> veb.top).min_val # <<<<<<<<<<<<<<
*
* while i != -1:
*/
- __pyx_t_2 = ((struct __pyx_t_3_sa__BitSet *)__pyx_v_veb->top)->min_val;
+ __pyx_t_2 = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)__pyx_v_veb->top)->min_val;
__pyx_v_i = __pyx_t_2;
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":254
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":254
* i = (<_BitSet*> veb.top).min_val
*
* while i != -1: # <<<<<<<<<<<<<<
@@ -20877,111 +20878,111 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
__pyx_t_1 = ((__pyx_v_i != -1) != 0);
if (!__pyx_t_1) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":255
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":255
*
* while i != -1:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
* del_VEB(<_VEB*> veb.bottom[i])
* else:
*/
- __pyx_t_1 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS) != 0);
+ __pyx_t_1 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":256
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":256
* while i != -1:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* del_VEB(<_VEB*> veb.bottom[i]) # <<<<<<<<<<<<<<
* else:
* free(<_BitSet*> veb.bottom[i])
*/
- __pyx_t_3 = __pyx_f_3_sa_del_VEB(((struct __pyx_t_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_4cdec_2sa_3_sa_del_VEB(((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L6;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":258
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":258
* del_VEB(<_VEB*> veb.bottom[i])
* else:
* free(<_BitSet*> veb.bottom[i]) # <<<<<<<<<<<<<<
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
*/
- free(((struct __pyx_t_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_i])));
+ free(((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_i])));
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":260
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":260
* free(<_BitSet*> veb.bottom[i])
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
* i = VEB_findsucc(<_VEB*> veb.top, i)
* else:
*/
- __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE) != 0);
+ __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":261
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":261
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* i = VEB_findsucc(<_VEB*> veb.top, i) # <<<<<<<<<<<<<<
* else:
* i = bitset_findsucc(<_BitSet*> veb.top, i)
*/
- __pyx_v_i = __pyx_f_3_sa_VEB_findsucc(((struct __pyx_t_3_sa__VEB *)__pyx_v_veb->top), __pyx_v_i);
+ __pyx_v_i = __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(((struct __pyx_t_4cdec_2sa_3_sa__VEB *)__pyx_v_veb->top), __pyx_v_i);
goto __pyx_L7;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":263
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":263
* i = VEB_findsucc(<_VEB*> veb.top, i)
* else:
* i = bitset_findsucc(<_BitSet*> veb.top, i) # <<<<<<<<<<<<<<
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
*/
- __pyx_v_i = __pyx_f_3_sa_bitset_findsucc(((struct __pyx_t_3_sa__BitSet *)__pyx_v_veb->top), __pyx_v_i);
+ __pyx_v_i = __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)__pyx_v_veb->top), __pyx_v_i);
}
__pyx_L7:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":265
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":265
* i = bitset_findsucc(<_BitSet*> veb.top, i)
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
* del_VEB(<_VEB*> veb.top)
* else:
*/
- __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE) != 0);
+ __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":266
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":266
*
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* del_VEB(<_VEB*> veb.top) # <<<<<<<<<<<<<<
* else:
* free(<_BitSet*> veb.top)
*/
- __pyx_t_3 = __pyx_f_3_sa_del_VEB(((struct __pyx_t_3_sa__VEB *)__pyx_v_veb->top)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_4cdec_2sa_3_sa_del_VEB(((struct __pyx_t_4cdec_2sa_3_sa__VEB *)__pyx_v_veb->top)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L8;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":268
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":268
* del_VEB(<_VEB*> veb.top)
* else:
* free(<_BitSet*> veb.top) # <<<<<<<<<<<<<<
* free(veb.bottom)
* free(veb)
*/
- free(((struct __pyx_t_3_sa__BitSet *)__pyx_v_veb->top));
+ free(((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)__pyx_v_veb->top));
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":269
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":269
* else:
* free(<_BitSet*> veb.top)
* free(veb.bottom) # <<<<<<<<<<<<<<
@@ -20990,7 +20991,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/mdenkows/cdec/python/cdec/sa/veb.pxi":270
* free(<_BitSet*> veb.top)
* free(veb.bottom)
* free(veb) # <<<<<<<<<<<<<<
@@ -21003,7 +21004,7 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.del_VEB", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.del_VEB", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -21011,7 +21012,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/mdenkows/cdec/python/cdec/sa/veb.pxi":273
*
*
* cdef int VEB_findsucc(_VEB* veb, int i): # <<<<<<<<<<<<<<
@@ -21019,9 +21020,9 @@ static PyObject *__pyx_f_3_sa_del_VEB(struct __pyx_t_3_sa__VEB *__pyx_v_veb) {
* cdef _BitSet* subb
*/
-static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __pyx_v_i) {
- struct __pyx_t_3_sa__VEB *__pyx_v_subv;
- struct __pyx_t_3_sa__BitSet *__pyx_v_subb;
+static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_v_veb, int __pyx_v_i) {
+ struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_v_subv;
+ struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_v_subb;
int __pyx_v_a;
int __pyx_v_b;
int __pyx_v_j;
@@ -21034,7 +21035,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/mdenkows/cdec/python/cdec/sa/veb.pxi":278
* cdef int a, b, j, c, found
*
* if veb.max_val == -1 or i>=veb.max_val: # <<<<<<<<<<<<<<
@@ -21050,7 +21051,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/mdenkows/cdec/python/cdec/sa/veb.pxi":279
*
* if veb.max_val == -1 or i>=veb.max_val:
* return -1 # <<<<<<<<<<<<<<
@@ -21063,7 +21064,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/mdenkows/cdec/python/cdec/sa/veb.pxi":280
* if veb.max_val == -1 or i>=veb.max_val:
* return -1
* if i < veb.min_val: # <<<<<<<<<<<<<<
@@ -21073,7 +21074,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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":281
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":281
* return -1
* if i < veb.min_val:
* return veb.min_val # <<<<<<<<<<<<<<
@@ -21086,7 +21087,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/mdenkows/cdec/python/cdec/sa/veb.pxi":283
* return veb.min_val
*
* a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<<
@@ -21095,16 +21096,16 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":284
*
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<<
* found = 0
* if veb.bottom[a] != NULL:
*/
- __pyx_v_b = (__pyx_v_i & (__pyx_v_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)]));
+ __pyx_v_b = (__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":285
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":285
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* found = 0 # <<<<<<<<<<<<<<
@@ -21113,7 +21114,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/mdenkows/cdec/python/cdec/sa/veb.pxi":286
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* found = 0
* if veb.bottom[a] != NULL: # <<<<<<<<<<<<<<
@@ -21123,26 +21124,26 @@ 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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":287
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":287
* found = 0
* if veb.bottom[a] != NULL:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
* subv = <_VEB*> veb.bottom[a]
* if subv.max_val > b:
*/
- __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS) != 0);
+ __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":288
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":288
* if veb.bottom[a] != NULL:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<<
* if subv.max_val > b:
* j = (a << veb.num_bottom_bits) + VEB_findsucc(subv, b)
*/
- __pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a]));
+ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":289
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":289
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a]
* if subv.max_val > b: # <<<<<<<<<<<<<<
@@ -21152,16 +21153,16 @@ 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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":290
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":290
* subv = <_VEB*> veb.bottom[a]
* if subv.max_val > b:
* j = (a << veb.num_bottom_bits) + VEB_findsucc(subv, b) # <<<<<<<<<<<<<<
* found = 1
* else:
*/
- __pyx_v_j = ((__pyx_v_a << __pyx_v_veb->num_bottom_bits) + __pyx_f_3_sa_VEB_findsucc(__pyx_v_subv, __pyx_v_b));
+ __pyx_v_j = ((__pyx_v_a << __pyx_v_veb->num_bottom_bits) + __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_subv, __pyx_v_b));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":291
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":291
* if subv.max_val > b:
* j = (a << veb.num_bottom_bits) + VEB_findsucc(subv, b)
* found = 1 # <<<<<<<<<<<<<<
@@ -21176,16 +21177,16 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":293
* found = 1
* else:
* subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<<
* if subb.max_val > b:
* j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b)
*/
- __pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a]));
+ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":294
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":294
* else:
* subb = <_BitSet*> veb.bottom[a]
* if subb.max_val > b: # <<<<<<<<<<<<<<
@@ -21195,16 +21196,16 @@ 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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":295
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":295
* subb = <_BitSet*> veb.bottom[a]
* if subb.max_val > b:
* j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b) # <<<<<<<<<<<<<<
* found = 1
* if found==0:
*/
- __pyx_v_j = ((__pyx_v_a << __pyx_v_veb->num_bottom_bits) + __pyx_f_3_sa_bitset_findsucc(__pyx_v_subb, __pyx_v_b));
+ __pyx_v_j = ((__pyx_v_a << __pyx_v_veb->num_bottom_bits) + __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(__pyx_v_subb, __pyx_v_b));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":296
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":296
* if subb.max_val > b:
* j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b)
* found = 1 # <<<<<<<<<<<<<<
@@ -21221,7 +21222,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/mdenkows/cdec/python/cdec/sa/veb.pxi":297
* j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b)
* found = 1
* if found==0: # <<<<<<<<<<<<<<
@@ -21231,77 +21232,77 @@ 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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":298
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":298
* found = 1
* if found==0:
* if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<<
* subv = <_VEB*> veb.top
* c = VEB_findsucc(subv, a)
*/
- __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_3_sa_MIN_BOTTOM_SIZE) != 0);
+ __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":299
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":299
* if found==0:
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top # <<<<<<<<<<<<<<
* c = VEB_findsucc(subv, a)
* else:
*/
- __pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)__pyx_v_veb->top);
+ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)__pyx_v_veb->top);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":300
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":300
* if veb.top_universe_size > MIN_BOTTOM_SIZE:
* subv = <_VEB*> veb.top
* c = VEB_findsucc(subv, a) # <<<<<<<<<<<<<<
* else:
* subb = <_BitSet*> veb.top
*/
- __pyx_v_c = __pyx_f_3_sa_VEB_findsucc(__pyx_v_subv, __pyx_v_a);
+ __pyx_v_c = __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_subv, __pyx_v_a);
goto __pyx_L10;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":302
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":302
* c = VEB_findsucc(subv, a)
* else:
* subb = <_BitSet*> veb.top # <<<<<<<<<<<<<<
* c = bitset_findsucc(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
*/
- __pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)__pyx_v_veb->top);
+ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)__pyx_v_veb->top);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":303
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":303
* else:
* subb = <_BitSet*> veb.top
* c = bitset_findsucc(subb, a) # <<<<<<<<<<<<<<
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[c]
*/
- __pyx_v_c = __pyx_f_3_sa_bitset_findsucc(__pyx_v_subb, __pyx_v_a);
+ __pyx_v_c = __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(__pyx_v_subb, __pyx_v_a);
}
__pyx_L10:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":304
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":304
* subb = <_BitSet*> veb.top
* c = bitset_findsucc(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
* subv = <_VEB*> veb.bottom[c]
* j = (c << veb.num_bottom_bits) + subv.min_val
*/
- __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS) != 0);
+ __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":305
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":305
* c = bitset_findsucc(subb, a)
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[c] # <<<<<<<<<<<<<<
* j = (c << veb.num_bottom_bits) + subv.min_val
* else:
*/
- __pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_c]));
+ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_c]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":306
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":306
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[c]
* j = (c << veb.num_bottom_bits) + subv.min_val # <<<<<<<<<<<<<<
@@ -21313,16 +21314,16 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":308
* j = (c << veb.num_bottom_bits) + subv.min_val
* else:
* subb = <_BitSet*> veb.bottom[c] # <<<<<<<<<<<<<<
* j = (c << veb.num_bottom_bits) + subb.min_val
* return j
*/
- __pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_c]));
+ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_c]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":309
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":309
* else:
* subb = <_BitSet*> veb.bottom[c]
* j = (c << veb.num_bottom_bits) + subb.min_val # <<<<<<<<<<<<<<
@@ -21336,7 +21337,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/mdenkows/cdec/python/cdec/sa/veb.pxi":310
* subb = <_BitSet*> veb.bottom[c]
* j = (c << veb.num_bottom_bits) + subb.min_val
* return j # <<<<<<<<<<<<<<
@@ -21352,7 +21353,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/mdenkows/cdec/python/cdec/sa/veb.pxi":313
*
*
* cdef int VEB_contains(_VEB* veb, int i): # <<<<<<<<<<<<<<
@@ -21360,9 +21361,9 @@ static int __pyx_f_3_sa_VEB_findsucc(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
* cdef _BitSet* subb
*/
-static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int __pyx_v_i) {
- struct __pyx_t_3_sa__VEB *__pyx_v_subv;
- struct __pyx_t_3_sa__BitSet *__pyx_v_subb;
+static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_v_veb, int __pyx_v_i) {
+ struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_v_subv;
+ struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_v_subb;
int __pyx_v_a;
int __pyx_v_b;
int __pyx_r;
@@ -21373,7 +21374,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/mdenkows/cdec/python/cdec/sa/veb.pxi":318
* cdef int a, b
*
* if veb.size == 0 or i < veb.min_val or i > veb.max_val: # <<<<<<<<<<<<<<
@@ -21395,7 +21396,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/mdenkows/cdec/python/cdec/sa/veb.pxi":319
*
* if veb.size == 0 or i < veb.min_val or i > veb.max_val:
* return 0 # <<<<<<<<<<<<<<
@@ -21408,7 +21409,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/mdenkows/cdec/python/cdec/sa/veb.pxi":321
* return 0
*
* if veb.min_val == i: # <<<<<<<<<<<<<<
@@ -21418,7 +21419,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) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":322
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":322
*
* if veb.min_val == i:
* return 1 # <<<<<<<<<<<<<<
@@ -21431,7 +21432,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/mdenkows/cdec/python/cdec/sa/veb.pxi":324
* return 1
* else:
* if veb.size == 1: # <<<<<<<<<<<<<<
@@ -21441,7 +21442,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) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":325
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":325
* else:
* if veb.size == 1:
* return 0 # <<<<<<<<<<<<<<
@@ -21456,7 +21457,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/mdenkows/cdec/python/cdec/sa/veb.pxi":327
* return 0
*
* a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<<
@@ -21465,16 +21466,16 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":328
*
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<<
* if veb.bottom[a] == NULL:
* return 0
*/
- __pyx_v_b = (__pyx_v_i & (__pyx_v_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)]));
+ __pyx_v_b = (__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":329
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":329
* a = i >> veb.num_bottom_bits
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* if veb.bottom[a] == NULL: # <<<<<<<<<<<<<<
@@ -21484,7 +21485,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) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":330
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":330
* b = i & LOWER_MASK[veb.num_bottom_bits-1]
* if veb.bottom[a] == NULL:
* return 0 # <<<<<<<<<<<<<<
@@ -21497,55 +21498,55 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":332
* return 0
* else:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<<
* subv = <_VEB*> veb.bottom[a]
* return VEB_contains(subv, b)
*/
- __pyx_t_2 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_3_sa_MIN_BOTTOM_BITS) != 0);
+ __pyx_t_2 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":333
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":333
* else:
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<<
* return VEB_contains(subv, b)
* else:
*/
- __pyx_v_subv = ((struct __pyx_t_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a]));
+ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":334
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":334
* if veb.num_bottom_bits > MIN_BOTTOM_BITS:
* subv = <_VEB*> veb.bottom[a]
* return VEB_contains(subv, b) # <<<<<<<<<<<<<<
* else:
* subb = <_BitSet*> veb.bottom[a]
*/
- __pyx_r = __pyx_f_3_sa_VEB_contains(__pyx_v_subv, __pyx_v_b);
+ __pyx_r = __pyx_f_4cdec_2sa_3_sa_VEB_contains(__pyx_v_subv, __pyx_v_b);
goto __pyx_L0;
goto __pyx_L7;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":336
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":336
* return VEB_contains(subv, b)
* else:
* subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<<
* return bitset_contains(subb, b)
*
*/
- __pyx_v_subb = ((struct __pyx_t_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a]));
+ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":337
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":337
* else:
* subb = <_BitSet*> veb.bottom[a]
* return bitset_contains(subb, b) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_r = __pyx_f_3_sa_bitset_contains(__pyx_v_subb, __pyx_v_b);
+ __pyx_r = __pyx_f_4cdec_2sa_3_sa_bitset_contains(__pyx_v_subb, __pyx_v_b);
goto __pyx_L0;
}
__pyx_L7:;
@@ -21559,17 +21560,17 @@ static int __pyx_f_3_sa_VEB_contains(struct __pyx_t_3_sa__VEB *__pyx_v_veb, int
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_11VEBIterator_1__next__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_11VEBIterator_1__next__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11VEBIterator_1__next__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11VEBIterator_1__next__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_11VEBIterator___next__(((struct __pyx_obj_3_sa_VEBIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(((struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":344
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":344
* cdef int next_val
*
* def __next__(self): # <<<<<<<<<<<<<<
@@ -21577,7 +21578,7 @@ static PyObject *__pyx_pw_3_sa_11VEBIterator_1__next__(PyObject *__pyx_v_self) {
*
*/
-static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator *__pyx_v_self) {
int __pyx_v_ret_val;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -21589,7 +21590,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/mdenkows/cdec/python/cdec/sa/veb.pxi":347
* cdef int ret_val
*
* if self.next_val == -1: # <<<<<<<<<<<<<<
@@ -21599,7 +21600,7 @@ static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBI
__pyx_t_1 = ((__pyx_v_self->next_val == -1) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":348
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":348
*
* if self.next_val == -1:
* raise StopIteration() # <<<<<<<<<<<<<<
@@ -21615,7 +21616,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/mdenkows/cdec/python/cdec/sa/veb.pxi":349
* if self.next_val == -1:
* raise StopIteration()
* ret_val = self.next_val # <<<<<<<<<<<<<<
@@ -21625,16 +21626,16 @@ static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBI
__pyx_t_3 = __pyx_v_self->next_val;
__pyx_v_ret_val = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":350
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":350
* raise StopIteration()
* ret_val = self.next_val
* self.next_val = VEB_findsucc(self.v, ret_val) # <<<<<<<<<<<<<<
* return ret_val
*
*/
- __pyx_v_self->next_val = __pyx_f_3_sa_VEB_findsucc(__pyx_v_self->v, __pyx_v_ret_val);
+ __pyx_v_self->next_val = __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_self->v, __pyx_v_ret_val);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":351
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":351
* ret_val = self.next_val
* self.next_val = VEB_findsucc(self.v, ret_val)
* return ret_val # <<<<<<<<<<<<<<
@@ -21652,7 +21653,7 @@ static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBI
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.VEBIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.VEBIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -21661,8 +21662,8 @@ static PyObject *__pyx_pf_3_sa_11VEBIterator___next__(struct __pyx_obj_3_sa_VEBI
}
/* Python wrapper */
-static int __pyx_pw_3_sa_3VEB_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_3VEB_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_3VEB_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_3VEB_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_size;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -21701,16 +21702,16 @@ static int __pyx_pw_3_sa_3VEB_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.VEB.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.VEB.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_3VEB___cinit__(((struct __pyx_obj_3_sa_VEB *)__pyx_v_self), __pyx_v_size);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_3VEB___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_v_self), __pyx_v_size);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":360
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":360
* cdef int _first(self)
*
* def __cinit__(self, int size): # <<<<<<<<<<<<<<
@@ -21718,19 +21719,19 @@ static int __pyx_pw_3_sa_3VEB_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx
*
*/
-static int __pyx_pf_3_sa_3VEB___cinit__(struct __pyx_obj_3_sa_VEB *__pyx_v_self, int __pyx_v_size) {
+static int __pyx_pf_4cdec_2sa_3_sa_3VEB___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self, int __pyx_v_size) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":361
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":361
*
* def __cinit__(self, int size):
* self.veb = new_VEB(size) # <<<<<<<<<<<<<<
*
* def __dealloc__(self):
*/
- __pyx_v_self->veb = __pyx_f_3_sa_new_VEB(__pyx_v_size);
+ __pyx_v_self->veb = __pyx_f_4cdec_2sa_3_sa_new_VEB(__pyx_v_size);
__pyx_r = 0;
__Pyx_RefNannyFinishContext();
@@ -21738,15 +21739,15 @@ static int __pyx_pf_3_sa_3VEB___cinit__(struct __pyx_obj_3_sa_VEB *__pyx_v_self,
}
/* Python wrapper */
-static void __pyx_pw_3_sa_3VEB_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_3_sa_3VEB_3__dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pw_4cdec_2sa_3_sa_3VEB_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_4cdec_2sa_3_sa_3VEB_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_pf_3_sa_3VEB_2__dealloc__(((struct __pyx_obj_3_sa_VEB *)__pyx_v_self));
+ __pyx_pf_4cdec_2sa_3_sa_3VEB_2__dealloc__(((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":363
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":363
* self.veb = new_VEB(size)
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -21754,7 +21755,7 @@ static void __pyx_pw_3_sa_3VEB_3__dealloc__(PyObject *__pyx_v_self) {
*
*/
-static void __pyx_pf_3_sa_3VEB_2__dealloc__(struct __pyx_obj_3_sa_VEB *__pyx_v_self) {
+static void __pyx_pf_4cdec_2sa_3_sa_3VEB_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_lineno = 0;
@@ -21762,37 +21763,37 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":364
*
* def __dealloc__(self):
* del_VEB(self.veb) # <<<<<<<<<<<<<<
*
* def __iter__(self):
*/
- __pyx_t_1 = __pyx_f_3_sa_del_VEB(__pyx_v_self->veb); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4cdec_2sa_3_sa_del_VEB(__pyx_v_self->veb); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.VEB.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.VEB.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_3VEB_5__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_3VEB_5__iter__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_3VEB_5__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_3VEB_5__iter__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_3VEB_4__iter__(((struct __pyx_obj_3_sa_VEB *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":366
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":366
* del_VEB(self.veb)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -21800,31 +21801,31 @@ static PyObject *__pyx_pw_3_sa_3VEB_5__iter__(PyObject *__pyx_v_self) {
* it = VEBIterator()
*/
-static PyObject *__pyx_pf_3_sa_3VEB_4__iter__(struct __pyx_obj_3_sa_VEB *__pyx_v_self) {
- struct __pyx_obj_3_sa_VEBIterator *__pyx_v_it = 0;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator *__pyx_v_it = 0;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
- struct __pyx_t_3_sa__VEB *__pyx_t_2;
+ struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_t_2;
int __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":368
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":368
* def __iter__(self):
* cdef VEBIterator it
* it = VEBIterator() # <<<<<<<<<<<<<<
* it.v = self.veb
* it.next_val = self.veb.min_val
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_VEBIterator)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_VEBIterator)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_v_it = ((struct __pyx_obj_3_sa_VEBIterator *)__pyx_t_1);
+ __pyx_v_it = ((struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":369
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":369
* cdef VEBIterator it
* it = VEBIterator()
* it.v = self.veb # <<<<<<<<<<<<<<
@@ -21834,7 +21835,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_4__iter__(struct __pyx_obj_3_sa_VEB *__pyx_v
__pyx_t_2 = __pyx_v_self->veb;
__pyx_v_it->v = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":370
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":370
* it = VEBIterator()
* it.v = self.veb
* it.next_val = self.veb.min_val # <<<<<<<<<<<<<<
@@ -21844,7 +21845,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_4__iter__(struct __pyx_obj_3_sa_VEB *__pyx_v
__pyx_t_3 = __pyx_v_self->veb->min_val;
__pyx_v_it->next_val = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":371
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":371
* it.v = self.veb
* it.next_val = self.veb.min_val
* return it # <<<<<<<<<<<<<<
@@ -21860,7 +21861,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_4__iter__(struct __pyx_obj_3_sa_VEB *__pyx_v
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.VEB.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.VEB.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_it);
@@ -21870,17 +21871,17 @@ static PyObject *__pyx_pf_3_sa_3VEB_4__iter__(struct __pyx_obj_3_sa_VEB *__pyx_v
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_3VEB_7insert(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_3VEB_7insert(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_3VEB_7insert(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_3VEB_7insert(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("insert (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_3VEB_6insert(((struct __pyx_obj_3_sa_VEB *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_3VEB_6insert(((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":373
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":373
* return it
*
* def insert(self, i): # <<<<<<<<<<<<<<
@@ -21888,7 +21889,7 @@ static PyObject *__pyx_pw_3_sa_3VEB_7insert(PyObject *__pyx_v_self, PyObject *__
*
*/
-static PyObject *__pyx_pf_3_sa_3VEB_6insert(struct __pyx_obj_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_6insert(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -21898,7 +21899,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/mdenkows/cdec/python/cdec/sa/veb.pxi":374
*
* def insert(self, i):
* return VEB_insert(self.veb, i) # <<<<<<<<<<<<<<
@@ -21907,7 +21908,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_6insert(struct __pyx_obj_3_sa_VEB *__pyx_v_s
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PyInt_FromLong(__pyx_f_3_sa_VEB_insert(__pyx_v_self->veb, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_VEB_insert(__pyx_v_self->veb, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -21917,7 +21918,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_6insert(struct __pyx_obj_3_sa_VEB *__pyx_v_s
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.VEB.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.VEB.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -21925,7 +21926,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/mdenkows/cdec/python/cdec/sa/veb.pxi":376
* return VEB_insert(self.veb, i)
*
* cdef int _insert(self, int i): # <<<<<<<<<<<<<<
@@ -21933,19 +21934,19 @@ static PyObject *__pyx_pf_3_sa_3VEB_6insert(struct __pyx_obj_3_sa_VEB *__pyx_v_s
*
*/
-static int __pyx_f_3_sa_3VEB__insert(struct __pyx_obj_3_sa_VEB *__pyx_v_self, int __pyx_v_i) {
+static int __pyx_f_4cdec_2sa_3_sa_3VEB__insert(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self, int __pyx_v_i) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":377
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":377
*
* cdef int _insert(self, int i):
* return VEB_insert(self.veb, i) # <<<<<<<<<<<<<<
*
* def findsucc(self, i):
*/
- __pyx_r = __pyx_f_3_sa_VEB_insert(__pyx_v_self->veb, __pyx_v_i);
+ __pyx_r = __pyx_f_4cdec_2sa_3_sa_VEB_insert(__pyx_v_self->veb, __pyx_v_i);
goto __pyx_L0;
__pyx_r = 0;
@@ -21955,17 +21956,17 @@ static int __pyx_f_3_sa_3VEB__insert(struct __pyx_obj_3_sa_VEB *__pyx_v_self, in
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_3VEB_9findsucc(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_3VEB_9findsucc(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_3VEB_9findsucc(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_3VEB_9findsucc(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("findsucc (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_3VEB_8findsucc(((struct __pyx_obj_3_sa_VEB *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_3VEB_8findsucc(((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":379
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":379
* return VEB_insert(self.veb, i)
*
* def findsucc(self, i): # <<<<<<<<<<<<<<
@@ -21973,7 +21974,7 @@ static PyObject *__pyx_pw_3_sa_3VEB_9findsucc(PyObject *__pyx_v_self, PyObject *
*
*/
-static PyObject *__pyx_pf_3_sa_3VEB_8findsucc(struct __pyx_obj_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_8findsucc(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -21983,7 +21984,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/mdenkows/cdec/python/cdec/sa/veb.pxi":380
*
* def findsucc(self, i):
* return VEB_findsucc(self.veb, i) # <<<<<<<<<<<<<<
@@ -21992,7 +21993,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_8findsucc(struct __pyx_obj_3_sa_VEB *__pyx_v
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PyInt_FromLong(__pyx_f_3_sa_VEB_findsucc(__pyx_v_self->veb, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_self->veb, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -22002,7 +22003,7 @@ static PyObject *__pyx_pf_3_sa_3VEB_8findsucc(struct __pyx_obj_3_sa_VEB *__pyx_v
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.VEB.findsucc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.VEB.findsucc", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -22010,7 +22011,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/mdenkows/cdec/python/cdec/sa/veb.pxi":382
* return VEB_findsucc(self.veb, i)
*
* cdef int _first(self): # <<<<<<<<<<<<<<
@@ -22018,12 +22019,12 @@ static PyObject *__pyx_pf_3_sa_3VEB_8findsucc(struct __pyx_obj_3_sa_VEB *__pyx_v
*
*/
-static int __pyx_f_3_sa_3VEB__first(struct __pyx_obj_3_sa_VEB *__pyx_v_self) {
+static int __pyx_f_4cdec_2sa_3_sa_3VEB__first(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_first", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":383
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":383
*
* cdef int _first(self):
* return self.veb.min_val # <<<<<<<<<<<<<<
@@ -22039,7 +22040,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/mdenkows/cdec/python/cdec/sa/veb.pxi":385
* return self.veb.min_val
*
* cdef int _findsucc(self, int i): # <<<<<<<<<<<<<<
@@ -22047,19 +22048,19 @@ static int __pyx_f_3_sa_3VEB__first(struct __pyx_obj_3_sa_VEB *__pyx_v_self) {
*
*/
-static int __pyx_f_3_sa_3VEB__findsucc(struct __pyx_obj_3_sa_VEB *__pyx_v_self, int __pyx_v_i) {
+static int __pyx_f_4cdec_2sa_3_sa_3VEB__findsucc(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self, int __pyx_v_i) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_findsucc", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":386
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":386
*
* cdef int _findsucc(self, int i):
* return VEB_findsucc(self.veb, i) # <<<<<<<<<<<<<<
*
* def __len__(self):
*/
- __pyx_r = __pyx_f_3_sa_VEB_findsucc(__pyx_v_self->veb, __pyx_v_i);
+ __pyx_r = __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_self->veb, __pyx_v_i);
goto __pyx_L0;
__pyx_r = 0;
@@ -22069,17 +22070,17 @@ static int __pyx_f_3_sa_3VEB__findsucc(struct __pyx_obj_3_sa_VEB *__pyx_v_self,
}
/* Python wrapper */
-static Py_ssize_t __pyx_pw_3_sa_3VEB_11__len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_pw_3_sa_3VEB_11__len__(PyObject *__pyx_v_self) {
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_3VEB_11__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_3VEB_11__len__(PyObject *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_3VEB_10__len__(((struct __pyx_obj_3_sa_VEB *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_3VEB_10__len__(((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":388
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":388
* return VEB_findsucc(self.veb, i)
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -22087,12 +22088,12 @@ static Py_ssize_t __pyx_pw_3_sa_3VEB_11__len__(PyObject *__pyx_v_self) {
*
*/
-static Py_ssize_t __pyx_pf_3_sa_3VEB_10__len__(struct __pyx_obj_3_sa_VEB *__pyx_v_self) {
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_3VEB_10__len__(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":389
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":389
*
* def __len__(self):
* return self.veb.size # <<<<<<<<<<<<<<
@@ -22109,24 +22110,24 @@ static Py_ssize_t __pyx_pf_3_sa_3VEB_10__len__(struct __pyx_obj_3_sa_VEB *__pyx_
}
/* Python wrapper */
-static int __pyx_pw_3_sa_3VEB_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static int __pyx_pw_3_sa_3VEB_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static int __pyx_pw_4cdec_2sa_3_sa_3VEB_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_3VEB_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_3VEB_12__contains__(((struct __pyx_obj_3_sa_VEB *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_3VEB_12__contains__(((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":391
+/* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":391
* return self.veb.size
*
* def __contains__(self, i): # <<<<<<<<<<<<<<
* return VEB_contains(self.veb, i)
*/
-static int __pyx_pf_3_sa_3VEB_12__contains__(struct __pyx_obj_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i) {
+static int __pyx_pf_4cdec_2sa_3_sa_3VEB_12__contains__(struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_self, PyObject *__pyx_v_i) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -22135,19 +22136,19 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":392
*
* def __contains__(self, i):
* return VEB_contains(self.veb, i) # <<<<<<<<<<<<<<
*/
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_f_3_sa_VEB_contains(__pyx_v_self->veb, __pyx_t_1);
+ __pyx_r = __pyx_f_4cdec_2sa_3_sa_VEB_contains(__pyx_v_self->veb, __pyx_t_1);
goto __pyx_L0;
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.VEB.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.VEB.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -22155,9 +22156,9 @@ static int __pyx_pf_3_sa_3VEB_12__contains__(struct __pyx_obj_3_sa_VEB *__pyx_v_
}
/* Python wrapper */
-static int __pyx_pw_3_sa_3LCP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_3LCP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- struct __pyx_obj_3_sa_SuffixArray *__pyx_v_sa = 0;
+static int __pyx_pw_4cdec_2sa_3_sa_3LCP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_3LCP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_sa = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -22189,18 +22190,18 @@ static int __pyx_pw_3_sa_3LCP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx
} else {
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
}
- __pyx_v_sa = ((struct __pyx_obj_3_sa_SuffixArray *)values[0]);
+ __pyx_v_sa = ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)values[0]);
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.LCP.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.LCP.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sa), __pyx_ptype_3_sa_SuffixArray, 1, "sa", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_3LCP___cinit__(((struct __pyx_obj_3_sa_LCP *)__pyx_v_self), __pyx_v_sa);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sa), __pyx_ptype_4cdec_2sa_3_sa_SuffixArray, 1, "sa", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_LCP *)__pyx_v_self), __pyx_v_sa);
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = -1;
@@ -22209,7 +22210,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":9
* cdef IntList lcp
*
* def __cinit__(self, SuffixArray sa): # <<<<<<<<<<<<<<
@@ -22217,13 +22218,13 @@ static int __pyx_pw_3_sa_3LCP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx
* cdef IntList rank
*/
-static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self, struct __pyx_obj_3_sa_SuffixArray *__pyx_v_sa) {
+static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_LCP *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_sa) {
int __pyx_v_i;
int __pyx_v_k;
int __pyx_v_j;
int __pyx_v_h;
int __pyx_v_n;
- struct __pyx_obj_3_sa_IntList *__pyx_v_rank = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_rank = 0;
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -22238,7 +22239,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":13
* cdef IntList rank
*
* logger.info("Constructing LCP array") # <<<<<<<<<<<<<<
@@ -22255,7 +22256,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":14
*
* logger.info("Constructing LCP array")
* self.sa = sa # <<<<<<<<<<<<<<
@@ -22268,7 +22269,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":15
* logger.info("Constructing LCP array")
* self.sa = sa
* n = self.sa.sa.len # <<<<<<<<<<<<<<
@@ -22278,7 +22279,7 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__pyx_t_3 = __pyx_v_self->sa->sa->len;
__pyx_v_n = __pyx_t_3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":16
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":16
* self.sa = sa
* n = self.sa.sa.len
* self.lcp = IntList(initial_len=n) # <<<<<<<<<<<<<<
@@ -22291,16 +22292,16 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->lcp);
__Pyx_DECREF(((PyObject *)__pyx_v_self->lcp));
- __pyx_v_self->lcp = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
+ __pyx_v_self->lcp = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":18
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":18
* self.lcp = IntList(initial_len=n)
*
* rank = IntList(initial_len=n) # <<<<<<<<<<<<<<
@@ -22313,13 +22314,13 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_v_rank = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_rank = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":19
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":19
*
* rank = IntList(initial_len=n)
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -22329,7 +22330,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":20
* rank = IntList(initial_len=n)
* for i from 0 <= i < n:
* rank.arr[sa.sa.arr[i]] = i # <<<<<<<<<<<<<<
@@ -22339,7 +22340,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":22
* rank.arr[sa.sa.arr[i]] = i
*
* h = 0 # <<<<<<<<<<<<<<
@@ -22348,7 +22349,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":23
*
* h = 0
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -22358,7 +22359,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":24
* h = 0
* for i from 0 <= i < n:
* k = rank.arr[i] # <<<<<<<<<<<<<<
@@ -22367,7 +22368,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":25
* for i from 0 <= i < n:
* k = rank.arr[i]
* if k == 0: # <<<<<<<<<<<<<<
@@ -22377,7 +22378,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":26
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":26
* k = rank.arr[i]
* if k == 0:
* self.lcp.arr[k] = -1 # <<<<<<<<<<<<<<
@@ -22389,7 +22390,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":28
* self.lcp.arr[k] = -1
* else:
* j = sa.sa.arr[k-1] # <<<<<<<<<<<<<<
@@ -22398,7 +22399,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":29
* else:
* j = sa.sa.arr[k-1]
* while i+h < n and j+h < n and sa.darray.data.arr[i+h] == sa.darray.data.arr[j+h]: # <<<<<<<<<<<<<<
@@ -22421,7 +22422,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":30
* j = sa.sa.arr[k-1]
* while i+h < n and j+h < n and sa.darray.data.arr[i+h] == sa.darray.data.arr[j+h]:
* h = h+1 # <<<<<<<<<<<<<<
@@ -22431,7 +22432,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":31
* while i+h < n and j+h < n and sa.darray.data.arr[i+h] == sa.darray.data.arr[j+h]:
* h = h+1
* self.lcp.arr[k] = h # <<<<<<<<<<<<<<
@@ -22442,7 +22443,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":32
* h = h+1
* self.lcp.arr[k] = h
* if h > 0: # <<<<<<<<<<<<<<
@@ -22452,7 +22453,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) != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":33
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":33
* self.lcp.arr[k] = h
* if h > 0:
* h = h-1 # <<<<<<<<<<<<<<
@@ -22465,7 +22466,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":34
* if h > 0:
* h = h-1
* logger.info("LCP array completed") # <<<<<<<<<<<<<<
@@ -22487,19 +22488,19 @@ static int __pyx_pf_3_sa_3LCP___cinit__(struct __pyx_obj_3_sa_LCP *__pyx_v_self,
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.LCP.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.LCP.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_rank);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_3LCP_3compute_stats(PyObject *__pyx_v_self, PyObject *__pyx_arg_max_n); /*proto*/
-static char __pyx_doc_3_sa_3LCP_2compute_stats[] = "Note: the output of this function is not exact. In\n particular, the frequency associated with each word is \n not guaranteed to be correct. This is due to a bit of\n laxness in the design; the function is intended only to\n obtain a list of the most frequent words; for this \n purpose it is perfectly fine";
-static PyObject *__pyx_pw_3_sa_3LCP_3compute_stats(PyObject *__pyx_v_self, PyObject *__pyx_arg_max_n) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_3LCP_3compute_stats(PyObject *__pyx_v_self, PyObject *__pyx_arg_max_n); /*proto*/
+static char __pyx_doc_4cdec_2sa_3_sa_3LCP_2compute_stats[] = "Note: the output of this function is not exact. In\n particular, the frequency associated with each word is \n not guaranteed to be correct. This is due to a bit of\n laxness in the design; the function is intended only to\n obtain a list of the most frequent words; for this \n purpose it is perfectly fine";
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_3LCP_3compute_stats(PyObject *__pyx_v_self, PyObject *__pyx_arg_max_n) {
int __pyx_v_max_n;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -22512,16 +22513,16 @@ static PyObject *__pyx_pw_3_sa_3LCP_3compute_stats(PyObject *__pyx_v_self, PyObj
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.LCP.compute_stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.LCP.compute_stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_3LCP_2compute_stats(((struct __pyx_obj_3_sa_LCP *)__pyx_v_self), ((int)__pyx_v_max_n));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_3LCP_2compute_stats(((struct __pyx_obj_4cdec_2sa_3_sa_LCP *)__pyx_v_self), ((int)__pyx_v_max_n));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":36
+/* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":36
* logger.info("LCP array completed")
*
* def compute_stats(self, int max_n): # <<<<<<<<<<<<<<
@@ -22529,15 +22530,15 @@ static PyObject *__pyx_pw_3_sa_3LCP_3compute_stats(PyObject *__pyx_v_self, PyObj
* particular, the frequency associated with each word is
*/
-static PyObject *__pyx_pf_3_sa_3LCP_2compute_stats(struct __pyx_obj_3_sa_LCP *__pyx_v_self, int __pyx_v_max_n) {
- struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_3LCP_2compute_stats(struct __pyx_obj_4cdec_2sa_3_sa_LCP *__pyx_v_self, int __pyx_v_max_n) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("compute_stats", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *)__pyx_tp_new_3_sa___pyx_scope_struct_3_compute_stats(__pyx_ptype_3_sa___pyx_scope_struct_3_compute_stats, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -22548,7 +22549,7 @@ static PyObject *__pyx_pf_3_sa_3LCP_2compute_stats(struct __pyx_obj_3_sa_LCP *__
__Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
__pyx_cur_scope->__pyx_v_max_n = __pyx_v_max_n;
{
- __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_3LCP_4generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -22557,7 +22558,7 @@ static PyObject *__pyx_pf_3_sa_3LCP_2compute_stats(struct __pyx_obj_3_sa_LCP *__
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.LCP.compute_stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.LCP.compute_stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -22566,9 +22567,9 @@ static PyObject *__pyx_pf_3_sa_3LCP_2compute_stats(struct __pyx_obj_3_sa_LCP *__
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
@@ -22595,7 +22596,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":48
* cdef VEB veb
*
* N = self.sa.sa.len # <<<<<<<<<<<<<<
@@ -22605,7 +22606,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_1 = __pyx_cur_scope->__pyx_v_self->sa->sa->len;
__pyx_cur_scope->__pyx_v_N = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":50
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":50
* N = self.sa.sa.len
*
* ngram_starts = [] # <<<<<<<<<<<<<<
@@ -22618,7 +22619,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_cur_scope->__pyx_v_ngram_starts = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":51
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":51
*
* ngram_starts = []
* for n from 0 <= n < max_n: # <<<<<<<<<<<<<<
@@ -22628,7 +22629,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_1 = __pyx_cur_scope->__pyx_v_max_n;
for (__pyx_cur_scope->__pyx_v_n = 0; __pyx_cur_scope->__pyx_v_n < __pyx_t_1; __pyx_cur_scope->__pyx_v_n++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":52
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":52
* ngram_starts = []
* for n from 0 <= n < max_n:
* ngram_starts.append(IntList(initial_len=N)) # <<<<<<<<<<<<<<
@@ -22641,14 +22642,14 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__pyx_t_4 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_ngram_starts, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":54
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":54
* ngram_starts.append(IntList(initial_len=N))
*
* run_start = IntList(initial_len=max_n) # <<<<<<<<<<<<<<
@@ -22661,14 +22662,14 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_GIVEREF(__pyx_t_2);
- __pyx_cur_scope->__pyx_v_run_start = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
+ __pyx_cur_scope->__pyx_v_run_start = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":55
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":55
*
* run_start = IntList(initial_len=max_n)
* veb = VEB(N) # <<<<<<<<<<<<<<
@@ -22682,14 +22683,14 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_VEB)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_VEB)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_GIVEREF(__pyx_t_2);
- __pyx_cur_scope->__pyx_v_veb = ((struct __pyx_obj_3_sa_VEB *)__pyx_t_2);
+ __pyx_cur_scope->__pyx_v_veb = ((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":57
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":57
* veb = VEB(N)
*
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -22699,7 +22700,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_1 = __pyx_cur_scope->__pyx_v_N;
for (__pyx_cur_scope->__pyx_v_i = 0; __pyx_cur_scope->__pyx_v_i < __pyx_t_1; __pyx_cur_scope->__pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":58
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":58
*
* for i from 0 <= i < N:
* h = self.lcp.arr[i] # <<<<<<<<<<<<<<
@@ -22708,7 +22709,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":59
* for i from 0 <= i < N:
* h = self.lcp.arr[i]
* if h < 0: # <<<<<<<<<<<<<<
@@ -22718,7 +22719,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_5 = ((__pyx_cur_scope->__pyx_v_h < 0) != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":60
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":60
* h = self.lcp.arr[i]
* if h < 0:
* h = 0 # <<<<<<<<<<<<<<
@@ -22730,7 +22731,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":61
* if h < 0:
* h = 0
* for n from h <= n < max_n: # <<<<<<<<<<<<<<
@@ -22740,7 +22741,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":62
* h = 0
* for n from h <= n < max_n:
* rs = run_start.arr[n] # <<<<<<<<<<<<<<
@@ -22749,7 +22750,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":63
* for n from h <= n < max_n:
* rs = run_start.arr[n]
* run_start.arr[n] = i # <<<<<<<<<<<<<<
@@ -22758,7 +22759,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":64
* rs = run_start.arr[n]
* run_start.arr[n] = i
* freq = i - rs # <<<<<<<<<<<<<<
@@ -22767,7 +22768,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":65
* run_start.arr[n] = i
* freq = i - rs
* if freq > 1000: # arbitrary, but see note below # <<<<<<<<<<<<<<
@@ -22777,16 +22778,16 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_5 = ((__pyx_cur_scope->__pyx_v_freq > 1000) != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":66
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":66
* freq = i - rs
* if freq > 1000: # arbitrary, but see note below
* veb._insert(freq) # <<<<<<<<<<<<<<
* ngram_start = ngram_starts[n]
* while ngram_start.arr[freq] > 0:
*/
- ((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);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *)__pyx_cur_scope->__pyx_v_veb->__pyx_vtab)->_insert(__pyx_cur_scope->__pyx_v_veb, __pyx_cur_scope->__pyx_v_freq);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":67
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":67
* if freq > 1000: # arbitrary, but see note below
* veb._insert(freq)
* ngram_start = ngram_starts[n] # <<<<<<<<<<<<<<
@@ -22795,14 +22796,14 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_cur_scope->__pyx_v_ngram_starts), __pyx_cur_scope->__pyx_v_n, sizeof(int), PyInt_FromLong, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_ngram_start));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_ngram_start));
__Pyx_GIVEREF(__pyx_t_2);
- __pyx_cur_scope->__pyx_v_ngram_start = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
+ __pyx_cur_scope->__pyx_v_ngram_start = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":68
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":68
* veb._insert(freq)
* ngram_start = ngram_starts[n]
* while ngram_start.arr[freq] > 0: # <<<<<<<<<<<<<<
@@ -22813,7 +22814,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) != 0);
if (!__pyx_t_5) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":69
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":69
* ngram_start = ngram_starts[n]
* while ngram_start.arr[freq] > 0:
* freq = freq + 1 # cheating a bit, should be ok for sparse histogram # <<<<<<<<<<<<<<
@@ -22823,7 +22824,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":70
* while ngram_start.arr[freq] > 0:
* freq = freq + 1 # cheating a bit, should be ok for sparse histogram
* ngram_start.arr[freq] = rs # <<<<<<<<<<<<<<
@@ -22837,7 +22838,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":71
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":71
* freq = freq + 1 # cheating a bit, should be ok for sparse histogram
* ngram_start.arr[freq] = rs
* i = veb.veb.min_val # <<<<<<<<<<<<<<
@@ -22847,7 +22848,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_1 = __pyx_cur_scope->__pyx_v_veb->veb->min_val;
__pyx_cur_scope->__pyx_v_i = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":72
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":72
* ngram_start.arr[freq] = rs
* i = veb.veb.min_val
* while i != -1: # <<<<<<<<<<<<<<
@@ -22858,16 +22859,16 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_5 = ((__pyx_cur_scope->__pyx_v_i != -1) != 0);
if (!__pyx_t_5) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":73
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":73
* i = veb.veb.min_val
* while i != -1:
* ii = veb._findsucc(i) # <<<<<<<<<<<<<<
* for n from 0 <= n < max_n:
* ngram_start = ngram_starts[n]
*/
- __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);
+ __pyx_cur_scope->__pyx_v_ii = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *)__pyx_cur_scope->__pyx_v_veb->__pyx_vtab)->_findsucc(__pyx_cur_scope->__pyx_v_veb, __pyx_cur_scope->__pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":74
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":74
* while i != -1:
* ii = veb._findsucc(i)
* for n from 0 <= n < max_n: # <<<<<<<<<<<<<<
@@ -22877,7 +22878,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_1 = __pyx_cur_scope->__pyx_v_max_n;
for (__pyx_cur_scope->__pyx_v_n = 0; __pyx_cur_scope->__pyx_v_n < __pyx_t_1; __pyx_cur_scope->__pyx_v_n++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":75
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":75
* ii = veb._findsucc(i)
* for n from 0 <= n < max_n:
* ngram_start = ngram_starts[n] # <<<<<<<<<<<<<<
@@ -22886,14 +22887,14 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
*/
__pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_cur_scope->__pyx_v_ngram_starts), __pyx_cur_scope->__pyx_v_n, sizeof(int), PyInt_FromLong, 1, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_ngram_start));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_ngram_start));
__Pyx_GIVEREF(__pyx_t_2);
- __pyx_cur_scope->__pyx_v_ngram_start = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
+ __pyx_cur_scope->__pyx_v_ngram_start = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":76
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":76
* for n from 0 <= n < max_n:
* ngram_start = ngram_starts[n]
* iii = i # <<<<<<<<<<<<<<
@@ -22902,7 +22903,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":77
* ngram_start = ngram_starts[n]
* iii = i
* rs = ngram_start.arr[iii] # <<<<<<<<<<<<<<
@@ -22911,7 +22912,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":78
* iii = i
* rs = ngram_start.arr[iii]
* while (ii==-1 or iii < ii) and rs != 0: # <<<<<<<<<<<<<<
@@ -22934,7 +22935,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":79
* rs = ngram_start.arr[iii]
* while (ii==-1 or iii < ii) and rs != 0:
* j = self.sa.sa.arr[rs] # <<<<<<<<<<<<<<
@@ -22943,7 +22944,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":80
* while (ii==-1 or iii < ii) and rs != 0:
* j = self.sa.sa.arr[rs]
* valid = 1 # <<<<<<<<<<<<<<
@@ -22952,7 +22953,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":81
* j = self.sa.sa.arr[rs]
* valid = 1
* for k from 0 <= k < n+1: # <<<<<<<<<<<<<<
@@ -22962,7 +22963,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":82
* valid = 1
* for k from 0 <= k < n+1:
* if self.sa.darray.data.arr[j+k] < 2: # <<<<<<<<<<<<<<
@@ -22972,7 +22973,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) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":83
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":83
* for k from 0 <= k < n+1:
* if self.sa.darray.data.arr[j+k] < 2:
* valid = 0 # <<<<<<<<<<<<<<
@@ -22985,7 +22986,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":84
* if self.sa.darray.data.arr[j+k] < 2:
* valid = 0
* if valid: # <<<<<<<<<<<<<<
@@ -22995,7 +22996,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_t_7 = (__pyx_cur_scope->__pyx_v_valid != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":85
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":85
* valid = 0
* if valid:
* ngram = tuple([self.sa.darray.data.arr[j+k] for k in range(n+1)]) # <<<<<<<<<<<<<<
@@ -23021,7 +23022,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
__pyx_cur_scope->__pyx_v_ngram = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":86
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":86
* if valid:
* ngram = tuple([self.sa.darray.data.arr[j+k] for k in range(n+1)])
* yield i, n+1, ngram # <<<<<<<<<<<<<<
@@ -23058,7 +23059,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":87
* ngram = tuple([self.sa.darray.data.arr[j+k] for k in range(n+1)])
* yield i, n+1, ngram
* iii = iii + 1 # <<<<<<<<<<<<<<
@@ -23067,7 +23068,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/mdenkows/cdec/python/cdec/sa/lcp.pxi":88
* yield i, n+1, ngram
* iii = iii + 1
* rs = ngram_start.arr[iii] # <<<<<<<<<<<<<<
@@ -23077,7 +23078,7 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":89
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":89
* iii = iii + 1
* rs = ngram_start.arr[iii]
* i = ii # <<<<<<<<<<<<<<
@@ -23100,20 +23101,20 @@ static PyObject *__pyx_gb_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_gen
}
/* Python wrapper */
-static int __pyx_pw_3_sa_8Alphabet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_8Alphabet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_8Alphabet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_8Alphabet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
- __pyx_r = __pyx_pf_3_sa_8Alphabet___cinit__(((struct __pyx_obj_3_sa_Alphabet *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":12
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":12
* cdef dict id2sym
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -23121,7 +23122,7 @@ static int __pyx_pw_3_sa_8Alphabet_1__cinit__(PyObject *__pyx_v_self, PyObject *
* self.nonterminals = StringMap()
*/
-static int __pyx_pf_3_sa_8Alphabet___cinit__(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -23130,37 +23131,37 @@ 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/mdenkows/cdec/python/cdec/sa/sym.pxi":13
*
* def __cinit__(self):
* self.terminals = StringMap() # <<<<<<<<<<<<<<
* self.nonterminals = StringMap()
* self.id2sym = {}
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_StringMap)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_StringMap)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->terminals);
__Pyx_DECREF(((PyObject *)__pyx_v_self->terminals));
- __pyx_v_self->terminals = ((struct __pyx_obj_3_sa_StringMap *)__pyx_t_1);
+ __pyx_v_self->terminals = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":14
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":14
* def __cinit__(self):
* self.terminals = StringMap()
* self.nonterminals = StringMap() # <<<<<<<<<<<<<<
* self.id2sym = {}
* self.first_nonterminal = -1
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_StringMap)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_StringMap)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->nonterminals);
__Pyx_DECREF(((PyObject *)__pyx_v_self->nonterminals));
- __pyx_v_self->nonterminals = ((struct __pyx_obj_3_sa_StringMap *)__pyx_t_1);
+ __pyx_v_self->nonterminals = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":15
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":15
* self.terminals = StringMap()
* self.nonterminals = StringMap()
* self.id2sym = {} # <<<<<<<<<<<<<<
@@ -23175,7 +23176,7 @@ static int __pyx_pf_3_sa_8Alphabet___cinit__(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_v_self->id2sym = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":16
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":16
* self.nonterminals = StringMap()
* self.id2sym = {}
* self.first_nonterminal = -1 # <<<<<<<<<<<<<<
@@ -23188,7 +23189,7 @@ static int __pyx_pf_3_sa_8Alphabet___cinit__(struct __pyx_obj_3_sa_Alphabet *__p
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.Alphabet.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Alphabet.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -23196,15 +23197,15 @@ static int __pyx_pf_3_sa_8Alphabet___cinit__(struct __pyx_obj_3_sa_Alphabet *__p
}
/* Python wrapper */
-static void __pyx_pw_3_sa_8Alphabet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_3_sa_8Alphabet_3__dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pw_4cdec_2sa_3_sa_8Alphabet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_4cdec_2sa_3_sa_8Alphabet_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_pf_3_sa_8Alphabet_2__dealloc__(((struct __pyx_obj_3_sa_Alphabet *)__pyx_v_self));
+ __pyx_pf_4cdec_2sa_3_sa_8Alphabet_2__dealloc__(((struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":18
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":18
* self.first_nonterminal = -1
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -23212,14 +23213,14 @@ static void __pyx_pw_3_sa_8Alphabet_3__dealloc__(PyObject *__pyx_v_self) {
*
*/
-static void __pyx_pf_3_sa_8Alphabet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_3_sa_Alphabet *__pyx_v_self) {
+static void __pyx_pf_4cdec_2sa_3_sa_8Alphabet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":21
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":21
* pass
*
* cdef int isvar(self, int sym): # <<<<<<<<<<<<<<
@@ -23227,12 +23228,12 @@ static void __pyx_pf_3_sa_8Alphabet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_
*
*/
-static int __pyx_f_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
+static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("isvar", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":22
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":22
*
* cdef int isvar(self, int sym):
* return sym < 0 # <<<<<<<<<<<<<<
@@ -23248,7 +23249,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/mdenkows/cdec/python/cdec/sa/sym.pxi":24
* return sym < 0
*
* cdef int isword(self, int sym): # <<<<<<<<<<<<<<
@@ -23256,12 +23257,12 @@ static int __pyx_f_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj_3_sa_Alph
*
*/
-static int __pyx_f_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_obj_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
+static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("isword", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":25
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":25
*
* cdef int isword(self, int sym):
* return sym >= 0 # <<<<<<<<<<<<<<
@@ -23277,7 +23278,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/mdenkows/cdec/python/cdec/sa/sym.pxi":27
* return sym >= 0
*
* cdef int getindex(self, int sym): # <<<<<<<<<<<<<<
@@ -23285,19 +23286,19 @@ static int __pyx_f_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_obj_3_sa_Alp
*
*/
-static int __pyx_f_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_obj_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
+static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getindex", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":28
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":28
*
* cdef int getindex(self, int sym):
* return -sym & INDEX_MASK # <<<<<<<<<<<<<<
*
* cdef int setindex(self, int sym, int ind):
*/
- __pyx_r = ((-__pyx_v_sym) & __pyx_v_3_sa_INDEX_MASK);
+ __pyx_r = ((-__pyx_v_sym) & __pyx_v_4cdec_2sa_3_sa_INDEX_MASK);
goto __pyx_L0;
__pyx_r = 0;
@@ -23306,7 +23307,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/mdenkows/cdec/python/cdec/sa/sym.pxi":30
* return -sym & INDEX_MASK
*
* cdef int setindex(self, int sym, int ind): # <<<<<<<<<<<<<<
@@ -23314,19 +23315,19 @@ static int __pyx_f_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_obj_3_sa_A
*
*/
-static int __pyx_f_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_obj_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym, int __pyx_v_ind) {
+static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym, int __pyx_v_ind) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("setindex", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":31
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":31
*
* cdef int setindex(self, int sym, int ind):
* return -(-sym & ~INDEX_MASK | ind) # <<<<<<<<<<<<<<
*
* cdef int clearindex(self, int sym):
*/
- __pyx_r = (-(((-__pyx_v_sym) & (~__pyx_v_3_sa_INDEX_MASK)) | __pyx_v_ind));
+ __pyx_r = (-(((-__pyx_v_sym) & (~__pyx_v_4cdec_2sa_3_sa_INDEX_MASK)) | __pyx_v_ind));
goto __pyx_L0;
__pyx_r = 0;
@@ -23335,7 +23336,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/mdenkows/cdec/python/cdec/sa/sym.pxi":33
* return -(-sym & ~INDEX_MASK | ind)
*
* cdef int clearindex(self, int sym): # <<<<<<<<<<<<<<
@@ -23343,19 +23344,19 @@ static int __pyx_f_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_obj_3_sa_A
*
*/
-static int __pyx_f_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __pyx_obj_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
+static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("clearindex", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":34
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":34
*
* cdef int clearindex(self, int sym):
* return -(-sym& ~INDEX_MASK) # <<<<<<<<<<<<<<
*
* cdef int match(self, int sym1, int sym2):
*/
- __pyx_r = (-((-__pyx_v_sym) & (~__pyx_v_3_sa_INDEX_MASK)));
+ __pyx_r = (-((-__pyx_v_sym) & (~__pyx_v_4cdec_2sa_3_sa_INDEX_MASK)));
goto __pyx_L0;
__pyx_r = 0;
@@ -23364,7 +23365,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/mdenkows/cdec/python/cdec/sa/sym.pxi":36
* return -(-sym& ~INDEX_MASK)
*
* cdef int match(self, int sym1, int sym2): # <<<<<<<<<<<<<<
@@ -23372,19 +23373,19 @@ static int __pyx_f_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __pyx_obj_3_sa
*
*/
-static int __pyx_f_3_sa_8Alphabet_match(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym1, int __pyx_v_sym2) {
+static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_match(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym1, int __pyx_v_sym2) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("match", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":37
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":37
*
* cdef int match(self, int sym1, int sym2):
* return self.clearindex(sym1) == self.clearindex(sym2); # <<<<<<<<<<<<<<
*
* cdef char* tocat(self, int sym):
*/
- __pyx_r = (((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->clearindex(__pyx_v_self, __pyx_v_sym1) == ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->clearindex(__pyx_v_self, __pyx_v_sym2));
+ __pyx_r = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->clearindex(__pyx_v_self, __pyx_v_sym1) == ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->clearindex(__pyx_v_self, __pyx_v_sym2));
goto __pyx_L0;
__pyx_r = 0;
@@ -23393,7 +23394,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/mdenkows/cdec/python/cdec/sa/sym.pxi":39
* return self.clearindex(sym1) == self.clearindex(sym2);
*
* cdef char* tocat(self, int sym): # <<<<<<<<<<<<<<
@@ -23401,19 +23402,19 @@ static int __pyx_f_3_sa_8Alphabet_match(struct __pyx_obj_3_sa_Alphabet *__pyx_v_
*
*/
-static char *__pyx_f_3_sa_8Alphabet_tocat(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
+static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tocat(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
char *__pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("tocat", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":40
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":40
*
* cdef char* tocat(self, int sym):
* return self.nonterminals.word((-sym >> INDEX_SHIFT)-1) # <<<<<<<<<<<<<<
*
* cdef int fromcat(self, char *s):
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_StringMap *)__pyx_v_self->nonterminals->__pyx_vtab)->word(__pyx_v_self->nonterminals, (((-__pyx_v_sym) >> __pyx_v_3_sa_INDEX_SHIFT) - 1));
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_self->nonterminals->__pyx_vtab)->word(__pyx_v_self->nonterminals, (((-__pyx_v_sym) >> __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT) - 1));
goto __pyx_L0;
__pyx_r = 0;
@@ -23422,7 +23423,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/mdenkows/cdec/python/cdec/sa/sym.pxi":42
* return self.nonterminals.word((-sym >> INDEX_SHIFT)-1)
*
* cdef int fromcat(self, char *s): # <<<<<<<<<<<<<<
@@ -23430,23 +23431,23 @@ static char *__pyx_f_3_sa_8Alphabet_tocat(struct __pyx_obj_3_sa_Alphabet *__pyx_
* i = self.nonterminals.index(s)
*/
-static int __pyx_f_3_sa_8Alphabet_fromcat(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self, char *__pyx_v_s) {
+static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self, char *__pyx_v_s) {
int __pyx_v_i;
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("fromcat", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":44
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":44
* cdef int fromcat(self, char *s):
* cdef int i
* i = self.nonterminals.index(s) # <<<<<<<<<<<<<<
* if self.first_nonterminal == -1:
* self.first_nonterminal = i
*/
- __pyx_v_i = ((struct __pyx_vtabstruct_3_sa_StringMap *)__pyx_v_self->nonterminals->__pyx_vtab)->index(__pyx_v_self->nonterminals, __pyx_v_s);
+ __pyx_v_i = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_self->nonterminals->__pyx_vtab)->index(__pyx_v_self->nonterminals, __pyx_v_s);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":45
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":45
* cdef int i
* i = self.nonterminals.index(s)
* if self.first_nonterminal == -1: # <<<<<<<<<<<<<<
@@ -23456,7 +23457,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":46
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":46
* i = self.nonterminals.index(s)
* if self.first_nonterminal == -1:
* self.first_nonterminal = i # <<<<<<<<<<<<<<
@@ -23468,7 +23469,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/mdenkows/cdec/python/cdec/sa/sym.pxi":47
* if self.first_nonterminal == -1:
* self.first_nonterminal = i
* if i > self.last_nonterminal: # <<<<<<<<<<<<<<
@@ -23478,7 +23479,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":48
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":48
* self.first_nonterminal = i
* if i > self.last_nonterminal:
* self.last_nonterminal = i # <<<<<<<<<<<<<<
@@ -23490,14 +23491,14 @@ 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/mdenkows/cdec/python/cdec/sa/sym.pxi":49
* if i > self.last_nonterminal:
* self.last_nonterminal = i
* return -(i+1 << INDEX_SHIFT) # <<<<<<<<<<<<<<
*
* cdef char* tostring(self, int sym):
*/
- __pyx_r = (-((__pyx_v_i + 1) << __pyx_v_3_sa_INDEX_SHIFT));
+ __pyx_r = (-((__pyx_v_i + 1) << __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT));
goto __pyx_L0;
__pyx_r = 0;
@@ -23506,7 +23507,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/mdenkows/cdec/python/cdec/sa/sym.pxi":51
* return -(i+1 << INDEX_SHIFT)
*
* cdef char* tostring(self, int sym): # <<<<<<<<<<<<<<
@@ -23514,7 +23515,7 @@ static int __pyx_f_3_sa_8Alphabet_fromcat(struct __pyx_obj_3_sa_Alphabet *__pyx_
* if self.isvar(sym):
*/
-static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
+static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self, int __pyx_v_sym) {
int __pyx_v_ind;
char *__pyx_r;
__Pyx_RefNannyDeclarations
@@ -23529,17 +23530,17 @@ 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/mdenkows/cdec/python/cdec/sa/sym.pxi":53
* cdef char* tostring(self, int sym):
* cdef int ind
* if self.isvar(sym): # <<<<<<<<<<<<<<
* if sym in self.id2sym:
* return self.id2sym[sym]
*/
- __pyx_t_1 = (((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->isvar(__pyx_v_self, __pyx_v_sym) != 0);
+ __pyx_t_1 = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->isvar(__pyx_v_self, __pyx_v_sym) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":54
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":54
* cdef int ind
* if self.isvar(sym):
* if sym in self.id2sym: # <<<<<<<<<<<<<<
@@ -23557,7 +23558,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_t_3 = (__pyx_t_1 != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":55
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":55
* if self.isvar(sym):
* if sym in self.id2sym:
* return self.id2sym[sym] # <<<<<<<<<<<<<<
@@ -23578,16 +23579,16 @@ 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/mdenkows/cdec/python/cdec/sa/sym.pxi":56
* if sym in self.id2sym:
* return self.id2sym[sym]
* ind = self.getindex(sym) # <<<<<<<<<<<<<<
* if ind > 0:
* self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind)
*/
- __pyx_v_ind = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->getindex(__pyx_v_self, __pyx_v_sym);
+ __pyx_v_ind = ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/sym.pxi":57
* return self.id2sym[sym]
* ind = self.getindex(sym)
* if ind > 0: # <<<<<<<<<<<<<<
@@ -23597,14 +23598,14 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_t_3 = ((__pyx_v_ind > 0) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":58
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":58
* ind = self.getindex(sym)
* if ind > 0:
* self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind) # <<<<<<<<<<<<<<
* else:
* self.id2sym[sym] = "[%s]" % self.tocat(sym)
*/
- __pyx_t_2 = __Pyx_PyBytes_FromString(((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->tocat(__pyx_v_self, __pyx_v_sym)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyBytes_FromString(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->tocat(__pyx_v_self, __pyx_v_sym)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_t_5 = PyInt_FromLong(__pyx_v_ind); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
@@ -23629,14 +23630,14 @@ 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/mdenkows/cdec/python/cdec/sa/sym.pxi":60
* self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind)
* else:
* self.id2sym[sym] = "[%s]" % self.tocat(sym) # <<<<<<<<<<<<<<
* return self.id2sym[sym]
* else:
*/
- __pyx_t_5 = __Pyx_PyBytes_FromString(((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->tocat(__pyx_v_self, __pyx_v_sym)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyBytes_FromString(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->tocat(__pyx_v_self, __pyx_v_sym)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
__pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_67), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
@@ -23650,7 +23651,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/mdenkows/cdec/python/cdec/sa/sym.pxi":61
* else:
* self.id2sym[sym] = "[%s]" % self.tocat(sym)
* return self.id2sym[sym] # <<<<<<<<<<<<<<
@@ -23671,14 +23672,14 @@ 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/mdenkows/cdec/python/cdec/sa/sym.pxi":63
* return self.id2sym[sym]
* else:
* return self.terminals.word(sym) # <<<<<<<<<<<<<<
*
* cdef int fromstring(self, char *s, bint terminal):
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_StringMap *)__pyx_v_self->terminals->__pyx_vtab)->word(__pyx_v_self->terminals, __pyx_v_sym);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_self->terminals->__pyx_vtab)->word(__pyx_v_self->terminals, __pyx_v_sym);
goto __pyx_L0;
}
__pyx_L3:;
@@ -23689,14 +23690,14 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_WriteUnraisable("_sa.Alphabet.tostring", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.Alphabet.tostring", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":65
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":65
* return self.terminals.word(sym)
*
* cdef int fromstring(self, char *s, bint terminal): # <<<<<<<<<<<<<<
@@ -23704,7 +23705,7 @@ static char *__pyx_f_3_sa_8Alphabet_tostring(struct __pyx_obj_3_sa_Alphabet *__p
* cdef char *comma
*/
-static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self, char *__pyx_v_s, int __pyx_v_terminal) {
+static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self, char *__pyx_v_s, int __pyx_v_terminal) {
char *__pyx_v_comma;
int __pyx_v_n;
char *__pyx_v_sep;
@@ -23724,7 +23725,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/mdenkows/cdec/python/cdec/sa/sym.pxi":69
* cdef char *comma
* cdef int n
* n = strlen(s) # <<<<<<<<<<<<<<
@@ -23733,7 +23734,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/mdenkows/cdec/python/cdec/sa/sym.pxi":71
* n = strlen(s)
* cdef char *sep
* sep = strstr(s,"_SEP_") # <<<<<<<<<<<<<<
@@ -23742,7 +23743,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/mdenkows/cdec/python/cdec/sa/sym.pxi":72
* cdef char *sep
* sep = strstr(s,"_SEP_")
* if n >= 3 and s[0] == c'[' and s[n-1] == c']' and sep == NULL: # <<<<<<<<<<<<<<
@@ -23770,7 +23771,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/mdenkows/cdec/python/cdec/sa/sym.pxi":73
* sep = strstr(s,"_SEP_")
* if n >= 3 and s[0] == c'[' and s[n-1] == c']' and sep == NULL:
* if terminal: # <<<<<<<<<<<<<<
@@ -23780,7 +23781,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_t_2 = (__pyx_v_terminal != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":74
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":74
* if n >= 3 and s[0] == c'[' and s[n-1] == c']' and sep == NULL:
* if terminal:
* s1 = "\\"+s # <<<<<<<<<<<<<<
@@ -23795,7 +23796,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/mdenkows/cdec/python/cdec/sa/sym.pxi":75
* if terminal:
* s1 = "\\"+s
* return self.terminals.index(s1) # <<<<<<<<<<<<<<
@@ -23803,13 +23804,13 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
* s = s + 1
*/
__pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_s1); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_StringMap *)__pyx_v_self->terminals->__pyx_vtab)->index(__pyx_v_self->terminals, __pyx_t_8);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_self->terminals->__pyx_vtab)->index(__pyx_v_self->terminals, __pyx_t_8);
goto __pyx_L0;
goto __pyx_L4;
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":76
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":76
* s1 = "\\"+s
* return self.terminals.index(s1)
* s[n-1] = c'\0' # <<<<<<<<<<<<<<
@@ -23818,7 +23819,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/mdenkows/cdec/python/cdec/sa/sym.pxi":77
* return self.terminals.index(s1)
* s[n-1] = c'\0'
* s = s + 1 # <<<<<<<<<<<<<<
@@ -23827,7 +23828,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/mdenkows/cdec/python/cdec/sa/sym.pxi":78
* s[n-1] = c'\0'
* s = s + 1
* comma = strrchr(s, c',') # <<<<<<<<<<<<<<
@@ -23836,7 +23837,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/mdenkows/cdec/python/cdec/sa/sym.pxi":79
* s = s + 1
* comma = strrchr(s, c',')
* if comma != NULL: # <<<<<<<<<<<<<<
@@ -23846,7 +23847,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_t_2 = ((__pyx_v_comma != NULL) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":80
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":80
* comma = strrchr(s, c',')
* if comma != NULL:
* comma[0] = c'\0' # <<<<<<<<<<<<<<
@@ -23855,27 +23856,27 @@ 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/mdenkows/cdec/python/cdec/sa/sym.pxi":81
* if comma != NULL:
* comma[0] = c'\0'
* return self.setindex(self.fromcat(s), strtol(comma+1, NULL, 10)) # <<<<<<<<<<<<<<
* else:
* return self.fromcat(s)
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->setindex(__pyx_v_self, ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->fromcat(__pyx_v_self, __pyx_v_s), strtol((__pyx_v_comma + 1), NULL, 10));
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->setindex(__pyx_v_self, ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->fromcat(__pyx_v_self, __pyx_v_s), strtol((__pyx_v_comma + 1), NULL, 10));
goto __pyx_L0;
goto __pyx_L5;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":83
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":83
* return self.setindex(self.fromcat(s), strtol(comma+1, NULL, 10))
* else:
* return self.fromcat(s) # <<<<<<<<<<<<<<
* else:
* return self.terminals.index(s)
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->fromcat(__pyx_v_self, __pyx_v_s);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->fromcat(__pyx_v_self, __pyx_v_s);
goto __pyx_L0;
}
__pyx_L5:;
@@ -23883,14 +23884,14 @@ 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/mdenkows/cdec/python/cdec/sa/sym.pxi":85
* return self.fromcat(s)
* else:
* return self.terminals.index(s) # <<<<<<<<<<<<<<
*
* cdef Alphabet ALPHABET = Alphabet()
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_StringMap *)__pyx_v_self->terminals->__pyx_vtab)->index(__pyx_v_self->terminals, __pyx_v_s);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_self->terminals->__pyx_vtab)->index(__pyx_v_self->terminals, __pyx_v_s);
goto __pyx_L0;
}
__pyx_L3:;
@@ -23900,7 +23901,7 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_WriteUnraisable("_sa.Alphabet.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.Alphabet.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_s1);
@@ -23909,17 +23910,17 @@ static int __pyx_f_3_sa_8Alphabet_fromstring(struct __pyx_obj_3_sa_Alphabet *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_8Alphabet_9terminals_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_8Alphabet_9terminals_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_8Alphabet_9terminals_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_8Alphabet_9terminals_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_8Alphabet_9terminals___get__(((struct __pyx_obj_3_sa_Alphabet *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_8Alphabet_9terminals___get__(((struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":8
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":8
*
* cdef class Alphabet:
* cdef readonly StringMap terminals, nonterminals # <<<<<<<<<<<<<<
@@ -23927,7 +23928,7 @@ static PyObject *__pyx_pw_3_sa_8Alphabet_9terminals_1__get__(PyObject *__pyx_v_s
* cdef dict id2sym
*/
-static PyObject *__pyx_pf_3_sa_8Alphabet_9terminals___get__(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_8Alphabet_9terminals___get__(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -23944,17 +23945,17 @@ static PyObject *__pyx_pf_3_sa_8Alphabet_9terminals___get__(struct __pyx_obj_3_s
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_8Alphabet_12nonterminals_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_8Alphabet_12nonterminals_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_8Alphabet_12nonterminals_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_8Alphabet_12nonterminals_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_8Alphabet_12nonterminals___get__(((struct __pyx_obj_3_sa_Alphabet *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_8Alphabet_12nonterminals___get__(((struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_3_sa_8Alphabet_12nonterminals___get__(struct __pyx_obj_3_sa_Alphabet *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_8Alphabet_12nonterminals___get__(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -23970,7 +23971,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/mdenkows/cdec/python/cdec/sa/sym.pxi":89
* cdef Alphabet ALPHABET = Alphabet()
*
* cdef char* sym_tostring(int sym): # <<<<<<<<<<<<<<
@@ -23978,19 +23979,19 @@ static PyObject *__pyx_pf_3_sa_8Alphabet_12nonterminals___get__(struct __pyx_obj
*
*/
-static char *__pyx_f_3_sa_sym_tostring(int __pyx_v_sym) {
+static char *__pyx_f_4cdec_2sa_3_sa_sym_tostring(int __pyx_v_sym) {
char *__pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_tostring", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":90
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":90
*
* cdef char* sym_tostring(int sym):
* return ALPHABET.tostring(sym) # <<<<<<<<<<<<<<
*
* cdef char* sym_tocat(int sym):
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_3_sa_ALPHABET->__pyx_vtab)->tostring(__pyx_v_3_sa_ALPHABET, __pyx_v_sym);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->tostring(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym);
goto __pyx_L0;
__pyx_r = 0;
@@ -23999,7 +24000,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/mdenkows/cdec/python/cdec/sa/sym.pxi":92
* return ALPHABET.tostring(sym)
*
* cdef char* sym_tocat(int sym): # <<<<<<<<<<<<<<
@@ -24007,19 +24008,19 @@ static char *__pyx_f_3_sa_sym_tostring(int __pyx_v_sym) {
*
*/
-static char *__pyx_f_3_sa_sym_tocat(int __pyx_v_sym) {
+static char *__pyx_f_4cdec_2sa_3_sa_sym_tocat(int __pyx_v_sym) {
char *__pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_tocat", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":93
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":93
*
* cdef char* sym_tocat(int sym):
* return ALPHABET.tocat(sym) # <<<<<<<<<<<<<<
*
* cdef int sym_isvar(int sym):
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_3_sa_ALPHABET->__pyx_vtab)->tocat(__pyx_v_3_sa_ALPHABET, __pyx_v_sym);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->tocat(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym);
goto __pyx_L0;
__pyx_r = 0;
@@ -24028,7 +24029,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/mdenkows/cdec/python/cdec/sa/sym.pxi":95
* return ALPHABET.tocat(sym)
*
* cdef int sym_isvar(int sym): # <<<<<<<<<<<<<<
@@ -24036,19 +24037,19 @@ static char *__pyx_f_3_sa_sym_tocat(int __pyx_v_sym) {
*
*/
-static int __pyx_f_3_sa_sym_isvar(int __pyx_v_sym) {
+static int __pyx_f_4cdec_2sa_3_sa_sym_isvar(int __pyx_v_sym) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_isvar", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":96
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":96
*
* cdef int sym_isvar(int sym):
* return ALPHABET.isvar(sym) # <<<<<<<<<<<<<<
*
* cdef int sym_getindex(int sym):
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_3_sa_ALPHABET->__pyx_vtab)->isvar(__pyx_v_3_sa_ALPHABET, __pyx_v_sym);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->isvar(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym);
goto __pyx_L0;
__pyx_r = 0;
@@ -24057,7 +24058,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/mdenkows/cdec/python/cdec/sa/sym.pxi":98
* return ALPHABET.isvar(sym)
*
* cdef int sym_getindex(int sym): # <<<<<<<<<<<<<<
@@ -24065,19 +24066,19 @@ static int __pyx_f_3_sa_sym_isvar(int __pyx_v_sym) {
*
*/
-static int __pyx_f_3_sa_sym_getindex(int __pyx_v_sym) {
+static int __pyx_f_4cdec_2sa_3_sa_sym_getindex(int __pyx_v_sym) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_getindex", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":99
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":99
*
* cdef int sym_getindex(int sym):
* return ALPHABET.getindex(sym) # <<<<<<<<<<<<<<
*
* cdef int sym_setindex(int sym, int id):
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_3_sa_ALPHABET->__pyx_vtab)->getindex(__pyx_v_3_sa_ALPHABET, __pyx_v_sym);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->getindex(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym);
goto __pyx_L0;
__pyx_r = 0;
@@ -24086,7 +24087,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/mdenkows/cdec/python/cdec/sa/sym.pxi":101
* return ALPHABET.getindex(sym)
*
* cdef int sym_setindex(int sym, int id): # <<<<<<<<<<<<<<
@@ -24094,19 +24095,19 @@ static int __pyx_f_3_sa_sym_getindex(int __pyx_v_sym) {
*
*/
-static int __pyx_f_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) {
+static int __pyx_f_4cdec_2sa_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_setindex", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":102
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":102
*
* cdef int sym_setindex(int sym, int id):
* return ALPHABET.setindex(sym, id) # <<<<<<<<<<<<<<
*
* cdef int sym_fromstring(char* string, bint terminal):
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_3_sa_ALPHABET->__pyx_vtab)->setindex(__pyx_v_3_sa_ALPHABET, __pyx_v_sym, __pyx_v_id);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->setindex(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym, __pyx_v_id);
goto __pyx_L0;
__pyx_r = 0;
@@ -24115,7 +24116,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/mdenkows/cdec/python/cdec/sa/sym.pxi":104
* return ALPHABET.setindex(sym, id)
*
* cdef int sym_fromstring(char* string, bint terminal): # <<<<<<<<<<<<<<
@@ -24123,19 +24124,19 @@ static int __pyx_f_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) {
*
*/
-static int __pyx_f_3_sa_sym_fromstring(char *__pyx_v_string, int __pyx_v_terminal) {
+static int __pyx_f_4cdec_2sa_3_sa_sym_fromstring(char *__pyx_v_string, int __pyx_v_terminal) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sym_fromstring", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":105
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":105
*
* cdef int sym_fromstring(char* string, bint terminal):
* return ALPHABET.fromstring(string, terminal) # <<<<<<<<<<<<<<
*
* def isvar(sym):
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_Alphabet *)__pyx_v_3_sa_ALPHABET->__pyx_vtab)->fromstring(__pyx_v_3_sa_ALPHABET, __pyx_v_string, __pyx_v_terminal);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->fromstring(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_string, __pyx_v_terminal);
goto __pyx_L0;
__pyx_r = 0;
@@ -24145,18 +24146,18 @@ static int __pyx_f_3_sa_sym_fromstring(char *__pyx_v_string, int __pyx_v_termina
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_5isvar(PyObject *__pyx_self, PyObject *__pyx_v_sym); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_5isvar = {__Pyx_NAMESTR("isvar"), (PyCFunction)__pyx_pw_3_sa_5isvar, METH_O, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_5isvar(PyObject *__pyx_self, PyObject *__pyx_v_sym) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5isvar(PyObject *__pyx_self, PyObject *__pyx_v_sym); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_5isvar = {__Pyx_NAMESTR("isvar"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_5isvar, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_5isvar(PyObject *__pyx_self, PyObject *__pyx_v_sym) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("isvar (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_4isvar(__pyx_self, ((PyObject *)__pyx_v_sym));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_4isvar(__pyx_self, ((PyObject *)__pyx_v_sym));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":107
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":107
* return ALPHABET.fromstring(string, terminal)
*
* def isvar(sym): # <<<<<<<<<<<<<<
@@ -24164,7 +24165,7 @@ static PyObject *__pyx_pw_3_sa_5isvar(PyObject *__pyx_self, PyObject *__pyx_v_sy
*
*/
-static PyObject *__pyx_pf_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sym) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sym) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -24174,7 +24175,7 @@ static PyObject *__pyx_pf_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_self, PyObje
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("isvar", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":108
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":108
*
* def isvar(sym):
* return sym_isvar(sym) # <<<<<<<<<<<<<<
@@ -24183,7 +24184,7 @@ static PyObject *__pyx_pf_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_self, PyObje
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_sym); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PyInt_FromLong(__pyx_f_3_sa_sym_isvar(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -24193,7 +24194,7 @@ static PyObject *__pyx_pf_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_self, PyObje
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.isvar", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.isvar", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -24202,19 +24203,19 @@ static PyObject *__pyx_pf_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_self, PyObje
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7make_lattice(PyObject *__pyx_self, PyObject *__pyx_v_words); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_7make_lattice = {__Pyx_NAMESTR("make_lattice"), (PyCFunction)__pyx_pw_3_sa_7make_lattice, METH_O, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_7make_lattice(PyObject *__pyx_self, PyObject *__pyx_v_words) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7make_lattice(PyObject *__pyx_self, PyObject *__pyx_v_words); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_7make_lattice = {__Pyx_NAMESTR("make_lattice"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7make_lattice, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7make_lattice(PyObject *__pyx_self, PyObject *__pyx_v_words) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("make_lattice (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6make_lattice(__pyx_self, ((PyObject *)__pyx_v_words));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6make_lattice(__pyx_self, ((PyObject *)__pyx_v_words));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":111
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":111
*
* def make_lattice(words):
* word_ids = (sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
@@ -24222,25 +24223,25 @@ static PyObject *__pyx_gb_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject
*
*/
-static PyObject *__pyx_pf_3_sa_12make_lattice_genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_12make_lattice_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_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_5_genexpr *)__pyx_tp_new_3_sa___pyx_scope_struct_5_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_5_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_4_make_lattice *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *) __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_12make_lattice_2generator7, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_12make_lattice_2generator7, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -24249,7 +24250,7 @@ static PyObject *__pyx_pf_3_sa_12make_lattice_genexpr(PyObject *__pyx_self) {
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.make_lattice.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.make_lattice.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -24258,9 +24259,9 @@ static PyObject *__pyx_pf_3_sa_12make_lattice_genexpr(PyObject *__pyx_self) {
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -24322,7 +24323,7 @@ static PyObject *__pyx_gb_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject
__pyx_cur_scope->__pyx_v_word = __pyx_t_4;
__pyx_t_4 = 0;
__pyx_t_5 = __Pyx_PyObject_AsString(__pyx_cur_scope->__pyx_v_word); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __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 = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_t_5, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
@@ -24357,9 +24358,9 @@ static PyObject *__pyx_gb_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject
__Pyx_RefNannyFinishContext();
return NULL;
}
-static PyObject *__pyx_gb_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":112
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":112
* def make_lattice(words):
* word_ids = (sym_fromstring(word, True) for word in words)
* return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<<
@@ -24367,25 +24368,25 @@ static PyObject *__pyx_gb_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject
* def decode_lattice(lattice):
*/
-static PyObject *__pyx_pf_3_sa_12make_lattice_3genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_12make_lattice_3genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_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_6_genexpr *)__pyx_tp_new_3_sa___pyx_scope_struct_6_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_6_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_4_make_lattice *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *) __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_12make_lattice_5generator8, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_12make_lattice_5generator8, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -24394,7 +24395,7 @@ static PyObject *__pyx_pf_3_sa_12make_lattice_3genexpr(PyObject *__pyx_self) {
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.make_lattice.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.make_lattice.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -24403,9 +24404,9 @@ static PyObject *__pyx_pf_3_sa_12make_lattice_3genexpr(PyObject *__pyx_self) {
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -24517,7 +24518,7 @@ static PyObject *__pyx_gb_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":110
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":110
* return sym_isvar(sym)
*
* def make_lattice(words): # <<<<<<<<<<<<<<
@@ -24525,8 +24526,8 @@ static PyObject *__pyx_gb_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject
* return tuple(((word, None, 1), ) for word in word_ids)
*/
-static PyObject *__pyx_pf_3_sa_6make_lattice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_words) {
- struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6make_lattice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_words) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -24535,7 +24536,7 @@ static PyObject *__pyx_pf_3_sa_6make_lattice(CYTHON_UNUSED PyObject *__pyx_self,
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("make_lattice", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *)__pyx_tp_new_3_sa___pyx_scope_struct_4_make_lattice(__pyx_ptype_3_sa___pyx_scope_struct_4_make_lattice, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -24545,20 +24546,20 @@ static PyObject *__pyx_pf_3_sa_6make_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":111
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":111
*
* 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_t_1 = __pyx_pf_3_sa_12make_lattice_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_12make_lattice_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_cur_scope->__pyx_v_word_ids = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":112
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":112
* def make_lattice(words):
* word_ids = (sym_fromstring(word, True) for word in words)
* return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<<
@@ -24566,7 +24567,7 @@ static PyObject *__pyx_pf_3_sa_6make_lattice(CYTHON_UNUSED PyObject *__pyx_self,
* def decode_lattice(lattice):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_pf_3_sa_12make_lattice_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_12make_lattice_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; __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 = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -24585,7 +24586,7 @@ static PyObject *__pyx_pf_3_sa_6make_lattice(CYTHON_UNUSED PyObject *__pyx_self,
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.make_lattice", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.make_lattice", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -24595,19 +24596,19 @@ static PyObject *__pyx_pf_3_sa_6make_lattice(CYTHON_UNUSED PyObject *__pyx_self,
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9decode_lattice(PyObject *__pyx_self, PyObject *__pyx_v_lattice); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_9decode_lattice = {__Pyx_NAMESTR("decode_lattice"), (PyCFunction)__pyx_pw_3_sa_9decode_lattice, METH_O, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_9decode_lattice(PyObject *__pyx_self, PyObject *__pyx_v_lattice) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9decode_lattice(PyObject *__pyx_self, PyObject *__pyx_v_lattice); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_9decode_lattice = {__Pyx_NAMESTR("decode_lattice"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9decode_lattice, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9decode_lattice(PyObject *__pyx_self, PyObject *__pyx_v_lattice) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("decode_lattice (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_8decode_lattice(__pyx_self, ((PyObject *)__pyx_v_lattice));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_8decode_lattice(__pyx_self, ((PyObject *)__pyx_v_lattice));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":115
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":115
*
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<<
@@ -24615,25 +24616,25 @@ static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObjec
*
*/
-static PyObject *__pyx_pf_3_sa_14decode_lattice_genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14decode_lattice_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_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_8_genexpr *)__pyx_tp_new_3_sa___pyx_scope_struct_8_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_8_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_8_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_7_decode_lattice *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *) __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_14decode_lattice_2generator9, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -24642,7 +24643,7 @@ static PyObject *__pyx_pf_3_sa_14decode_lattice_genexpr(PyObject *__pyx_self) {
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.decode_lattice.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.decode_lattice.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -24651,9 +24652,9 @@ static PyObject *__pyx_pf_3_sa_14decode_lattice_genexpr(PyObject *__pyx_self) {
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -24684,7 +24685,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 = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":116
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":116
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc
* for arc in node for node in lattice) # <<<<<<<<<<<<<<
@@ -24702,7 +24703,7 @@ static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObjec
}
for (;;) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":115
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":115
*
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<<
@@ -24808,7 +24809,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":116
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":116
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc
* for arc in node for node in lattice) # <<<<<<<<<<<<<<
@@ -24896,7 +24897,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":115
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":115
*
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<<
@@ -24904,7 +24905,7 @@ static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObjec
*
*/
__pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_sym); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_14)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring(__pyx_t_14)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
__pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
@@ -24977,7 +24978,7 @@ static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObjec
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":114
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":114
* return tuple(((word, None, 1), ) for word in word_ids)
*
* def decode_lattice(lattice): # <<<<<<<<<<<<<<
@@ -24985,8 +24986,8 @@ static PyObject *__pyx_gb_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObjec
* for arc in node for node in lattice)
*/
-static PyObject *__pyx_pf_3_sa_8decode_lattice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lattice) {
- struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_8decode_lattice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lattice) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -24995,7 +24996,7 @@ static PyObject *__pyx_pf_3_sa_8decode_lattice(CYTHON_UNUSED PyObject *__pyx_sel
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("decode_lattice", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *)__pyx_tp_new_3_sa___pyx_scope_struct_7_decode_lattice(__pyx_ptype_3_sa___pyx_scope_struct_7_decode_lattice, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -25005,7 +25006,7 @@ static PyObject *__pyx_pf_3_sa_8decode_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":115
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":115
*
* def decode_lattice(lattice):
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<<
@@ -25013,7 +25014,7 @@ static PyObject *__pyx_pf_3_sa_8decode_lattice(CYTHON_UNUSED PyObject *__pyx_sel
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_pf_3_sa_14decode_lattice_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_14decode_lattice_genexpr(((PyObject*)__pyx_cur_scope)); 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);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -25032,7 +25033,7 @@ static PyObject *__pyx_pf_3_sa_8decode_lattice(CYTHON_UNUSED PyObject *__pyx_sel
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.decode_lattice", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.decode_lattice", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -25042,19 +25043,19 @@ static PyObject *__pyx_pf_3_sa_8decode_lattice(CYTHON_UNUSED PyObject *__pyx_sel
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_11decode_sentence(PyObject *__pyx_self, PyObject *__pyx_v_lattice); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_11decode_sentence = {__Pyx_NAMESTR("decode_sentence"), (PyCFunction)__pyx_pw_3_sa_11decode_sentence, METH_O, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_11decode_sentence(PyObject *__pyx_self, PyObject *__pyx_v_lattice) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11decode_sentence(PyObject *__pyx_self, PyObject *__pyx_v_lattice); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_11decode_sentence = {__Pyx_NAMESTR("decode_sentence"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11decode_sentence, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11decode_sentence(PyObject *__pyx_self, PyObject *__pyx_v_lattice) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("decode_sentence (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_10decode_sentence(__pyx_self, ((PyObject *)__pyx_v_lattice));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_10decode_sentence(__pyx_self, ((PyObject *)__pyx_v_lattice));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":119
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":119
*
* def decode_sentence(lattice):
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) # <<<<<<<<<<<<<<
@@ -25062,25 +25063,25 @@ static PyObject *__pyx_gb_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObj
* def encode_words(words):
*/
-static PyObject *__pyx_pf_3_sa_15decode_sentence_genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_15decode_sentence_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_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_10_genexpr *)__pyx_tp_new_3_sa___pyx_scope_struct_10_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_10_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_10_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_9_decode_sentence *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *) __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_15decode_sentence_2generator10, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_15decode_sentence_2generator10, (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;
@@ -25089,7 +25090,7 @@ static PyObject *__pyx_pf_3_sa_15decode_sentence_genexpr(PyObject *__pyx_self) {
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.decode_sentence.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.decode_sentence.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -25098,9 +25099,9 @@ static PyObject *__pyx_pf_3_sa_15decode_sentence_genexpr(PyObject *__pyx_self) {
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -25280,7 +25281,7 @@ static PyObject *__pyx_gb_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObj
__pyx_cur_scope->__pyx_v__ = __pyx_t_9;
__pyx_t_9 = 0;
__pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_sym); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_11)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring(__pyx_t_11)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__pyx_r = ((PyObject *)__pyx_t_4);
__pyx_t_4 = 0;
@@ -25321,7 +25322,7 @@ static PyObject *__pyx_gb_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObj
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":118
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":118
* for arc in node for node in lattice)
*
* def decode_sentence(lattice): # <<<<<<<<<<<<<<
@@ -25329,8 +25330,8 @@ static PyObject *__pyx_gb_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObj
*
*/
-static PyObject *__pyx_pf_3_sa_10decode_sentence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lattice) {
- struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_10decode_sentence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lattice) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -25339,7 +25340,7 @@ static PyObject *__pyx_pf_3_sa_10decode_sentence(CYTHON_UNUSED PyObject *__pyx_s
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("decode_sentence", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *)__pyx_tp_new_3_sa___pyx_scope_struct_9_decode_sentence(__pyx_ptype_3_sa___pyx_scope_struct_9_decode_sentence, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -25349,7 +25350,7 @@ static PyObject *__pyx_pf_3_sa_10decode_sentence(CYTHON_UNUSED PyObject *__pyx_s
__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":119
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":119
*
* def decode_sentence(lattice):
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) # <<<<<<<<<<<<<<
@@ -25357,7 +25358,7 @@ static PyObject *__pyx_pf_3_sa_10decode_sentence(CYTHON_UNUSED PyObject *__pyx_s
* 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 = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_15decode_sentence_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);
@@ -25376,7 +25377,7 @@ static PyObject *__pyx_pf_3_sa_10decode_sentence(CYTHON_UNUSED PyObject *__pyx_s
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.decode_sentence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.decode_sentence", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -25386,19 +25387,19 @@ static PyObject *__pyx_pf_3_sa_10decode_sentence(CYTHON_UNUSED PyObject *__pyx_s
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_13encode_words(PyObject *__pyx_self, PyObject *__pyx_v_words); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_13encode_words = {__Pyx_NAMESTR("encode_words"), (PyCFunction)__pyx_pw_3_sa_13encode_words, METH_O, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_13encode_words(PyObject *__pyx_self, PyObject *__pyx_v_words) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_13encode_words(PyObject *__pyx_self, PyObject *__pyx_v_words); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_13encode_words = {__Pyx_NAMESTR("encode_words"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_13encode_words, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_13encode_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_12encode_words(__pyx_self, ((PyObject *)__pyx_v_words));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_12encode_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 */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_12encode_words_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":122
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":122
*
* def encode_words(words):
* return tuple(sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
@@ -25406,25 +25407,25 @@ static PyObject *__pyx_gb_3_sa_12encode_words_2generator11(__pyx_GeneratorObject
* 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;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_12encode_words_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_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_tp_new_3_sa___pyx_scope_struct_12_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_12_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr(__pyx_ptype_4cdec_2sa_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_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_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 = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_12encode_words_2generator11, (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;
@@ -25433,7 +25434,7 @@ static PyObject *__pyx_pf_3_sa_12encode_words_genexpr(PyObject *__pyx_self) {
__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_AddTraceback("cdec.sa._sa.encode_words.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -25442,9 +25443,9 @@ static PyObject *__pyx_pf_3_sa_12encode_words_genexpr(PyObject *__pyx_self) {
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_12encode_words_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_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);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_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;
@@ -25506,7 +25507,7 @@ static PyObject *__pyx_gb_3_sa_12encode_words_2generator11(__pyx_GeneratorObject
__pyx_cur_scope->__pyx_v_word = __pyx_t_4;
__pyx_t_4 = 0;
__pyx_t_5 = __Pyx_PyObject_AsString(__pyx_cur_scope->__pyx_v_word); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __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 = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_t_5, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
@@ -25542,7 +25543,7 @@ static PyObject *__pyx_gb_3_sa_12encode_words_2generator11(__pyx_GeneratorObject
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":121
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":121
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
*
* def encode_words(words): # <<<<<<<<<<<<<<
@@ -25550,8 +25551,8 @@ static PyObject *__pyx_gb_3_sa_12encode_words_2generator11(__pyx_GeneratorObject
*
*/
-static PyObject *__pyx_pf_3_sa_12encode_words(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_words) {
- struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_12encode_words(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_words) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -25560,7 +25561,7 @@ static PyObject *__pyx_pf_3_sa_12encode_words(CYTHON_UNUSED PyObject *__pyx_self
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_tp_new_3_sa___pyx_scope_struct_11_encode_words(__pyx_ptype_3_sa___pyx_scope_struct_11_encode_words, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -25570,7 +25571,7 @@ static PyObject *__pyx_pf_3_sa_12encode_words(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":122
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":122
*
* def encode_words(words):
* return tuple(sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<<
@@ -25578,7 +25579,7 @@ static PyObject *__pyx_pf_3_sa_12encode_words(CYTHON_UNUSED PyObject *__pyx_self
* 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 = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_12encode_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);
@@ -25597,7 +25598,7 @@ static PyObject *__pyx_pf_3_sa_12encode_words(CYTHON_UNUSED PyObject *__pyx_self
__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_AddTraceback("cdec.sa._sa.encode_words", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -25607,43 +25608,43 @@ static PyObject *__pyx_pf_3_sa_12encode_words(CYTHON_UNUSED PyObject *__pyx_self
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_15decode_words(PyObject *__pyx_self, PyObject *__pyx_v_syms); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_15decode_words = {__Pyx_NAMESTR("decode_words"), (PyCFunction)__pyx_pw_3_sa_15decode_words, METH_O, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_15decode_words(PyObject *__pyx_self, PyObject *__pyx_v_syms) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_15decode_words(PyObject *__pyx_self, PyObject *__pyx_v_syms); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_15decode_words = {__Pyx_NAMESTR("decode_words"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_15decode_words, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_15decode_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_14decode_words(__pyx_self, ((PyObject *)__pyx_v_syms));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_14decode_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 */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_12decode_words_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":125
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":125
*
* 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;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_12decode_words_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_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_tp_new_3_sa___pyx_scope_struct_14_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_14_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr(__pyx_ptype_4cdec_2sa_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_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_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 = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_12decode_words_2generator12, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -25652,7 +25653,7 @@ static PyObject *__pyx_pf_3_sa_12decode_words_genexpr(PyObject *__pyx_self) {
__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_AddTraceback("cdec.sa._sa.decode_words.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -25661,9 +25662,9 @@ static PyObject *__pyx_pf_3_sa_12decode_words_genexpr(PyObject *__pyx_self) {
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_12decode_words_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_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);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_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;
@@ -25725,7 +25726,7 @@ static PyObject *__pyx_gb_3_sa_12decode_words_2generator12(__pyx_GeneratorObject
__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 = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring(__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__pyx_r = ((PyObject *)__pyx_t_4);
__pyx_t_4 = 0;
@@ -25761,15 +25762,15 @@ static PyObject *__pyx_gb_3_sa_12decode_words_2generator12(__pyx_GeneratorObject
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":124
+/* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":124
* return tuple(sym_fromstring(word, True) for word in words)
*
* def decode_words(syms): # <<<<<<<<<<<<<<
* return tuple(sym_tostring(sym) for sym in syms)
*/
-static PyObject *__pyx_pf_3_sa_14decode_words(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_syms) {
- struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14decode_words(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_syms) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -25778,7 +25779,7 @@ static PyObject *__pyx_pf_3_sa_14decode_words(CYTHON_UNUSED PyObject *__pyx_self
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_tp_new_3_sa___pyx_scope_struct_13_decode_words(__pyx_ptype_3_sa___pyx_scope_struct_13_decode_words, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -25788,13 +25789,13 @@ static PyObject *__pyx_pf_3_sa_14decode_words(CYTHON_UNUSED PyObject *__pyx_self
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_syms);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_syms);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":125
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":125
*
* 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 = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_12decode_words_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 125; __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 = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -25813,7 +25814,7 @@ static PyObject *__pyx_pf_3_sa_14decode_words(CYTHON_UNUSED PyObject *__pyx_self
__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_AddTraceback("cdec.sa._sa.decode_words", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -25823,8 +25824,8 @@ static PyObject *__pyx_pf_3_sa_14decode_words(CYTHON_UNUSED PyObject *__pyx_self
}
/* 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) {
+static int __pyx_pw_4cdec_2sa_3_sa_6Phrase_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_6Phrase_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_words = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -25863,16 +25864,16 @@ static int __pyx_pw_3_sa_6Phrase_1__cinit__(PyObject *__pyx_v_self, PyObject *__
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Phrase.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_6Phrase___cinit__(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self), __pyx_v_words);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self), __pyx_v_words);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":6
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":6
* cdef class Phrase:
*
* def __cinit__(self, words): # <<<<<<<<<<<<<<
@@ -25880,7 +25881,7 @@ static int __pyx_pw_3_sa_6Phrase_1__cinit__(PyObject *__pyx_v_self, PyObject *__
* n_vars = 0
*/
-static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_words) {
+static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_words) {
int __pyx_v_i;
int __pyx_v_j;
int __pyx_v_n;
@@ -25897,7 +25898,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/mdenkows/cdec/python/cdec/sa/rule.pxi":8
* def __cinit__(self, words):
* cdef int i, j, n, n_vars
* n_vars = 0 # <<<<<<<<<<<<<<
@@ -25906,7 +25907,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/mdenkows/cdec/python/cdec/sa/rule.pxi":9
* cdef int i, j, n, n_vars
* n_vars = 0
* n = len(words) # <<<<<<<<<<<<<<
@@ -25916,7 +25917,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/mdenkows/cdec/python/cdec/sa/rule.pxi":10
* n_vars = 0
* n = len(words)
* self.syms = <int *>malloc(n*sizeof(int)) # <<<<<<<<<<<<<<
@@ -25925,7 +25926,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/mdenkows/cdec/python/cdec/sa/rule.pxi":11
* n = len(words)
* self.syms = <int *>malloc(n*sizeof(int))
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -25935,7 +25936,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/mdenkows/cdec/python/cdec/sa/rule.pxi":12
* self.syms = <int *>malloc(n*sizeof(int))
* for i from 0 <= i < n:
* self.syms[i] = words[i] # <<<<<<<<<<<<<<
@@ -25948,17 +25949,17 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":13
* for i from 0 <= i < n:
* self.syms[i] = words[i]
* if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<<
* n_vars += 1
* self.n = n
*/
- __pyx_t_5 = (__pyx_f_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0);
+ __pyx_t_5 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":14
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":14
* self.syms[i] = words[i]
* if sym_isvar(self.syms[i]):
* n_vars += 1 # <<<<<<<<<<<<<<
@@ -25971,7 +25972,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/mdenkows/cdec/python/cdec/sa/rule.pxi":15
* if sym_isvar(self.syms[i]):
* n_vars += 1
* self.n = n # <<<<<<<<<<<<<<
@@ -25980,7 +25981,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/mdenkows/cdec/python/cdec/sa/rule.pxi":16
* n_vars += 1
* self.n = n
* self.n_vars = n_vars # <<<<<<<<<<<<<<
@@ -25989,7 +25990,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/mdenkows/cdec/python/cdec/sa/rule.pxi":17
* self.n = n
* self.n_vars = n_vars
* self.varpos = <int *>malloc(n_vars*sizeof(int)) # <<<<<<<<<<<<<<
@@ -25998,7 +25999,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/mdenkows/cdec/python/cdec/sa/rule.pxi":18
* self.n_vars = n_vars
* self.varpos = <int *>malloc(n_vars*sizeof(int))
* j = 0 # <<<<<<<<<<<<<<
@@ -26007,7 +26008,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/mdenkows/cdec/python/cdec/sa/rule.pxi":19
* self.varpos = <int *>malloc(n_vars*sizeof(int))
* j = 0
* for i from 0 <= i < n: # <<<<<<<<<<<<<<
@@ -26017,17 +26018,17 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":20
* j = 0
* for i from 0 <= i < n:
* if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<<
* self.varpos[j] = i
* j = j + 1
*/
- __pyx_t_5 = (__pyx_f_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0);
+ __pyx_t_5 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":21
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":21
* for i from 0 <= i < n:
* if sym_isvar(self.syms[i]):
* self.varpos[j] = i # <<<<<<<<<<<<<<
@@ -26036,7 +26037,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/mdenkows/cdec/python/cdec/sa/rule.pxi":22
* if sym_isvar(self.syms[i]):
* self.varpos[j] = i
* j = j + 1 # <<<<<<<<<<<<<<
@@ -26053,7 +26054,7 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.Phrase.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -26061,15 +26062,15 @@ static int __pyx_pf_3_sa_6Phrase___cinit__(struct __pyx_obj_3_sa_Phrase *__pyx_v
}
/* Python wrapper */
-static void __pyx_pw_3_sa_6Phrase_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_3_sa_6Phrase_3__dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pw_4cdec_2sa_3_sa_6Phrase_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_4cdec_2sa_3_sa_6Phrase_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_pf_3_sa_6Phrase_2__dealloc__(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self));
+ __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":24
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":24
* j = j + 1
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -26077,11 +26078,11 @@ static void __pyx_pw_3_sa_6Phrase_3__dealloc__(PyObject *__pyx_v_self) {
* free(self.varpos)
*/
-static void __pyx_pf_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self) {
+static void __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":25
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":25
*
* def __dealloc__(self):
* free(self.syms) # <<<<<<<<<<<<<<
@@ -26090,7 +26091,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/mdenkows/cdec/python/cdec/sa/rule.pxi":26
* def __dealloc__(self):
* free(self.syms)
* free(self.varpos) # <<<<<<<<<<<<<<
@@ -26103,17 +26104,17 @@ static void __pyx_pf_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_3_sa_Phrase *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_5__str__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_5__str__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_5__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_5__str__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_4__str__(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":28
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":28
* free(self.varpos)
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -26121,7 +26122,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_5__str__(PyObject *__pyx_v_self) {
* cdef int i, s
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_4__str__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self) {
PyObject *__pyx_v_strs = NULL;
int __pyx_v_i;
int __pyx_v_s;
@@ -26137,7 +26138,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/mdenkows/cdec/python/cdec/sa/rule.pxi":29
*
* def __str__(self):
* strs = [] # <<<<<<<<<<<<<<
@@ -26149,7 +26150,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_4__str__(struct __pyx_obj_3_sa_Phrase *__
__pyx_v_strs = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":31
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":31
* strs = []
* cdef int i, s
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -26159,7 +26160,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/mdenkows/cdec/python/cdec/sa/rule.pxi":32
* cdef int i, s
* for i from 0 <= i < self.n:
* s = self.syms[i] # <<<<<<<<<<<<<<
@@ -26168,20 +26169,20 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":33
* for i from 0 <= i < self.n:
* s = self.syms[i]
* strs.append(sym_tostring(s)) # <<<<<<<<<<<<<<
* return ' '.join(strs)
*
*/
- __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_v_s)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring(__pyx_v_s)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_t_3 = __Pyx_PyList_Append(__pyx_v_strs, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":34
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":34
* s = self.syms[i]
* strs.append(sym_tostring(s))
* return ' '.join(strs) # <<<<<<<<<<<<<<
@@ -26210,7 +26211,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_4__str__(struct __pyx_obj_3_sa_Phrase *__
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.Phrase.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_strs);
@@ -26220,18 +26221,18 @@ static PyObject *__pyx_pf_3_sa_6Phrase_4__str__(struct __pyx_obj_3_sa_Phrase *__
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_7handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_3_sa_6Phrase_6handle[] = "return a hashable representation that normalizes the ordering\n of the nonterminal indices";
-static PyObject *__pyx_pw_3_sa_6Phrase_7handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_7handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_4cdec_2sa_3_sa_6Phrase_6handle[] = "return a hashable representation that normalizes the ordering\n of the nonterminal indices";
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_7handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("handle (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_6handle(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":36
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":36
* return ' '.join(strs)
*
* def handle(self): # <<<<<<<<<<<<<<
@@ -26239,7 +26240,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_7handle(PyObject *__pyx_v_self, CYTHON_UN
* of the nonterminal indices"""
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self) {
PyObject *__pyx_v_norm = NULL;
int __pyx_v_i;
int __pyx_v_j;
@@ -26255,7 +26256,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/mdenkows/cdec/python/cdec/sa/rule.pxi":39
* """return a hashable representation that normalizes the ordering
* of the nonterminal indices"""
* norm = [] # <<<<<<<<<<<<<<
@@ -26267,7 +26268,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
__pyx_v_norm = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":41
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":41
* norm = []
* cdef int i, j, s
* i = 1 # <<<<<<<<<<<<<<
@@ -26276,7 +26277,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/mdenkows/cdec/python/cdec/sa/rule.pxi":42
* cdef int i, j, s
* i = 1
* j = 0 # <<<<<<<<<<<<<<
@@ -26285,7 +26286,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/mdenkows/cdec/python/cdec/sa/rule.pxi":43
* i = 1
* j = 0
* for j from 0 <= j < self.n: # <<<<<<<<<<<<<<
@@ -26295,7 +26296,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/mdenkows/cdec/python/cdec/sa/rule.pxi":44
* j = 0
* for j from 0 <= j < self.n:
* s = self.syms[j] # <<<<<<<<<<<<<<
@@ -26304,26 +26305,26 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":45
* for j from 0 <= j < self.n:
* s = self.syms[j]
* if sym_isvar(s): # <<<<<<<<<<<<<<
* s = sym_setindex(s,i)
* i = i + 1
*/
- __pyx_t_3 = (__pyx_f_3_sa_sym_isvar(__pyx_v_s) != 0);
+ __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_v_s) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":46
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":46
* s = self.syms[j]
* if sym_isvar(s):
* s = sym_setindex(s,i) # <<<<<<<<<<<<<<
* i = i + 1
* norm.append(s)
*/
- __pyx_v_s = __pyx_f_3_sa_sym_setindex(__pyx_v_s, __pyx_v_i);
+ __pyx_v_s = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_s, __pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":47
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":47
* if sym_isvar(s):
* s = sym_setindex(s,i)
* i = i + 1 # <<<<<<<<<<<<<<
@@ -26335,7 +26336,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/mdenkows/cdec/python/cdec/sa/rule.pxi":48
* s = sym_setindex(s,i)
* i = i + 1
* norm.append(s) # <<<<<<<<<<<<<<
@@ -26348,7 +26349,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/mdenkows/cdec/python/cdec/sa/rule.pxi":49
* i = i + 1
* norm.append(s)
* return tuple(norm) # <<<<<<<<<<<<<<
@@ -26366,7 +26367,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.Phrase.handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_norm);
@@ -26376,26 +26377,25 @@ static PyObject *__pyx_pf_3_sa_6Phrase_6handle(struct __pyx_obj_3_sa_Phrase *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_9strhandle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_9strhandle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_9strhandle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_9strhandle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("strhandle (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_8strhandle(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":51
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":51
* return tuple(norm)
*
* def strhandle(self): # <<<<<<<<<<<<<<
- * strs = []
* norm = []
+ * cdef int i, j, s
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *__pyx_v_self) {
- CYTHON_UNUSED PyObject *__pyx_v_strs = NULL;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self) {
PyObject *__pyx_v_norm = NULL;
int __pyx_v_i;
int __pyx_v_j;
@@ -26413,31 +26413,19 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":52
*
* def strhandle(self):
- * strs = [] # <<<<<<<<<<<<<<
- * norm = []
- * cdef int i, j, s
- */
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_strs = ((PyObject*)__pyx_t_1);
- __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":53
- * def strhandle(self):
- * strs = []
* norm = [] # <<<<<<<<<<<<<<
* cdef int i, j, s
* i = 1
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_norm = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":55
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":54
* norm = []
* cdef int i, j, s
* i = 1 # <<<<<<<<<<<<<<
@@ -26446,7 +26434,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/mdenkows/cdec/python/cdec/sa/rule.pxi":55
* cdef int i, j, s
* i = 1
* j = 0 # <<<<<<<<<<<<<<
@@ -26455,7 +26443,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/mdenkows/cdec/python/cdec/sa/rule.pxi":56
* i = 1
* j = 0
* for j from 0 <= j < self.n: # <<<<<<<<<<<<<<
@@ -26465,7 +26453,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/mdenkows/cdec/python/cdec/sa/rule.pxi":57
* j = 0
* for j from 0 <= j < self.n:
* s = self.syms[j] # <<<<<<<<<<<<<<
@@ -26474,26 +26462,26 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":58
* for j from 0 <= j < self.n:
* s = self.syms[j]
* if sym_isvar(s): # <<<<<<<<<<<<<<
* s = sym_setindex(s,i)
* i = i + 1
*/
- __pyx_t_3 = (__pyx_f_3_sa_sym_isvar(__pyx_v_s) != 0);
+ __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_v_s) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":60
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":59
* s = self.syms[j]
* if sym_isvar(s):
* s = sym_setindex(s,i) # <<<<<<<<<<<<<<
* i = i + 1
* norm.append(sym_tostring(s))
*/
- __pyx_v_s = __pyx_f_3_sa_sym_setindex(__pyx_v_s, __pyx_v_i);
+ __pyx_v_s = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_s, __pyx_v_i);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":61
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":60
* if sym_isvar(s):
* s = sym_setindex(s,i)
* i = i + 1 # <<<<<<<<<<<<<<
@@ -26505,20 +26493,20 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":61
* s = sym_setindex(s,i)
* i = i + 1
* norm.append(sym_tostring(s)) # <<<<<<<<<<<<<<
* return ' '.join(norm)
*
*/
- __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_v_s)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring(__pyx_v_s)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_norm, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_norm, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":63
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":62
* i = i + 1
* norm.append(sym_tostring(s))
* return ' '.join(norm) # <<<<<<<<<<<<<<
@@ -26526,14 +26514,14 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
* def arity(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_69), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_69), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(((PyObject *)__pyx_v_norm));
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_norm));
__Pyx_GIVEREF(((PyObject *)__pyx_v_norm));
- __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
@@ -26547,10 +26535,9 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("_sa.Phrase.strhandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.strhandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
- __Pyx_XDECREF(__pyx_v_strs);
__Pyx_XDECREF(__pyx_v_norm);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
@@ -26558,17 +26545,17 @@ static PyObject *__pyx_pf_3_sa_6Phrase_8strhandle(struct __pyx_obj_3_sa_Phrase *
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_11arity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_11arity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_11arity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_11arity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("arity (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_10arity(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_10arity(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":65
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":64
* return ' '.join(norm)
*
* def arity(self): # <<<<<<<<<<<<<<
@@ -26576,7 +26563,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_11arity(PyObject *__pyx_v_self, CYTHON_UN
*
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_10arity(struct __pyx_obj_3_sa_Phrase *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_10arity(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -26585,7 +26572,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/mdenkows/cdec/python/cdec/sa/rule.pxi":65
*
* def arity(self):
* return self.n_vars # <<<<<<<<<<<<<<
@@ -26593,7 +26580,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_10arity(struct __pyx_obj_3_sa_Phrase *__p
* def getvarpos(self, i):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->n_vars); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->n_vars); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -26603,7 +26590,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_10arity(struct __pyx_obj_3_sa_Phrase *__p
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.Phrase.arity", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.arity", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -26612,17 +26599,17 @@ static PyObject *__pyx_pf_3_sa_6Phrase_10arity(struct __pyx_obj_3_sa_Phrase *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_13getvarpos(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_13getvarpos(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_13getvarpos(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_13getvarpos(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getvarpos (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_12getvarpos(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":68
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":67
* return self.n_vars
*
* def getvarpos(self, i): # <<<<<<<<<<<<<<
@@ -26630,7 +26617,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_13getvarpos(PyObject *__pyx_v_self, PyObj
* return self.varpos[i]
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_12getvarpos(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -26642,26 +26629,26 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":68
*
* def getvarpos(self, i):
* if 0 <= i < self.n_vars: # <<<<<<<<<<<<<<
* return self.varpos[i]
* else:
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
__Pyx_DECREF(__pyx_t_1);
- __pyx_t_2 = PyInt_FromLong(__pyx_v_self->n_vars); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_self->n_vars); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":70
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":69
* def getvarpos(self, i):
* if 0 <= i < self.n_vars:
* return self.varpos[i] # <<<<<<<<<<<<<<
@@ -26669,8 +26656,8 @@ static PyObject *__pyx_pf_3_sa_6Phrase_12getvarpos(struct __pyx_obj_3_sa_Phrase
* raise IndexError
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyInt_FromLong((__pyx_v_self->varpos[__pyx_t_4])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong((__pyx_v_self->varpos[__pyx_t_4])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -26679,7 +26666,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/mdenkows/cdec/python/cdec/sa/rule.pxi":71
* return self.varpos[i]
* else:
* raise IndexError # <<<<<<<<<<<<<<
@@ -26687,7 +26674,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_12getvarpos(struct __pyx_obj_3_sa_Phrase
* def getvar(self, i):
*/
__Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[7]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
@@ -26696,7 +26683,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_12getvarpos(struct __pyx_obj_3_sa_Phrase
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.Phrase.getvarpos", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.getvarpos", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -26705,17 +26692,17 @@ static PyObject *__pyx_pf_3_sa_6Phrase_12getvarpos(struct __pyx_obj_3_sa_Phrase
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_15getvar(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_15getvar(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_15getvar(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_15getvar(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getvar (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_14getvar(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":74
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":73
* raise IndexError
*
* def getvar(self, i): # <<<<<<<<<<<<<<
@@ -26723,7 +26710,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_15getvar(PyObject *__pyx_v_self, PyObject
* return self.syms[self.varpos[i]]
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_14getvar(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -26735,26 +26722,26 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":74
*
* def getvar(self, i):
* if 0 <= i < self.n_vars: # <<<<<<<<<<<<<<
* return self.syms[self.varpos[i]]
* else:
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
__Pyx_DECREF(__pyx_t_1);
- __pyx_t_2 = PyInt_FromLong(__pyx_v_self->n_vars); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_self->n_vars); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":76
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":75
* def getvar(self, i):
* if 0 <= i < self.n_vars:
* return self.syms[self.varpos[i]] # <<<<<<<<<<<<<<
@@ -26762,8 +26749,8 @@ static PyObject *__pyx_pf_3_sa_6Phrase_14getvar(struct __pyx_obj_3_sa_Phrase *__
* raise IndexError
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyInt_FromLong((__pyx_v_self->syms[(__pyx_v_self->varpos[__pyx_t_4])])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong((__pyx_v_self->syms[(__pyx_v_self->varpos[__pyx_t_4])])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -26772,7 +26759,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/mdenkows/cdec/python/cdec/sa/rule.pxi":77
* return self.syms[self.varpos[i]]
* else:
* raise IndexError # <<<<<<<<<<<<<<
@@ -26780,7 +26767,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_14getvar(struct __pyx_obj_3_sa_Phrase *__
* cdef int chunkpos(self, int k):
*/
__Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[7]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
@@ -26789,7 +26776,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_14getvar(struct __pyx_obj_3_sa_Phrase *__
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.Phrase.getvar", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.getvar", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -26797,7 +26784,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/mdenkows/cdec/python/cdec/sa/rule.pxi":79
* raise IndexError
*
* cdef int chunkpos(self, int k): # <<<<<<<<<<<<<<
@@ -26805,13 +26792,13 @@ static PyObject *__pyx_pf_3_sa_6Phrase_14getvar(struct __pyx_obj_3_sa_Phrase *__
* return 0
*/
-int __pyx_f_3_sa_6Phrase_chunkpos(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, int __pyx_v_k) {
+int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, int __pyx_v_k) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("chunkpos", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":81
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":80
*
* cdef int chunkpos(self, int k):
* if k == 0: # <<<<<<<<<<<<<<
@@ -26821,7 +26808,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":82
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":81
* cdef int chunkpos(self, int k):
* if k == 0:
* return 0 # <<<<<<<<<<<<<<
@@ -26834,7 +26821,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/mdenkows/cdec/python/cdec/sa/rule.pxi":83
* return 0
* else:
* return self.varpos[k-1]+1 # <<<<<<<<<<<<<<
@@ -26852,7 +26839,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/mdenkows/cdec/python/cdec/sa/rule.pxi":85
* return self.varpos[k-1]+1
*
* cdef int chunklen(self, int k): # <<<<<<<<<<<<<<
@@ -26860,13 +26847,13 @@ int __pyx_f_3_sa_6Phrase_chunkpos(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
* return self.n
*/
-int __pyx_f_3_sa_6Phrase_chunklen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, int __pyx_v_k) {
+int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, int __pyx_v_k) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("chunklen", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":87
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":86
*
* cdef int chunklen(self, int k):
* if self.n_vars == 0: # <<<<<<<<<<<<<<
@@ -26876,7 +26863,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":88
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":87
* cdef int chunklen(self, int k):
* if self.n_vars == 0:
* return self.n # <<<<<<<<<<<<<<
@@ -26888,7 +26875,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/mdenkows/cdec/python/cdec/sa/rule.pxi":88
* if self.n_vars == 0:
* return self.n
* elif k == 0: # <<<<<<<<<<<<<<
@@ -26898,7 +26885,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":90
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":89
* return self.n
* elif k == 0:
* return self.varpos[0] # <<<<<<<<<<<<<<
@@ -26910,7 +26897,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/mdenkows/cdec/python/cdec/sa/rule.pxi":90
* elif k == 0:
* return self.varpos[0]
* elif k == self.n_vars: # <<<<<<<<<<<<<<
@@ -26920,7 +26907,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":92
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":91
* return self.varpos[0]
* elif k == self.n_vars:
* return self.n-self.varpos[k-1]-1 # <<<<<<<<<<<<<<
@@ -26933,7 +26920,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/mdenkows/cdec/python/cdec/sa/rule.pxi":93
* return self.n-self.varpos[k-1]-1
* else:
* return self.varpos[k]-self.varpos[k-1]-1 # <<<<<<<<<<<<<<
@@ -26952,17 +26939,17 @@ int __pyx_f_3_sa_6Phrase_chunklen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, in
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_17clen(PyObject *__pyx_v_self, PyObject *__pyx_v_k); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_17clen(PyObject *__pyx_v_self, PyObject *__pyx_v_k) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_17clen(PyObject *__pyx_v_self, PyObject *__pyx_v_k); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_17clen(PyObject *__pyx_v_self, PyObject *__pyx_v_k) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("clen (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_16clen(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_k));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_16clen(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_k));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":96
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":95
* return self.varpos[k]-self.varpos[k-1]-1
*
* def clen(self, k): # <<<<<<<<<<<<<<
@@ -26970,7 +26957,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_17clen(PyObject *__pyx_v_self, PyObject *
*
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_16clen(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_k) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_16clen(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_k) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -26980,7 +26967,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/mdenkows/cdec/python/cdec/sa/rule.pxi":96
*
* def clen(self, k):
* return self.chunklen(k) # <<<<<<<<<<<<<<
@@ -26988,8 +26975,8 @@ static PyObject *__pyx_pf_3_sa_6Phrase_16clen(struct __pyx_obj_3_sa_Phrase *__py
* def getchunk(self, ci):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_k); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PyInt_FromLong(((struct __pyx_vtabstruct_3_sa_Phrase *)__pyx_v_self->__pyx_vtab)->chunklen(__pyx_v_self, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_k); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *)__pyx_v_self->__pyx_vtab)->chunklen(__pyx_v_self, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -26999,7 +26986,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_16clen(struct __pyx_obj_3_sa_Phrase *__py
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.Phrase.clen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.clen", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -27008,17 +26995,17 @@ static PyObject *__pyx_pf_3_sa_6Phrase_16clen(struct __pyx_obj_3_sa_Phrase *__py
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_19getchunk(PyObject *__pyx_v_self, PyObject *__pyx_v_ci); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_19getchunk(PyObject *__pyx_v_self, PyObject *__pyx_v_ci) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_19getchunk(PyObject *__pyx_v_self, PyObject *__pyx_v_ci); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_19getchunk(PyObject *__pyx_v_self, PyObject *__pyx_v_ci) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getchunk (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_18getchunk(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_ci));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_ci));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":99
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":98
* return self.chunklen(k)
*
* def getchunk(self, ci): # <<<<<<<<<<<<<<
@@ -27026,7 +27013,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_19getchunk(PyObject *__pyx_v_self, PyObje
* start = self.chunkpos(ci)
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_18getchunk(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_ci) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_ci) {
int __pyx_v_start;
int __pyx_v_stop;
PyObject *__pyx_v_chunk = NULL;
@@ -27041,39 +27028,39 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":100
* def getchunk(self, ci):
* cdef int start, stop
* start = self.chunkpos(ci) # <<<<<<<<<<<<<<
* stop = start+self.chunklen(ci)
* chunk = []
*/
- __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);
+ __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 = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_start = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *)__pyx_v_self->__pyx_vtab)->chunkpos(__pyx_v_self, __pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":102
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":101
* cdef int start, stop
* start = self.chunkpos(ci)
* stop = start+self.chunklen(ci) # <<<<<<<<<<<<<<
* chunk = []
* for i from start <= i < stop:
*/
- __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));
+ __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_stop = (__pyx_v_start + ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/rule.pxi":102
* start = self.chunkpos(ci)
* stop = start+self.chunklen(ci)
* chunk = [] # <<<<<<<<<<<<<<
* for i from start <= i < stop:
* chunk.append(self.syms[i])
*/
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_chunk = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":104
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":103
* stop = start+self.chunklen(ci)
* chunk = []
* for i from start <= i < stop: # <<<<<<<<<<<<<<
@@ -27083,20 +27070,20 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":104
* chunk = []
* for i from start <= i < stop:
* chunk.append(self.syms[i]) # <<<<<<<<<<<<<<
* return chunk
*
*/
- __pyx_t_2 = PyInt_FromLong((__pyx_v_self->syms[__pyx_v_i])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong((__pyx_v_self->syms[__pyx_v_i])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_chunk, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_chunk, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":106
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":105
* for i from start <= i < stop:
* chunk.append(self.syms[i])
* return chunk # <<<<<<<<<<<<<<
@@ -27112,7 +27099,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_18getchunk(struct __pyx_obj_3_sa_Phrase *
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.Phrase.getchunk", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.getchunk", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_chunk);
@@ -27123,18 +27110,18 @@ static PyObject *__pyx_pf_3_sa_6Phrase_18getchunk(struct __pyx_obj_3_sa_Phrase *
/* Python wrapper */
#if PY_MAJOR_VERSION < 3
-static int __pyx_pw_3_sa_6Phrase_21__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
-static int __pyx_pw_3_sa_6Phrase_21__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+static int __pyx_pw_4cdec_2sa_3_sa_6Phrase_21__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_6Phrase_21__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cmp__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_20__cmp__(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_other));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_other));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":108
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":107
* return chunk
*
* def __cmp__(self, other): # <<<<<<<<<<<<<<
@@ -27143,8 +27130,8 @@ static int __pyx_pw_3_sa_6Phrase_21__cmp__(PyObject *__pyx_v_self, PyObject *__p
*/
#if PY_MAJOR_VERSION < 3
-static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_other) {
- struct __pyx_obj_3_sa_Phrase *__pyx_v_otherp = 0;
+static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_other) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_otherp = 0;
int __pyx_v_i;
int __pyx_r;
__Pyx_RefNannyDeclarations
@@ -27157,18 +27144,18 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":110
* cdef Phrase otherp
* cdef int i
* otherp = other # <<<<<<<<<<<<<<
* for i from 0 <= i < min(self.n, otherp.n):
* if self.syms[i] < otherp.syms[i]:
*/
- if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_3_sa_Phrase))))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_4cdec_2sa_3_sa_Phrase))))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_other);
- __pyx_v_otherp = ((struct __pyx_obj_3_sa_Phrase *)__pyx_v_other);
+ __pyx_v_otherp = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_other);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":112
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":111
* cdef int i
* otherp = other
* for i from 0 <= i < min(self.n, otherp.n): # <<<<<<<<<<<<<<
@@ -27185,7 +27172,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/mdenkows/cdec/python/cdec/sa/rule.pxi":112
* otherp = other
* for i from 0 <= i < min(self.n, otherp.n):
* if self.syms[i] < otherp.syms[i]: # <<<<<<<<<<<<<<
@@ -27195,7 +27182,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])) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":114
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":113
* for i from 0 <= i < min(self.n, otherp.n):
* if self.syms[i] < otherp.syms[i]:
* return -1 # <<<<<<<<<<<<<<
@@ -27207,7 +27194,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/mdenkows/cdec/python/cdec/sa/rule.pxi":114
* if self.syms[i] < otherp.syms[i]:
* return -1
* elif self.syms[i] > otherp.syms[i]: # <<<<<<<<<<<<<<
@@ -27217,7 +27204,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])) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":116
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":115
* return -1
* elif self.syms[i] > otherp.syms[i]:
* return 1 # <<<<<<<<<<<<<<
@@ -27231,7 +27218,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/mdenkows/cdec/python/cdec/sa/rule.pxi":116
* elif self.syms[i] > otherp.syms[i]:
* return 1
* if self.n < otherp.n: # <<<<<<<<<<<<<<
@@ -27241,7 +27228,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":118
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":117
* return 1
* if self.n < otherp.n:
* return -1 # <<<<<<<<<<<<<<
@@ -27253,7 +27240,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/mdenkows/cdec/python/cdec/sa/rule.pxi":118
* if self.n < otherp.n:
* return -1
* elif self.n > otherp.n: # <<<<<<<<<<<<<<
@@ -27263,7 +27250,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":120
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":119
* return -1
* elif self.n > otherp.n:
* return 1 # <<<<<<<<<<<<<<
@@ -27276,7 +27263,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/mdenkows/cdec/python/cdec/sa/rule.pxi":121
* return 1
* else:
* return 0 # <<<<<<<<<<<<<<
@@ -27291,7 +27278,7 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.Phrase.__cmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.__cmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_otherp);
@@ -27301,17 +27288,17 @@ static int __pyx_pf_3_sa_6Phrase_20__cmp__(struct __pyx_obj_3_sa_Phrase *__pyx_v
#endif /*!(#if PY_MAJOR_VERSION < 3)*/
/* Python wrapper */
-static Py_hash_t __pyx_pw_3_sa_6Phrase_23__hash__(PyObject *__pyx_v_self); /*proto*/
-static Py_hash_t __pyx_pw_3_sa_6Phrase_23__hash__(PyObject *__pyx_v_self) {
+static Py_hash_t __pyx_pw_4cdec_2sa_3_sa_6Phrase_23__hash__(PyObject *__pyx_v_self); /*proto*/
+static Py_hash_t __pyx_pw_4cdec_2sa_3_sa_6Phrase_23__hash__(PyObject *__pyx_v_self) {
Py_hash_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_22__hash__(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":124
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":123
* return 0
*
* def __hash__(self): # <<<<<<<<<<<<<<
@@ -27319,7 +27306,7 @@ static Py_hash_t __pyx_pw_3_sa_6Phrase_23__hash__(PyObject *__pyx_v_self) {
* cdef unsigned h
*/
-static Py_hash_t __pyx_pf_3_sa_6Phrase_22__hash__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self) {
+static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self) {
int __pyx_v_i;
unsigned int __pyx_v_h;
Py_hash_t __pyx_r;
@@ -27328,7 +27315,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/mdenkows/cdec/python/cdec/sa/rule.pxi":126
* cdef int i
* cdef unsigned h
* h = 0 # <<<<<<<<<<<<<<
@@ -27337,7 +27324,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/mdenkows/cdec/python/cdec/sa/rule.pxi":127
* cdef unsigned h
* h = 0
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -27347,7 +27334,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/mdenkows/cdec/python/cdec/sa/rule.pxi":128
* h = 0
* for i from 0 <= i < self.n:
* if self.syms[i] > 0: # <<<<<<<<<<<<<<
@@ -27357,7 +27344,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) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":130
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":129
* for i from 0 <= i < self.n:
* if self.syms[i] > 0:
* h = (h << 1) + self.syms[i] # <<<<<<<<<<<<<<
@@ -27369,7 +27356,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/mdenkows/cdec/python/cdec/sa/rule.pxi":131
* h = (h << 1) + self.syms[i]
* else:
* h = (h << 1) + -self.syms[i] # <<<<<<<<<<<<<<
@@ -27381,7 +27368,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/mdenkows/cdec/python/cdec/sa/rule.pxi":132
* else:
* h = (h << 1) + -self.syms[i]
* return h # <<<<<<<<<<<<<<
@@ -27399,17 +27386,17 @@ static Py_hash_t __pyx_pf_3_sa_6Phrase_22__hash__(struct __pyx_obj_3_sa_Phrase *
}
/* Python wrapper */
-static Py_ssize_t __pyx_pw_3_sa_6Phrase_25__len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_pw_3_sa_6Phrase_25__len__(PyObject *__pyx_v_self) {
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_6Phrase_25__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_4cdec_2sa_3_sa_6Phrase_25__len__(PyObject *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_24__len__(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_24__len__(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":135
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":134
* return h
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -27417,12 +27404,12 @@ static Py_ssize_t __pyx_pw_3_sa_6Phrase_25__len__(PyObject *__pyx_v_self) {
*
*/
-static Py_ssize_t __pyx_pf_3_sa_6Phrase_24__len__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self) {
+static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_24__len__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self) {
Py_ssize_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":136
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":135
*
* def __len__(self):
* return self.n # <<<<<<<<<<<<<<
@@ -27439,17 +27426,17 @@ static Py_ssize_t __pyx_pf_3_sa_6Phrase_24__len__(struct __pyx_obj_3_sa_Phrase *
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_27__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_27__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_27__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_27__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_26__getitem__(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_26__getitem__(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":138
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":137
* return self.n
*
* def __getitem__(self, i): # <<<<<<<<<<<<<<
@@ -27457,7 +27444,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_27__getitem__(PyObject *__pyx_v_self, PyO
*
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_26__getitem__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_26__getitem__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
@@ -27467,7 +27454,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/mdenkows/cdec/python/cdec/sa/rule.pxi":138
*
* def __getitem__(self, i):
* return self.syms[i] # <<<<<<<<<<<<<<
@@ -27475,8 +27462,8 @@ static PyObject *__pyx_pf_3_sa_6Phrase_26__getitem__(struct __pyx_obj_3_sa_Phras
* def __iter__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PyInt_FromLong((__pyx_v_self->syms[__pyx_t_1])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong((__pyx_v_self->syms[__pyx_t_1])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -27486,27 +27473,27 @@ static PyObject *__pyx_pf_3_sa_6Phrase_26__getitem__(struct __pyx_obj_3_sa_Phras
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.Phrase.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_29__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_29__iter__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_29__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_29__iter__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_28__iter__(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_28__iter__(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":141
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":140
* return self.syms[i]
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -27514,15 +27501,15 @@ static PyObject *__pyx_pw_3_sa_6Phrase_29__iter__(PyObject *__pyx_v_self) {
* for i from 0 <= i < self.n:
*/
-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_15___iter__ *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_28__iter__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self) {
+ struct __pyx_obj_4cdec_2sa_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_15___iter__ *)__pyx_tp_new_3_sa___pyx_scope_struct_15___iter__(__pyx_ptype_3_sa___pyx_scope_struct_15___iter__, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -27532,7 +27519,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_28__iter__(struct __pyx_obj_3_sa_Phrase *
__Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
__Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
{
- __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_6Phrase_30generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -27541,7 +27528,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_28__iter__(struct __pyx_obj_3_sa_Phrase *
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.Phrase.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -27550,9 +27537,9 @@ static PyObject *__pyx_pf_3_sa_6Phrase_28__iter__(struct __pyx_obj_3_sa_Phrase *
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- 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);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
@@ -27569,9 +27556,9 @@ static PyObject *__pyx_gb_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx
return NULL;
}
__pyx_L3_first_run:;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":143
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":142
* def __iter__(self):
* cdef int i
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -27581,14 +27568,14 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":143
* cdef int i
* for i from 0 <= i < self.n:
* yield self.syms[i] # <<<<<<<<<<<<<<
*
* def subst(self, start, children):
*/
- __pyx_t_2 = PyInt_FromLong((__pyx_cur_scope->__pyx_v_self->syms[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong((__pyx_cur_scope->__pyx_v_self->syms[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -27600,7 +27587,7 @@ static PyObject *__pyx_gb_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx
return __pyx_r;
__pyx_L6_resume_from_yield:;
__pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
PyErr_SetNone(PyExc_StopIteration);
goto __pyx_L0;
@@ -27616,8 +27603,8 @@ static PyObject *__pyx_gb_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_32subst(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_32subst(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_32subst(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_32subst(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_start = 0;
PyObject *__pyx_v_children = 0;
int __pyx_lineno = 0;
@@ -27646,11 +27633,11 @@ static PyObject *__pyx_pw_3_sa_6Phrase_32subst(PyObject *__pyx_v_self, PyObject
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__children)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("subst", 1, 2, 2, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("subst", 1, 2, 2, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "subst") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "subst") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -27663,18 +27650,18 @@ static PyObject *__pyx_pw_3_sa_6Phrase_32subst(PyObject *__pyx_v_self, PyObject
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("subst", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("subst", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Phrase.subst", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.subst", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_6Phrase_31subst(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self), __pyx_v_start, __pyx_v_children);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self), __pyx_v_start, __pyx_v_children);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":146
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":145
* yield self.syms[i]
*
* def subst(self, start, children): # <<<<<<<<<<<<<<
@@ -27682,7 +27669,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_32subst(PyObject *__pyx_v_self, PyObject
* for i from 0 <= i < self.n:
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_31subst(struct __pyx_obj_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_children) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_children) {
int __pyx_v_i;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -27697,7 +27684,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/mdenkows/cdec/python/cdec/sa/rule.pxi":147
* def subst(self, start, children):
* cdef int i
* for i from 0 <= i < self.n: # <<<<<<<<<<<<<<
@@ -27707,27 +27694,27 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":148
* cdef int i
* for i from 0 <= i < self.n:
* if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<<
* start = start + children[sym_getindex(self.syms[i])-1]
* else:
*/
- __pyx_t_2 = (__pyx_f_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0);
+ __pyx_t_2 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":150
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":149
* for i from 0 <= i < self.n:
* if sym_isvar(self.syms[i]):
* start = start + children[sym_getindex(self.syms[i])-1] # <<<<<<<<<<<<<<
* else:
* start = start + (self.syms[i],)
*/
- __pyx_t_3 = (__pyx_f_3_sa_sym_getindex((__pyx_v_self->syms[__pyx_v_i])) - 1);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_children, __pyx_t_3, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_getindex((__pyx_v_self->syms[__pyx_v_i])) - 1);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_children, __pyx_t_3, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyNumber_Add(__pyx_v_start, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Add(__pyx_v_start, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_v_start);
@@ -27737,21 +27724,21 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":151
* start = start + children[sym_getindex(self.syms[i])-1]
* else:
* start = start + (self.syms[i],) # <<<<<<<<<<<<<<
* return start
*
*/
- __pyx_t_5 = PyInt_FromLong((__pyx_v_self->syms[__pyx_v_i])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong((__pyx_v_self->syms[__pyx_v_i])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyNumber_Add(__pyx_v_start, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Add(__pyx_v_start, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_v_start);
@@ -27761,7 +27748,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/mdenkows/cdec/python/cdec/sa/rule.pxi":152
* else:
* start = start + (self.syms[i],)
* return start # <<<<<<<<<<<<<<
@@ -27778,7 +27765,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_31subst(struct __pyx_obj_3_sa_Phrase *__p
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.Phrase.subst", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.subst", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_start);
@@ -27788,17 +27775,17 @@ static PyObject *__pyx_pf_3_sa_6Phrase_31subst(struct __pyx_obj_3_sa_Phrase *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_6Phrase_5words_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_6Phrase_5words_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_5words_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_6Phrase_5words_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_6Phrase_5words___get__(((struct __pyx_obj_3_sa_Phrase *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Phrase_5words___get__(((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":156
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":155
*
* property words:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -27806,7 +27793,7 @@ static PyObject *__pyx_pw_3_sa_6Phrase_5words_1__get__(PyObject *__pyx_v_self) {
*
*/
-static PyObject *__pyx_pf_3_sa_6Phrase_5words___get__(struct __pyx_obj_3_sa_Phrase *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_5words___get__(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_self) {
PyObject *__pyx_v_w = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -27822,7 +27809,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/mdenkows/cdec/python/cdec/sa/rule.pxi":156
* property words:
* def __get__(self):
* return [sym_tostring(w) for w in self if not sym_isvar(w)] # <<<<<<<<<<<<<<
@@ -27830,13 +27817,13 @@ static PyObject *__pyx_pf_3_sa_6Phrase_5words___get__(struct __pyx_obj_3_sa_Phra
* cdef class Rule:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyList_CheckExact(((PyObject *)__pyx_v_self)) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {
__pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
@@ -27844,23 +27831,23 @@ static PyObject *__pyx_pf_3_sa_6Phrase_5words___get__(struct __pyx_obj_3_sa_Phra
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
if (unlikely(!__pyx_t_5)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -27869,13 +27856,13 @@ static PyObject *__pyx_pf_3_sa_6Phrase_5words___get__(struct __pyx_obj_3_sa_Phra
__Pyx_XDECREF(__pyx_v_w);
__pyx_v_w = __pyx_t_5;
__pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = ((!(__pyx_f_3_sa_sym_isvar(__pyx_t_6) != 0)) != 0);
+ __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = ((!(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_6) != 0)) != 0);
if (__pyx_t_7) {
- __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring(__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
goto __pyx_L5;
}
@@ -27892,7 +27879,7 @@ static PyObject *__pyx_pf_3_sa_6Phrase_5words___get__(struct __pyx_obj_3_sa_Phra
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.Phrase.words.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Phrase.words.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_w);
@@ -27902,11 +27889,11 @@ static PyObject *__pyx_pf_3_sa_6Phrase_5words___get__(struct __pyx_obj_3_sa_Phra
}
/* Python wrapper */
-static int __pyx_pw_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_lhs;
- struct __pyx_obj_3_sa_Phrase *__pyx_v_f = 0;
- struct __pyx_obj_3_sa_Phrase *__pyx_v_e = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_f = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_e = 0;
PyObject *__pyx_v_scores = 0;
PyObject *__pyx_v_word_alignments = 0;
int __pyx_lineno = 0;
@@ -27919,7 +27906,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/mdenkows/cdec/python/cdec/sa/rule.pxi":160
* cdef class Rule:
*
* def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): # <<<<<<<<<<<<<<
@@ -27948,12 +27935,12 @@ static int __pyx_pw_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__py
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (kw_args > 0) {
@@ -27967,7 +27954,7 @@ static int __pyx_pw_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__py
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -27980,23 +27967,23 @@ static int __pyx_pw_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__py
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_lhs = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_lhs == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_f = ((struct __pyx_obj_3_sa_Phrase *)values[1]);
- __pyx_v_e = ((struct __pyx_obj_3_sa_Phrase *)values[2]);
+ __pyx_v_lhs = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_lhs == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_f = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)values[1]);
+ __pyx_v_e = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)values[2]);
__pyx_v_scores = values[3];
__pyx_v_word_alignments = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Rule.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Rule.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_3_sa_Phrase, 1, "f", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_e), __pyx_ptype_3_sa_Phrase, 1, "e", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_4Rule___cinit__(((struct __pyx_obj_3_sa_Rule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_f, __pyx_v_e, __pyx_v_scores, __pyx_v_word_alignments);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_4cdec_2sa_3_sa_Phrase, 1, "f", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_e), __pyx_ptype_4cdec_2sa_3_sa_Phrase, 1, "e", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_f, __pyx_v_e, __pyx_v_scores, __pyx_v_word_alignments);
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = -1;
@@ -28005,7 +27992,7 @@ static int __pyx_pw_3_sa_4Rule_1__cinit__(PyObject *__pyx_v_self, PyObject *__py
return __pyx_r;
}
-static int __pyx_pf_3_sa_4Rule___cinit__(struct __pyx_obj_3_sa_Rule *__pyx_v_self, int __pyx_v_lhs, struct __pyx_obj_3_sa_Phrase *__pyx_v_f, struct __pyx_obj_3_sa_Phrase *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_word_alignments) {
+static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self, int __pyx_v_lhs, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_f, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_word_alignments) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -28016,36 +28003,36 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":161
*
* def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None):
* if not sym_isvar(lhs): raise Exception('Invalid LHS symbol: %d' % lhs) # <<<<<<<<<<<<<<
* self.lhs = lhs
* self.f = f
*/
- __pyx_t_1 = ((!(__pyx_f_3_sa_sym_isvar(__pyx_v_lhs) != 0)) != 0);
+ __pyx_t_1 = ((!(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_v_lhs) != 0)) != 0);
if (__pyx_t_1) {
- __pyx_t_2 = PyInt_FromLong(__pyx_v_lhs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_lhs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_70), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_70), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
__Pyx_GIVEREF(((PyObject *)__pyx_t_3));
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[7]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":163
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":162
* def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None):
* if not sym_isvar(lhs): raise Exception('Invalid LHS symbol: %d' % lhs)
* self.lhs = lhs # <<<<<<<<<<<<<<
@@ -28054,7 +28041,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/mdenkows/cdec/python/cdec/sa/rule.pxi":163
* if not sym_isvar(lhs): raise Exception('Invalid LHS symbol: %d' % lhs)
* self.lhs = lhs
* self.f = f # <<<<<<<<<<<<<<
@@ -28067,7 +28054,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/mdenkows/cdec/python/cdec/sa/rule.pxi":164
* self.lhs = lhs
* self.f = f
* self.e = e # <<<<<<<<<<<<<<
@@ -28080,7 +28067,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/mdenkows/cdec/python/cdec/sa/rule.pxi":165
* self.f = f
* self.e = e
* self.word_alignments = word_alignments # <<<<<<<<<<<<<<
@@ -28093,26 +28080,26 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":166
* self.e = e
* self.word_alignments = word_alignments
* self.scores = scores # <<<<<<<<<<<<<<
*
* def __hash__(self):
*/
- if (!(likely(((__pyx_v_scores) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_scores, __pyx_ptype_3_sa_FeatureVector))))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_scores) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_scores, __pyx_ptype_4cdec_2sa_3_sa_FeatureVector))))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_scores);
__Pyx_GIVEREF(__pyx_v_scores);
__Pyx_GOTREF(__pyx_v_self->scores);
__Pyx_DECREF(((PyObject *)__pyx_v_self->scores));
- __pyx_v_self->scores = ((struct __pyx_obj_3_sa_FeatureVector *)__pyx_v_scores);
+ __pyx_v_self->scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_v_scores);
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.Rule.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Rule.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -28120,17 +28107,17 @@ static int __pyx_pf_3_sa_4Rule___cinit__(struct __pyx_obj_3_sa_Rule *__pyx_v_sel
}
/* Python wrapper */
-static Py_hash_t __pyx_pw_3_sa_4Rule_3__hash__(PyObject *__pyx_v_self); /*proto*/
-static Py_hash_t __pyx_pw_3_sa_4Rule_3__hash__(PyObject *__pyx_v_self) {
+static Py_hash_t __pyx_pw_4cdec_2sa_3_sa_4Rule_3__hash__(PyObject *__pyx_v_self); /*proto*/
+static Py_hash_t __pyx_pw_4cdec_2sa_3_sa_4Rule_3__hash__(PyObject *__pyx_v_self) {
Py_hash_t __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_4Rule_2__hash__(((struct __pyx_obj_3_sa_Rule *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_4Rule_2__hash__(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":169
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":168
* self.scores = scores
*
* def __hash__(self): # <<<<<<<<<<<<<<
@@ -28138,7 +28125,7 @@ static Py_hash_t __pyx_pw_3_sa_4Rule_3__hash__(PyObject *__pyx_v_self) {
*
*/
-static Py_hash_t __pyx_pf_3_sa_4Rule_2__hash__(struct __pyx_obj_3_sa_Rule *__pyx_v_self) {
+static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_4Rule_2__hash__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self) {
Py_hash_t __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -28149,16 +28136,16 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":169
*
* def __hash__(self):
* return hash((self.lhs, self.f, self.e)) # <<<<<<<<<<<<<<
*
* def __cmp__(self, Rule other):
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->lhs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->lhs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 169; __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);
@@ -28169,7 +28156,7 @@ static Py_hash_t __pyx_pf_3_sa_4Rule_2__hash__(struct __pyx_obj_3_sa_Rule *__pyx
PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->e));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->e));
__pyx_t_1 = 0;
- __pyx_t_3 = PyObject_Hash(((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Hash(((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
goto __pyx_L0;
@@ -28179,7 +28166,7 @@ static Py_hash_t __pyx_pf_3_sa_4Rule_2__hash__(struct __pyx_obj_3_sa_Rule *__pyx
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.Rule.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Rule.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
@@ -28189,16 +28176,16 @@ static Py_hash_t __pyx_pf_3_sa_4Rule_2__hash__(struct __pyx_obj_3_sa_Rule *__pyx
/* Python wrapper */
#if PY_MAJOR_VERSION < 3
-static int __pyx_pw_3_sa_4Rule_5__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
-static int __pyx_pw_3_sa_4Rule_5__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+static int __pyx_pw_4cdec_2sa_3_sa_4Rule_5__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_4Rule_5__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
CYTHON_UNUSED int __pyx_lineno = 0;
CYTHON_UNUSED const char *__pyx_filename = NULL;
CYTHON_UNUSED int __pyx_clineno = 0;
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cmp__ (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3_sa_Rule, 1, "other", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_4Rule_4__cmp__(((struct __pyx_obj_3_sa_Rule *)__pyx_v_self), ((struct __pyx_obj_3_sa_Rule *)__pyx_v_other));
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_2sa_3_sa_Rule, 1, "other", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_self), ((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_other));
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = -1;
@@ -28208,7 +28195,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/mdenkows/cdec/python/cdec/sa/rule.pxi":171
* return hash((self.lhs, self.f, self.e))
*
* def __cmp__(self, Rule other): # <<<<<<<<<<<<<<
@@ -28217,7 +28204,7 @@ static int __pyx_pw_3_sa_4Rule_5__cmp__(PyObject *__pyx_v_self, PyObject *__pyx_
*/
#if PY_MAJOR_VERSION < 3
-static int __pyx_pf_3_sa_4Rule_4__cmp__(struct __pyx_obj_3_sa_Rule *__pyx_v_self, struct __pyx_obj_3_sa_Rule *__pyx_v_other) {
+static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_other) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -28229,16 +28216,16 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":172
*
* 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))
*
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->lhs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->lhs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 172; __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);
@@ -28253,16 +28240,16 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":173
* def __cmp__(self, Rule other):
* return cmp((self.lhs, self.f, self.e, self.word_alignments),
* (other.lhs, other.f, other.e, self.word_alignments)) # <<<<<<<<<<<<<<
*
* def fmerge(self, Phrase f):
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_other->lhs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_other->lhs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
@@ -28276,7 +28263,7 @@ static int __pyx_pf_3_sa_4Rule_4__cmp__(struct __pyx_obj_3_sa_Rule *__pyx_v_self
PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->word_alignments);
__Pyx_GIVEREF(__pyx_v_self->word_alignments);
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
@@ -28284,10 +28271,10 @@ static int __pyx_pf_3_sa_4Rule_4__cmp__(struct __pyx_obj_3_sa_Rule *__pyx_v_self
__Pyx_GIVEREF(((PyObject *)__pyx_t_3));
__pyx_t_2 = 0;
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_cmp, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_cmp, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_4;
goto __pyx_L0;
@@ -28298,7 +28285,7 @@ static int __pyx_pf_3_sa_4Rule_4__cmp__(struct __pyx_obj_3_sa_Rule *__pyx_v_self
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.Rule.__cmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Rule.__cmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -28307,16 +28294,16 @@ static int __pyx_pf_3_sa_4Rule_4__cmp__(struct __pyx_obj_3_sa_Rule *__pyx_v_self
#endif /*!(#if PY_MAJOR_VERSION < 3)*/
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_4Rule_7fmerge(PyObject *__pyx_v_self, PyObject *__pyx_v_f); /*proto*/
-static PyObject *__pyx_pw_3_sa_4Rule_7fmerge(PyObject *__pyx_v_self, PyObject *__pyx_v_f) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_7fmerge(PyObject *__pyx_v_self, PyObject *__pyx_v_f); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_7fmerge(PyObject *__pyx_v_self, PyObject *__pyx_v_f) {
CYTHON_UNUSED int __pyx_lineno = 0;
CYTHON_UNUSED const char *__pyx_filename = NULL;
CYTHON_UNUSED int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("fmerge (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_3_sa_Phrase, 1, "f", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_4Rule_6fmerge(((struct __pyx_obj_3_sa_Rule *)__pyx_v_self), ((struct __pyx_obj_3_sa_Phrase *)__pyx_v_f));
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_f), __pyx_ptype_4cdec_2sa_3_sa_Phrase, 1, "f", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_self), ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_v_f));
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = NULL;
@@ -28325,7 +28312,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/mdenkows/cdec/python/cdec/sa/rule.pxi":175
* (other.lhs, other.f, other.e, self.word_alignments))
*
* def fmerge(self, Phrase f): # <<<<<<<<<<<<<<
@@ -28333,7 +28320,7 @@ static PyObject *__pyx_pw_3_sa_4Rule_7fmerge(PyObject *__pyx_v_self, PyObject *_
* self.f = f
*/
-static PyObject *__pyx_pf_3_sa_4Rule_6fmerge(struct __pyx_obj_3_sa_Rule *__pyx_v_self, struct __pyx_obj_3_sa_Phrase *__pyx_v_f) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_f) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -28343,19 +28330,19 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":176
*
* def fmerge(self, Phrase f):
* if self.f == f: # <<<<<<<<<<<<<<
* self.f = f
*
*/
- __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self->f), ((PyObject *)__pyx_v_f), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self->f), ((PyObject *)__pyx_v_f), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":178
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":177
* def fmerge(self, Phrase f):
* if self.f == f:
* self.f = f # <<<<<<<<<<<<<<
@@ -28375,7 +28362,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_6fmerge(struct __pyx_obj_3_sa_Rule *__pyx_v
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.Rule.fmerge", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Rule.fmerge", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -28384,17 +28371,17 @@ static PyObject *__pyx_pf_3_sa_4Rule_6fmerge(struct __pyx_obj_3_sa_Rule *__pyx_v
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_4Rule_9arity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_4Rule_9arity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_9arity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_9arity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("arity (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_4Rule_8arity(((struct __pyx_obj_3_sa_Rule *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_4Rule_8arity(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":180
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":179
* self.f = f
*
* def arity(self): # <<<<<<<<<<<<<<
@@ -28402,7 +28389,7 @@ static PyObject *__pyx_pw_3_sa_4Rule_9arity(PyObject *__pyx_v_self, CYTHON_UNUSE
*
*/
-static PyObject *__pyx_pf_3_sa_4Rule_8arity(struct __pyx_obj_3_sa_Rule *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_8arity(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -28412,7 +28399,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/mdenkows/cdec/python/cdec/sa/rule.pxi":180
*
* def arity(self):
* return self.f.arity() # <<<<<<<<<<<<<<
@@ -28420,9 +28407,9 @@ static PyObject *__pyx_pf_3_sa_4Rule_8arity(struct __pyx_obj_3_sa_Rule *__pyx_v_
* def __str__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->f), __pyx_n_s__arity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->f), __pyx_n_s__arity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
@@ -28434,7 +28421,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_8arity(struct __pyx_obj_3_sa_Rule *__pyx_v_
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.Rule.arity", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Rule.arity", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -28443,18 +28430,18 @@ static PyObject *__pyx_pf_3_sa_4Rule_8arity(struct __pyx_obj_3_sa_Rule *__pyx_v_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_4Rule_11__str__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_4Rule_11__str__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_11__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_11__str__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_4Rule_10__str__(((struct __pyx_obj_3_sa_Rule *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/rule.pxi":186
* fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)]
* if self.word_alignments is not None:
* fields.append(' '.join('%d-%d' % a for a in self.alignments())) # <<<<<<<<<<<<<<
@@ -28462,25 +28449,25 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject
*
*/
-static PyObject *__pyx_pf_3_sa_4Rule_7__str___genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_7__str___genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_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_17_genexpr *)__pyx_tp_new_3_sa___pyx_scope_struct_17_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_17_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr(__pyx_ptype_4cdec_2sa_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_16___str__ *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_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___2generator13, (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_4cdec_2sa_3_sa_4Rule_7__str___2generator13, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -28489,7 +28476,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_7__str___genexpr(PyObject *__pyx_self) {
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.Rule.__str__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Rule.__str__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -28498,9 +28485,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___2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- 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);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
@@ -28519,18 +28506,18 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject
return NULL;
}
__pyx_L3_first_run:;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s__alignments); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s__alignments); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
__pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -28539,23 +28526,23 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_4(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -28566,7 +28553,7 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject
__Pyx_GIVEREF(__pyx_t_2);
__pyx_cur_scope->__pyx_v_a = __pyx_t_2;
__pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_71), __pyx_cur_scope->__pyx_v_a); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_71), __pyx_cur_scope->__pyx_v_a); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_r = ((PyObject *)__pyx_t_2);
__pyx_t_2 = 0;
@@ -28585,7 +28572,7 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject
__Pyx_XGOTREF(__pyx_t_1);
__pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
__pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyErr_SetNone(PyExc_StopIteration);
@@ -28602,7 +28589,7 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":183
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":182
* return self.f.arity()
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -28610,8 +28597,8 @@ static PyObject *__pyx_gb_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject
* fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)]
*/
-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_16___str__ *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ *__pyx_cur_scope;
PyObject *__pyx_v_fields = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -28627,7 +28614,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_16___str__ *)__pyx_tp_new_3_sa___pyx_scope_struct_16___str__(__pyx_ptype_3_sa___pyx_scope_struct_16___str__, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_16___str__(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_16___str__, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -28637,40 +28624,40 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":184
* def __str__(self):
* cdef unsigned i
* fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)] # <<<<<<<<<<<<<<
* if self.word_alignments is not None:
* fields.append(' '.join('%d-%d' % a for a in self.alignments()))
*/
- __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_cur_scope->__pyx_v_self->lhs)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring(__pyx_cur_scope->__pyx_v_self->lhs)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self->f));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self->f));
__Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self->f));
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__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[7]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self->e));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self->e));
__Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self->e));
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__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[7]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self->scores));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_self->scores));
__Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self->scores));
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
@@ -28687,7 +28674,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx
__pyx_v_fields = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":186
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":185
* cdef unsigned i
* fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)]
* if self.word_alignments is not None: # <<<<<<<<<<<<<<
@@ -28698,33 +28685,33 @@ static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx
__pyx_t_7 = (__pyx_t_6 != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":187
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":186
* fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)]
* if self.word_alignments is not None:
* fields.append(' '.join('%d-%d' % a for a in self.alignments())) # <<<<<<<<<<<<<<
* return ' ||| '.join(fields)
*
*/
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_69), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_69), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = __pyx_pf_3_sa_4Rule_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __pyx_pf_4cdec_2sa_3_sa_4Rule_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_fields, __pyx_t_5); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_fields, __pyx_t_5); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
goto __pyx_L3;
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":188
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":187
* if self.word_alignments is not None:
* fields.append(' '.join('%d-%d' % a for a in self.alignments()))
* return ' ||| '.join(fields) # <<<<<<<<<<<<<<
@@ -28732,14 +28719,14 @@ static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx
* def alignments(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_19), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_19), __pyx_n_s__join); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_v_fields));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_fields));
__Pyx_GIVEREF(((PyObject *)__pyx_v_fields));
- __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
@@ -28755,7 +28742,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.Rule.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Rule.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_fields);
@@ -28764,20 +28751,20 @@ static PyObject *__pyx_pf_3_sa_4Rule_10__str__(struct __pyx_obj_3_sa_Rule *__pyx
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_4Rule_13alignments(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_4Rule_13alignments(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_13alignments(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_13alignments(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("alignments (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_4Rule_12alignments(((struct __pyx_obj_3_sa_Rule *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_4Rule_12alignments(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":190
+/* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":189
* return ' ||| '.join(fields)
*
* def alignments(self): # <<<<<<<<<<<<<<
@@ -28785,15 +28772,15 @@ static PyObject *__pyx_pw_3_sa_4Rule_13alignments(PyObject *__pyx_v_self, CYTHON
* yield point / ALIGNMENT_CODE, point % ALIGNMENT_CODE
*/
-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_18_alignments *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_12alignments(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self) {
+ struct __pyx_obj_4cdec_2sa_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_18_alignments *)__pyx_tp_new_3_sa___pyx_scope_struct_18_alignments(__pyx_ptype_3_sa___pyx_scope_struct_18_alignments, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -28803,7 +28790,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_12alignments(struct __pyx_obj_3_sa_Rule *__
__Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
__Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
{
- __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_4Rule_14generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -28812,7 +28799,7 @@ static PyObject *__pyx_pf_3_sa_4Rule_12alignments(struct __pyx_obj_3_sa_Rule *__
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.Rule.alignments", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Rule.alignments", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -28821,9 +28808,9 @@ static PyObject *__pyx_pf_3_sa_4Rule_12alignments(struct __pyx_obj_3_sa_Rule *__
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- 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);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_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;
@@ -28844,9 +28831,9 @@ static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_g
return NULL;
}
__pyx_L3_first_run:;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rule.pxi":191
+ /* "/home/mdenkows/cdec/python/cdec/sa/rule.pxi":190
*
* def alignments(self):
* for point in self.word_alignments: # <<<<<<<<<<<<<<
@@ -28856,7 +28843,7 @@ static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_g
__pyx_t_1 = __pyx_cur_scope->__pyx_v_self->word_alignments; __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_v_self->word_alignments); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_self->word_alignments); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -28864,23 +28851,23 @@ static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_g
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[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __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[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __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[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __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[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __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[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -28892,22 +28879,22 @@ 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/mdenkows/cdec/python/cdec/sa/rule.pxi":191
* def alignments(self):
* for point in self.word_alignments:
* yield point / ALIGNMENT_CODE, point % ALIGNMENT_CODE # <<<<<<<<<<<<<<
*/
- __pyx_t_4 = PyInt_FromLong(__pyx_v_3_sa_ALIGNMENT_CODE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_cur_scope->__pyx_v_point, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_cur_scope->__pyx_v_point, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromLong(__pyx_v_3_sa_ALIGNMENT_CODE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyNumber_Remainder(__pyx_cur_scope->__pyx_v_point, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Remainder(__pyx_cur_scope->__pyx_v_point, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
@@ -28932,7 +28919,7 @@ static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_g
__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[7]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyErr_SetNone(PyExc_StopIteration);
@@ -28952,17 +28939,17 @@ static PyObject *__pyx_gb_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_g
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_4Rule_1f_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_4Rule_1f_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_1f_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_1f_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_4Rule_1f___get__(((struct __pyx_obj_3_sa_Rule *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_4Rule_1f___get__(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "_sa.pxd":37
+/* "cdec/sa/_sa.pxd":37
* cdef class Rule:
* cdef int lhs
* cdef readonly Phrase f, e # <<<<<<<<<<<<<<
@@ -28970,7 +28957,7 @@ static PyObject *__pyx_pw_3_sa_4Rule_1f_1__get__(PyObject *__pyx_v_self) {
* cdef int n_scores
*/
-static PyObject *__pyx_pf_3_sa_4Rule_1f___get__(struct __pyx_obj_3_sa_Rule *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_1f___get__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -28987,17 +28974,17 @@ static PyObject *__pyx_pf_3_sa_4Rule_1f___get__(struct __pyx_obj_3_sa_Rule *__py
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_4Rule_1e_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_4Rule_1e_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_1e_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_1e_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_4Rule_1e___get__(((struct __pyx_obj_3_sa_Rule *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_4Rule_1e___get__(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_3_sa_4Rule_1e___get__(struct __pyx_obj_3_sa_Rule *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_1e___get__(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -29013,7 +29000,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":21
* int arr_len
*
* cdef _Trie_Node* new_trie_node(): # <<<<<<<<<<<<<<
@@ -29021,22 +29008,22 @@ static PyObject *__pyx_pf_3_sa_4Rule_1e___get__(struct __pyx_obj_3_sa_Rule *__py
* node = <_Trie_Node*> malloc(sizeof(_Trie_Node))
*/
-static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_new_trie_node(void) {
- struct __pyx_t_3_sa__Trie_Node *__pyx_v_node;
- struct __pyx_t_3_sa__Trie_Node *__pyx_r;
+static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie_node(void) {
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("new_trie_node", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":23
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":23
* cdef _Trie_Node* new_trie_node():
* cdef _Trie_Node* node
* node = <_Trie_Node*> malloc(sizeof(_Trie_Node)) # <<<<<<<<<<<<<<
* node.root = NULL
* node.arr_len = 0
*/
- __pyx_v_node = ((struct __pyx_t_3_sa__Trie_Node *)malloc((sizeof(struct __pyx_t_3_sa__Trie_Node))));
+ __pyx_v_node = ((struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":24
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":24
* cdef _Trie_Node* node
* node = <_Trie_Node*> malloc(sizeof(_Trie_Node))
* node.root = NULL # <<<<<<<<<<<<<<
@@ -29045,7 +29032,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":25
* node = <_Trie_Node*> malloc(sizeof(_Trie_Node))
* node.root = NULL
* node.arr_len = 0 # <<<<<<<<<<<<<<
@@ -29054,7 +29041,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":26
* node.root = NULL
* node.arr_len = 0
* node.arr = <int*> malloc(sizeof(0*sizeof(int))) # <<<<<<<<<<<<<<
@@ -29063,7 +29050,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":27
* node.arr_len = 0
* node.arr = <int*> malloc(sizeof(0*sizeof(int)))
* return node # <<<<<<<<<<<<<<
@@ -29079,7 +29066,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":29
* return node
*
* cdef _Trie_Edge* new_trie_edge(int val): # <<<<<<<<<<<<<<
@@ -29087,31 +29074,31 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_new_trie_node(void) {
* edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge))
*/
-static struct __pyx_t_3_sa__Trie_Edge *__pyx_f_3_sa_new_trie_edge(int __pyx_v_val) {
- struct __pyx_t_3_sa__Trie_Edge *__pyx_v_edge;
- struct __pyx_t_3_sa__Trie_Edge *__pyx_r;
+static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie_edge(int __pyx_v_val) {
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_v_edge;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("new_trie_edge", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":31
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":31
* cdef _Trie_Edge* new_trie_edge(int val):
* cdef _Trie_Edge* edge
* edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge)) # <<<<<<<<<<<<<<
* edge.node = new_trie_node()
* edge.bigger = NULL
*/
- __pyx_v_edge = ((struct __pyx_t_3_sa__Trie_Edge *)malloc((sizeof(struct __pyx_t_3_sa__Trie_Edge))));
+ __pyx_v_edge = ((struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":32
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":32
* cdef _Trie_Edge* edge
* edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge))
* edge.node = new_trie_node() # <<<<<<<<<<<<<<
* edge.bigger = NULL
* edge.smaller = NULL
*/
- __pyx_v_edge->node = __pyx_f_3_sa_new_trie_node();
+ __pyx_v_edge->node = __pyx_f_4cdec_2sa_3_sa_new_trie_node();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":33
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":33
* edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge))
* edge.node = new_trie_node()
* edge.bigger = NULL # <<<<<<<<<<<<<<
@@ -29120,7 +29107,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":34
* edge.node = new_trie_node()
* edge.bigger = NULL
* edge.smaller = NULL # <<<<<<<<<<<<<<
@@ -29129,7 +29116,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":35
* edge.bigger = NULL
* edge.smaller = NULL
* edge.val = val # <<<<<<<<<<<<<<
@@ -29138,7 +29125,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":36
* edge.smaller = NULL
* edge.val = val
* return edge # <<<<<<<<<<<<<<
@@ -29154,7 +29141,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":38
* return edge
*
* cdef free_trie_node(_Trie_Node* node): # <<<<<<<<<<<<<<
@@ -29162,7 +29149,7 @@ static struct __pyx_t_3_sa__Trie_Edge *__pyx_f_3_sa_new_trie_edge(int __pyx_v_va
* free_trie_edge(node.root)
*/
-static PyObject *__pyx_f_3_sa_free_trie_node(struct __pyx_t_3_sa__Trie_Node *__pyx_v_node) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -29172,7 +29159,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":39
*
* cdef free_trie_node(_Trie_Node* node):
* if node != NULL: # <<<<<<<<<<<<<<
@@ -29182,18 +29169,18 @@ static PyObject *__pyx_f_3_sa_free_trie_node(struct __pyx_t_3_sa__Trie_Node *__p
__pyx_t_1 = ((__pyx_v_node != NULL) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":40
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":40
* cdef free_trie_node(_Trie_Node* node):
* if node != NULL:
* free_trie_edge(node.root) # <<<<<<<<<<<<<<
* free(node.arr)
*
*/
- __pyx_t_2 = __pyx_f_3_sa_free_trie_edge(__pyx_v_node->root); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4cdec_2sa_3_sa_free_trie_edge(__pyx_v_node->root); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":41
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":41
* if node != NULL:
* free_trie_edge(node.root)
* free(node.arr) # <<<<<<<<<<<<<<
@@ -29209,7 +29196,7 @@ static PyObject *__pyx_f_3_sa_free_trie_node(struct __pyx_t_3_sa__Trie_Node *__p
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.free_trie_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.free_trie_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -29217,7 +29204,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":43
* free(node.arr)
*
* cdef free_trie_edge(_Trie_Edge* edge): # <<<<<<<<<<<<<<
@@ -29225,7 +29212,7 @@ static PyObject *__pyx_f_3_sa_free_trie_node(struct __pyx_t_3_sa__Trie_Node *__p
* free_trie_node(edge.node)
*/
-static PyObject *__pyx_f_3_sa_free_trie_edge(struct __pyx_t_3_sa__Trie_Edge *__pyx_v_edge) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_v_edge) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -29235,7 +29222,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":44
*
* cdef free_trie_edge(_Trie_Edge* edge):
* if edge != NULL: # <<<<<<<<<<<<<<
@@ -29245,36 +29232,36 @@ static PyObject *__pyx_f_3_sa_free_trie_edge(struct __pyx_t_3_sa__Trie_Edge *__p
__pyx_t_1 = ((__pyx_v_edge != NULL) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":45
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":45
* cdef free_trie_edge(_Trie_Edge* edge):
* if edge != NULL:
* free_trie_node(edge.node) # <<<<<<<<<<<<<<
* free_trie_edge(edge.bigger)
* free_trie_edge(edge.smaller)
*/
- __pyx_t_2 = __pyx_f_3_sa_free_trie_node(__pyx_v_edge->node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4cdec_2sa_3_sa_free_trie_node(__pyx_v_edge->node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":46
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":46
* if edge != NULL:
* free_trie_node(edge.node)
* free_trie_edge(edge.bigger) # <<<<<<<<<<<<<<
* free_trie_edge(edge.smaller)
*
*/
- __pyx_t_2 = __pyx_f_3_sa_free_trie_edge(__pyx_v_edge->bigger); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4cdec_2sa_3_sa_free_trie_edge(__pyx_v_edge->bigger); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":47
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":47
* free_trie_node(edge.node)
* free_trie_edge(edge.bigger)
* free_trie_edge(edge.smaller) # <<<<<<<<<<<<<<
*
* cdef _Trie_Node* trie_find(_Trie_Node* node, int val):
*/
- __pyx_t_2 = __pyx_f_3_sa_free_trie_edge(__pyx_v_edge->smaller); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4cdec_2sa_3_sa_free_trie_edge(__pyx_v_edge->smaller); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L3;
@@ -29285,7 +29272,7 @@ static PyObject *__pyx_f_3_sa_free_trie_edge(struct __pyx_t_3_sa__Trie_Edge *__p
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.free_trie_edge", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.free_trie_edge", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -29293,7 +29280,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":49
* free_trie_edge(edge.smaller)
*
* cdef _Trie_Node* trie_find(_Trie_Node* node, int val): # <<<<<<<<<<<<<<
@@ -29301,17 +29288,17 @@ static PyObject *__pyx_f_3_sa_free_trie_edge(struct __pyx_t_3_sa__Trie_Edge *__p
* cur = node.root
*/
-static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_sa__Trie_Node *__pyx_v_node, int __pyx_v_val) {
- struct __pyx_t_3_sa__Trie_Edge *__pyx_v_cur;
- struct __pyx_t_3_sa__Trie_Node *__pyx_r;
+static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_find(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node, int __pyx_v_val) {
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_v_cur;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_r;
__Pyx_RefNannyDeclarations
- struct __pyx_t_3_sa__Trie_Edge *__pyx_t_1;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
int __pyx_t_4;
__Pyx_RefNannySetupContext("trie_find", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":51
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":51
* cdef _Trie_Node* trie_find(_Trie_Node* node, int val):
* cdef _Trie_Edge* cur
* cur = node.root # <<<<<<<<<<<<<<
@@ -29321,7 +29308,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
__pyx_t_1 = __pyx_v_node->root;
__pyx_v_cur = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":52
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":52
* cdef _Trie_Edge* cur
* cur = node.root
* while cur != NULL and cur.val != val: # <<<<<<<<<<<<<<
@@ -29338,7 +29325,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
}
if (!__pyx_t_4) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":53
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":53
* cur = node.root
* while cur != NULL and cur.val != val:
* if val > cur.val: # <<<<<<<<<<<<<<
@@ -29348,7 +29335,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
__pyx_t_4 = ((__pyx_v_val > __pyx_v_cur->val) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":54
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":54
* while cur != NULL and cur.val != val:
* if val > cur.val:
* cur = cur.bigger # <<<<<<<<<<<<<<
@@ -29360,7 +29347,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":55
* if val > cur.val:
* cur = cur.bigger
* elif val < cur.val: # <<<<<<<<<<<<<<
@@ -29370,7 +29357,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
__pyx_t_4 = ((__pyx_v_val < __pyx_v_cur->val) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":56
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":56
* cur = cur.bigger
* elif val < cur.val:
* cur = cur.smaller # <<<<<<<<<<<<<<
@@ -29384,7 +29371,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":57
* elif val < cur.val:
* cur = cur.smaller
* if cur == NULL: # <<<<<<<<<<<<<<
@@ -29394,7 +29381,7 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
__pyx_t_4 = ((__pyx_v_cur == NULL) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":58
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":58
* cur = cur.smaller
* if cur == NULL:
* return NULL # <<<<<<<<<<<<<<
@@ -29407,7 +29394,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":60
* return NULL
* else:
* return cur.node # <<<<<<<<<<<<<<
@@ -29425,7 +29412,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":62
* return cur.node
*
* cdef trie_node_data_append(_Trie_Node* node, int val): # <<<<<<<<<<<<<<
@@ -29433,13 +29420,13 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_find(struct __pyx_t_3_s
* new_len = node.arr_len + 1
*/
-static PyObject *__pyx_f_3_sa_trie_node_data_append(struct __pyx_t_3_sa__Trie_Node *__pyx_v_node, int __pyx_v_val) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node, int __pyx_v_val) {
int __pyx_v_new_len;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("trie_node_data_append", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":64
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":64
* cdef trie_node_data_append(_Trie_Node* node, int val):
* cdef int new_len
* new_len = node.arr_len + 1 # <<<<<<<<<<<<<<
@@ -29448,7 +29435,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":65
* cdef int new_len
* new_len = node.arr_len + 1
* node.arr = <int*> realloc(node.arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -29457,7 +29444,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -29466,7 +29453,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -29481,7 +29468,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":69
* node.arr_len = new_len
*
* cdef trie_node_data_extend(_Trie_Node* node, int* vals, int num_vals): # <<<<<<<<<<<<<<
@@ -29489,13 +29476,13 @@ static PyObject *__pyx_f_3_sa_trie_node_data_append(struct __pyx_t_3_sa__Trie_No
* new_len = node.arr_len + num_vals
*/
-static PyObject *__pyx_f_3_sa_trie_node_data_extend(struct __pyx_t_3_sa__Trie_Node *__pyx_v_node, int *__pyx_v_vals, int __pyx_v_num_vals) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node, int *__pyx_v_vals, int __pyx_v_num_vals) {
int __pyx_v_new_len;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("trie_node_data_extend", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":71
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":71
* cdef trie_node_data_extend(_Trie_Node* node, int* vals, int num_vals):
* cdef int new_len
* new_len = node.arr_len + num_vals # <<<<<<<<<<<<<<
@@ -29504,7 +29491,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -29513,7 +29500,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -29522,7 +29509,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -29537,7 +29524,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":77
*
*
* cdef _Trie_Node* trie_insert(_Trie_Node* node, int val): # <<<<<<<<<<<<<<
@@ -29545,16 +29532,16 @@ static PyObject *__pyx_f_3_sa_trie_node_data_extend(struct __pyx_t_3_sa__Trie_No
* cur = &node.root
*/
-static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3_sa__Trie_Node *__pyx_v_node, int __pyx_v_val) {
- struct __pyx_t_3_sa__Trie_Edge **__pyx_v_cur;
- struct __pyx_t_3_sa__Trie_Node *__pyx_r;
+static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_insert(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node, int __pyx_v_val) {
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge **__pyx_v_cur;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
__Pyx_RefNannySetupContext("trie_insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":79
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":79
* cdef _Trie_Node* trie_insert(_Trie_Node* node, int val):
* cdef _Trie_Edge** cur
* cur = &node.root # <<<<<<<<<<<<<<
@@ -29563,7 +29550,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":80
* cdef _Trie_Edge** cur
* cur = &node.root
* while cur[0] != NULL and cur[0].val != val: # <<<<<<<<<<<<<<
@@ -29580,7 +29567,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":81
* cur = &node.root
* while cur[0] != NULL and cur[0].val != val:
* if val > cur[0].val: # <<<<<<<<<<<<<<
@@ -29590,7 +29577,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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":82
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":82
* while cur[0] != NULL and cur[0].val != val:
* if val > cur[0].val:
* cur = &cur[0].bigger # <<<<<<<<<<<<<<
@@ -29601,7 +29588,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":83
* if val > cur[0].val:
* cur = &cur[0].bigger
* elif val < cur[0].val: # <<<<<<<<<<<<<<
@@ -29611,7 +29598,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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":84
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":84
* cur = &cur[0].bigger
* elif val < cur[0].val:
* cur = &cur[0].smaller # <<<<<<<<<<<<<<
@@ -29624,7 +29611,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":85
* elif val < cur[0].val:
* cur = &cur[0].smaller
* if cur[0] == NULL: # <<<<<<<<<<<<<<
@@ -29634,19 +29621,19 @@ 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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":86
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":86
* cur = &cur[0].smaller
* if cur[0] == NULL:
* cur[0] = new_trie_edge(val) # <<<<<<<<<<<<<<
* return cur[0].node
*
*/
- (__pyx_v_cur[0]) = __pyx_f_3_sa_new_trie_edge(__pyx_v_val);
+ (__pyx_v_cur[0]) = __pyx_f_4cdec_2sa_3_sa_new_trie_edge(__pyx_v_val);
goto __pyx_L6;
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":87
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":87
* if cur[0] == NULL:
* cur[0] = new_trie_edge(val)
* return cur[0].node # <<<<<<<<<<<<<<
@@ -29662,7 +29649,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":89
* return cur[0].node
*
* cdef trie_node_to_map(_Trie_Node* node, result, prefix, int include_zeros): # <<<<<<<<<<<<<<
@@ -29670,8 +29657,8 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_trie_insert(struct __pyx_t_3
*
*/
-static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *__pyx_v_node, PyObject *__pyx_v_result, PyObject *__pyx_v_prefix, int __pyx_v_include_zeros) {
- struct __pyx_obj_3_sa_IntList *__pyx_v_arr = 0;
+static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node, PyObject *__pyx_v_result, PyObject *__pyx_v_prefix, int __pyx_v_include_zeros) {
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_arr = 0;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -29683,7 +29670,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":92
* cdef IntList arr
*
* if include_zeros or node.arr_len > 0: # <<<<<<<<<<<<<<
@@ -29698,19 +29685,19 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":93
*
* if include_zeros or node.arr_len > 0:
* arr = IntList() # <<<<<<<<<<<<<<
* free(arr.arr)
* arr.arr = <int*> malloc(node.arr_len * sizeof(int))
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_v_arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
+ __pyx_v_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":94
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":94
* if include_zeros or node.arr_len > 0:
* arr = IntList()
* free(arr.arr) # <<<<<<<<<<<<<<
@@ -29719,7 +29706,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":95
* arr = IntList()
* free(arr.arr)
* arr.arr = <int*> malloc(node.arr_len * sizeof(int)) # <<<<<<<<<<<<<<
@@ -29728,7 +29715,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/mdenkows/cdec/python/cdec/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)) # <<<<<<<<<<<<<<
@@ -29737,7 +29724,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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -29747,7 +29734,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
__pyx_t_4 = __pyx_v_node->arr_len;
__pyx_v_arr->len = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":98
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":98
* memcpy(arr.arr, node.arr, node.arr_len * sizeof(int))
* arr.len = node.arr_len
* arr.size = node.arr_len # <<<<<<<<<<<<<<
@@ -29757,7 +29744,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
__pyx_t_4 = __pyx_v_node->arr_len;
__pyx_v_arr->size = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":99
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":99
* arr.len = node.arr_len
* arr.size = node.arr_len
* result[prefix] = arr # <<<<<<<<<<<<<<
@@ -29769,14 +29756,14 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":100
* arr.size = node.arr_len
* result[prefix] = arr
* trie_edge_to_map(node.root, result, prefix, include_zeros) # <<<<<<<<<<<<<<
*
* cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros):
*/
- __pyx_t_3 = __pyx_f_3_sa_trie_edge_to_map(__pyx_v_node->root, __pyx_v_result, __pyx_v_prefix, __pyx_v_include_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(__pyx_v_node->root, __pyx_v_result, __pyx_v_prefix, __pyx_v_include_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -29784,7 +29771,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.trie_node_to_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.trie_node_to_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_arr);
@@ -29793,7 +29780,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":102
* trie_edge_to_map(node.root, result, prefix, include_zeros)
*
* cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros): # <<<<<<<<<<<<<<
@@ -29801,7 +29788,7 @@ static PyObject *__pyx_f_3_sa_trie_node_to_map(struct __pyx_t_3_sa__Trie_Node *_
* trie_edge_to_map(edge.smaller, result, prefix, include_zeros)
*/
-static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *__pyx_v_edge, PyObject *__pyx_v_result, PyObject *__pyx_v_prefix, int __pyx_v_include_zeros) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_v_edge, PyObject *__pyx_v_result, PyObject *__pyx_v_prefix, int __pyx_v_include_zeros) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -29813,7 +29800,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":103
*
* cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros):
* if edge != NULL: # <<<<<<<<<<<<<<
@@ -29823,29 +29810,29 @@ static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *_
__pyx_t_1 = ((__pyx_v_edge != NULL) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":104
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":104
* cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros):
* if edge != NULL:
* trie_edge_to_map(edge.smaller, result, prefix, include_zeros) # <<<<<<<<<<<<<<
* trie_edge_to_map(edge.bigger, result, prefix, include_zeros)
* prefix = prefix + (edge.val,)
*/
- __pyx_t_2 = __pyx_f_3_sa_trie_edge_to_map(__pyx_v_edge->smaller, __pyx_v_result, __pyx_v_prefix, __pyx_v_include_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(__pyx_v_edge->smaller, __pyx_v_result, __pyx_v_prefix, __pyx_v_include_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":105
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":105
* if edge != NULL:
* trie_edge_to_map(edge.smaller, result, prefix, include_zeros)
* trie_edge_to_map(edge.bigger, result, prefix, include_zeros) # <<<<<<<<<<<<<<
* prefix = prefix + (edge.val,)
* trie_node_to_map(edge.node, result, prefix, include_zeros)
*/
- __pyx_t_2 = __pyx_f_3_sa_trie_edge_to_map(__pyx_v_edge->bigger, __pyx_v_result, __pyx_v_prefix, __pyx_v_include_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(__pyx_v_edge->bigger, __pyx_v_result, __pyx_v_prefix, __pyx_v_include_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":106
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":106
* trie_edge_to_map(edge.smaller, result, prefix, include_zeros)
* trie_edge_to_map(edge.bigger, result, prefix, include_zeros)
* prefix = prefix + (edge.val,) # <<<<<<<<<<<<<<
@@ -29866,14 +29853,14 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":107
* trie_edge_to_map(edge.bigger, result, prefix, include_zeros)
* prefix = prefix + (edge.val,)
* trie_node_to_map(edge.node, result, prefix, include_zeros) # <<<<<<<<<<<<<<
*
* cdef class TrieMap:
*/
- __pyx_t_2 = __pyx_f_3_sa_trie_node_to_map(__pyx_v_edge->node, __pyx_v_result, __pyx_v_prefix, __pyx_v_include_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4cdec_2sa_3_sa_trie_node_to_map(__pyx_v_edge->node, __pyx_v_result, __pyx_v_prefix, __pyx_v_include_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L3;
@@ -29885,7 +29872,7 @@ static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *_
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.trie_edge_to_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.trie_edge_to_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_prefix);
@@ -29895,8 +29882,8 @@ static PyObject *__pyx_f_3_sa_trie_edge_to_map(struct __pyx_t_3_sa__Trie_Edge *_
}
/* Python wrapper */
-static int __pyx_pw_3_sa_7TrieMap_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_7TrieMap_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_7TrieMap_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_7TrieMap_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_alphabet_size;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -29935,16 +29922,16 @@ static int __pyx_pw_3_sa_7TrieMap_1__cinit__(PyObject *__pyx_v_self, PyObject *_
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.TrieMap.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieMap.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_7TrieMap___cinit__(((struct __pyx_obj_3_sa_TrieMap *)__pyx_v_self), __pyx_v_alphabet_size);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_v_self), __pyx_v_alphabet_size);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":114
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":114
* cdef int V
*
* def __cinit__(self, int alphabet_size): # <<<<<<<<<<<<<<
@@ -29952,12 +29939,12 @@ static int __pyx_pw_3_sa_7TrieMap_1__cinit__(PyObject *__pyx_v_self, PyObject *_
* self.root = <_Trie_Node**> malloc(self.V * sizeof(_Trie_Node*))
*/
-static int __pyx_pf_3_sa_7TrieMap___cinit__(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self, int __pyx_v_alphabet_size) {
+static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self, int __pyx_v_alphabet_size) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":115
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":115
*
* def __cinit__(self, int alphabet_size):
* self.V = alphabet_size # <<<<<<<<<<<<<<
@@ -29966,23 +29953,23 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":116
* def __cinit__(self, int alphabet_size):
* self.V = alphabet_size
* self.root = <_Trie_Node**> malloc(self.V * sizeof(_Trie_Node*)) # <<<<<<<<<<<<<<
* memset(self.root, 0, self.V * sizeof(_Trie_Node*))
*
*/
- __pyx_v_self->root = ((struct __pyx_t_3_sa__Trie_Node **)malloc((__pyx_v_self->V * (sizeof(struct __pyx_t_3_sa__Trie_Node *)))));
+ __pyx_v_self->root = ((struct __pyx_t_4cdec_2sa_3_sa__Trie_Node **)malloc((__pyx_v_self->V * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *)))));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":117
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":117
* self.V = alphabet_size
* self.root = <_Trie_Node**> malloc(self.V * sizeof(_Trie_Node*))
* memset(self.root, 0, self.V * sizeof(_Trie_Node*)) # <<<<<<<<<<<<<<
*
*
*/
- memset(__pyx_v_self->root, 0, (__pyx_v_self->V * (sizeof(struct __pyx_t_3_sa__Trie_Node *))));
+ memset(__pyx_v_self->root, 0, (__pyx_v_self->V * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *))));
__pyx_r = 0;
__Pyx_RefNannyFinishContext();
@@ -29990,15 +29977,15 @@ static int __pyx_pf_3_sa_7TrieMap___cinit__(struct __pyx_obj_3_sa_TrieMap *__pyx
}
/* Python wrapper */
-static void __pyx_pw_3_sa_7TrieMap_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_pw_3_sa_7TrieMap_3__dealloc__(PyObject *__pyx_v_self) {
+static void __pyx_pw_4cdec_2sa_3_sa_7TrieMap_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_4cdec_2sa_3_sa_7TrieMap_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_pf_3_sa_7TrieMap_2__dealloc__(((struct __pyx_obj_3_sa_TrieMap *)__pyx_v_self));
+ __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":120
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":120
*
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -30006,7 +29993,7 @@ static void __pyx_pw_3_sa_7TrieMap_3__dealloc__(PyObject *__pyx_v_self) {
* for i from 0 <= i < self.V:
*/
-static void __pyx_pf_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self) {
+static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self) {
int __pyx_v_i;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -30017,7 +30004,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":122
* def __dealloc__(self):
* cdef int i
* for i from 0 <= i < self.V: # <<<<<<<<<<<<<<
@@ -30027,7 +30014,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":123
* cdef int i
* for i from 0 <= i < self.V:
* if self.root[i] != NULL: # <<<<<<<<<<<<<<
@@ -30037,14 +30024,14 @@ 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) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":124
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":124
* for i from 0 <= i < self.V:
* if self.root[i] != NULL:
* free_trie_node(self.root[i]) # <<<<<<<<<<<<<<
* free(self.root)
*
*/
- __pyx_t_3 = __pyx_f_3_sa_free_trie_node((__pyx_v_self->root[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_4cdec_2sa_3_sa_free_trie_node((__pyx_v_self->root[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L5;
@@ -30052,7 +30039,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":125
* if self.root[i] != NULL:
* free_trie_node(self.root[i])
* free(self.root) # <<<<<<<<<<<<<<
@@ -30064,23 +30051,23 @@ static void __pyx_pf_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_3_sa_TrieMap *_
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.TrieMap.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieMap.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7TrieMap_5insert(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern); /*proto*/
-static PyObject *__pyx_pw_3_sa_7TrieMap_5insert(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7TrieMap_5insert(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7TrieMap_5insert(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("insert (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7TrieMap_4insert(((struct __pyx_obj_3_sa_TrieMap *)__pyx_v_self), ((PyObject *)__pyx_v_pattern));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_v_self), ((PyObject *)__pyx_v_pattern));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":128
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":128
*
*
* def insert(self, pattern): # <<<<<<<<<<<<<<
@@ -30088,7 +30075,7 @@ static PyObject *__pyx_pw_3_sa_7TrieMap_5insert(PyObject *__pyx_v_self, PyObject
* cdef int i, l
*/
-static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_pattern) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_pattern) {
int *__pyx_v_p;
int __pyx_v_i;
int __pyx_v_l;
@@ -30103,7 +30090,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":131
* cdef int* p
* cdef int i, l
* l = len(pattern) # <<<<<<<<<<<<<<
@@ -30113,7 +30100,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":132
* cdef int i, l
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int)) # <<<<<<<<<<<<<<
@@ -30122,7 +30109,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":133
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l: # <<<<<<<<<<<<<<
@@ -30132,7 +30119,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":134
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l:
* p[i] = pattern[i] # <<<<<<<<<<<<<<
@@ -30146,16 +30133,16 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":135
* for i from 0 <= i < l:
* p[i] = pattern[i]
* self._insert(p,l) # <<<<<<<<<<<<<<
* free(p)
*
*/
- ((struct __pyx_vtabstruct_3_sa_TrieMap *)__pyx_v_self->__pyx_vtab)->_insert(__pyx_v_self, __pyx_v_p, __pyx_v_l);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":136
* p[i] = pattern[i]
* self._insert(p,l)
* free(p) # <<<<<<<<<<<<<<
@@ -30168,7 +30155,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *_
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.TrieMap.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieMap.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -30176,7 +30163,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":139
*
*
* cdef _Trie_Node* _insert(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<<
@@ -30184,16 +30171,16 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_4insert(struct __pyx_obj_3_sa_TrieMap *_
* cdef _Trie_Node* node
*/
-static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__insert(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self, int *__pyx_v_pattern, int __pyx_v_pattern_len) {
+static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap__insert(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self, int *__pyx_v_pattern, int __pyx_v_pattern_len) {
int __pyx_v_i;
- struct __pyx_t_3_sa__Trie_Node *__pyx_v_node;
- struct __pyx_t_3_sa__Trie_Node *__pyx_r;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
__Pyx_RefNannySetupContext("_insert", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":142
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":142
* cdef int i
* cdef _Trie_Node* node
* if self.root[pattern[0]] == NULL: # <<<<<<<<<<<<<<
@@ -30203,19 +30190,19 @@ 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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":143
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":143
* cdef _Trie_Node* node
* if self.root[pattern[0]] == NULL:
* self.root[pattern[0]] = new_trie_node() # <<<<<<<<<<<<<<
* node = self.root[pattern[0]]
* for i from 1 <= i < pattern_len:
*/
- (__pyx_v_self->root[(__pyx_v_pattern[0])]) = __pyx_f_3_sa_new_trie_node();
+ (__pyx_v_self->root[(__pyx_v_pattern[0])]) = __pyx_f_4cdec_2sa_3_sa_new_trie_node();
goto __pyx_L3;
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":144
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":144
* if self.root[pattern[0]] == NULL:
* self.root[pattern[0]] = new_trie_node()
* node = self.root[pattern[0]] # <<<<<<<<<<<<<<
@@ -30224,7 +30211,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":145
* self.root[pattern[0]] = new_trie_node()
* node = self.root[pattern[0]]
* for i from 1 <= i < pattern_len: # <<<<<<<<<<<<<<
@@ -30234,17 +30221,17 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":146
* node = self.root[pattern[0]]
* for i from 1 <= i < pattern_len:
* node = trie_insert(node, pattern[i]) # <<<<<<<<<<<<<<
* return node
*
*/
- __pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, (__pyx_v_pattern[__pyx_v_i]));
+ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, (__pyx_v_pattern[__pyx_v_i]));
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":147
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":147
* for i from 1 <= i < pattern_len:
* node = trie_insert(node, pattern[i])
* return node # <<<<<<<<<<<<<<
@@ -30261,17 +30248,17 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__insert(struct __py
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7TrieMap_7contains(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern); /*proto*/
-static PyObject *__pyx_pw_3_sa_7TrieMap_7contains(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7TrieMap_7contains(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7TrieMap_7contains(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("contains (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7TrieMap_6contains(((struct __pyx_obj_3_sa_TrieMap *)__pyx_v_self), ((PyObject *)__pyx_v_pattern));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_v_self), ((PyObject *)__pyx_v_pattern));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":149
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":149
* return node
*
* def contains(self, pattern): # <<<<<<<<<<<<<<
@@ -30279,11 +30266,11 @@ static PyObject *__pyx_pw_3_sa_7TrieMap_7contains(PyObject *__pyx_v_self, PyObje
* cdef int i, l
*/
-static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_pattern) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_pattern) {
int *__pyx_v_p;
int __pyx_v_i;
int __pyx_v_l;
- struct __pyx_t_3_sa__Trie_Node *__pyx_v_node;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
@@ -30296,7 +30283,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":153
* cdef int i, l
* cdef _Trie_Node* node
* l = len(pattern) # <<<<<<<<<<<<<<
@@ -30306,7 +30293,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":154
* cdef _Trie_Node* node
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int)) # <<<<<<<<<<<<<<
@@ -30315,7 +30302,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":155
* l = len(pattern)
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l: # <<<<<<<<<<<<<<
@@ -30325,7 +30312,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":156
* p = <int*> malloc(l*sizeof(int))
* for i from 0 <= i < l:
* p[i] = pattern[i] # <<<<<<<<<<<<<<
@@ -30339,16 +30326,16 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":157
* for i from 0 <= i < l:
* p[i] = pattern[i]
* node = self._contains(p,l) # <<<<<<<<<<<<<<
* free(p)
* if node == NULL:
*/
- __pyx_v_node = ((struct __pyx_vtabstruct_3_sa_TrieMap *)__pyx_v_self->__pyx_vtab)->_contains(__pyx_v_self, __pyx_v_p, __pyx_v_l);
+ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_self->__pyx_vtab)->_contains(__pyx_v_self, __pyx_v_p, __pyx_v_l);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":158
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":158
* p[i] = pattern[i]
* node = self._contains(p,l)
* free(p) # <<<<<<<<<<<<<<
@@ -30357,7 +30344,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":159
* node = self._contains(p,l)
* free(p)
* if node == NULL: # <<<<<<<<<<<<<<
@@ -30367,7 +30354,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
__pyx_t_5 = ((__pyx_v_node == NULL) != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":160
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":160
* free(p)
* if node == NULL:
* return False # <<<<<<<<<<<<<<
@@ -30384,7 +30371,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":162
* return False
* else:
* return True # <<<<<<<<<<<<<<
@@ -30404,7 +30391,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.TrieMap.contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieMap.contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -30412,7 +30399,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":164
* return True
*
* cdef _Trie_Node* _contains(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<<
@@ -30420,17 +30407,17 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_6contains(struct __pyx_obj_3_sa_TrieMap
* cdef _Trie_Node* node
*/
-static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__contains(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self, int *__pyx_v_pattern, int __pyx_v_pattern_len) {
+static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap__contains(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self, int *__pyx_v_pattern, int __pyx_v_pattern_len) {
int __pyx_v_i;
- struct __pyx_t_3_sa__Trie_Node *__pyx_v_node;
- struct __pyx_t_3_sa__Trie_Node *__pyx_r;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
__Pyx_RefNannySetupContext("_contains", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":167
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":167
* cdef int i
* cdef _Trie_Node* node
* node = self.root[pattern[0]] # <<<<<<<<<<<<<<
@@ -30439,7 +30426,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":168
* cdef _Trie_Node* node
* node = self.root[pattern[0]]
* i = 1 # <<<<<<<<<<<<<<
@@ -30448,7 +30435,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":169
* node = self.root[pattern[0]]
* i = 1
* while node != NULL and i < pattern_len: # <<<<<<<<<<<<<<
@@ -30465,16 +30452,16 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":170
* i = 1
* while node != NULL and i < pattern_len:
* node = trie_find(node, pattern[i]) # <<<<<<<<<<<<<<
* i = i+1
* return node
*/
- __pyx_v_node = __pyx_f_3_sa_trie_find(__pyx_v_node, (__pyx_v_pattern[__pyx_v_i]));
+ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_find(__pyx_v_node, (__pyx_v_pattern[__pyx_v_i]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":171
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":171
* while node != NULL and i < pattern_len:
* node = trie_find(node, pattern[i])
* i = i+1 # <<<<<<<<<<<<<<
@@ -30484,7 +30471,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":172
* node = trie_find(node, pattern[i])
* i = i+1
* return node # <<<<<<<<<<<<<<
@@ -30501,17 +30488,17 @@ static struct __pyx_t_3_sa__Trie_Node *__pyx_f_3_sa_7TrieMap__contains(struct __
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7TrieMap_9toMap(PyObject *__pyx_v_self, PyObject *__pyx_v_flag); /*proto*/
-static PyObject *__pyx_pw_3_sa_7TrieMap_9toMap(PyObject *__pyx_v_self, PyObject *__pyx_v_flag) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7TrieMap_9toMap(PyObject *__pyx_v_self, PyObject *__pyx_v_flag); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7TrieMap_9toMap(PyObject *__pyx_v_self, PyObject *__pyx_v_flag) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("toMap (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_7TrieMap_8toMap(((struct __pyx_obj_3_sa_TrieMap *)__pyx_v_self), ((PyObject *)__pyx_v_flag));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_v_self), ((PyObject *)__pyx_v_flag));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":174
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":174
* return node
*
* def toMap(self, flag): # <<<<<<<<<<<<<<
@@ -30519,7 +30506,7 @@ static PyObject *__pyx_pw_3_sa_7TrieMap_9toMap(PyObject *__pyx_v_self, PyObject
*
*/
-static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_flag) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_self, PyObject *__pyx_v_flag) {
int __pyx_v_i;
int __pyx_v_include_zeros;
PyObject *__pyx_v_result = NULL;
@@ -30534,7 +30521,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":177
* cdef int i, include_zeros
*
* if flag: # <<<<<<<<<<<<<<
@@ -30544,7 +30531,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":178
*
* if flag:
* include_zeros=1 # <<<<<<<<<<<<<<
@@ -30556,7 +30543,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":180
* include_zeros=1
* else:
* include_zeros=0 # <<<<<<<<<<<<<<
@@ -30567,7 +30554,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":181
* else:
* include_zeros=0
* result = {} # <<<<<<<<<<<<<<
@@ -30579,7 +30566,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
__pyx_v_result = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":182
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":182
* include_zeros=0
* result = {}
* for i from 0 <= i < self.V: # <<<<<<<<<<<<<<
@@ -30589,7 +30576,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":183
* result = {}
* for i from 0 <= i < self.V:
* if self.root[i] != NULL: # <<<<<<<<<<<<<<
@@ -30599,7 +30586,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":184
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":184
* for i from 0 <= i < self.V:
* if self.root[i] != NULL:
* trie_node_to_map(self.root[i], result, (i,), include_zeros) # <<<<<<<<<<<<<<
@@ -30613,7 +30600,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = __pyx_f_3_sa_trie_node_to_map((__pyx_v_self->root[__pyx_v_i]), ((PyObject *)__pyx_v_result), ((PyObject *)__pyx_t_4), __pyx_v_include_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4cdec_2sa_3_sa_trie_node_to_map((__pyx_v_self->root[__pyx_v_i]), ((PyObject *)__pyx_v_result), ((PyObject *)__pyx_t_4), __pyx_v_include_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -30622,7 +30609,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":185
* if self.root[i] != NULL:
* trie_node_to_map(self.root[i], result, (i,), include_zeros)
* return result # <<<<<<<<<<<<<<
@@ -30639,7 +30626,7 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.TrieMap.toMap", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieMap.toMap", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
@@ -30649,8 +30636,8 @@ static PyObject *__pyx_pf_3_sa_7TrieMap_8toMap(struct __pyx_obj_3_sa_TrieMap *__
}
/* Python wrapper */
-static int __pyx_pw_3_sa_14Precomputation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_14Precomputation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_14Precomputation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_14Precomputation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_fsarray = 0;
PyObject *__pyx_v_from_stats = 0;
PyObject *__pyx_v_from_binary = 0;
@@ -30670,7 +30657,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_72,&__pyx_n_s__max_length,&__pyx_n_s__max_nonterminals,&__pyx_n_s_73,&__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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":200
* cdef write_map(self, m, FILE* f)
*
* def __cinit__(self, fsarray=None, from_stats=None, from_binary=None, # <<<<<<<<<<<<<<
@@ -30782,16 +30769,16 @@ static int __pyx_pw_3_sa_14Precomputation_1__cinit__(PyObject *__pyx_v_self, PyO
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Precomputation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Precomputation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_14Precomputation___cinit__(((struct __pyx_obj_3_sa_Precomputation *)__pyx_v_self), __pyx_v_fsarray, __pyx_v_from_stats, __pyx_v_from_binary, __pyx_v_precompute_rank, __pyx_v_precompute_secondary_rank, __pyx_v_max_length, __pyx_v_max_nonterminals, __pyx_v_train_max_initial_size, __pyx_v_train_min_gap_size);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)__pyx_v_self), __pyx_v_fsarray, __pyx_v_from_stats, __pyx_v_from_binary, __pyx_v_precompute_rank, __pyx_v_precompute_secondary_rank, __pyx_v_max_length, __pyx_v_max_nonterminals, __pyx_v_train_max_initial_size, __pyx_v_train_min_gap_size);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precomputation *__pyx_v_self, PyObject *__pyx_v_fsarray, PyObject *__pyx_v_from_stats, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_precompute_rank, PyObject *__pyx_v_precompute_secondary_rank, PyObject *__pyx_v_max_length, PyObject *__pyx_v_max_nonterminals, PyObject *__pyx_v_train_max_initial_size, PyObject *__pyx_v_train_min_gap_size) {
+static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_self, PyObject *__pyx_v_fsarray, PyObject *__pyx_v_from_stats, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_precompute_rank, PyObject *__pyx_v_precompute_secondary_rank, PyObject *__pyx_v_max_length, PyObject *__pyx_v_max_nonterminals, PyObject *__pyx_v_train_max_initial_size, PyObject *__pyx_v_train_min_gap_size) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -30804,7 +30791,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":204
* max_length=5, max_nonterminals=2,
* train_max_initial_size=10, train_min_gap_size=2):
* self.precompute_rank = precompute_rank # <<<<<<<<<<<<<<
@@ -30814,7 +30801,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":205
* train_max_initial_size=10, train_min_gap_size=2):
* self.precompute_rank = precompute_rank
* self.precompute_secondary_rank = precompute_secondary_rank # <<<<<<<<<<<<<<
@@ -30824,7 +30811,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":206
* self.precompute_rank = precompute_rank
* self.precompute_secondary_rank = precompute_secondary_rank
* self.max_length = max_length # <<<<<<<<<<<<<<
@@ -30834,7 +30821,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":207
* self.precompute_secondary_rank = precompute_secondary_rank
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals # <<<<<<<<<<<<<<
@@ -30844,7 +30831,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":208
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals
* self.train_max_initial_size = train_max_initial_size # <<<<<<<<<<<<<<
@@ -30854,7 +30841,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":209
* self.max_nonterminals = max_nonterminals
* self.train_max_initial_size = train_max_initial_size
* self.train_min_gap_size = train_min_gap_size # <<<<<<<<<<<<<<
@@ -30864,7 +30851,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":210
* self.train_max_initial_size = train_max_initial_size
* self.train_min_gap_size = train_min_gap_size
* if from_binary: # <<<<<<<<<<<<<<
@@ -30874,7 +30861,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":211
* self.train_min_gap_size = train_min_gap_size
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -30896,7 +30883,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":212
* if from_binary:
* self.read_binary(from_binary)
* elif from_stats: # <<<<<<<<<<<<<<
@@ -30906,7 +30893,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":213
* self.read_binary(from_binary)
* elif from_stats:
* self.precompute(from_stats, fsarray) # <<<<<<<<<<<<<<
@@ -30938,7 +30925,7 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.Precomputation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Precomputation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -30946,8 +30933,8 @@ static int __pyx_pf_3_sa_14Precomputation___cinit__(struct __pyx_obj_3_sa_Precom
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_14Precomputation_3read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_14Precomputation_3read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_14Precomputation_3read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_14Precomputation_3read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -30960,16 +30947,16 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_3read_binary(PyObject *__pyx_v_s
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Precomputation.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Precomputation.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_14Precomputation_2read_binary(((struct __pyx_obj_3_sa_Precomputation *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(((struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":216
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":216
*
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -30977,7 +30964,7 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_3read_binary(PyObject *__pyx_v_s
* f = fopen(filename, "r")
*/
-static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_sa_Precomputation *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -30987,7 +30974,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":218
* def read_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -30996,7 +30983,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":219
* cdef FILE* f
* f = fopen(filename, "r")
* fread(&(self.precompute_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31005,7 +30992,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":220
* f = fopen(filename, "r")
* fread(&(self.precompute_rank), sizeof(int), 1, f)
* fread(&(self.precompute_secondary_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31014,7 +31001,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":221
* fread(&(self.precompute_rank), sizeof(int), 1, f)
* fread(&(self.precompute_secondary_rank), sizeof(int), 1, f)
* fread(&(self.max_length), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31023,7 +31010,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":222
* fread(&(self.precompute_secondary_rank), sizeof(int), 1, f)
* fread(&(self.max_length), sizeof(int), 1, f)
* fread(&(self.max_nonterminals), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31032,7 +31019,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":223
* fread(&(self.max_length), sizeof(int), 1, f)
* fread(&(self.max_nonterminals), sizeof(int), 1, f)
* fread(&(self.train_max_initial_size), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31041,7 +31028,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":224
* fread(&(self.max_nonterminals), sizeof(int), 1, f)
* fread(&(self.train_max_initial_size), sizeof(int), 1, f)
* fread(&(self.train_min_gap_size), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31050,14 +31037,14 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":225
* fread(&(self.train_max_initial_size), sizeof(int), 1, f)
* fread(&(self.train_min_gap_size), sizeof(int), 1, f)
* self.precomputed_index = self.read_map(f) # <<<<<<<<<<<<<<
* self.precomputed_collocations = self.read_map(f)
* fclose(f)
*/
- __pyx_t_1 = ((struct __pyx_vtabstruct_3_sa_Precomputation *)__pyx_v_self->__pyx_vtab)->read_map(__pyx_v_self, __pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Precomputation *)__pyx_v_self->__pyx_vtab)->read_map(__pyx_v_self, __pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->precomputed_index);
@@ -31065,14 +31052,14 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":226
* fread(&(self.train_min_gap_size), sizeof(int), 1, f)
* self.precomputed_index = self.read_map(f)
* self.precomputed_collocations = self.read_map(f) # <<<<<<<<<<<<<<
* fclose(f)
*
*/
- __pyx_t_1 = ((struct __pyx_vtabstruct_3_sa_Precomputation *)__pyx_v_self->__pyx_vtab)->read_map(__pyx_v_self, __pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Precomputation *)__pyx_v_self->__pyx_vtab)->read_map(__pyx_v_self, __pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->precomputed_collocations);
@@ -31080,7 +31067,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":227
* self.precomputed_index = self.read_map(f)
* self.precomputed_collocations = self.read_map(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -31093,7 +31080,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.Precomputation.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Precomputation.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -31102,8 +31089,8 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_2read_binary(struct __pyx_obj_3_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_14Precomputation_5write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_14Precomputation_5write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_14Precomputation_5write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_14Precomputation_5write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -31116,16 +31103,16 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_5write_binary(PyObject *__pyx_v_
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Precomputation.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Precomputation.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_14Precomputation_4write_binary(((struct __pyx_obj_3_sa_Precomputation *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(((struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":230
+/* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":230
*
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -31133,7 +31120,7 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_5write_binary(PyObject *__pyx_v_
* f = fopen(filename, "w")
*/
-static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3_sa_Precomputation *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -31144,7 +31131,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":232
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -31153,7 +31140,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":233
* cdef FILE* f
* f = fopen(filename, "w")
* fwrite(&(self.precompute_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31162,7 +31149,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":234
* f = fopen(filename, "w")
* fwrite(&(self.precompute_rank), sizeof(int), 1, f)
* fwrite(&(self.precompute_secondary_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31171,7 +31158,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":235
* fwrite(&(self.precompute_rank), sizeof(int), 1, f)
* fwrite(&(self.precompute_secondary_rank), sizeof(int), 1, f)
* fwrite(&(self.max_length), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31180,7 +31167,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":236
* fwrite(&(self.precompute_secondary_rank), sizeof(int), 1, f)
* fwrite(&(self.max_length), sizeof(int), 1, f)
* fwrite(&(self.max_nonterminals), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31189,7 +31176,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":237
* fwrite(&(self.max_length), sizeof(int), 1, f)
* fwrite(&(self.max_nonterminals), sizeof(int), 1, f)
* fwrite(&(self.train_max_initial_size), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31198,7 +31185,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":238
* fwrite(&(self.max_nonterminals), sizeof(int), 1, f)
* fwrite(&(self.train_max_initial_size), sizeof(int), 1, f)
* fwrite(&(self.train_min_gap_size), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31207,7 +31194,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":239
* fwrite(&(self.train_max_initial_size), sizeof(int), 1, f)
* fwrite(&(self.train_min_gap_size), sizeof(int), 1, f)
* self.write_map(self.precomputed_index, f) # <<<<<<<<<<<<<<
@@ -31216,12 +31203,12 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
*/
__pyx_t_1 = __pyx_v_self->precomputed_index;
__Pyx_INCREF(__pyx_t_1);
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_Precomputation *)__pyx_v_self->__pyx_vtab)->write_map(__pyx_v_self, __pyx_t_1, __pyx_v_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Precomputation *)__pyx_v_self->__pyx_vtab)->write_map(__pyx_v_self, __pyx_t_1, __pyx_v_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":240
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":240
* fwrite(&(self.train_min_gap_size), sizeof(int), 1, f)
* self.write_map(self.precomputed_index, f)
* self.write_map(self.precomputed_collocations, f) # <<<<<<<<<<<<<<
@@ -31230,12 +31217,12 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
*/
__pyx_t_2 = __pyx_v_self->precomputed_collocations;
__Pyx_INCREF(__pyx_t_2);
- __pyx_t_1 = ((struct __pyx_vtabstruct_3_sa_Precomputation *)__pyx_v_self->__pyx_vtab)->write_map(__pyx_v_self, __pyx_t_2, __pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Precomputation *)__pyx_v_self->__pyx_vtab)->write_map(__pyx_v_self, __pyx_t_2, __pyx_v_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 240; __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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":241
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":241
* self.write_map(self.precomputed_index, f)
* self.write_map(self.precomputed_collocations, f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -31249,7 +31236,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.Precomputation.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Precomputation.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -31257,7 +31244,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":244
*
*
* cdef write_map(self, m, FILE* f): # <<<<<<<<<<<<<<
@@ -31265,10 +31252,10 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_4write_binary(struct __pyx_obj_3
* cdef IntList arr
*/
-static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __pyx_obj_3_sa_Precomputation *__pyx_v_self, PyObject *__pyx_v_m, FILE *__pyx_v_f) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_self, PyObject *__pyx_v_m, FILE *__pyx_v_f) {
int __pyx_v_i;
int __pyx_v_N;
- struct __pyx_obj_3_sa_IntList *__pyx_v_arr = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_arr = 0;
PyObject *__pyx_v_pattern = NULL;
PyObject *__pyx_v_val = NULL;
PyObject *__pyx_v_word_id = NULL;
@@ -31288,7 +31275,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":248
* cdef IntList arr
*
* N = len(m) # <<<<<<<<<<<<<<
@@ -31298,7 +31285,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":249
*
* N = len(m)
* fwrite(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31307,7 +31294,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":250
* N = len(m)
* fwrite(&(N), sizeof(int), 1, f)
* for pattern, val in m.iteritems(): # <<<<<<<<<<<<<<
@@ -31337,7 +31324,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":251
* fwrite(&(N), sizeof(int), 1, f)
* for pattern, val in m.iteritems():
* N = len(pattern) # <<<<<<<<<<<<<<
@@ -31347,7 +31334,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":252
* for pattern, val in m.iteritems():
* N = len(pattern)
* fwrite(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31356,7 +31343,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":253
* N = len(pattern)
* fwrite(&(N), sizeof(int), 1, f)
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -31401,7 +31388,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":254
* fwrite(&(N), sizeof(int), 1, f)
* for word_id in pattern:
* i = word_id # <<<<<<<<<<<<<<
@@ -31411,7 +31398,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":255
* for word_id in pattern:
* i = word_id
* fwrite(&(i), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31422,26 +31409,26 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":256
* i = word_id
* fwrite(&(i), sizeof(int), 1, f)
* arr = val # <<<<<<<<<<<<<<
* arr.write_handle(f)
*
*/
- if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_val);
__Pyx_XDECREF(((PyObject *)__pyx_v_arr));
- __pyx_v_arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_v_val);
+ __pyx_v_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_val);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":257
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":257
* fwrite(&(i), sizeof(int), 1, f)
* arr = val
* arr.write_handle(f) # <<<<<<<<<<<<<<
*
*
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_arr->__pyx_vtab)->write_handle(__pyx_v_arr, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_arr->__pyx_vtab)->write_handle(__pyx_v_arr, __pyx_v_f);
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -31451,7 +31438,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("_sa.Precomputation.write_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Precomputation.write_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_arr);
@@ -31463,7 +31450,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":260
*
*
* cdef read_map(self, FILE* f): # <<<<<<<<<<<<<<
@@ -31471,13 +31458,13 @@ static PyObject *__pyx_f_3_sa_14Precomputation_write_map(CYTHON_UNUSED struct __
* cdef IntList arr
*/
-static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __pyx_obj_3_sa_Precomputation *__pyx_v_self, FILE *__pyx_v_f) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_self, FILE *__pyx_v_f) {
int __pyx_v_i;
CYTHON_UNUSED int __pyx_v_j;
CYTHON_UNUSED int __pyx_v_k;
int __pyx_v_word_id;
int __pyx_v_N;
- struct __pyx_obj_3_sa_IntList *__pyx_v_arr = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_arr = 0;
PyObject *__pyx_v_m = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_r = NULL;
@@ -31491,7 +31478,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":264
* cdef IntList arr
*
* m = {} # <<<<<<<<<<<<<<
@@ -31503,7 +31490,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
__pyx_v_m = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":265
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":265
*
* m = {}
* fread(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31512,7 +31499,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":266
* m = {}
* fread(&(N), sizeof(int), 1, f)
* for j from 0 <= j < N: # <<<<<<<<<<<<<<
@@ -31522,7 +31509,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":267
* fread(&(N), sizeof(int), 1, f)
* for j from 0 <= j < N:
* fread(&(i), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31531,7 +31518,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":268
* for j from 0 <= j < N:
* fread(&(i), sizeof(int), 1, f)
* key = () # <<<<<<<<<<<<<<
@@ -31542,7 +31529,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":269
* fread(&(i), sizeof(int), 1, f)
* key = ()
* for k from 0 <= k < i: # <<<<<<<<<<<<<<
@@ -31552,7 +31539,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":270
* key = ()
* for k from 0 <= k < i:
* fread(&(word_id), sizeof(int), 1, f) # <<<<<<<<<<<<<<
@@ -31561,7 +31548,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":271
* for k from 0 <= k < i:
* fread(&(word_id), sizeof(int), 1, f)
* key = key + (word_id,) # <<<<<<<<<<<<<<
@@ -31583,29 +31570,29 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":272
* fread(&(word_id), sizeof(int), 1, f)
* key = key + (word_id,)
* arr = IntList() # <<<<<<<<<<<<<<
* arr.read_handle(f)
* m[key] = arr
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF(((PyObject *)__pyx_v_arr));
- __pyx_v_arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":273
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":273
* key = key + (word_id,)
* arr = IntList()
* arr.read_handle(f) # <<<<<<<<<<<<<<
* m[key] = arr
* return m
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_arr->__pyx_vtab)->read_handle(__pyx_v_arr, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":274
* arr = IntList()
* arr.read_handle(f)
* m[key] = arr # <<<<<<<<<<<<<<
@@ -31615,7 +31602,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":275
* arr.read_handle(f)
* m[key] = arr
* return m # <<<<<<<<<<<<<<
@@ -31632,7 +31619,7 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.Precomputation.read_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Precomputation.read_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_arr);
@@ -31644,10 +31631,10 @@ static PyObject *__pyx_f_3_sa_14Precomputation_read_map(CYTHON_UNUSED struct __p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_14Precomputation_7precompute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_14Precomputation_7precompute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_14Precomputation_7precompute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_14Precomputation_7precompute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_stats = 0;
- struct __pyx_obj_3_sa_SuffixArray *__pyx_v_sarray = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_sarray = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -31687,18 +31674,18 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_7precompute(PyObject *__pyx_v_se
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
__pyx_v_stats = values[0];
- __pyx_v_sarray = ((struct __pyx_obj_3_sa_SuffixArray *)values[1]);
+ __pyx_v_sarray = ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)values[1]);
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("precompute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Precomputation.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Precomputation.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sarray), __pyx_ptype_3_sa_SuffixArray, 1, "sarray", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_14Precomputation_6precompute(((struct __pyx_obj_3_sa_Precomputation *)__pyx_v_self), __pyx_v_stats, __pyx_v_sarray);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sarray), __pyx_ptype_4cdec_2sa_3_sa_SuffixArray, 1, "sarray", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(((struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)__pyx_v_self), __pyx_v_stats, __pyx_v_sarray);
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = NULL;
@@ -31707,7 +31694,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":278
*
*
* def precompute(self, stats, SuffixArray sarray): # <<<<<<<<<<<<<<
@@ -31715,7 +31702,7 @@ static PyObject *__pyx_pw_3_sa_14Precomputation_7precompute(PyObject *__pyx_v_se
* cdef DataArray darray = sarray.darray
*/
-static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_sa_Precomputation *__pyx_v_self, PyObject *__pyx_v_stats, struct __pyx_obj_3_sa_SuffixArray *__pyx_v_sarray) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_self, PyObject *__pyx_v_stats, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_sarray) {
int __pyx_v_i;
int __pyx_v_l;
int __pyx_v_N;
@@ -31732,15 +31719,15 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
int __pyx_v_is_super;
int __pyx_v_sent_count;
int __pyx_v_max_rank;
- struct __pyx_obj_3_sa_DataArray *__pyx_v_darray = 0;
- struct __pyx_obj_3_sa_IntList *__pyx_v_data = 0;
- struct __pyx_obj_3_sa_IntList *__pyx_v_queue = 0;
- struct __pyx_obj_3_sa_IntList *__pyx_v_cost_by_rank = 0;
- struct __pyx_obj_3_sa_IntList *__pyx_v_count_by_rank = 0;
- struct __pyx_obj_3_sa_TrieMap *__pyx_v_frequent_patterns = 0;
- struct __pyx_obj_3_sa_TrieMap *__pyx_v_super_frequent_patterns = 0;
- struct __pyx_obj_3_sa_TrieMap *__pyx_v_collocations = 0;
- struct __pyx_t_3_sa__Trie_Node *__pyx_v_node;
+ struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_darray = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_data = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_queue = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_cost_by_rank = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_count_by_rank = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_frequent_patterns = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_super_frequent_patterns = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *__pyx_v_collocations = 0;
+ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_v_node;
PyObject *__pyx_v_I_set = NULL;
PyObject *__pyx_v_J_set = NULL;
PyObject *__pyx_v_J2_set = NULL;
@@ -31793,7 +31780,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":280
* def precompute(self, stats, SuffixArray sarray):
* cdef int i, l, N, max_pattern_len, i1, l1, i2, l2, i3, l3, ptr1, ptr2, ptr3, is_super, sent_count, max_rank
* cdef DataArray darray = sarray.darray # <<<<<<<<<<<<<<
@@ -31802,10 +31789,10 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_t_1 = ((PyObject *)__pyx_v_sarray->darray);
__Pyx_INCREF(__pyx_t_1);
- __pyx_v_darray = ((struct __pyx_obj_3_sa_DataArray *)__pyx_t_1);
+ __pyx_v_darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":285
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":285
* cdef _Trie_Node* node
*
* data = darray.data # <<<<<<<<<<<<<<
@@ -31814,10 +31801,10 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_t_1 = ((PyObject *)__pyx_v_darray->data);
__Pyx_INCREF(__pyx_t_1);
- __pyx_v_data = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_data = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":287
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":287
* data = darray.data
*
* frequent_patterns = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<<
@@ -31835,13 +31822,13 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_TrieMap)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_TrieMap)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_v_frequent_patterns = ((struct __pyx_obj_3_sa_TrieMap *)__pyx_t_1);
+ __pyx_v_frequent_patterns = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":288
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":288
*
* frequent_patterns = TrieMap(len(darray.id2word))
* super_frequent_patterns = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<<
@@ -31859,13 +31846,13 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_TrieMap)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_TrieMap)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_v_super_frequent_patterns = ((struct __pyx_obj_3_sa_TrieMap *)__pyx_t_1);
+ __pyx_v_super_frequent_patterns = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":289
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":289
* frequent_patterns = TrieMap(len(darray.id2word))
* super_frequent_patterns = TrieMap(len(darray.id2word))
* collocations = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<<
@@ -31883,13 +31870,13 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_TrieMap)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_TrieMap)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_v_collocations = ((struct __pyx_obj_3_sa_TrieMap *)__pyx_t_1);
+ __pyx_v_collocations = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":291
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":291
* collocations = TrieMap(len(darray.id2word))
*
* I_set = set() # <<<<<<<<<<<<<<
@@ -31901,7 +31888,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_I_set = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":292
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":292
*
* I_set = set()
* J_set = set() # <<<<<<<<<<<<<<
@@ -31913,7 +31900,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_J_set = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":293
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":293
* I_set = set()
* J_set = set()
* J2_set = set() # <<<<<<<<<<<<<<
@@ -31925,7 +31912,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_J2_set = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":294
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":294
* J_set = set()
* J2_set = set()
* IJ_set = set() # <<<<<<<<<<<<<<
@@ -31937,7 +31924,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_IJ_set = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":295
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":295
* J2_set = set()
* IJ_set = set()
* pattern_rank = {} # <<<<<<<<<<<<<<
@@ -31949,7 +31936,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern_rank = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":297
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":297
* pattern_rank = {}
*
* logger.info("Precomputing frequent intersections") # <<<<<<<<<<<<<<
@@ -31966,7 +31953,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":298
*
* logger.info("Precomputing frequent intersections")
* cdef float start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -31982,7 +31969,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_start_time = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":300
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":300
* cdef float start_time = monitor_cpu()
*
* max_pattern_len = 0 # <<<<<<<<<<<<<<
@@ -31991,7 +31978,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":301
*
* max_pattern_len = 0
* for rank, (_, _, phrase) in enumerate(stats): # <<<<<<<<<<<<<<
@@ -32110,7 +32097,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_3 = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":302
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":302
* max_pattern_len = 0
* for rank, (_, _, phrase) in enumerate(stats):
* if rank >= self.precompute_rank: # <<<<<<<<<<<<<<
@@ -32125,7 +32112,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":303
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":303
* for rank, (_, _, phrase) in enumerate(stats):
* if rank >= self.precompute_rank:
* break # <<<<<<<<<<<<<<
@@ -32137,7 +32124,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":304
* if rank >= self.precompute_rank:
* break
* max_pattern_len = max(max_pattern_len, len(phrase)) # <<<<<<<<<<<<<<
@@ -32153,7 +32140,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__pyx_v_max_pattern_len = __pyx_t_15;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":305
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":305
* break
* max_pattern_len = max(max_pattern_len, len(phrase))
* frequent_patterns.insert(phrase) # <<<<<<<<<<<<<<
@@ -32173,7 +32160,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":306
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":306
* max_pattern_len = max(max_pattern_len, len(phrase))
* frequent_patterns.insert(phrase)
* I_set.add(phrase) # <<<<<<<<<<<<<<
@@ -32182,7 +32169,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_t_16 = PySet_Add(__pyx_v_I_set, __pyx_v_phrase); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":307
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":307
* frequent_patterns.insert(phrase)
* I_set.add(phrase)
* pattern_rank[phrase] = rank # <<<<<<<<<<<<<<
@@ -32191,7 +32178,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":308
* I_set.add(phrase)
* pattern_rank[phrase] = rank
* if rank < self.precompute_secondary_rank: # <<<<<<<<<<<<<<
@@ -32206,7 +32193,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":309
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":309
* pattern_rank[phrase] = rank
* if rank < self.precompute_secondary_rank:
* super_frequent_patterns.insert(phrase) # <<<<<<<<<<<<<<
@@ -32226,7 +32213,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":310
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":310
* if rank < self.precompute_secondary_rank:
* super_frequent_patterns.insert(phrase)
* J_set.add(phrase) # <<<<<<<<<<<<<<
@@ -32242,7 +32229,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":312
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":312
* J_set.add(phrase)
*
* queue = IntList(increment=1000) # <<<<<<<<<<<<<<
@@ -32252,13 +32239,13 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__increment), __pyx_int_1000) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_v_queue = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_queue = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":314
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":314
* queue = IntList(increment=1000)
*
* logger.info(" Computing inverted indexes...") # <<<<<<<<<<<<<<
@@ -32275,7 +32262,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":315
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":315
*
* logger.info(" Computing inverted indexes...")
* N = len(data) # <<<<<<<<<<<<<<
@@ -32285,7 +32272,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":316
* logger.info(" Computing inverted indexes...")
* N = len(data)
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -32295,7 +32282,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_14 = __pyx_v_N;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":317
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":317
* N = len(data)
* for i from 0 <= i < N:
* sa_word_id = data.arr[i] # <<<<<<<<<<<<<<
@@ -32304,7 +32291,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":318
* for i from 0 <= i < N:
* sa_word_id = data.arr[i]
* if sa_word_id == 1: # <<<<<<<<<<<<<<
@@ -32314,19 +32301,19 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_12 = ((__pyx_v_sa_word_id == 1) != 0);
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":319
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":319
* sa_word_id = data.arr[i]
* if sa_word_id == 1:
* queue._append(-1) # <<<<<<<<<<<<<<
* else:
* for l from 1 <= l <= max_pattern_len:
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_queue->__pyx_vtab)->_append(__pyx_v_queue, -1);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_queue->__pyx_vtab)->_append(__pyx_v_queue, -1);
goto __pyx_L11;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":321
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":321
* queue._append(-1)
* else:
* for l from 1 <= l <= max_pattern_len: # <<<<<<<<<<<<<<
@@ -32336,16 +32323,16 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_17 = __pyx_v_max_pattern_len;
for (__pyx_v_l = 1; __pyx_v_l <= __pyx_t_17; __pyx_v_l++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":322
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":322
* else:
* for l from 1 <= l <= max_pattern_len:
* node = frequent_patterns._contains(data.arr+i, l) # <<<<<<<<<<<<<<
* if node == NULL:
* break
*/
- __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);
+ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i), __pyx_v_l);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":323
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":323
* for l from 1 <= l <= max_pattern_len:
* node = frequent_patterns._contains(data.arr+i, l)
* if node == NULL: # <<<<<<<<<<<<<<
@@ -32355,7 +32342,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_12 = ((__pyx_v_node == NULL) != 0);
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":324
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":324
* node = frequent_patterns._contains(data.arr+i, l)
* if node == NULL:
* break # <<<<<<<<<<<<<<
@@ -32367,32 +32354,32 @@ 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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":325
* if node == NULL:
* break
* queue._append(i) # <<<<<<<<<<<<<<
* queue._append(l)
* trie_node_data_append(node, i)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_queue->__pyx_vtab)->_append(__pyx_v_queue, __pyx_v_i);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":326
* break
* queue._append(i)
* queue._append(l) # <<<<<<<<<<<<<<
* trie_node_data_append(node, i)
*
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_queue->__pyx_vtab)->_append(__pyx_v_queue, __pyx_v_l);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":327
* queue._append(i)
* queue._append(l)
* trie_node_data_append(node, i) # <<<<<<<<<<<<<<
*
* logger.info(" Computing collocations...")
*/
- __pyx_t_1 = __pyx_f_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4cdec_2sa_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
@@ -32401,7 +32388,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":329
* trie_node_data_append(node, i)
*
* logger.info(" Computing collocations...") # <<<<<<<<<<<<<<
@@ -32418,7 +32405,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":330
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":330
*
* logger.info(" Computing collocations...")
* N = len(queue) # <<<<<<<<<<<<<<
@@ -32428,7 +32415,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":331
* logger.info(" Computing collocations...")
* N = len(queue)
* ptr1 = 0 # <<<<<<<<<<<<<<
@@ -32437,7 +32424,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":332
* N = len(queue)
* ptr1 = 0
* sent_count = 0 # <<<<<<<<<<<<<<
@@ -32446,7 +32433,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":333
* ptr1 = 0
* sent_count = 0
* while ptr1 < N: # main loop # <<<<<<<<<<<<<<
@@ -32457,7 +32444,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_12 = ((__pyx_v_ptr1 < __pyx_v_N) != 0);
if (!__pyx_t_12) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":334
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":334
* sent_count = 0
* while ptr1 < N: # main loop
* i1 = queue.arr[ptr1] # <<<<<<<<<<<<<<
@@ -32466,7 +32453,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":335
* while ptr1 < N: # main loop
* i1 = queue.arr[ptr1]
* if i1 > -1: # <<<<<<<<<<<<<<
@@ -32476,7 +32463,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_12 = ((__pyx_v_i1 > -1) != 0);
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":336
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":336
* i1 = queue.arr[ptr1]
* if i1 > -1:
* l1 = queue.arr[ptr1+1] # <<<<<<<<<<<<<<
@@ -32485,7 +32472,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":337
* if i1 > -1:
* l1 = queue.arr[ptr1+1]
* ptr2 = ptr1 + 2 # <<<<<<<<<<<<<<
@@ -32494,7 +32481,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":338
* l1 = queue.arr[ptr1+1]
* ptr2 = ptr1 + 2
* while ptr2 < N: # <<<<<<<<<<<<<<
@@ -32505,7 +32492,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_12 = ((__pyx_v_ptr2 < __pyx_v_N) != 0);
if (!__pyx_t_12) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":339
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":339
* ptr2 = ptr1 + 2
* while ptr2 < N:
* i2 = queue.arr[ptr2] # <<<<<<<<<<<<<<
@@ -32514,7 +32501,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":340
* while ptr2 < N:
* i2 = queue.arr[ptr2]
* if i2 == -1 or i2 - i1 >= self.train_max_initial_size: # <<<<<<<<<<<<<<
@@ -32530,7 +32517,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":341
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":341
* i2 = queue.arr[ptr2]
* if i2 == -1 or i2 - i1 >= self.train_max_initial_size:
* break # <<<<<<<<<<<<<<
@@ -32542,7 +32529,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":342
* if i2 == -1 or i2 - i1 >= self.train_max_initial_size:
* break
* l2 = queue.arr[ptr2+1] # <<<<<<<<<<<<<<
@@ -32551,7 +32538,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":343
* break
* l2 = queue.arr[ptr2+1]
* if (i2 - i1 - l1 >= self.train_min_gap_size and # <<<<<<<<<<<<<<
@@ -32561,7 +32548,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_19 = ((((__pyx_v_i2 - __pyx_v_i1) - __pyx_v_l1) >= __pyx_v_self->train_min_gap_size) != 0);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":344
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":344
* l2 = queue.arr[ptr2+1]
* if (i2 - i1 - l1 >= self.train_min_gap_size and
* i2 + l2 - i1 <= self.train_max_initial_size and # <<<<<<<<<<<<<<
@@ -32571,7 +32558,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_12 = ((((__pyx_v_i2 + __pyx_v_l2) - __pyx_v_i1) <= __pyx_v_self->train_max_initial_size) != 0);
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":345
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":345
* if (i2 - i1 - l1 >= self.train_min_gap_size and
* i2 + l2 - i1 <= self.train_max_initial_size and
* l1+l2+1 <= self.max_length): # <<<<<<<<<<<<<<
@@ -32589,25 +32576,25 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":346
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":346
* i2 + l2 - i1 <= self.train_max_initial_size and
* l1+l2+1 <= self.max_length):
* node = collocations._insert(data.arr+i1, l1) # <<<<<<<<<<<<<<
* node = trie_insert(node, -1)
* for i from i2 <= i < i2+l2:
*/
- __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);
+ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_collocations->__pyx_vtab)->_insert(__pyx_v_collocations, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":347
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":347
* l1+l2+1 <= self.max_length):
* node = collocations._insert(data.arr+i1, l1)
* node = trie_insert(node, -1) # <<<<<<<<<<<<<<
* for i from i2 <= i < i2+l2:
* node = trie_insert(node, data.arr[i])
*/
- __pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, -1);
+ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, -1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":348
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":348
* node = collocations._insert(data.arr+i1, l1)
* node = trie_insert(node, -1)
* for i from i2 <= i < i2+l2: # <<<<<<<<<<<<<<
@@ -32617,59 +32604,59 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_14 = (__pyx_v_i2 + __pyx_v_l2);
for (__pyx_v_i = __pyx_v_i2; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":349
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":349
* node = trie_insert(node, -1)
* for i from i2 <= i < i2+l2:
* node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<<
* trie_node_data_append(node, i1)
* trie_node_data_append(node, i2)
*/
- __pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i]));
+ __pyx_v_node = __pyx_f_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":350
* for i from i2 <= i < i2+l2:
* node = trie_insert(node, data.arr[i])
* trie_node_data_append(node, i1) # <<<<<<<<<<<<<<
* trie_node_data_append(node, i2)
* if super_frequent_patterns._contains(data.arr+i2, l2) != NULL:
*/
- __pyx_t_1 = __pyx_f_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4cdec_2sa_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":351
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":351
* node = trie_insert(node, data.arr[i])
* trie_node_data_append(node, i1)
* trie_node_data_append(node, i2) # <<<<<<<<<<<<<<
* if super_frequent_patterns._contains(data.arr+i2, l2) != NULL:
* if super_frequent_patterns._contains(data.arr+i1, l1) != NULL:
*/
- __pyx_t_1 = __pyx_f_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4cdec_2sa_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":352
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":352
* trie_node_data_append(node, i1)
* trie_node_data_append(node, i2)
* if super_frequent_patterns._contains(data.arr+i2, l2) != NULL: # <<<<<<<<<<<<<<
* if super_frequent_patterns._contains(data.arr+i1, l1) != NULL:
* is_super = 1
*/
- __pyx_t_12 = ((((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) != 0);
+ __pyx_t_12 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_super_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_super_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i2), __pyx_v_l2) != NULL) != 0);
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":353
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":353
* trie_node_data_append(node, i2)
* if super_frequent_patterns._contains(data.arr+i2, l2) != NULL:
* if super_frequent_patterns._contains(data.arr+i1, l1) != NULL: # <<<<<<<<<<<<<<
* is_super = 1
* else:
*/
- __pyx_t_12 = ((((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) != 0);
+ __pyx_t_12 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_super_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_super_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1) != NULL) != 0);
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":354
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":354
* if super_frequent_patterns._contains(data.arr+i2, l2) != NULL:
* if super_frequent_patterns._contains(data.arr+i1, l1) != NULL:
* is_super = 1 # <<<<<<<<<<<<<<
@@ -32681,7 +32668,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":356
* is_super = 1
* else:
* is_super = 0 # <<<<<<<<<<<<<<
@@ -32692,7 +32679,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":357
* else:
* is_super = 0
* ptr3 = ptr2 + 2 # <<<<<<<<<<<<<<
@@ -32701,7 +32688,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":358
* is_super = 0
* ptr3 = ptr2 + 2
* while ptr3 < N: # <<<<<<<<<<<<<<
@@ -32712,7 +32699,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_12 = ((__pyx_v_ptr3 < __pyx_v_N) != 0);
if (!__pyx_t_12) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":359
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":359
* ptr3 = ptr2 + 2
* while ptr3 < N:
* i3 = queue.arr[ptr3] # <<<<<<<<<<<<<<
@@ -32721,7 +32708,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":360
* while ptr3 < N:
* i3 = queue.arr[ptr3]
* if i3 == -1 or i3 - i1 >= self.train_max_initial_size: # <<<<<<<<<<<<<<
@@ -32737,7 +32724,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":361
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":361
* i3 = queue.arr[ptr3]
* if i3 == -1 or i3 - i1 >= self.train_max_initial_size:
* break # <<<<<<<<<<<<<<
@@ -32749,7 +32736,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":362
* if i3 == -1 or i3 - i1 >= self.train_max_initial_size:
* break
* l3 = queue.arr[ptr3+1] # <<<<<<<<<<<<<<
@@ -32758,7 +32745,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":363
* break
* l3 = queue.arr[ptr3+1]
* if (i3 - i2 - l2 >= self.train_min_gap_size and # <<<<<<<<<<<<<<
@@ -32768,7 +32755,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_20 = ((((__pyx_v_i3 - __pyx_v_i2) - __pyx_v_l2) >= __pyx_v_self->train_min_gap_size) != 0);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":364
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":364
* l3 = queue.arr[ptr3+1]
* if (i3 - i2 - l2 >= self.train_min_gap_size and
* i3 + l3 - i1 <= self.train_max_initial_size and # <<<<<<<<<<<<<<
@@ -32778,7 +32765,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_12 = ((((__pyx_v_i3 + __pyx_v_l3) - __pyx_v_i1) <= __pyx_v_self->train_max_initial_size) != 0);
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":365
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":365
* if (i3 - i2 - l2 >= self.train_min_gap_size and
* i3 + l3 - i1 <= self.train_max_initial_size and
* l1+l2+l3+2 <= self.max_length): # <<<<<<<<<<<<<<
@@ -32796,7 +32783,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":366
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":366
* i3 + l3 - i1 <= self.train_max_initial_size and
* l1+l2+l3+2 <= self.max_length):
* if is_super or super_frequent_patterns._contains(data.arr+i3, l3) != NULL: # <<<<<<<<<<<<<<
@@ -32804,32 +32791,32 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
* node = trie_insert(node, -1)
*/
if (!(__pyx_v_is_super != 0)) {
- __pyx_t_12 = (((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_i3), __pyx_v_l3) != NULL);
+ __pyx_t_12 = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_super_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_super_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i3), __pyx_v_l3) != NULL);
__pyx_t_20 = __pyx_t_12;
} else {
__pyx_t_20 = (__pyx_v_is_super != 0);
}
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":367
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":367
* l1+l2+l3+2 <= self.max_length):
* if is_super or super_frequent_patterns._contains(data.arr+i3, l3) != NULL:
* node = collocations._insert(data.arr+i1, l1) # <<<<<<<<<<<<<<
* node = trie_insert(node, -1)
* for i from i2 <= i < i2+l2:
*/
- __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);
+ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_collocations->__pyx_vtab)->_insert(__pyx_v_collocations, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":368
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":368
* if is_super or super_frequent_patterns._contains(data.arr+i3, l3) != NULL:
* node = collocations._insert(data.arr+i1, l1)
* node = trie_insert(node, -1) # <<<<<<<<<<<<<<
* for i from i2 <= i < i2+l2:
* node = trie_insert(node, data.arr[i])
*/
- __pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, -1);
+ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, -1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":369
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":369
* node = collocations._insert(data.arr+i1, l1)
* node = trie_insert(node, -1)
* for i from i2 <= i < i2+l2: # <<<<<<<<<<<<<<
@@ -32839,26 +32826,26 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_14 = (__pyx_v_i2 + __pyx_v_l2);
for (__pyx_v_i = __pyx_v_i2; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":370
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":370
* node = trie_insert(node, -1)
* for i from i2 <= i < i2+l2:
* node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<<
* node = trie_insert(node, -1)
* for i from i3 <= i < i3+l3:
*/
- __pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i]));
+ __pyx_v_node = __pyx_f_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":371
* for i from i2 <= i < i2+l2:
* node = trie_insert(node, data.arr[i])
* node = trie_insert(node, -1) # <<<<<<<<<<<<<<
* for i from i3 <= i < i3+l3:
* node = trie_insert(node, data.arr[i])
*/
- __pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, -1);
+ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, -1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":372
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":372
* node = trie_insert(node, data.arr[i])
* node = trie_insert(node, -1)
* for i from i3 <= i < i3+l3: # <<<<<<<<<<<<<<
@@ -32868,46 +32855,46 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_14 = (__pyx_v_i3 + __pyx_v_l3);
for (__pyx_v_i = __pyx_v_i3; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":373
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":373
* node = trie_insert(node, -1)
* for i from i3 <= i < i3+l3:
* node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<<
* trie_node_data_append(node, i1)
* trie_node_data_append(node, i2)
*/
- __pyx_v_node = __pyx_f_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i]));
+ __pyx_v_node = __pyx_f_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":374
* for i from i3 <= i < i3+l3:
* node = trie_insert(node, data.arr[i])
* trie_node_data_append(node, i1) # <<<<<<<<<<<<<<
* trie_node_data_append(node, i2)
* trie_node_data_append(node, i3)
*/
- __pyx_t_1 = __pyx_f_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4cdec_2sa_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":375
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":375
* node = trie_insert(node, data.arr[i])
* trie_node_data_append(node, i1)
* trie_node_data_append(node, i2) # <<<<<<<<<<<<<<
* trie_node_data_append(node, i3)
* ptr3 = ptr3 + 2
*/
- __pyx_t_1 = __pyx_f_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4cdec_2sa_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":376
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":376
* trie_node_data_append(node, i1)
* trie_node_data_append(node, i2)
* trie_node_data_append(node, i3) # <<<<<<<<<<<<<<
* ptr3 = ptr3 + 2
* ptr2 = ptr2 + 2
*/
- __pyx_t_1 = __pyx_f_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4cdec_2sa_3_sa_trie_node_data_append(__pyx_v_node, __pyx_v_i3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L30;
@@ -32917,7 +32904,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":377
* trie_node_data_append(node, i2)
* trie_node_data_append(node, i3)
* ptr3 = ptr3 + 2 # <<<<<<<<<<<<<<
@@ -32934,7 +32921,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":378
* trie_node_data_append(node, i3)
* ptr3 = ptr3 + 2
* ptr2 = ptr2 + 2 # <<<<<<<<<<<<<<
@@ -32945,7 +32932,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":379
* ptr3 = ptr3 + 2
* ptr2 = ptr2 + 2
* ptr1 = ptr1 + 2 # <<<<<<<<<<<<<<
@@ -32957,7 +32944,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":381
* ptr1 = ptr1 + 2
* else:
* sent_count = sent_count + 1 # <<<<<<<<<<<<<<
@@ -32966,7 +32953,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":382
* else:
* sent_count = sent_count + 1
* if sent_count % 10000 == 0: # <<<<<<<<<<<<<<
@@ -32976,7 +32963,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_20 = ((__Pyx_mod_long(__pyx_v_sent_count, 10000) == 0) != 0);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":383
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":383
* sent_count = sent_count + 1
* if sent_count % 10000 == 0:
* logger.debug(" %d sentences", sent_count) # <<<<<<<<<<<<<<
@@ -33007,7 +32994,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":384
* if sent_count % 10000 == 0:
* logger.debug(" %d sentences", sent_count)
* ptr1 = ptr1 + 1 # <<<<<<<<<<<<<<
@@ -33019,7 +33006,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":386
* ptr1 = ptr1 + 1
*
* self.precomputed_collocations = collocations.toMap(False) # <<<<<<<<<<<<<<
@@ -33045,7 +33032,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_self->precomputed_collocations = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":387
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":387
*
* self.precomputed_collocations = collocations.toMap(False)
* self.precomputed_index = frequent_patterns.toMap(True) # <<<<<<<<<<<<<<
@@ -33071,7 +33058,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_self->precomputed_index = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":389
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":389
* self.precomputed_index = frequent_patterns.toMap(True)
*
* x = 0 # <<<<<<<<<<<<<<
@@ -33081,7 +33068,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":390
*
* x = 0
* for pattern1 in J_set: # <<<<<<<<<<<<<<
@@ -33107,7 +33094,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern1 = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":391
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":391
* x = 0
* for pattern1 in J_set:
* for pattern2 in J_set: # <<<<<<<<<<<<<<
@@ -33133,7 +33120,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern2 = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":392
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":392
* for pattern1 in J_set:
* for pattern2 in J_set:
* if len(pattern1) + len(pattern2) + 1 < self.max_length: # <<<<<<<<<<<<<<
@@ -33145,7 +33132,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_20 = ((((__pyx_t_2 + __pyx_t_15) + 1) < __pyx_v_self->max_length) != 0);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":393
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":393
* for pattern2 in J_set:
* if len(pattern1) + len(pattern2) + 1 < self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -33161,7 +33148,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":394
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":394
* if len(pattern1) + len(pattern2) + 1 < self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2
* J2_set.add(combined_pattern) # <<<<<<<<<<<<<<
@@ -33177,7 +33164,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":396
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":396
* J2_set.add(combined_pattern)
*
* for pattern1 in I_set: # <<<<<<<<<<<<<<
@@ -33203,7 +33190,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern1 = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":397
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":397
*
* for pattern1 in I_set:
* for pattern2 in I_set: # <<<<<<<<<<<<<<
@@ -33229,7 +33216,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":398
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":398
* for pattern1 in I_set:
* for pattern2 in I_set:
* x = x+1 # <<<<<<<<<<<<<<
@@ -33242,7 +33229,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":399
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":399
* for pattern2 in I_set:
* x = x+1
* if len(pattern1) + len(pattern2) + 1 <= self.max_length: # <<<<<<<<<<<<<<
@@ -33254,7 +33241,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_20 = ((((__pyx_t_15 + __pyx_t_2) + 1) <= __pyx_v_self->max_length) != 0);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":400
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":400
* x = x+1
* if len(pattern1) + len(pattern2) + 1 <= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -33270,7 +33257,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_combined_pattern = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":401
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":401
* if len(pattern1) + len(pattern2) + 1 <= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2
* IJ_set.add(combined_pattern) # <<<<<<<<<<<<<<
@@ -33286,7 +33273,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":403
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":403
* IJ_set.add(combined_pattern)
*
* for pattern1 in I_set: # <<<<<<<<<<<<<<
@@ -33312,7 +33299,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern1 = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":404
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":404
*
* for pattern1 in I_set:
* for pattern2 in J2_set: # <<<<<<<<<<<<<<
@@ -33338,7 +33325,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern2 = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":405
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":405
* for pattern1 in I_set:
* for pattern2 in J2_set:
* x = x+2 # <<<<<<<<<<<<<<
@@ -33351,7 +33338,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_x = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":406
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":406
* for pattern2 in J2_set:
* x = x+2
* if len(pattern1) + len(pattern2) + 1<= self.max_length: # <<<<<<<<<<<<<<
@@ -33363,7 +33350,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_20 = ((((__pyx_t_2 + __pyx_t_15) + 1) <= __pyx_v_self->max_length) != 0);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":407
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":407
* x = x+2
* if len(pattern1) + len(pattern2) + 1<= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -33379,7 +33366,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":408
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":408
* if len(pattern1) + len(pattern2) + 1<= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2
* IJ_set.add(combined_pattern) # <<<<<<<<<<<<<<
@@ -33388,7 +33375,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
*/
__pyx_t_16 = PySet_Add(__pyx_v_IJ_set, __pyx_v_combined_pattern); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":409
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":409
* combined_pattern = pattern1 + (-1,) + pattern2
* IJ_set.add(combined_pattern)
* combined_pattern = pattern2 + (-1,) + pattern1 # <<<<<<<<<<<<<<
@@ -33404,7 +33391,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_combined_pattern = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":410
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":410
* IJ_set.add(combined_pattern)
* combined_pattern = pattern2 + (-1,) + pattern1
* IJ_set.add(combined_pattern) # <<<<<<<<<<<<<<
@@ -33420,7 +33407,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":412
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":412
* IJ_set.add(combined_pattern)
*
* N = len(pattern_rank) # <<<<<<<<<<<<<<
@@ -33430,7 +33417,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_15 = PyDict_Size(((PyObject *)__pyx_v_pattern_rank)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_N = __pyx_t_15;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":413
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":413
*
* N = len(pattern_rank)
* cost_by_rank = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -33443,13 +33430,13 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_v_cost_by_rank = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_cost_by_rank = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":414
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":414
* N = len(pattern_rank)
* cost_by_rank = IntList(initial_len=N)
* count_by_rank = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -33462,13 +33449,13 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_v_count_by_rank = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
+ __pyx_v_count_by_rank = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":415
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":415
* cost_by_rank = IntList(initial_len=N)
* count_by_rank = IntList(initial_len=N)
* for pattern, arr in self.precomputed_collocations.iteritems(): # <<<<<<<<<<<<<<
@@ -33498,7 +33485,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_arr = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":416
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":416
* count_by_rank = IntList(initial_len=N)
* for pattern, arr in self.precomputed_collocations.iteritems():
* if pattern not in IJ_set: # <<<<<<<<<<<<<<
@@ -33509,7 +33496,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_12 = (__pyx_t_20 != 0);
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":417
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":417
* for pattern, arr in self.precomputed_collocations.iteritems():
* if pattern not in IJ_set:
* s = "" # <<<<<<<<<<<<<<
@@ -33520,7 +33507,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_47);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":418
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":418
* if pattern not in IJ_set:
* s = ""
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -33565,7 +33552,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_word_id = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":419
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":419
* s = ""
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
@@ -33577,7 +33564,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":420
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":420
* for word_id in pattern:
* if word_id == -1:
* s = s + "X " # <<<<<<<<<<<<<<
@@ -33593,7 +33580,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":422
* s = s + "X "
* else:
* s = s + darray.id2word[word_id] + " " # <<<<<<<<<<<<<<
@@ -33616,7 +33603,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":423
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":423
* else:
* s = s + darray.id2word[word_id] + " "
* logger.warn("ERROR: unexpected pattern %s in set of precomputed collocations", s) # <<<<<<<<<<<<<<
@@ -33645,7 +33632,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":425
* logger.warn("ERROR: unexpected pattern %s in set of precomputed collocations", s)
* else:
* chunk = () # <<<<<<<<<<<<<<
@@ -33656,7 +33643,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":426
* else:
* chunk = ()
* max_rank = 0 # <<<<<<<<<<<<<<
@@ -33665,7 +33652,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":427
* chunk = ()
* max_rank = 0
* arity = 0 # <<<<<<<<<<<<<<
@@ -33676,7 +33663,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":428
* max_rank = 0
* arity = 0
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -33721,7 +33708,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_word_id = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":429
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":429
* arity = 0
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
@@ -33733,7 +33720,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":430
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":430
* for word_id in pattern:
* if word_id == -1:
* max_rank = max(max_rank, pattern_rank[chunk]) # <<<<<<<<<<<<<<
@@ -33763,7 +33750,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_max_rank = __pyx_t_17;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":431
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":431
* if word_id == -1:
* max_rank = max(max_rank, pattern_rank[chunk])
* arity = arity + 1 # <<<<<<<<<<<<<<
@@ -33776,7 +33763,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_arity = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":432
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":432
* max_rank = max(max_rank, pattern_rank[chunk])
* arity = arity + 1
* chunk = () # <<<<<<<<<<<<<<
@@ -33790,7 +33777,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":434
* chunk = ()
* else:
* chunk = chunk + (word_id,) # <<<<<<<<<<<<<<
@@ -33813,7 +33800,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":435
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":435
* else:
* chunk = chunk + (word_id,)
* max_rank = max(max_rank, pattern_rank[chunk]) # <<<<<<<<<<<<<<
@@ -33843,7 +33830,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_max_rank = __pyx_t_17;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":436
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":436
* chunk = chunk + (word_id,)
* max_rank = max(max_rank, pattern_rank[chunk])
* cost_by_rank.arr[max_rank] = cost_by_rank.arr[max_rank] + (4*len(arr)) # <<<<<<<<<<<<<<
@@ -33853,7 +33840,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_13 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
(__pyx_v_cost_by_rank->arr[__pyx_v_max_rank]) = ((__pyx_v_cost_by_rank->arr[__pyx_v_max_rank]) + (4 * __pyx_t_13));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":437
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":437
* max_rank = max(max_rank, pattern_rank[chunk])
* cost_by_rank.arr[max_rank] = cost_by_rank.arr[max_rank] + (4*len(arr))
* count_by_rank.arr[max_rank] = count_by_rank.arr[max_rank] + (len(arr)/(arity+1)) # <<<<<<<<<<<<<<
@@ -33883,7 +33870,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":439
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":439
* count_by_rank.arr[max_rank] = count_by_rank.arr[max_rank] + (len(arr)/(arity+1))
*
* cumul_cost = 0 # <<<<<<<<<<<<<<
@@ -33893,7 +33880,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":440
*
* cumul_cost = 0
* cumul_count = 0 # <<<<<<<<<<<<<<
@@ -33903,7 +33890,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/mdenkows/cdec/python/cdec/sa/precomputation.pxi":441
* cumul_cost = 0
* cumul_count = 0
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -33913,7 +33900,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_14 = __pyx_v_N;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":442
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":442
* cumul_count = 0
* for i from 0 <= i < N:
* cumul_cost = cumul_cost + cost_by_rank.arr[i] # <<<<<<<<<<<<<<
@@ -33929,7 +33916,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_cumul_cost = __pyx_t_7;
__pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":443
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":443
* for i from 0 <= i < N:
* cumul_cost = cumul_cost + cost_by_rank.arr[i]
* cumul_count = cumul_count + count_by_rank.arr[i] # <<<<<<<<<<<<<<
@@ -33945,7 +33932,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_cumul_count = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":444
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":444
* cumul_cost = cumul_cost + cost_by_rank.arr[i]
* cumul_count = cumul_count + count_by_rank.arr[i]
* logger.debug("RANK %d\tCOUNT, COST: %d %d\tCUMUL: %d, %d", i, count_by_rank.arr[i], cost_by_rank.arr[i], cumul_count, cumul_cost) # <<<<<<<<<<<<<<
@@ -33990,7 +33977,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":446
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":446
* logger.debug("RANK %d\tCOUNT, COST: %d %d\tCUMUL: %d, %d", i, count_by_rank.arr[i], cost_by_rank.arr[i], cumul_count, cumul_cost)
*
* num_found_patterns = len(self.precomputed_collocations) # <<<<<<<<<<<<<<
@@ -34006,7 +33993,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_num_found_patterns = __pyx_t_9;
__pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":447
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":447
*
* num_found_patterns = len(self.precomputed_collocations)
* for pattern in IJ_set: # <<<<<<<<<<<<<<
@@ -34032,7 +34019,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_v_pattern = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":448
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":448
* num_found_patterns = len(self.precomputed_collocations)
* for pattern in IJ_set:
* if pattern not in self.precomputed_collocations: # <<<<<<<<<<<<<<
@@ -34043,14 +34030,14 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__pyx_t_20 = (__pyx_t_12 != 0);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":449
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":449
* for pattern in IJ_set:
* if pattern not in self.precomputed_collocations:
* self.precomputed_collocations[pattern] = IntList() # <<<<<<<<<<<<<<
*
* cdef float stop_time = monitor_cpu()
*/
- __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
if (PyObject_SetItem(__pyx_v_self->precomputed_collocations, __pyx_v_pattern, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
@@ -34060,7 +34047,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":451
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":451
* self.precomputed_collocations[pattern] = IntList()
*
* cdef float stop_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -34076,7 +34063,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_stop_time = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":452
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":452
*
* cdef float stop_time = monitor_cpu()
* logger.info("Precomputed collocations for %d patterns out of %d possible (upper bound %d)", num_found_patterns, len(self.precomputed_collocations), x) # <<<<<<<<<<<<<<
@@ -34114,7 +34101,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":453
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":453
* cdef float stop_time = monitor_cpu()
* logger.info("Precomputed collocations for %d patterns out of %d possible (upper bound %d)", num_found_patterns, len(self.precomputed_collocations), x)
* logger.info("Precomputed inverted index for %d patterns ", len(self.precomputed_index)) # <<<<<<<<<<<<<<
@@ -34145,7 +34132,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":454
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":454
* logger.info("Precomputed collocations for %d patterns out of %d possible (upper bound %d)", num_found_patterns, len(self.precomputed_collocations), x)
* logger.info("Precomputed inverted index for %d patterns ", len(self.precomputed_index))
* logger.info("Precomputation took %f seconds", (stop_time - start_time)) # <<<<<<<<<<<<<<
@@ -34181,7 +34168,7 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("_sa.Precomputation.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Precomputation.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_darray);
@@ -34219,8 +34206,8 @@ static PyObject *__pyx_pf_3_sa_14Precomputation_6precompute(struct __pyx_obj_3_s
}
/* Python wrapper */
-static int __pyx_pw_3_sa_11SuffixArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_11SuffixArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_11SuffixArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11SuffixArray_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_from_binary = 0;
PyObject *__pyx_v_from_text = 0;
PyObject *__pyx_v_side = 0;
@@ -34234,7 +34221,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":11
* cdef IntList ha
*
* def __cinit__(self, from_binary=None, from_text=None, side=None): # <<<<<<<<<<<<<<
@@ -34292,16 +34279,16 @@ static int __pyx_pw_3_sa_11SuffixArray_1__cinit__(PyObject *__pyx_v_self, PyObje
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.SuffixArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_11SuffixArray___cinit__(((struct __pyx_obj_3_sa_SuffixArray *)__pyx_v_self), __pyx_v_from_binary, __pyx_v_from_text, __pyx_v_side);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self), __pyx_v_from_binary, __pyx_v_from_text, __pyx_v_side);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text, PyObject *__pyx_v_side) {
+static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_from_binary, PyObject *__pyx_v_from_text, PyObject *__pyx_v_side) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -34313,52 +34300,52 @@ 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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":12
*
* def __cinit__(self, from_binary=None, from_text=None, side=None):
* self.darray = DataArray() # <<<<<<<<<<<<<<
* self.sa = IntList()
* self.ha = IntList()
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_DataArray)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_DataArray)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->darray);
__Pyx_DECREF(((PyObject *)__pyx_v_self->darray));
- __pyx_v_self->darray = ((struct __pyx_obj_3_sa_DataArray *)__pyx_t_1);
+ __pyx_v_self->darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":13
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":13
* def __cinit__(self, from_binary=None, from_text=None, side=None):
* self.darray = DataArray()
* self.sa = IntList() # <<<<<<<<<<<<<<
* self.ha = IntList()
* if from_binary:
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->sa);
__Pyx_DECREF(((PyObject *)__pyx_v_self->sa));
- __pyx_v_self->sa = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":14
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":14
* self.darray = DataArray()
* self.sa = IntList()
* self.ha = IntList() # <<<<<<<<<<<<<<
* if from_binary:
* self.read_binary(from_binary)
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->ha);
__Pyx_DECREF(((PyObject *)__pyx_v_self->ha));
- __pyx_v_self->ha = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->ha = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":15
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":15
* self.sa = IntList()
* self.ha = IntList()
* if from_binary: # <<<<<<<<<<<<<<
@@ -34368,7 +34355,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":16
* self.ha = IntList()
* if from_binary:
* self.read_binary(from_binary) # <<<<<<<<<<<<<<
@@ -34390,7 +34377,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":17
* if from_binary:
* self.read_binary(from_binary)
* elif from_text: # <<<<<<<<<<<<<<
@@ -34400,7 +34387,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":18
* self.read_binary(from_binary)
* elif from_text:
* self.read_text(from_text, side) # <<<<<<<<<<<<<<
@@ -34432,7 +34419,7 @@ static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArr
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.SuffixArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -34440,17 +34427,17 @@ static int __pyx_pf_3_sa_11SuffixArray___cinit__(struct __pyx_obj_3_sa_SuffixArr
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_11SuffixArray_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
-static PyObject *__pyx_pw_3_sa_11SuffixArray_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_11SuffixArray_2__getitem__(((struct __pyx_obj_3_sa_SuffixArray *)__pyx_v_self), ((PyObject *)__pyx_v_i));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11SuffixArray_2__getitem__(((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self), ((PyObject *)__pyx_v_i));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":20
+/* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":20
* self.read_text(from_text, side)
*
* def __getitem__(self, i): # <<<<<<<<<<<<<<
@@ -34458,7 +34445,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_3__getitem__(PyObject *__pyx_v_self
*
*/
-static PyObject *__pyx_pf_3_sa_11SuffixArray_2__getitem__(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_i) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_2__getitem__(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_i) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
@@ -34468,7 +34455,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":21
*
* def __getitem__(self, i):
* return self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -34487,7 +34474,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_2__getitem__(struct __pyx_obj_3_sa_
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.SuffixArray.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -34496,9 +34483,9 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_2__getitem__(struct __pyx_obj_3_sa_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_11SuffixArray_5read_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_3_sa_11SuffixArray_4read_text[] = "Constructs suffix array using the algorithm\n of Larsson & Sadahkane (1999)";
-static PyObject *__pyx_pw_3_sa_11SuffixArray_5read_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_5read_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cdec_2sa_3_sa_11SuffixArray_4read_text[] = "Constructs suffix array using the algorithm\n of Larsson & Sadahkane (1999)";
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_5read_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_filename = 0;
PyObject *__pyx_v_side = 0;
int __pyx_lineno = 0;
@@ -34546,16 +34533,16 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_5read_text(PyObject *__pyx_v_self,
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("read_text", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.SuffixArray.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_11SuffixArray_4read_text(((struct __pyx_obj_3_sa_SuffixArray *)__pyx_v_self), __pyx_v_filename, __pyx_v_side);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self), __pyx_v_filename, __pyx_v_side);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":23
+/* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":23
* return self.sa.arr[i]
*
* def read_text(self, filename, side): # <<<<<<<<<<<<<<
@@ -34563,7 +34550,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_5read_text(PyObject *__pyx_v_self,
* of Larsson & Sadahkane (1999)'''
*/
-static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_side) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_side) {
int __pyx_v_V;
int __pyx_v_N;
int __pyx_v_i;
@@ -34573,8 +34560,8 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
int __pyx_v_n;
int __pyx_v_current_run;
int __pyx_v_skip;
- struct __pyx_obj_3_sa_IntList *__pyx_v_isa = 0;
- struct __pyx_obj_3_sa_IntList *__pyx_v_word_count = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_isa = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_word_count = 0;
float __pyx_v_sort_start_time;
float __pyx_v_start_time;
PyObject *__pyx_r = NULL;
@@ -34596,7 +34583,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":29
* cdef IntList isa, word_count
*
* self.darray = DataArray(from_text=filename, side=side, use_sent_id=True) # <<<<<<<<<<<<<<
@@ -34611,16 +34598,16 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__use_sent_id), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_DataArray)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_DataArray)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->darray);
__Pyx_DECREF(((PyObject *)__pyx_v_self->darray));
- __pyx_v_self->darray = ((struct __pyx_obj_3_sa_DataArray *)__pyx_t_2);
+ __pyx_v_self->darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":30
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":30
*
* self.darray = DataArray(from_text=filename, side=side, use_sent_id=True)
* N = len(self.darray) # <<<<<<<<<<<<<<
@@ -34633,7 +34620,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":31
* self.darray = DataArray(from_text=filename, side=side, use_sent_id=True)
* N = len(self.darray)
* V = len(self.darray.id2word) # <<<<<<<<<<<<<<
@@ -34646,7 +34633,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":33
* V = len(self.darray.id2word)
*
* self.sa = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -34659,16 +34646,16 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->sa);
__Pyx_DECREF(((PyObject *)__pyx_v_self->sa));
- __pyx_v_self->sa = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":34
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":34
*
* self.sa = IntList(initial_len=N)
* self.ha = IntList(initial_len=V+1) # <<<<<<<<<<<<<<
@@ -34681,16 +34668,16 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->ha);
__Pyx_DECREF(((PyObject *)__pyx_v_self->ha));
- __pyx_v_self->ha = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
+ __pyx_v_self->ha = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":36
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":36
* self.ha = IntList(initial_len=V+1)
*
* isa = IntList(initial_len=N) # <<<<<<<<<<<<<<
@@ -34703,13 +34690,13 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_v_isa = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_isa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":37
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":37
*
* isa = IntList(initial_len=N)
* word_count = IntList(initial_len=V+1) # <<<<<<<<<<<<<<
@@ -34722,13 +34709,13 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_v_word_count = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
+ __pyx_v_word_count = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":40
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":40
*
* '''Step 1: bucket sort data'''
* cdef float sort_start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -34744,7 +34731,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_sort_start_time = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":41
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":41
* '''Step 1: bucket sort data'''
* cdef float sort_start_time = monitor_cpu()
* cdef float start_time = sort_start_time # <<<<<<<<<<<<<<
@@ -34753,7 +34740,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":42
* cdef float sort_start_time = monitor_cpu()
* cdef float start_time = sort_start_time
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -34763,7 +34750,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_5 = __pyx_v_N;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":43
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":43
* cdef float start_time = sort_start_time
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i] # <<<<<<<<<<<<<<
@@ -34772,7 +34759,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":44
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i]
* word_count.arr[a_i] = word_count.arr[a_i] + 1 # <<<<<<<<<<<<<<
@@ -34782,7 +34769,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":46
* word_count.arr[a_i] = word_count.arr[a_i] + 1
*
* n = 0 # <<<<<<<<<<<<<<
@@ -34791,7 +34778,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":47
*
* n = 0
* for i from 0 <= i < V+1: # <<<<<<<<<<<<<<
@@ -34801,7 +34788,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_6 = (__pyx_v_V + 1);
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":48
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":48
* n = 0
* for i from 0 <= i < V+1:
* self.ha.arr[i] = n # <<<<<<<<<<<<<<
@@ -34810,7 +34797,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":49
* for i from 0 <= i < V+1:
* self.ha.arr[i] = n
* n = n + word_count.arr[i] # <<<<<<<<<<<<<<
@@ -34819,7 +34806,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":50
* self.ha.arr[i] = n
* n = n + word_count.arr[i]
* word_count.arr[i] = 0 # <<<<<<<<<<<<<<
@@ -34829,7 +34816,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":52
* word_count.arr[i] = 0
*
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -34839,7 +34826,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_5 = __pyx_v_N;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":53
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":53
*
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i] # <<<<<<<<<<<<<<
@@ -34848,7 +34835,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":54
* for i from 0 <= i < N:
* a_i = self.darray.data.arr[i]
* self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i # <<<<<<<<<<<<<<
@@ -34857,7 +34844,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":55
* a_i = self.darray.data.arr[i]
* self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i
* isa.arr[i] = self.ha.arr[a_i + 1] - 1 # bucket pointer is last index in bucket # <<<<<<<<<<<<<<
@@ -34866,7 +34853,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":56
* self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i
* isa.arr[i] = self.ha.arr[a_i + 1] - 1 # bucket pointer is last index in bucket
* word_count.arr[a_i] = word_count.arr[a_i] + 1 # <<<<<<<<<<<<<<
@@ -34876,7 +34863,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":59
*
* '''Determine size of initial runs'''
* current_run = 0 # <<<<<<<<<<<<<<
@@ -34885,7 +34872,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":60
* '''Determine size of initial runs'''
* current_run = 0
* for i from 0 <= i < V+1: # <<<<<<<<<<<<<<
@@ -34895,7 +34882,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_6 = (__pyx_v_V + 1);
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":61
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":61
* current_run = 0
* for i from 0 <= i < V+1:
* if i < V and self.ha.arr[i+1] - self.ha.arr[i] == 1: # <<<<<<<<<<<<<<
@@ -34911,7 +34898,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":62
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":62
* for i from 0 <= i < V+1:
* if i < V and self.ha.arr[i+1] - self.ha.arr[i] == 1:
* current_run = current_run + 1 # <<<<<<<<<<<<<<
@@ -34923,7 +34910,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":64
* current_run = current_run + 1
* else:
* if current_run > 0: # <<<<<<<<<<<<<<
@@ -34933,7 +34920,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_9 = ((__pyx_v_current_run > 0) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":65
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":65
* else:
* if current_run > 0:
* self.sa.arr[self.ha.arr[i] - current_run] = -current_run # <<<<<<<<<<<<<<
@@ -34942,7 +34929,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":66
* if current_run > 0:
* self.sa.arr[self.ha.arr[i] - current_run] = -current_run
* current_run = 0 # <<<<<<<<<<<<<<
@@ -34957,7 +34944,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":68
* current_run = 0
*
* logger.info(" Bucket sort took %f seconds", (monitor_cpu() - sort_start_time)) # <<<<<<<<<<<<<<
@@ -34994,7 +34981,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_11); __pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":71
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":71
*
* '''Step 2: prefix-doubling sort'''
* h = 1 # <<<<<<<<<<<<<<
@@ -35003,7 +34990,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":72
* '''Step 2: prefix-doubling sort'''
* h = 1
* while self.sa.arr[0] != -N: # <<<<<<<<<<<<<<
@@ -35014,7 +35001,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_9 = (((__pyx_v_self->sa->arr[0]) != (-__pyx_v_N)) != 0);
if (!__pyx_t_9) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":73
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":73
* h = 1
* while self.sa.arr[0] != -N:
* sort_start_time = monitor_cpu() # <<<<<<<<<<<<<<
@@ -35030,7 +35017,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_sort_start_time = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":74
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":74
* while self.sa.arr[0] != -N:
* sort_start_time = monitor_cpu()
* logger.debug(" Refining, sort depth = %d", h) # <<<<<<<<<<<<<<
@@ -35058,7 +35045,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":75
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":75
* sort_start_time = monitor_cpu()
* logger.debug(" Refining, sort depth = %d", h)
* i = 0 # <<<<<<<<<<<<<<
@@ -35067,7 +35054,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":76
* logger.debug(" Refining, sort depth = %d", h)
* i = 0
* skip = 0 # <<<<<<<<<<<<<<
@@ -35076,7 +35063,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":77
* i = 0
* skip = 0
* while i < N: # <<<<<<<<<<<<<<
@@ -35087,7 +35074,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_9 = ((__pyx_v_i < __pyx_v_N) != 0);
if (!__pyx_t_9) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":78
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":78
* skip = 0
* while i < N:
* if self.sa.arr[i] < 0: # <<<<<<<<<<<<<<
@@ -35097,7 +35084,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_9 = (((__pyx_v_self->sa->arr[__pyx_v_i]) < 0) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":79
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":79
* while i < N:
* if self.sa.arr[i] < 0:
* skip = skip + self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -35106,7 +35093,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":80
* if self.sa.arr[i] < 0:
* skip = skip + self.sa.arr[i]
* i = i - self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -35118,7 +35105,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":82
* i = i - self.sa.arr[i]
* else:
* if skip < 0: # <<<<<<<<<<<<<<
@@ -35128,7 +35115,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_9 = ((__pyx_v_skip < 0) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":83
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":83
* else:
* if skip < 0:
* self.sa.arr[i+skip] = skip # <<<<<<<<<<<<<<
@@ -35137,7 +35124,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":84
* if skip < 0:
* self.sa.arr[i+skip] = skip
* skip = 0 # <<<<<<<<<<<<<<
@@ -35149,7 +35136,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":85
* self.sa.arr[i+skip] = skip
* skip = 0
* j = isa.arr[self.sa.arr[i]] # <<<<<<<<<<<<<<
@@ -35158,7 +35145,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":86
* skip = 0
* j = isa.arr[self.sa.arr[i]]
* self.q3sort(i, j, h, isa) # <<<<<<<<<<<<<<
@@ -35193,7 +35180,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":87
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":87
* j = isa.arr[self.sa.arr[i]]
* self.q3sort(i, j, h, isa)
* i = j+1 # <<<<<<<<<<<<<<
@@ -35205,7 +35192,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":88
* self.q3sort(i, j, h, isa)
* i = j+1
* if skip < 0: # <<<<<<<<<<<<<<
@@ -35215,7 +35202,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_9 = ((__pyx_v_skip < 0) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":89
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":89
* i = j+1
* if skip < 0:
* self.sa.arr[i+skip] = skip # <<<<<<<<<<<<<<
@@ -35227,7 +35214,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":90
* if skip < 0:
* self.sa.arr[i+skip] = skip
* h = h * 2 # <<<<<<<<<<<<<<
@@ -35236,7 +35223,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":91
* self.sa.arr[i+skip] = skip
* h = h * 2
* logger.debug(" Refinement took %f seconds", (monitor_cpu() - sort_start_time)) # <<<<<<<<<<<<<<
@@ -35274,7 +35261,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":94
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":94
*
* '''Step 3: read off suffix array from inverse suffix array'''
* logger.info(" Finalizing sort...") # <<<<<<<<<<<<<<
@@ -35291,7 +35278,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;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":95
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":95
* '''Step 3: read off suffix array from inverse suffix array'''
* logger.info(" Finalizing sort...")
* for i from 0 <= i < N: # <<<<<<<<<<<<<<
@@ -35301,7 +35288,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__pyx_t_5 = __pyx_v_N;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":96
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":96
* logger.info(" Finalizing sort...")
* for i from 0 <= i < N:
* j = isa.arr[i] # <<<<<<<<<<<<<<
@@ -35310,7 +35297,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":97
* for i from 0 <= i < N:
* j = isa.arr[i]
* self.sa.arr[j] = i # <<<<<<<<<<<<<<
@@ -35320,7 +35307,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":98
* j = isa.arr[i]
* self.sa.arr[j] = i
* logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time)) # <<<<<<<<<<<<<<
@@ -35365,7 +35352,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
- __Pyx_AddTraceback("_sa.SuffixArray.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_isa);
@@ -35376,13 +35363,13 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_4read_text(struct __pyx_obj_3_sa_Su
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_11SuffixArray_7q3sort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_3_sa_11SuffixArray_6q3sort[] = "This is a ternary quicksort. It divides the array into\n three partitions: items less than the pivot, items equal\n to pivot, and items greater than pivot. The first and last\n of these partitions are then recursively sorted";
-static PyObject *__pyx_pw_3_sa_11SuffixArray_7q3sort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_7q3sort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cdec_2sa_3_sa_11SuffixArray_6q3sort[] = "This is a ternary quicksort. It divides the array into\n three partitions: items less than the pivot, items equal\n to pivot, and items greater than pivot. The first and last\n of these partitions are then recursively sorted";
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_7q3sort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_i;
int __pyx_v_j;
int __pyx_v_h;
- struct __pyx_obj_3_sa_IntList *__pyx_v_isa = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_isa = 0;
PyObject *__pyx_v_pad = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -35449,19 +35436,19 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_7q3sort(PyObject *__pyx_v_self, PyO
__pyx_v_i = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_j = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_h = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_isa = ((struct __pyx_obj_3_sa_IntList *)values[3]);
+ __pyx_v_isa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)values[3]);
__pyx_v_pad = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("q3sort", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.SuffixArray.q3sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.q3sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isa), __pyx_ptype_3_sa_IntList, 1, "isa", 0))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_11SuffixArray_6q3sort(((struct __pyx_obj_3_sa_SuffixArray *)__pyx_v_self), __pyx_v_i, __pyx_v_j, __pyx_v_h, __pyx_v_isa, __pyx_v_pad);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isa), __pyx_ptype_4cdec_2sa_3_sa_IntList, 1, "isa", 0))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self), __pyx_v_i, __pyx_v_j, __pyx_v_h, __pyx_v_isa, __pyx_v_pad);
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = NULL;
@@ -35470,7 +35457,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":100
* logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time))
*
* def q3sort(self, int i, int j, int h, IntList isa, pad=""): # <<<<<<<<<<<<<<
@@ -35478,7 +35465,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_7q3sort(PyObject *__pyx_v_self, PyO
* three partitions: items less than the pivot, items equal
*/
-static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_i, int __pyx_v_j, int __pyx_v_h, struct __pyx_obj_3_sa_IntList *__pyx_v_isa, PyObject *__pyx_v_pad) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_i, int __pyx_v_j, int __pyx_v_h, struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_isa, PyObject *__pyx_v_pad) {
int __pyx_v_k;
int __pyx_v_midpoint;
int __pyx_v_pval;
@@ -35500,7 +35487,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":107
* cdef int k, midpoint, pval, phead, ptail, tmp
*
* if j-i < -1: # <<<<<<<<<<<<<<
@@ -35510,7 +35497,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":108
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":108
*
* if j-i < -1:
* raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j)) # <<<<<<<<<<<<<<
@@ -35547,7 +35534,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":109
* if j-i < -1:
* raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j))
* if j-i == -1: # recursive base case -- empty interval # <<<<<<<<<<<<<<
@@ -35557,7 +35544,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":110
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":110
* raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j))
* if j-i == -1: # recursive base case -- empty interval
* return # <<<<<<<<<<<<<<
@@ -35571,7 +35558,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":111
* if j-i == -1: # recursive base case -- empty interval
* return
* if (j-i == 0): # recursive base case -- singleton interval # <<<<<<<<<<<<<<
@@ -35581,7 +35568,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":112
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":112
* return
* if (j-i == 0): # recursive base case -- singleton interval
* isa.arr[self.sa.arr[i]] = i # <<<<<<<<<<<<<<
@@ -35590,7 +35577,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":113
* if (j-i == 0): # recursive base case -- singleton interval
* isa.arr[self.sa.arr[i]] = i
* self.sa.arr[i] = -1 # <<<<<<<<<<<<<<
@@ -35599,7 +35586,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":114
* isa.arr[self.sa.arr[i]] = i
* self.sa.arr[i] = -1
* return # <<<<<<<<<<<<<<
@@ -35613,7 +35600,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":123
* # If the method of assigning word_id's is changed, this method
* # may need to be reconsidered as well.
* midpoint = (i+j)/2 # <<<<<<<<<<<<<<
@@ -35622,7 +35609,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":124
* # may need to be reconsidered as well.
* midpoint = (i+j)/2
* pval = isa.arr[self.sa.arr[midpoint] + h] # <<<<<<<<<<<<<<
@@ -35631,7 +35618,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":125
* midpoint = (i+j)/2
* pval = isa.arr[self.sa.arr[midpoint] + h]
* if i != midpoint: # <<<<<<<<<<<<<<
@@ -35641,7 +35628,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__pyx_t_1 = ((__pyx_v_i != __pyx_v_midpoint) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":126
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":126
* pval = isa.arr[self.sa.arr[midpoint] + h]
* if i != midpoint:
* tmp = self.sa.arr[midpoint] # <<<<<<<<<<<<<<
@@ -35650,7 +35637,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":127
* if i != midpoint:
* tmp = self.sa.arr[midpoint]
* self.sa.arr[midpoint] = self.sa.arr[i] # <<<<<<<<<<<<<<
@@ -35659,7 +35646,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":128
* tmp = self.sa.arr[midpoint]
* self.sa.arr[midpoint] = self.sa.arr[i]
* self.sa.arr[i] = tmp # <<<<<<<<<<<<<<
@@ -35671,7 +35658,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":129
* self.sa.arr[midpoint] = self.sa.arr[i]
* self.sa.arr[i] = tmp
* phead = i # <<<<<<<<<<<<<<
@@ -35680,7 +35667,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":130
* self.sa.arr[i] = tmp
* phead = i
* ptail = i # <<<<<<<<<<<<<<
@@ -35689,7 +35676,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":134
* # find the three partitions. phead marks the first element
* # of the middle partition, and ptail marks the last element
* for k from i+1 <= k < j+1: # <<<<<<<<<<<<<<
@@ -35699,7 +35686,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":135
* # of the middle partition, and ptail marks the last element
* for k from i+1 <= k < j+1:
* if isa.arr[self.sa.arr[k] + h] < pval: # <<<<<<<<<<<<<<
@@ -35709,7 +35696,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":136
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":136
* for k from i+1 <= k < j+1:
* if isa.arr[self.sa.arr[k] + h] < pval:
* if k > ptail+1: # <<<<<<<<<<<<<<
@@ -35719,7 +35706,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)) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":137
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":137
* if isa.arr[self.sa.arr[k] + h] < pval:
* if k > ptail+1:
* tmp = self.sa.arr[phead] # <<<<<<<<<<<<<<
@@ -35728,7 +35715,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":138
* if k > ptail+1:
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k] # <<<<<<<<<<<<<<
@@ -35737,7 +35724,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":139
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = self.sa.arr[ptail+1] # <<<<<<<<<<<<<<
@@ -35746,7 +35733,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":140
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = self.sa.arr[ptail+1]
* self.sa.arr[ptail+1] = tmp # <<<<<<<<<<<<<<
@@ -35758,7 +35745,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":142
* self.sa.arr[ptail+1] = tmp
* else: # k == ptail+1
* tmp = self.sa.arr[phead] # <<<<<<<<<<<<<<
@@ -35767,7 +35754,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":143
* else: # k == ptail+1
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k] # <<<<<<<<<<<<<<
@@ -35776,7 +35763,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":144
* tmp = self.sa.arr[phead]
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = tmp # <<<<<<<<<<<<<<
@@ -35787,7 +35774,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":145
* self.sa.arr[phead] = self.sa.arr[k]
* self.sa.arr[k] = tmp
* phead = phead + 1 # <<<<<<<<<<<<<<
@@ -35796,7 +35783,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":146
* self.sa.arr[k] = tmp
* phead = phead + 1
* ptail = ptail + 1 # <<<<<<<<<<<<<<
@@ -35808,7 +35795,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":148
* ptail = ptail + 1
* else:
* if isa.arr[self.sa.arr[k] + h] == pval: # <<<<<<<<<<<<<<
@@ -35818,7 +35805,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":149
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":149
* else:
* if isa.arr[self.sa.arr[k] + h] == pval:
* if k > ptail+1: # <<<<<<<<<<<<<<
@@ -35828,7 +35815,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)) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":150
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":150
* if isa.arr[self.sa.arr[k] + h] == pval:
* if k > ptail+1:
* tmp = self.sa.arr[ptail+1] # <<<<<<<<<<<<<<
@@ -35837,7 +35824,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":151
* if k > ptail+1:
* tmp = self.sa.arr[ptail+1]
* self.sa.arr[ptail+1] = self.sa.arr[k] # <<<<<<<<<<<<<<
@@ -35846,7 +35833,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":152
* tmp = self.sa.arr[ptail+1]
* self.sa.arr[ptail+1] = self.sa.arr[k]
* self.sa.arr[k] = tmp # <<<<<<<<<<<<<<
@@ -35858,7 +35845,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":153
* self.sa.arr[ptail+1] = self.sa.arr[k]
* self.sa.arr[k] = tmp
* ptail = ptail + 1 # <<<<<<<<<<<<<<
@@ -35873,7 +35860,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":156
*
* # recursively sort smaller suffixes
* self.q3sort(i, phead-1, h, isa, pad+" ") # <<<<<<<<<<<<<<
@@ -35913,7 +35900,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":160
* # update suffixes with pivot value
* # corresponds to update_group function in Larsson & Sadakane
* for k from phead <= k < ptail+1: # <<<<<<<<<<<<<<
@@ -35923,7 +35910,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":161
* # corresponds to update_group function in Larsson & Sadakane
* for k from phead <= k < ptail+1:
* isa.arr[self.sa.arr[k]] = ptail # <<<<<<<<<<<<<<
@@ -35933,7 +35920,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":162
* for k from phead <= k < ptail+1:
* isa.arr[self.sa.arr[k]] = ptail
* if phead == ptail: # <<<<<<<<<<<<<<
@@ -35943,7 +35930,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__pyx_t_1 = ((__pyx_v_phead == __pyx_v_ptail) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":163
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":163
* isa.arr[self.sa.arr[k]] = ptail
* if phead == ptail:
* self.sa.arr[phead] = -1 # <<<<<<<<<<<<<<
@@ -35955,7 +35942,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":166
*
* # recursively sort larger suffixes
* self.q3sort(ptail+1, j, h, isa, pad+" ") # <<<<<<<<<<<<<<
@@ -36004,7 +35991,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_AddTraceback("_sa.SuffixArray.q3sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.q3sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -36013,8 +36000,8 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_3_sa_Suffi
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_11SuffixArray_9write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_11SuffixArray_9write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_9write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_9write_text(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -36027,16 +36014,16 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_9write_text(PyObject *__pyx_v_self,
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.SuffixArray.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_11SuffixArray_8write_text(((struct __pyx_obj_3_sa_SuffixArray *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11SuffixArray_8write_text(((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":169
+/* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":169
*
*
* def write_text(self, char* filename): # <<<<<<<<<<<<<<
@@ -36044,7 +36031,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_9write_text(PyObject *__pyx_v_self,
*
*/
-static PyObject *__pyx_pf_3_sa_11SuffixArray_8write_text(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_8write_text(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -36055,7 +36042,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":170
*
* def write_text(self, char* filename):
* self.darray.write_text(filename) # <<<<<<<<<<<<<<
@@ -36083,7 +36070,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_8write_text(struct __pyx_obj_3_sa_S
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.SuffixArray.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -36092,8 +36079,8 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_8write_text(struct __pyx_obj_3_sa_S
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_11SuffixArray_11read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_11SuffixArray_11read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_11read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_11read_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -36106,16 +36093,16 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_11read_binary(PyObject *__pyx_v_sel
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.SuffixArray.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.read_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_11SuffixArray_10read_binary(((struct __pyx_obj_3_sa_SuffixArray *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":172
+/* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":172
* self.darray.write_text(filename)
*
* def read_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -36123,13 +36110,13 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_11read_binary(PyObject *__pyx_v_sel
* f = fopen(filename, "r")
*/
-static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_binary(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("read_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":174
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":174
* def read_binary(self, char* filename):
* cdef FILE *f
* f = fopen(filename, "r") # <<<<<<<<<<<<<<
@@ -36138,34 +36125,34 @@ 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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":175
* cdef FILE *f
* f = fopen(filename, "r")
* self.darray.read_handle(f) # <<<<<<<<<<<<<<
* self.sa.read_handle(f)
* self.ha.read_handle(f)
*/
- ((struct __pyx_vtabstruct_3_sa_DataArray *)__pyx_v_self->darray->__pyx_vtab)->read_handle(__pyx_v_self->darray, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":176
* f = fopen(filename, "r")
* self.darray.read_handle(f)
* self.sa.read_handle(f) # <<<<<<<<<<<<<<
* self.ha.read_handle(f)
* fclose(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sa->__pyx_vtab)->read_handle(__pyx_v_self->sa, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":177
* self.darray.read_handle(f)
* self.sa.read_handle(f)
* self.ha.read_handle(f) # <<<<<<<<<<<<<<
* fclose(f)
*
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->ha->__pyx_vtab)->read_handle(__pyx_v_self->ha, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":178
* self.sa.read_handle(f)
* self.ha.read_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -36181,8 +36168,8 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_10read_binary(struct __pyx_obj_3_sa
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_11SuffixArray_13write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_11SuffixArray_13write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_13write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_13write_binary(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -36195,16 +36182,16 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_13write_binary(PyObject *__pyx_v_se
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.SuffixArray.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.write_binary", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_11SuffixArray_12write_binary(((struct __pyx_obj_3_sa_SuffixArray *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":180
+/* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":180
* fclose(f)
*
* def write_binary(self, char* filename): # <<<<<<<<<<<<<<
@@ -36212,13 +36199,13 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_13write_binary(PyObject *__pyx_v_se
* f = fopen(filename, "w")
*/
-static PyObject *__pyx_pf_3_sa_11SuffixArray_12write_binary(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename) {
FILE *__pyx_v_f;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("write_binary", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":182
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":182
* def write_binary(self, char* filename):
* cdef FILE* f
* f = fopen(filename, "w") # <<<<<<<<<<<<<<
@@ -36227,34 +36214,34 @@ 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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":183
* cdef FILE* f
* f = fopen(filename, "w")
* self.darray.write_handle(f) # <<<<<<<<<<<<<<
* self.sa.write_handle(f)
* self.ha.write_handle(f)
*/
- ((struct __pyx_vtabstruct_3_sa_DataArray *)__pyx_v_self->darray->__pyx_vtab)->write_handle(__pyx_v_self->darray, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":184
* f = fopen(filename, "w")
* self.darray.write_handle(f)
* self.sa.write_handle(f) # <<<<<<<<<<<<<<
* self.ha.write_handle(f)
* fclose(f)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->sa->__pyx_vtab)->write_handle(__pyx_v_self->sa, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":185
* self.darray.write_handle(f)
* self.sa.write_handle(f)
* self.ha.write_handle(f) # <<<<<<<<<<<<<<
* fclose(f)
*
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_self->ha->__pyx_vtab)->write_handle(__pyx_v_self->ha, __pyx_v_f);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":186
* self.sa.write_handle(f)
* self.ha.write_handle(f)
* fclose(f) # <<<<<<<<<<<<<<
@@ -36270,8 +36257,8 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_12write_binary(struct __pyx_obj_3_s
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_11SuffixArray_15write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
-static PyObject *__pyx_pw_3_sa_11SuffixArray_15write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_15write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_15write_enhanced(PyObject *__pyx_v_self, PyObject *__pyx_arg_filename) {
char *__pyx_v_filename;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -36284,16 +36271,16 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_15write_enhanced(PyObject *__pyx_v_
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.SuffixArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_11SuffixArray_14write_enhanced(((struct __pyx_obj_3_sa_SuffixArray *)__pyx_v_self), ((char *)__pyx_v_filename));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self), ((char *)__pyx_v_filename));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":188
+/* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":188
* fclose(f)
*
* def write_enhanced(self, char* filename): # <<<<<<<<<<<<<<
@@ -36301,7 +36288,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_15write_enhanced(PyObject *__pyx_v_
* self.darray.write_enhanced_handle(f)
*/
-static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, char *__pyx_v_filename) {
PyObject *__pyx_v_f = NULL;
PyObject *__pyx_v_a_i = NULL;
PyObject *__pyx_v_w_i = NULL;
@@ -36325,7 +36312,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":189
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -36365,7 +36352,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":190
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f:
* self.darray.write_enhanced_handle(f) # <<<<<<<<<<<<<<
@@ -36385,7 +36372,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":191
* with open(filename, "w") as f:
* self.darray.write_enhanced_handle(f)
* for a_i in self.sa: # <<<<<<<<<<<<<<
@@ -36430,7 +36417,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":192
* self.darray.write_enhanced_handle(f)
* for a_i in self.sa:
* f.write("%d " % a_i) # <<<<<<<<<<<<<<
@@ -36454,7 +36441,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":193
* for a_i in self.sa:
* f.write("%d " % a_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -36468,7 +36455,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":194
* f.write("%d " % a_i)
* f.write("\n")
* for w_i in self.ha: # <<<<<<<<<<<<<<
@@ -36513,7 +36500,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":195
* f.write("\n")
* for w_i in self.ha:
* f.write("%d " % w_i) # <<<<<<<<<<<<<<
@@ -36537,7 +36524,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":196
* for w_i in self.ha:
* f.write("%d " % w_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -36561,7 +36548,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":189
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -36569,7 +36556,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_3
* for a_i in self.sa:
*/
/*except:*/ {
- __Pyx_AddTraceback("_sa.SuffixArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_GOTREF(__pyx_t_4);
@@ -36648,7 +36635,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_3
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("_sa.SuffixArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.write_enhanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_f);
@@ -36659,7 +36646,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":198
* f.write("\n")
*
* cdef int __search_high(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -36667,14 +36654,14 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_14write_enhanced(struct __pyx_obj_3
*
*/
-static int __pyx_f_3_sa_11SuffixArray___search_high(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_word_id, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high) {
+static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_word_id, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high) {
int __pyx_v_midpoint;
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("__search_high", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":201
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":201
* cdef int midpoint
*
* if low >= high: # <<<<<<<<<<<<<<
@@ -36684,7 +36671,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":202
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":202
*
* if low >= high:
* return high # <<<<<<<<<<<<<<
@@ -36697,7 +36684,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":203
* if low >= high:
* return high
* midpoint = (high + low) / 2 # <<<<<<<<<<<<<<
@@ -36706,7 +36693,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":204
* return high
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<<
@@ -36716,27 +36703,27 @@ 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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":205
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":205
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id:
* return self.__search_high(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<<
* else:
* return self.__search_high(word_id, offset, low, midpoint)
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_high(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, (__pyx_v_midpoint + 1), __pyx_v_high);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_high(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, (__pyx_v_midpoint + 1), __pyx_v_high);
goto __pyx_L0;
goto __pyx_L4;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":207
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":207
* return self.__search_high(word_id, offset, midpoint+1, high)
* else:
* return self.__search_high(word_id, offset, low, midpoint) # <<<<<<<<<<<<<<
*
* cdef int __search_low(self, int word_id, int offset, int low, int high):
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_high(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_low, __pyx_v_midpoint);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_high(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_low, __pyx_v_midpoint);
goto __pyx_L0;
}
__pyx_L4:;
@@ -36747,7 +36734,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":209
* return self.__search_high(word_id, offset, low, midpoint)
*
* cdef int __search_low(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -36755,14 +36742,14 @@ static int __pyx_f_3_sa_11SuffixArray___search_high(struct __pyx_obj_3_sa_Suffix
*
*/
-static int __pyx_f_3_sa_11SuffixArray___search_low(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_word_id, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high) {
+static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_word_id, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high) {
int __pyx_v_midpoint;
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("__search_low", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":212
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":212
* cdef int midpoint
*
* if low >= high: # <<<<<<<<<<<<<<
@@ -36772,7 +36759,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":213
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":213
*
* if low >= high:
* return high # <<<<<<<<<<<<<<
@@ -36785,7 +36772,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":214
* if low >= high:
* return high
* midpoint = (high + low) / 2 # <<<<<<<<<<<<<<
@@ -36794,7 +36781,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":215
* return high
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<<
@@ -36804,27 +36791,27 @@ 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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":216
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":216
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id:
* return self.__search_low(word_id, offset, low, midpoint) # <<<<<<<<<<<<<<
* else:
* return self.__search_low(word_id, offset, midpoint+1, high)
*/
- __pyx_r = ((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);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_low(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_low, __pyx_v_midpoint);
goto __pyx_L0;
goto __pyx_L4;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":218
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":218
* return self.__search_low(word_id, offset, low, midpoint)
* else:
* return self.__search_low(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<<
*
* cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint):
*/
- __pyx_r = ((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_midpoint + 1), __pyx_v_high);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_low(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, (__pyx_v_midpoint + 1), __pyx_v_high);
goto __pyx_L0;
}
__pyx_L4:;
@@ -36835,7 +36822,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":220
* return self.__search_low(word_id, offset, midpoint+1, high)
*
* cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): # <<<<<<<<<<<<<<
@@ -36843,7 +36830,7 @@ static int __pyx_f_3_sa_11SuffixArray___search_low(struct __pyx_obj_3_sa_SuffixA
* self.__search_high(word_id, offset, midpoint, high))
*/
-static PyObject *__pyx_f_3_sa_11SuffixArray___get_range(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_word_id, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high, int __pyx_v_midpoint) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_word_id, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high, int __pyx_v_midpoint) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -36854,7 +36841,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":221
*
* cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint):
* return (self.__search_low(word_id, offset, low, midpoint), # <<<<<<<<<<<<<<
@@ -36862,17 +36849,17 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___get_range(struct __pyx_obj_3_sa_Su
*
*/
__Pyx_XDECREF(__pyx_r);
- __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_t_1 = PyInt_FromLong(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_low(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_low, __pyx_v_midpoint)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":222
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":222
* cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint):
* return (self.__search_low(word_id, offset, low, midpoint),
* self.__search_high(word_id, offset, midpoint, high)) # <<<<<<<<<<<<<<
*
* cdef __lookup_helper(self, int word_id, int offset, int low, int high):
*/
- __pyx_t_2 = PyInt_FromLong(((struct __pyx_vtabstruct_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_high(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_midpoint, __pyx_v_high)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_high(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_midpoint, __pyx_v_high)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -36892,7 +36879,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___get_range(struct __pyx_obj_3_sa_Su
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.SuffixArray.__get_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.__get_range", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -36900,7 +36887,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":224
* self.__search_high(word_id, offset, midpoint, high))
*
* cdef __lookup_helper(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -36908,7 +36895,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___get_range(struct __pyx_obj_3_sa_Su
*
*/
-static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_word_id, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, int __pyx_v_word_id, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high) {
int __pyx_v_midpoint;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -36921,7 +36908,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":227
* cdef int midpoint
*
* if offset == 0: # <<<<<<<<<<<<<<
@@ -36931,7 +36918,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
__pyx_t_1 = ((__pyx_v_offset == 0) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":228
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":228
*
* if offset == 0:
* return (self.ha.arr[word_id], self.ha.arr[word_id+1]) # <<<<<<<<<<<<<<
@@ -36958,7 +36945,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":229
* if offset == 0:
* return (self.ha.arr[word_id], self.ha.arr[word_id+1])
* if low >= high: # <<<<<<<<<<<<<<
@@ -36968,7 +36955,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
__pyx_t_1 = ((__pyx_v_low >= __pyx_v_high) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":230
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":230
* return (self.ha.arr[word_id], self.ha.arr[word_id+1])
* if low >= high:
* return None # <<<<<<<<<<<<<<
@@ -36983,7 +36970,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":232
* return None
*
* midpoint = (high + low) / 2 # <<<<<<<<<<<<<<
@@ -36992,7 +36979,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":233
*
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<<
@@ -37002,7 +36989,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":234
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":234
* midpoint = (high + low) / 2
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id:
* return self.__get_range(word_id, offset, low, high, midpoint) # <<<<<<<<<<<<<<
@@ -37010,7 +36997,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
* return self.__lookup_helper(word_id, offset, low, midpoint)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = ((struct __pyx_vtabstruct_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___get_range(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_low, __pyx_v_high, __pyx_v_midpoint); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___get_range(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_low, __pyx_v_high, __pyx_v_midpoint); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
@@ -37019,7 +37006,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":235
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id:
* return self.__get_range(word_id, offset, low, high, midpoint)
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] > word_id: # <<<<<<<<<<<<<<
@@ -37029,7 +37016,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":236
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":236
* return self.__get_range(word_id, offset, low, high, midpoint)
* if self.darray.data.arr[self.sa.arr[midpoint] + offset] > word_id:
* return self.__lookup_helper(word_id, offset, low, midpoint) # <<<<<<<<<<<<<<
@@ -37037,7 +37024,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
* return self.__lookup_helper(word_id, offset, midpoint+1, high)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = ((struct __pyx_vtabstruct_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___lookup_helper(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_low, __pyx_v_midpoint); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___lookup_helper(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_low, __pyx_v_midpoint); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
@@ -37046,7 +37033,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":238
* return self.__lookup_helper(word_id, offset, low, midpoint)
* else:
* return self.__lookup_helper(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<<
@@ -37054,7 +37041,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
* def lookup(self, word, int offset, int low, int high):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = ((struct __pyx_vtabstruct_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___lookup_helper(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, (__pyx_v_midpoint + 1), __pyx_v_high); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___lookup_helper(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, (__pyx_v_midpoint + 1), __pyx_v_high); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
@@ -37068,7 +37055,7 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.SuffixArray.__lookup_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.__lookup_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -37077,8 +37064,8 @@ static PyObject *__pyx_f_3_sa_11SuffixArray___lookup_helper(struct __pyx_obj_3_s
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_11SuffixArray_17lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_11SuffixArray_17lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_17lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_17lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_word = 0;
int __pyx_v_offset;
int __pyx_v_low;
@@ -37144,16 +37131,16 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_17lookup(PyObject *__pyx_v_self, Py
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("lookup", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.SuffixArray.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_11SuffixArray_16lookup(((struct __pyx_obj_3_sa_SuffixArray *)__pyx_v_self), __pyx_v_word, __pyx_v_offset, __pyx_v_low, __pyx_v_high);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self), __pyx_v_word, __pyx_v_offset, __pyx_v_low, __pyx_v_high);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":240
+/* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":240
* return self.__lookup_helper(word_id, offset, midpoint+1, high)
*
* def lookup(self, word, int offset, int low, int high): # <<<<<<<<<<<<<<
@@ -37161,7 +37148,7 @@ static PyObject *__pyx_pw_3_sa_11SuffixArray_17lookup(PyObject *__pyx_v_self, Py
* if low == -1:
*/
-static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_word, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_self, PyObject *__pyx_v_word, int __pyx_v_offset, int __pyx_v_low, int __pyx_v_high) {
PyObject *__pyx_v_word_id = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -37175,7 +37162,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":242
* def lookup(self, word, int offset, int low, int high):
* cdef int wordid
* if low == -1: # <<<<<<<<<<<<<<
@@ -37185,7 +37172,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = ((__pyx_v_low == -1) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":243
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":243
* cdef int wordid
* if low == -1:
* low = 0 # <<<<<<<<<<<<<<
@@ -37197,7 +37184,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":244
* if low == -1:
* low = 0
* if high == -1: # <<<<<<<<<<<<<<
@@ -37207,7 +37194,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
__pyx_t_1 = ((__pyx_v_high == -1) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":245
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":245
* low = 0
* if high == -1:
* high = len(self.sa) # <<<<<<<<<<<<<<
@@ -37223,7 +37210,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":246
* if high == -1:
* high = len(self.sa)
* if word in self.darray.word2id: # <<<<<<<<<<<<<<
@@ -37234,7 +37221,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
__pyx_t_4 = (__pyx_t_1 != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":247
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":247
* high = len(self.sa)
* if word in self.darray.word2id:
* word_id = self.darray.word2id[word] # <<<<<<<<<<<<<<
@@ -37246,7 +37233,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":248
* if word in self.darray.word2id:
* word_id = self.darray.word2id[word]
* return self.__lookup_helper(word_id, offset, low, high) # <<<<<<<<<<<<<<
@@ -37255,7 +37242,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_word_id); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___lookup_helper(__pyx_v_self, __pyx_t_5, __pyx_v_offset, __pyx_v_low, __pyx_v_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___lookup_helper(__pyx_v_self, __pyx_t_5, __pyx_v_offset, __pyx_v_low, __pyx_v_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -37264,7 +37251,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/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":250
* return self.__lookup_helper(word_id, offset, low, high)
* else:
* return None # <<<<<<<<<<<<<<
@@ -37280,7 +37267,7 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.SuffixArray.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.SuffixArray.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_word_id);
@@ -37290,20 +37277,1140 @@ static PyObject *__pyx_pf_3_sa_11SuffixArray_16lookup(struct __pyx_obj_3_sa_Suff
}
/* Python wrapper */
-static int __pyx_pw_3_sa_8TrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_8TrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9__cinit___lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_11OnlineStats_9__cinit___lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9__cinit___lambda1, METH_NOARGS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9__cinit___lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":56
+ * self.phrases_f = defaultdict(int)
+ * self.phrases_e = defaultdict(int)
+ * self.phrases_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<<
+ * self.phrases_al = defaultdict(lambda: defaultdict(tuple))
+ *
+ */
+
+static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("lambda1", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("cdec.sa._sa.OnlineStats.__cinit__.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9__cinit___1lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_11OnlineStats_9__cinit___1lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9__cinit___1lambda2, METH_NOARGS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9__cinit___1lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":57
+ * self.phrases_e = defaultdict(int)
+ * self.phrases_fe = defaultdict(lambda: defaultdict(int))
+ * self.phrases_al = defaultdict(lambda: defaultdict(tuple)) # <<<<<<<<<<<<<<
+ *
+ * # Bilexical counts
+ */
+
+static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("lambda2", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)((PyObject*)(&PyTuple_Type))));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyTuple_Type))));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyTuple_Type))));
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("cdec.sa._sa.OnlineStats.__cinit__.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9__cinit___2lambda3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_11OnlineStats_9__cinit___2lambda3 = {__Pyx_NAMESTR("lambda3"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9__cinit___2lambda3, METH_NOARGS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9__cinit___2lambda3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":62
+ * self.bilex_f = defaultdict(int)
+ * self.bilex_e = defaultdict(int)
+ * self.bilex_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<<
+ *
+ * cdef int PRECOMPUTE = 0
+ */
+
+static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("lambda3", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("cdec.sa._sa.OnlineStats.__cinit__.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":49
+ * cdef public bilex_fe
+ *
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * # Keep track of everything that can be sampled:
+ * self.samples_f = defaultdict(int)
+ */
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":51
+ * def __cinit__(self):
+ * # Keep track of everything that can be sampled:
+ * self.samples_f = defaultdict(int) # <<<<<<<<<<<<<<
+ *
+ * # Phrase counts
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_3);
+ __Pyx_GOTREF(__pyx_v_self->samples_f);
+ __Pyx_DECREF(__pyx_v_self->samples_f);
+ __pyx_v_self->samples_f = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":54
+ *
+ * # Phrase counts
+ * self.phrases_f = defaultdict(int) # <<<<<<<<<<<<<<
+ * self.phrases_e = defaultdict(int)
+ * self.phrases_fe = defaultdict(lambda: defaultdict(int))
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->phrases_f);
+ __Pyx_DECREF(__pyx_v_self->phrases_f);
+ __pyx_v_self->phrases_f = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":55
+ * # Phrase counts
+ * self.phrases_f = defaultdict(int)
+ * self.phrases_e = defaultdict(int) # <<<<<<<<<<<<<<
+ * self.phrases_fe = defaultdict(lambda: defaultdict(int))
+ * self.phrases_al = defaultdict(lambda: defaultdict(tuple))
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_3);
+ __Pyx_GOTREF(__pyx_v_self->phrases_e);
+ __Pyx_DECREF(__pyx_v_self->phrases_e);
+ __pyx_v_self->phrases_e = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":56
+ * self.phrases_f = defaultdict(int)
+ * self.phrases_e = defaultdict(int)
+ * self.phrases_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<<
+ * self.phrases_al = defaultdict(lambda: defaultdict(tuple))
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_11OnlineStats_9__cinit___lambda1, 0, __pyx_n_s_101, NULL, __pyx_n_s_102, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+ __Pyx_GIVEREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_v_self->phrases_fe);
+ __Pyx_DECREF(__pyx_v_self->phrases_fe);
+ __pyx_v_self->phrases_fe = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":57
+ * self.phrases_e = defaultdict(int)
+ * self.phrases_fe = defaultdict(lambda: defaultdict(int))
+ * self.phrases_al = defaultdict(lambda: defaultdict(tuple)) # <<<<<<<<<<<<<<
+ *
+ * # Bilexical counts
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_11OnlineStats_9__cinit___1lambda2, 0, __pyx_n_s_101, NULL, __pyx_n_s_102, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; __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 = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->phrases_al);
+ __Pyx_DECREF(__pyx_v_self->phrases_al);
+ __pyx_v_self->phrases_al = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":60
+ *
+ * # Bilexical counts
+ * self.bilex_f = defaultdict(int) # <<<<<<<<<<<<<<
+ * self.bilex_e = defaultdict(int)
+ * self.bilex_fe = defaultdict(lambda: defaultdict(int))
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 60; __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 = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_GIVEREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_v_self->bilex_f);
+ __Pyx_DECREF(__pyx_v_self->bilex_f);
+ __pyx_v_self->bilex_f = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":61
+ * # Bilexical counts
+ * self.bilex_f = defaultdict(int)
+ * self.bilex_e = defaultdict(int) # <<<<<<<<<<<<<<
+ * self.bilex_fe = defaultdict(lambda: defaultdict(int))
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->bilex_e);
+ __Pyx_DECREF(__pyx_v_self->bilex_e);
+ __pyx_v_self->bilex_e = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":62
+ * self.bilex_f = defaultdict(int)
+ * self.bilex_e = defaultdict(int)
+ * self.bilex_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<<
+ *
+ * cdef int PRECOMPUTE = 0
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_11OnlineStats_9__cinit___2lambda3, 0, __pyx_n_s_101, NULL, __pyx_n_s_102, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_3);
+ __Pyx_GOTREF(__pyx_v_self->bilex_fe);
+ __Pyx_DECREF(__pyx_v_self->bilex_fe);
+ __pyx_v_self->bilex_fe = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("cdec.sa._sa.OnlineStats.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9samples_f_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9samples_f_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f___get__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":40
+ *
+ * cdef class OnlineStats:
+ * cdef public samples_f # <<<<<<<<<<<<<<
+ * cdef public phrases_f
+ * cdef public phrases_e
+ */
+
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self->samples_f);
+ __pyx_r = __pyx_v_self->samples_f;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9samples_f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9samples_f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(__pyx_v_self->samples_f);
+ __Pyx_DECREF(__pyx_v_self->samples_f);
+ __pyx_v_self->samples_f = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9samples_f_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9samples_f_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(__pyx_v_self->samples_f);
+ __Pyx_DECREF(__pyx_v_self->samples_f);
+ __pyx_v_self->samples_f = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f___get__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":41
+ * cdef class OnlineStats:
+ * cdef public samples_f
+ * cdef public phrases_f # <<<<<<<<<<<<<<
+ * cdef public phrases_e
+ * cdef public phrases_fe
+ */
+
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self->phrases_f);
+ __pyx_r = __pyx_v_self->phrases_f;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(__pyx_v_self->phrases_f);
+ __Pyx_DECREF(__pyx_v_self->phrases_f);
+ __pyx_v_self->phrases_f = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(__pyx_v_self->phrases_f);
+ __Pyx_DECREF(__pyx_v_self->phrases_f);
+ __pyx_v_self->phrases_f = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e___get__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":42
+ * cdef public samples_f
+ * cdef public phrases_f
+ * cdef public phrases_e # <<<<<<<<<<<<<<
+ * cdef public phrases_fe
+ * cdef public phrases_al
+ */
+
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self->phrases_e);
+ __pyx_r = __pyx_v_self->phrases_e;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(__pyx_v_self->phrases_e);
+ __Pyx_DECREF(__pyx_v_self->phrases_e);
+ __pyx_v_self->phrases_e = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(__pyx_v_self->phrases_e);
+ __Pyx_DECREF(__pyx_v_self->phrases_e);
+ __pyx_v_self->phrases_e = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe___get__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":43
+ * cdef public phrases_f
+ * cdef public phrases_e
+ * cdef public phrases_fe # <<<<<<<<<<<<<<
+ * cdef public phrases_al
+ * cdef public bilex_f
+ */
+
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self->phrases_fe);
+ __pyx_r = __pyx_v_self->phrases_fe;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(__pyx_v_self->phrases_fe);
+ __Pyx_DECREF(__pyx_v_self->phrases_fe);
+ __pyx_v_self->phrases_fe = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(__pyx_v_self->phrases_fe);
+ __Pyx_DECREF(__pyx_v_self->phrases_fe);
+ __pyx_v_self->phrases_fe = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al___get__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":44
+ * cdef public phrases_e
+ * cdef public phrases_fe
+ * cdef public phrases_al # <<<<<<<<<<<<<<
+ * cdef public bilex_f
+ * cdef public bilex_e
+ */
+
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self->phrases_al);
+ __pyx_r = __pyx_v_self->phrases_al;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(__pyx_v_self->phrases_al);
+ __Pyx_DECREF(__pyx_v_self->phrases_al);
+ __pyx_v_self->phrases_al = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(__pyx_v_self->phrases_al);
+ __Pyx_DECREF(__pyx_v_self->phrases_al);
+ __pyx_v_self->phrases_al = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_f___get__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":45
+ * cdef public phrases_fe
+ * cdef public phrases_al
+ * cdef public bilex_f # <<<<<<<<<<<<<<
+ * cdef public bilex_e
+ * cdef public bilex_fe
+ */
+
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_f___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self->bilex_f);
+ __pyx_r = __pyx_v_self->bilex_f;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(__pyx_v_self->bilex_f);
+ __Pyx_DECREF(__pyx_v_self->bilex_f);
+ __pyx_v_self->bilex_f = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(__pyx_v_self->bilex_f);
+ __Pyx_DECREF(__pyx_v_self->bilex_f);
+ __pyx_v_self->bilex_f = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_e___get__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":46
+ * cdef public phrases_al
+ * cdef public bilex_f
+ * cdef public bilex_e # <<<<<<<<<<<<<<
+ * cdef public bilex_fe
+ *
+ */
+
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_e___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self->bilex_e);
+ __pyx_r = __pyx_v_self->bilex_e;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(__pyx_v_self->bilex_e);
+ __Pyx_DECREF(__pyx_v_self->bilex_e);
+ __pyx_v_self->bilex_e = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(__pyx_v_self->bilex_e);
+ __Pyx_DECREF(__pyx_v_self->bilex_e);
+ __pyx_v_self->bilex_e = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe___get__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":47
+ * cdef public bilex_f
+ * cdef public bilex_e
+ * cdef public bilex_fe # <<<<<<<<<<<<<<
+ *
+ * def __cinit__(self):
+ */
+
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self->bilex_fe);
+ __pyx_r = __pyx_v_self->bilex_fe;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(__pyx_v_self->bilex_fe);
+ __Pyx_DECREF(__pyx_v_self->bilex_fe);
+ __pyx_v_self->bilex_fe = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self));
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(__pyx_v_self->bilex_fe);
+ __Pyx_DECREF(__pyx_v_self->bilex_fe);
+ __pyx_v_self->bilex_fe = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_4cdec_2sa_3_sa_8TrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_8TrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
- __pyx_r = __pyx_pf_3_sa_8TrieNode___cinit__(((struct __pyx_obj_3_sa_TrieNode *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_8TrieNode___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":49
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":74
* cdef public children
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -37311,7 +38418,7 @@ static int __pyx_pw_3_sa_8TrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *
*
*/
-static int __pyx_pf_3_sa_8TrieNode___cinit__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -37320,14 +38427,14 @@ 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":50
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":75
*
* def __cinit__(self):
* self.children = {} # <<<<<<<<<<<<<<
*
* cdef class ExtendedTrieNode(TrieNode):
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__Pyx_GOTREF(__pyx_v_self->children);
@@ -37339,7 +38446,7 @@ static int __pyx_pf_3_sa_8TrieNode___cinit__(struct __pyx_obj_3_sa_TrieNode *__p
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.TrieNode.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieNode.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -37347,17 +38454,17 @@ static int __pyx_pf_3_sa_8TrieNode___cinit__(struct __pyx_obj_3_sa_TrieNode *__p
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_8TrieNode_8children_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_8TrieNode_8children_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_8TrieNode_8children_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_8TrieNode_8children_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_8TrieNode_8children___get__(((struct __pyx_obj_3_sa_TrieNode *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children___get__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":47
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":72
*
* cdef class TrieNode:
* cdef public children # <<<<<<<<<<<<<<
@@ -37365,7 +38472,7 @@ static PyObject *__pyx_pw_3_sa_8TrieNode_8children_1__get__(PyObject *__pyx_v_se
* def __cinit__(self):
*/
-static PyObject *__pyx_pf_3_sa_8TrieNode_8children___get__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children___get__(struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -37382,17 +38489,17 @@ static PyObject *__pyx_pf_3_sa_8TrieNode_8children___get__(struct __pyx_obj_3_sa
}
/* Python wrapper */
-static int __pyx_pw_3_sa_8TrieNode_8children_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_8TrieNode_8children_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_8TrieNode_8children_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_8TrieNode_8children_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_8TrieNode_8children_2__set__(((struct __pyx_obj_3_sa_TrieNode *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_8TrieNode_8children_2__set__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
@@ -37408,17 +38515,17 @@ static int __pyx_pf_3_sa_8TrieNode_8children_2__set__(struct __pyx_obj_3_sa_Trie
}
/* Python wrapper */
-static int __pyx_pw_3_sa_8TrieNode_8children_5__del__(PyObject *__pyx_v_self); /*proto*/
-static int __pyx_pw_3_sa_8TrieNode_8children_5__del__(PyObject *__pyx_v_self) {
+static int __pyx_pw_4cdec_2sa_3_sa_8TrieNode_8children_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_8TrieNode_8children_5__del__(PyObject *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_8TrieNode_8children_4__del__(((struct __pyx_obj_3_sa_TrieNode *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_8TrieNode_8children_4__del__(struct __pyx_obj_3_sa_TrieNode *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
@@ -37434,8 +38541,8 @@ static int __pyx_pf_3_sa_8TrieNode_8children_4__del__(struct __pyx_obj_3_sa_Trie
}
/* Python wrapper */
-static int __pyx_pw_3_sa_16ExtendedTrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_16ExtendedTrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_phrase = 0;
PyObject *__pyx_v_phrase_location = 0;
PyObject *__pyx_v_suffix_link = 0;
@@ -37449,7 +38556,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":57
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":82
* cdef public suffix_link
*
* def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): # <<<<<<<<<<<<<<
@@ -37488,7 +38595,7 @@ static int __pyx_pw_3_sa_16ExtendedTrieNode_1__cinit__(PyObject *__pyx_v_self, P
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -37505,23 +38612,23 @@ static int __pyx_pw_3_sa_16ExtendedTrieNode_1__cinit__(PyObject *__pyx_v_self, P
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.ExtendedTrieNode.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.ExtendedTrieNode.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_16ExtendedTrieNode___cinit__(((struct __pyx_obj_3_sa_ExtendedTrieNode *)__pyx_v_self), __pyx_v_phrase, __pyx_v_phrase_location, __pyx_v_suffix_link);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)__pyx_v_self), __pyx_v_phrase, __pyx_v_phrase_location, __pyx_v_suffix_link);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_phrase, PyObject *__pyx_v_phrase_location, PyObject *__pyx_v_suffix_link) {
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_phrase, PyObject *__pyx_v_phrase_location, PyObject *__pyx_v_suffix_link) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":58
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":83
*
* def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None):
* self.phrase = phrase # <<<<<<<<<<<<<<
@@ -37534,7 +38641,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":59
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":84
* def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None):
* self.phrase = phrase
* self.phrase_location = phrase_location # <<<<<<<<<<<<<<
@@ -37547,7 +38654,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":60
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":85
* self.phrase = phrase
* self.phrase_location = phrase_location
* self.suffix_link = suffix_link # <<<<<<<<<<<<<<
@@ -37566,17 +38673,17 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj_3_sa_Exte
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_6phrase_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_6phrase_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_16ExtendedTrieNode_6phrase___get__(((struct __pyx_obj_3_sa_ExtendedTrieNode *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase___get__(((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":53
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":78
*
* cdef class ExtendedTrieNode(TrieNode):
* cdef public phrase # <<<<<<<<<<<<<<
@@ -37584,7 +38691,7 @@ static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_6phrase_1__get__(PyObject *__p
* cdef public suffix_link
*/
-static PyObject *__pyx_pf_3_sa_16ExtendedTrieNode_6phrase___get__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase___get__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -37601,17 +38708,17 @@ static PyObject *__pyx_pf_3_sa_16ExtendedTrieNode_6phrase___get__(struct __pyx_o
}
/* Python wrapper */
-static int __pyx_pw_3_sa_16ExtendedTrieNode_6phrase_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_16ExtendedTrieNode_6phrase_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_16ExtendedTrieNode_6phrase_2__set__(((struct __pyx_obj_3_sa_ExtendedTrieNode *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_16ExtendedTrieNode_6phrase_2__set__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
@@ -37627,17 +38734,17 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode_6phrase_2__set__(struct __pyx_obj_3_
}
/* Python wrapper */
-static int __pyx_pw_3_sa_16ExtendedTrieNode_6phrase_5__del__(PyObject *__pyx_v_self); /*proto*/
-static int __pyx_pw_3_sa_16ExtendedTrieNode_6phrase_5__del__(PyObject *__pyx_v_self) {
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_5__del__(PyObject *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_16ExtendedTrieNode_6phrase_4__del__(((struct __pyx_obj_3_sa_ExtendedTrieNode *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_16ExtendedTrieNode_6phrase_4__del__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
@@ -37653,17 +38760,17 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode_6phrase_4__del__(struct __pyx_obj_3_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location___get__(((struct __pyx_obj_3_sa_ExtendedTrieNode *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location___get__(((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":54
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":79
* cdef class ExtendedTrieNode(TrieNode):
* cdef public phrase
* cdef public phrase_location # <<<<<<<<<<<<<<
@@ -37671,7 +38778,7 @@ static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_1__get__(PyO
*
*/
-static PyObject *__pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location___get__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location___get__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -37688,17 +38795,17 @@ static PyObject *__pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location___get__(stru
}
/* Python wrapper */
-static int __pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location_2__set__(((struct __pyx_obj_3_sa_ExtendedTrieNode *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location_2__set__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
@@ -37714,17 +38821,17 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location_2__set__(struct __
}
/* Python wrapper */
-static int __pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_5__del__(PyObject *__pyx_v_self); /*proto*/
-static int __pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_5__del__(PyObject *__pyx_v_self) {
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_5__del__(PyObject *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location_4__del__(((struct __pyx_obj_3_sa_ExtendedTrieNode *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location_4__del__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
@@ -37740,17 +38847,17 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode_15phrase_location_4__del__(struct __
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link___get__(((struct __pyx_obj_3_sa_ExtendedTrieNode *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link___get__(((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":55
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":80
* cdef public phrase
* cdef public phrase_location
* cdef public suffix_link # <<<<<<<<<<<<<<
@@ -37758,7 +38865,7 @@ static PyObject *__pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_1__get__(PyObjec
* def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None):
*/
-static PyObject *__pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link___get__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link___get__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -37775,17 +38882,17 @@ static PyObject *__pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link___get__(struct _
}
/* Python wrapper */
-static int __pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link_2__set__(((struct __pyx_obj_3_sa_ExtendedTrieNode *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link_2__set__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
@@ -37801,17 +38908,17 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link_2__set__(struct __pyx_
}
/* Python wrapper */
-static int __pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_5__del__(PyObject *__pyx_v_self); /*proto*/
-static int __pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_5__del__(PyObject *__pyx_v_self) {
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_5__del__(PyObject *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link_4__del__(((struct __pyx_obj_3_sa_ExtendedTrieNode *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link_4__del__(struct __pyx_obj_3_sa_ExtendedTrieNode *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
@@ -37827,8 +38934,8 @@ static int __pyx_pf_3_sa_16ExtendedTrieNode_11suffix_link_4__del__(struct __pyx_
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_extended = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
@@ -37839,7 +38946,7 @@ static int __pyx_pw_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__extended,0};
PyObject* values[1] = {0};
- values[0] = __pyx_k_101;
+ values[0] = __pyx_k_103;
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -37857,7 +38964,7 @@ static int __pyx_pw_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -37870,18 +38977,18 @@ static int __pyx_pw_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.TrieTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_9TrieTable___cinit__(((struct __pyx_obj_3_sa_TrieTable *)__pyx_v_self), __pyx_v_extended);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_v_self), __pyx_v_extended);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":67
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":92
* cdef public int count
* cdef public root
* def __cinit__(self, extended=False): # <<<<<<<<<<<<<<
@@ -37889,7 +38996,7 @@ static int __pyx_pw_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, PyObject
* self.extended = extended
*/
-static int __pyx_pf_3_sa_9TrieTable___cinit__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_extended) {
+static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_extended) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -37900,7 +39007,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":68
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":93
* cdef public root
* def __cinit__(self, extended=False):
* self.count = 0 # <<<<<<<<<<<<<<
@@ -37909,34 +39016,34 @@ 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":69
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":94
* def __cinit__(self, extended=False):
* self.count = 0
* self.extended = extended # <<<<<<<<<<<<<<
* if extended:
* self.root = ExtendedTrieNode()
*/
- __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 = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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 = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->extended = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":70
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":95
* self.count = 0
* self.extended = extended
* if extended: # <<<<<<<<<<<<<<
* self.root = ExtendedTrieNode()
* else:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_extended); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_extended); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":71
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":96
* self.extended = extended
* if extended:
* self.root = ExtendedTrieNode() # <<<<<<<<<<<<<<
* else:
* self.root = TrieNode()
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_v_self->root);
@@ -37947,14 +39054,14 @@ static int __pyx_pf_3_sa_9TrieTable___cinit__(struct __pyx_obj_3_sa_TrieTable *_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":73
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":98
* self.root = ExtendedTrieNode()
* else:
* self.root = TrieNode() # <<<<<<<<<<<<<<
*
* # linked list structure for storing matches in BaselineRuleFactory
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_TrieNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_TrieNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_v_self->root);
@@ -37968,7 +39075,7 @@ static int __pyx_pf_3_sa_9TrieTable___cinit__(struct __pyx_obj_3_sa_TrieTable *_
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.TrieTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -37976,17 +39083,17 @@ static int __pyx_pf_3_sa_9TrieTable___cinit__(struct __pyx_obj_3_sa_TrieTable *_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9TrieTable_8extended_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_9TrieTable_8extended_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9TrieTable_8extended_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9TrieTable_8extended_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9TrieTable_8extended___get__(((struct __pyx_obj_3_sa_TrieTable *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9TrieTable_8extended___get__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":64
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":89
*
* cdef class TrieTable:
* cdef public int extended # <<<<<<<<<<<<<<
@@ -37994,7 +39101,7 @@ static PyObject *__pyx_pw_3_sa_9TrieTable_8extended_1__get__(PyObject *__pyx_v_s
* cdef public root
*/
-static PyObject *__pyx_pf_3_sa_9TrieTable_8extended___get__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9TrieTable_8extended___get__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -38003,7 +39110,7 @@ static PyObject *__pyx_pf_3_sa_9TrieTable_8extended___get__(struct __pyx_obj_3_s
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->extended); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->extended); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -38013,7 +39120,7 @@ static PyObject *__pyx_pf_3_sa_9TrieTable_8extended___get__(struct __pyx_obj_3_s
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.TrieTable.extended.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieTable.extended.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -38022,17 +39129,17 @@ static PyObject *__pyx_pf_3_sa_9TrieTable_8extended___get__(struct __pyx_obj_3_s
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9TrieTable_8extended_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_9TrieTable_8extended_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_8extended_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_8extended_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9TrieTable_8extended_2__set__(((struct __pyx_obj_3_sa_TrieTable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9TrieTable_8extended_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9TrieTable_8extended_2__set__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_8extended_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -38040,13 +39147,13 @@ static int __pyx_pf_3_sa_9TrieTable_8extended_2__set__(struct __pyx_obj_3_sa_Tri
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__set__", 0);
- __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->extended = __pyx_t_1;
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.TrieTable.extended.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieTable.extended.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -38054,17 +39161,17 @@ static int __pyx_pf_3_sa_9TrieTable_8extended_2__set__(struct __pyx_obj_3_sa_Tri
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9TrieTable_5count_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_9TrieTable_5count_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9TrieTable_5count_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9TrieTable_5count_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9TrieTable_5count___get__(((struct __pyx_obj_3_sa_TrieTable *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9TrieTable_5count___get__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":65
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":90
* cdef class TrieTable:
* cdef public int extended
* cdef public int count # <<<<<<<<<<<<<<
@@ -38072,7 +39179,7 @@ static PyObject *__pyx_pw_3_sa_9TrieTable_5count_1__get__(PyObject *__pyx_v_self
* def __cinit__(self, extended=False):
*/
-static PyObject *__pyx_pf_3_sa_9TrieTable_5count___get__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9TrieTable_5count___get__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -38081,7 +39188,7 @@ static PyObject *__pyx_pf_3_sa_9TrieTable_5count___get__(struct __pyx_obj_3_sa_T
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -38091,7 +39198,7 @@ static PyObject *__pyx_pf_3_sa_9TrieTable_5count___get__(struct __pyx_obj_3_sa_T
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.TrieTable.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieTable.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -38100,17 +39207,17 @@ static PyObject *__pyx_pf_3_sa_9TrieTable_5count___get__(struct __pyx_obj_3_sa_T
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9TrieTable_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_9TrieTable_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9TrieTable_5count_2__set__(((struct __pyx_obj_3_sa_TrieTable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9TrieTable_5count_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9TrieTable_5count_2__set__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_5count_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -38118,13 +39225,13 @@ static int __pyx_pf_3_sa_9TrieTable_5count_2__set__(struct __pyx_obj_3_sa_TrieTa
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__set__", 0);
- __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->count = __pyx_t_1;
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.TrieTable.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.TrieTable.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -38132,17 +39239,17 @@ static int __pyx_pf_3_sa_9TrieTable_5count_2__set__(struct __pyx_obj_3_sa_TrieTa
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_9TrieTable_4root_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_9TrieTable_4root_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9TrieTable_4root_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_9TrieTable_4root_1__get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9TrieTable_4root___get__(((struct __pyx_obj_3_sa_TrieTable *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root___get__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":66
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":91
* cdef public int extended
* cdef public int count
* cdef public root # <<<<<<<<<<<<<<
@@ -38150,7 +39257,7 @@ static PyObject *__pyx_pw_3_sa_9TrieTable_4root_1__get__(PyObject *__pyx_v_self)
* self.count = 0
*/
-static PyObject *__pyx_pf_3_sa_9TrieTable_4root___get__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root___get__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
@@ -38167,17 +39274,17 @@ static PyObject *__pyx_pf_3_sa_9TrieTable_4root___get__(struct __pyx_obj_3_sa_Tr
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9TrieTable_4root_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_3_sa_9TrieTable_4root_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_4root_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_4root_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9TrieTable_4root_2__set__(((struct __pyx_obj_3_sa_TrieTable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9TrieTable_4root_2__set__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value) {
+static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
@@ -38193,17 +39300,17 @@ static int __pyx_pf_3_sa_9TrieTable_4root_2__set__(struct __pyx_obj_3_sa_TrieTab
}
/* Python wrapper */
-static int __pyx_pw_3_sa_9TrieTable_4root_5__del__(PyObject *__pyx_v_self); /*proto*/
-static int __pyx_pw_3_sa_9TrieTable_4root_5__del__(PyObject *__pyx_v_self) {
+static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_4root_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_4root_5__del__(PyObject *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_9TrieTable_4root_4__del__(((struct __pyx_obj_3_sa_TrieTable *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static int __pyx_pf_3_sa_9TrieTable_4root_4__del__(struct __pyx_obj_3_sa_TrieTable *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__del__", 0);
@@ -38218,7 +39325,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":93
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":118
*
* # returns true if sent_id is contained
* cdef int contains(self, int sent_id): # <<<<<<<<<<<<<<
@@ -38226,12 +39333,12 @@ static int __pyx_pf_3_sa_9TrieTable_4root_4__del__(struct __pyx_obj_3_sa_TrieTab
*
*/
-static int __pyx_f_3_sa_14PhraseLocation_contains(CYTHON_UNUSED struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_self, CYTHON_UNUSED int __pyx_v_sent_id) {
+static int __pyx_f_4cdec_2sa_3_sa_14PhraseLocation_contains(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_self, CYTHON_UNUSED int __pyx_v_sent_id) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("contains", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":94
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":119
* # returns true if sent_id is contained
* cdef int contains(self, int sent_id):
* return 1 # <<<<<<<<<<<<<<
@@ -38248,8 +39355,8 @@ static int __pyx_f_3_sa_14PhraseLocation_contains(CYTHON_UNUSED struct __pyx_obj
}
/* Python wrapper */
-static int __pyx_pw_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_sa_low;
int __pyx_v_sa_high;
int __pyx_v_arr_low;
@@ -38266,7 +39373,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":97
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":122
*
* 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): # <<<<<<<<<<<<<<
@@ -38321,7 +39428,7 @@ static int __pyx_pw_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyO
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -38336,46 +39443,46 @@ static int __pyx_pw_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyO
}
}
if (values[0]) {
- __pyx_v_sa_low = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_sa_low == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_sa_low = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_sa_low == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_sa_low = ((int)-1);
}
if (values[1]) {
- __pyx_v_sa_high = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_sa_high == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_sa_high = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_sa_high == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_sa_high = ((int)-1);
}
if (values[2]) {
- __pyx_v_arr_low = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_arr_low == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_arr_low = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_arr_low == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_arr_low = ((int)-1);
}
if (values[3]) {
- __pyx_v_arr_high = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_arr_high == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_arr_high = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_arr_high == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_arr_high = ((int)-1);
}
__pyx_v_arr = values[4];
if (values[5]) {
- __pyx_v_num_subpatterns = __Pyx_PyInt_AsInt(values[5]); if (unlikely((__pyx_v_num_subpatterns == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_num_subpatterns = __Pyx_PyInt_AsInt(values[5]); if (unlikely((__pyx_v_num_subpatterns == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_num_subpatterns = ((int)1);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.PhraseLocation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.PhraseLocation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_14PhraseLocation___cinit__(((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_v_self), __pyx_v_sa_low, __pyx_v_sa_high, __pyx_v_arr_low, __pyx_v_arr_high, __pyx_v_arr, __pyx_v_num_subpatterns);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_v_self), __pyx_v_sa_low, __pyx_v_sa_high, __pyx_v_arr_low, __pyx_v_arr_high, __pyx_v_arr, __pyx_v_num_subpatterns);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":96
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":121
* return 1
*
* def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, # <<<<<<<<<<<<<<
@@ -38383,7 +39490,7 @@ static int __pyx_pw_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v_self, PyO
* self.sa_low = sa_low
*/
-static int __pyx_pf_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_self, int __pyx_v_sa_low, int __pyx_v_sa_high, int __pyx_v_arr_low, int __pyx_v_arr_high, PyObject *__pyx_v_arr, int __pyx_v_num_subpatterns) {
+static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_self, int __pyx_v_sa_low, int __pyx_v_sa_high, int __pyx_v_arr_low, int __pyx_v_arr_high, PyObject *__pyx_v_arr, int __pyx_v_num_subpatterns) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_lineno = 0;
@@ -38391,7 +39498,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":98
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":123
* 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 # <<<<<<<<<<<<<<
@@ -38400,7 +39507,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":99
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":124
* arr=None, int num_subpatterns=1):
* self.sa_low = sa_low
* self.sa_high = sa_high # <<<<<<<<<<<<<<
@@ -38409,7 +39516,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":100
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":125
* self.sa_low = sa_low
* self.sa_high = sa_high
* self.arr_low = arr_low # <<<<<<<<<<<<<<
@@ -38418,7 +39525,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":101
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":126
* self.sa_high = sa_high
* self.arr_low = arr_low
* self.arr_high = arr_high # <<<<<<<<<<<<<<
@@ -38427,21 +39534,21 @@ 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":102
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":127
* self.arr_low = arr_low
* self.arr_high = arr_high
* self.arr = arr # <<<<<<<<<<<<<<
* self.num_subpatterns = num_subpatterns
*
*/
- if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_arr);
__Pyx_GIVEREF(__pyx_v_arr);
__Pyx_GOTREF(__pyx_v_self->arr);
__Pyx_DECREF(((PyObject *)__pyx_v_self->arr));
- __pyx_v_self->arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_v_arr);
+ __pyx_v_self->arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":103
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":128
* self.arr_high = arr_high
* self.arr = arr
* self.num_subpatterns = num_subpatterns # <<<<<<<<<<<<<<
@@ -38453,7 +39560,7 @@ static int __pyx_pf_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_3_sa_Phrase
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.PhraseLocation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.PhraseLocation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -38461,10 +39568,10 @@ static int __pyx_pf_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_3_sa_Phrase
}
/* Python wrapper */
-static int __pyx_pw_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_v_sample_size;
- struct __pyx_obj_3_sa_SuffixArray *__pyx_v_fsarray = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_fsarray = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -38491,11 +39598,11 @@ static int __pyx_pw_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, PyObject *_
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fsarray)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -38503,19 +39610,19 @@ static int __pyx_pw_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, PyObject *_
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
- __pyx_v_sample_size = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_sample_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_fsarray = ((struct __pyx_obj_3_sa_SuffixArray *)values[1]);
+ __pyx_v_sample_size = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_sample_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_fsarray = ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)values[1]);
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.Sampler.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Sampler.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fsarray), __pyx_ptype_3_sa_SuffixArray, 1, "fsarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_7Sampler___cinit__(((struct __pyx_obj_3_sa_Sampler *)__pyx_v_self), __pyx_v_sample_size, __pyx_v_fsarray);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fsarray), __pyx_ptype_4cdec_2sa_3_sa_SuffixArray, 1, "fsarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)__pyx_v_self), __pyx_v_sample_size, __pyx_v_fsarray);
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = -1;
@@ -38524,7 +39631,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":113
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":138
* cdef IntList sa
*
* def __cinit__(self, int sample_size, SuffixArray fsarray): # <<<<<<<<<<<<<<
@@ -38532,7 +39639,7 @@ static int __pyx_pw_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, PyObject *_
* self.sa = fsarray.sa
*/
-static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx_v_self, int __pyx_v_sample_size, struct __pyx_obj_3_sa_SuffixArray *__pyx_v_fsarray) {
+static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_Sampler *__pyx_v_self, int __pyx_v_sample_size, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_fsarray) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -38544,7 +39651,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":114
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":139
*
* def __cinit__(self, int sample_size, SuffixArray fsarray):
* self.sample_size = sample_size # <<<<<<<<<<<<<<
@@ -38553,7 +39660,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":115
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":140
* def __cinit__(self, int sample_size, SuffixArray fsarray):
* self.sample_size = sample_size
* self.sa = fsarray.sa # <<<<<<<<<<<<<<
@@ -38565,10 +39672,10 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->sa);
__Pyx_DECREF(((PyObject *)__pyx_v_self->sa));
- __pyx_v_self->sa = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":116
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":141
* self.sample_size = sample_size
* self.sa = fsarray.sa
* if sample_size > 0: # <<<<<<<<<<<<<<
@@ -38578,29 +39685,29 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
__pyx_t_2 = ((__pyx_v_sample_size > 0) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":117
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":142
* self.sa = fsarray.sa
* if sample_size > 0:
* logger.info("Sampling strategy: uniform, max sample size = %d", sample_size) # <<<<<<<<<<<<<<
* else:
* logger.info("Sampling strategy: no sampling")
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromLong(__pyx_v_sample_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_sample_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_102));
- PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_102));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_102));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_104));
+ PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_104));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_104));
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
@@ -38609,19 +39716,19 @@ 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":119
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":144
* logger.info("Sampling strategy: uniform, max sample size = %d", sample_size)
* else:
* logger.info("Sampling strategy: no sampling") # <<<<<<<<<<<<<<
*
* def sample(self, PhraseLocation phrase_location):
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_106), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -38634,7 +39741,7 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.Sampler.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Sampler.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -38642,17 +39749,17 @@ static int __pyx_pf_3_sa_7Sampler___cinit__(struct __pyx_obj_3_sa_Sampler *__pyx
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_7Sampler_3sample(PyObject *__pyx_v_self, PyObject *__pyx_v_phrase_location); /*proto*/
-static char __pyx_doc_3_sa_7Sampler_2sample[] = "Returns a sample of the locations for\n the phrase. If there are less than self.sample_size\n locations, return all of them; otherwise, return\n up to self.sample_size locations. In the latter case,\n we choose to sample UNIFORMLY -- that is, the locations\n are chosen at uniform intervals over the entire set, rather\n than randomly. This makes the algorithm deterministic, which\n is good for things like MERT";
-static PyObject *__pyx_pw_3_sa_7Sampler_3sample(PyObject *__pyx_v_self, PyObject *__pyx_v_phrase_location) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7Sampler_3sample(PyObject *__pyx_v_self, PyObject *__pyx_v_phrase_location); /*proto*/
+static char __pyx_doc_4cdec_2sa_3_sa_7Sampler_2sample[] = "Returns a sample of the locations for\n the phrase. If there are less than self.sample_size\n locations, return all of them; otherwise, return\n up to self.sample_size locations. In the latter case,\n we choose to sample UNIFORMLY -- that is, the locations\n are chosen at uniform intervals over the entire set, rather\n than randomly. This makes the algorithm deterministic, which\n is good for things like MERT";
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_7Sampler_3sample(PyObject *__pyx_v_self, PyObject *__pyx_v_phrase_location) {
CYTHON_UNUSED int __pyx_lineno = 0;
CYTHON_UNUSED const char *__pyx_filename = NULL;
CYTHON_UNUSED int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sample (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phrase_location), __pyx_ptype_3_sa_PhraseLocation, 1, "phrase_location", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_7Sampler_2sample(((struct __pyx_obj_3_sa_Sampler *)__pyx_v_self), ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_v_phrase_location));
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phrase_location), __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation, 1, "phrase_location", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(((struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)__pyx_v_self), ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_v_phrase_location));
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = NULL;
@@ -38661,7 +39768,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":121
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":146
* logger.info("Sampling strategy: no sampling")
*
* def sample(self, PhraseLocation phrase_location): # <<<<<<<<<<<<<<
@@ -38669,8 +39776,8 @@ static PyObject *__pyx_pw_3_sa_7Sampler_3sample(PyObject *__pyx_v_self, PyObject
* the phrase. If there are less than self.sample_size
*/
-static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *__pyx_v_self, struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_phrase_location) {
- struct __pyx_obj_3_sa_IntList *__pyx_v_sample = 0;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec_2sa_3_sa_Sampler *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_phrase_location) {
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_sample = 0;
double __pyx_v_i;
double __pyx_v_stepsize;
int __pyx_v_num_locations;
@@ -38688,19 +39795,19 @@ 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":134
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":159
* cdef int num_locations, val, j
*
* sample = IntList() # <<<<<<<<<<<<<<
* if phrase_location.arr is None:
* num_locations = phrase_location.sa_high - phrase_location.sa_low
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_v_sample = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_sample = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":135
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":160
*
* sample = IntList()
* if phrase_location.arr is None: # <<<<<<<<<<<<<<
@@ -38711,7 +39818,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":136
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":161
* sample = IntList()
* if phrase_location.arr is None:
* num_locations = phrase_location.sa_high - phrase_location.sa_low # <<<<<<<<<<<<<<
@@ -38720,7 +39827,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":137
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":162
* 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: # <<<<<<<<<<<<<<
@@ -38736,19 +39843,19 @@ 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":138
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":163
* 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) # <<<<<<<<<<<<<<
* else:
* stepsize = float(num_locations)/float(self.sample_size)
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_sample->__pyx_vtab)->_extend_arr(__pyx_v_sample, (__pyx_v_self->sa->arr + __pyx_v_phrase_location->sa_low), __pyx_v_num_locations);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_sample->__pyx_vtab)->_extend_arr(__pyx_v_sample, (__pyx_v_self->sa->arr + __pyx_v_phrase_location->sa_low), __pyx_v_num_locations);
goto __pyx_L4;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":140
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":165
* sample._extend_arr(self.sa.arr + phrase_location.sa_low, num_locations)
* else:
* stepsize = float(num_locations)/float(self.sample_size) # <<<<<<<<<<<<<<
@@ -38763,11 +39870,11 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_stepsize = (((double)__pyx_v_num_locations) / ((double)__pyx_v_self->sample_size));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":141
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":166
* else:
* stepsize = float(num_locations)/float(self.sample_size)
* i = phrase_location.sa_low # <<<<<<<<<<<<<<
@@ -38777,7 +39884,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
__pyx_t_5 = __pyx_v_phrase_location->sa_low;
__pyx_v_i = __pyx_t_5;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":142
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":167
* 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: # <<<<<<<<<<<<<<
@@ -38794,7 +39901,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":145
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":170
* '''Note: int(i) not guaranteed to have the desired
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5: # <<<<<<<<<<<<<<
@@ -38804,7 +39911,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
__pyx_t_2 = ((fmod(__pyx_v_i, 1.0) > 0.5) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":146
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":171
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5:
* val = int(ceil(i)) # <<<<<<<<<<<<<<
@@ -38816,7 +39923,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":148
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":173
* val = int(ceil(i))
* else:
* val = int(floor(i)) # <<<<<<<<<<<<<<
@@ -38827,16 +39934,16 @@ 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":149
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":174
* else:
* val = int(floor(i))
* sample._append(self.sa.arr[val]) # <<<<<<<<<<<<<<
* i = i + stepsize
* else:
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_sample->__pyx_vtab)->_append(__pyx_v_sample, (__pyx_v_self->sa->arr[__pyx_v_val]));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_sample->__pyx_vtab)->_append(__pyx_v_sample, (__pyx_v_self->sa->arr[__pyx_v_val]));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":150
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":175
* val = int(floor(i))
* sample._append(self.sa.arr[val])
* i = i + stepsize # <<<<<<<<<<<<<<
@@ -38851,7 +39958,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":152
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":177
* i = i + stepsize
* else:
* num_locations = (phrase_location.arr_high - phrase_location.arr_low) / phrase_location.num_subpatterns # <<<<<<<<<<<<<<
@@ -38867,7 +39974,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
else if (sizeof(int) == sizeof(long) && unlikely(__pyx_v_phrase_location->num_subpatterns == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_5))) {
#ifdef WITH_THREAD
@@ -38877,11 +39984,11 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__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":153
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":178
* 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: # <<<<<<<<<<<<<<
@@ -38897,7 +40004,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":154
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":179
* 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 # <<<<<<<<<<<<<<
@@ -38907,13 +40014,13 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
__pyx_t_1 = ((PyObject *)__pyx_v_phrase_location->arr);
__Pyx_INCREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_v_sample));
- __pyx_v_sample = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_sample = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L8;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":156
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":181
* sample = phrase_location.arr
* else:
* stepsize = float(num_locations)/float(self.sample_size) # <<<<<<<<<<<<<<
@@ -38928,11 +40035,11 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_stepsize = (((double)__pyx_v_num_locations) / ((double)__pyx_v_self->sample_size));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":157
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":182
* else:
* stepsize = float(num_locations)/float(self.sample_size)
* i = phrase_location.arr_low # <<<<<<<<<<<<<<
@@ -38942,7 +40049,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
__pyx_t_5 = __pyx_v_phrase_location->arr_low;
__pyx_v_i = __pyx_t_5;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":158
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":183
* 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: # <<<<<<<<<<<<<<
@@ -38959,7 +40066,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":161
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":186
* '''Note: int(i) not guaranteed to have the desired
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5: # <<<<<<<<<<<<<<
@@ -38969,7 +40076,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":162
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":187
* effect, according to the python documentation'''
* if fmod(i,1.0) > 0.5:
* val = int(ceil(i)) # <<<<<<<<<<<<<<
@@ -38981,7 +40088,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":164
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":189
* val = int(ceil(i))
* else:
* val = int(floor(i)) # <<<<<<<<<<<<<<
@@ -38992,7 +40099,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":165
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":190
* else:
* val = int(floor(i))
* j = phrase_location.arr_low + (val*phrase_location.num_subpatterns) # <<<<<<<<<<<<<<
@@ -39001,16 +40108,16 @@ 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":166
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":191
* 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) # <<<<<<<<<<<<<<
* i = i + stepsize
* return sample
*/
- ((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);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_sample->__pyx_vtab)->_extend_arr(__pyx_v_sample, (__pyx_v_phrase_location->arr->arr + __pyx_v_j), __pyx_v_phrase_location->num_subpatterns);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":167
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":192
* 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 # <<<<<<<<<<<<<<
@@ -39024,7 +40131,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":168
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":193
* sample._extend_arr(phrase_location.arr.arr + j, phrase_location.num_subpatterns)
* i = i + stepsize
* return sample # <<<<<<<<<<<<<<
@@ -39040,7 +40147,7 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.Sampler.sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Sampler.sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_sample);
@@ -39049,7 +40156,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":180
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":205
*
*
* cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): # <<<<<<<<<<<<<<
@@ -39057,11 +40164,11 @@ static PyObject *__pyx_pf_3_sa_7Sampler_2sample(struct __pyx_obj_3_sa_Sampler *_
* m.start = start
*/
-static void __pyx_f_3_sa_assign_matching(struct __pyx_t_3_sa_Matching *__pyx_v_m, int *__pyx_v_arr, int __pyx_v_start, int __pyx_v_step, int *__pyx_v_sent_id_arr) {
+static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa_Matching *__pyx_v_m, int *__pyx_v_arr, int __pyx_v_start, int __pyx_v_step, int *__pyx_v_sent_id_arr) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("assign_matching", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":181
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":206
*
* cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr):
* m.arr = arr # <<<<<<<<<<<<<<
@@ -39070,7 +40177,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":182
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":207
* cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr):
* m.arr = arr
* m.start = start # <<<<<<<<<<<<<<
@@ -39079,7 +40186,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":183
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":208
* m.arr = arr
* m.start = start
* m.end = start + step # <<<<<<<<<<<<<<
@@ -39088,7 +40195,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":184
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":209
* m.start = start
* m.end = start + step
* m.sent_id = sent_id_arr[arr[start]] # <<<<<<<<<<<<<<
@@ -39097,7 +40204,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":185
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":210
* m.end = start + step
* m.sent_id = sent_id_arr[arr[start]]
* m.size = step # <<<<<<<<<<<<<<
@@ -39109,7 +40216,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":188
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":213
*
*
* cdef int* append_combined_matching(int* arr, Matching* loc1, Matching* loc2, # <<<<<<<<<<<<<<
@@ -39117,7 +40224,7 @@ static void __pyx_f_3_sa_assign_matching(struct __pyx_t_3_sa_Matching *__pyx_v_m
* cdef int i, new_len
*/
-static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx_t_3_sa_Matching *__pyx_v_loc1, struct __pyx_t_3_sa_Matching *__pyx_v_loc2, CYTHON_UNUSED int __pyx_v_offset_by_one, int __pyx_v_num_subpatterns, int *__pyx_v_result_len) {
+static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx_t_4cdec_2sa_3_sa_Matching *__pyx_v_loc1, struct __pyx_t_4cdec_2sa_3_sa_Matching *__pyx_v_loc2, CYTHON_UNUSED int __pyx_v_offset_by_one, int __pyx_v_num_subpatterns, int *__pyx_v_result_len) {
int __pyx_v_i;
int __pyx_v_new_len;
int *__pyx_r;
@@ -39126,7 +40233,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":192
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":217
* cdef int i, new_len
*
* new_len = result_len[0] + num_subpatterns # <<<<<<<<<<<<<<
@@ -39135,7 +40242,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":193
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":218
*
* new_len = result_len[0] + num_subpatterns
* arr = <int*> realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -39144,7 +40251,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":195
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":220
* arr = <int*> realloc(arr, new_len*sizeof(int))
*
* for i from 0 <= i < loc1.size: # <<<<<<<<<<<<<<
@@ -39154,7 +40261,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":196
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":221
*
* for i from 0 <= i < loc1.size:
* arr[result_len[0]+i] = loc1.arr[loc1.start+i] # <<<<<<<<<<<<<<
@@ -39164,7 +40271,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":197
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":222
* for i from 0 <= i < loc1.size:
* arr[result_len[0]+i] = loc1.arr[loc1.start+i]
* if num_subpatterns > loc1.size: # <<<<<<<<<<<<<<
@@ -39174,7 +40281,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) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":198
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":223
* arr[result_len[0]+i] = loc1.arr[loc1.start+i]
* if num_subpatterns > loc1.size:
* arr[new_len-1] = loc2.arr[loc2.end-1] # <<<<<<<<<<<<<<
@@ -39186,7 +40293,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":199
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":224
* if num_subpatterns > loc1.size:
* arr[new_len-1] = loc2.arr[loc2.end-1]
* result_len[0] = new_len # <<<<<<<<<<<<<<
@@ -39195,7 +40302,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":200
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":225
* arr[new_len-1] = loc2.arr[loc2.end-1]
* result_len[0] = new_len
* return arr # <<<<<<<<<<<<<<
@@ -39211,7 +40318,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":203
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":228
*
*
* cdef int* extend_arr(int* arr, int* arr_len, int* appendix, int appendix_len): # <<<<<<<<<<<<<<
@@ -39219,13 +40326,13 @@ static int *__pyx_f_3_sa_append_combined_matching(int *__pyx_v_arr, struct __pyx
*
*/
-static int *__pyx_f_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr_len, int *__pyx_v_appendix, int __pyx_v_appendix_len) {
+static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr_len, int *__pyx_v_appendix, int __pyx_v_appendix_len) {
int __pyx_v_new_len;
int *__pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("extend_arr", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":206
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":231
* cdef int new_len
*
* new_len = arr_len[0] + appendix_len # <<<<<<<<<<<<<<
@@ -39234,7 +40341,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":207
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":232
*
* new_len = arr_len[0] + appendix_len
* arr = <int*> realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -39243,7 +40350,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":208
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":233
* 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)) # <<<<<<<<<<<<<<
@@ -39252,7 +40359,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":209
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":234
* arr = <int*> realloc(arr, new_len*sizeof(int))
* memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int))
* arr_len[0] = new_len # <<<<<<<<<<<<<<
@@ -39261,7 +40368,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":210
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":235
* memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int))
* arr_len[0] = new_len
* return arr # <<<<<<<<<<<<<<
@@ -39277,7 +40384,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":212
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":237
* return arr
*
* cdef int median(int low, int high, int step): # <<<<<<<<<<<<<<
@@ -39285,7 +40392,7 @@ static int *__pyx_f_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr_len, int
*
*/
-static int __pyx_f_3_sa_median(int __pyx_v_low, int __pyx_v_high, int __pyx_v_step) {
+static int __pyx_f_4cdec_2sa_3_sa_median(int __pyx_v_low, int __pyx_v_high, int __pyx_v_step) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -39294,7 +40401,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":213
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":238
*
* cdef int median(int low, int high, int step):
* return low + (((high - low)/step)/2)*step # <<<<<<<<<<<<<<
@@ -39310,7 +40417,7 @@ static int __pyx_f_3_sa_median(int __pyx_v_low, int __pyx_v_high, int __pyx_v_st
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
else if (sizeof(int) == sizeof(long) && unlikely(__pyx_v_step == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
#ifdef WITH_THREAD
@@ -39320,7 +40427,7 @@ static int __pyx_f_3_sa_median(int __pyx_v_low, int __pyx_v_high, int __pyx_v_st
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_r = (__pyx_v_low + (__Pyx_div_long(__Pyx_div_int(__pyx_t_1, __pyx_v_step), 2) * __pyx_v_step));
goto __pyx_L0;
@@ -39328,14 +40435,14 @@ static int __pyx_f_3_sa_median(int __pyx_v_low, int __pyx_v_high, int __pyx_v_st
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_WriteUnraisable("_sa.median", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.median", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":216
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":241
*
*
* cdef void find_comparable_matchings(int low, int high, int* arr, int step, int loc, int* loc_minus, int* loc_plus): # <<<<<<<<<<<<<<
@@ -39343,14 +40450,14 @@ static int __pyx_f_3_sa_median(int __pyx_v_low, int __pyx_v_high, int __pyx_v_st
* # in which all matchings have the same first index as the one
*/
-static void __pyx_f_3_sa_find_comparable_matchings(int __pyx_v_low, int __pyx_v_high, int *__pyx_v_arr, int __pyx_v_step, int __pyx_v_loc, int *__pyx_v_loc_minus, int *__pyx_v_loc_plus) {
+static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, int __pyx_v_high, int *__pyx_v_arr, int __pyx_v_step, int __pyx_v_loc, int *__pyx_v_loc_minus, int *__pyx_v_loc_plus) {
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
__Pyx_RefNannySetupContext("find_comparable_matchings", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":220
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":245
* # in which all matchings have the same first index as the one
* # starting at loc
* loc_plus[0] = loc + step # <<<<<<<<<<<<<<
@@ -39359,7 +40466,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":221
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":246
* # starting at loc
* loc_plus[0] = loc + step
* while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]: # <<<<<<<<<<<<<<
@@ -39376,7 +40483,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":222
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":247
* loc_plus[0] = loc + step
* while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]:
* loc_plus[0] = loc_plus[0] + step # <<<<<<<<<<<<<<
@@ -39386,7 +40493,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":223
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":248
* while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]:
* loc_plus[0] = loc_plus[0] + step
* loc_minus[0] = loc # <<<<<<<<<<<<<<
@@ -39395,7 +40502,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":224
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":249
* 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]: # <<<<<<<<<<<<<<
@@ -39412,7 +40519,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":225
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":250
* 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 # <<<<<<<<<<<<<<
@@ -39426,9 +40533,9 @@ static void __pyx_f_3_sa_find_comparable_matchings(int __pyx_v_low, int __pyx_v_
}
/* Python wrapper */
-static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- struct __pyx_obj_3_sa_Alignment *__pyx_v_alignment = 0;
+static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_alignment = 0;
float __pyx_v_by_slack_factor;
char *__pyx_v_category;
PyObject *__pyx_v_max_chunks = 0;
@@ -39456,10 +40563,10 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__alignment,&__pyx_n_s__by_slack_factor,&__pyx_n_s__category,&__pyx_n_s__max_chunks,&__pyx_n_s__max_initial_size,&__pyx_n_s__max_length,&__pyx_n_s__max_nonterminals,&__pyx_n_s__max_target_chunks,&__pyx_n_s__max_target_length,&__pyx_n_s__min_gap_size,&__pyx_n_s__precompute_file,&__pyx_n_s_72,&__pyx_n_s__precompute_rank,&__pyx_n_s_105,&__pyx_n_s_106,&__pyx_n_s_73,&__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};
+ 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_72,&__pyx_n_s__precompute_rank,&__pyx_n_s_107,&__pyx_n_s_108,&__pyx_n_s_73,&__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":296
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":314
* 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, # <<<<<<<<<<<<<<
@@ -39468,7 +40575,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":304
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":322
* 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, # <<<<<<<<<<<<<<
@@ -39477,7 +40584,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":306
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":324
* 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, # <<<<<<<<<<<<<<
@@ -39486,7 +40593,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":310
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":328
* unsigned min_gap_size=2,
* # filename of file containing precomputed collocations
* precompute_file=None, # <<<<<<<<<<<<<<
@@ -39589,12 +40696,12 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
}
case 13:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_105);
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_107);
if (value) { values[13] = value; kw_args--; }
}
case 14:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_106);
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_108);
if (value) { values[14] = value; kw_args--; }
}
case 15:
@@ -39629,7 +40736,7 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -39658,12 +40765,12 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_alignment = ((struct __pyx_obj_3_sa_Alignment *)values[0]);
+ __pyx_v_alignment = ((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)values[0]);
if (values[1]) {
- __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 = 292; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __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 = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":292
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":310
* Alignment alignment,
* # parameter for double-binary search; doesn't seem to matter much
* float by_slack_factor=1.0, # <<<<<<<<<<<<<<
@@ -39673,49 +40780,49 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_by_slack_factor = ((float)1.0);
}
if (values[2]) {
- __pyx_v_category = __Pyx_PyObject_AsString(values[2]); if (unlikely((!__pyx_v_category) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_category = __Pyx_PyObject_AsString(values[2]); if (unlikely((!__pyx_v_category) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- __pyx_v_category = ((char *)__pyx_k_107);
+ __pyx_v_category = ((char *)__pyx_k_109);
}
__pyx_v_max_chunks = values[3];
if (values[4]) {
- __pyx_v_max_initial_size = __Pyx_PyInt_AsUnsignedInt(values[4]); if (unlikely((__pyx_v_max_initial_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_max_initial_size = __Pyx_PyInt_AsUnsignedInt(values[4]); if (unlikely((__pyx_v_max_initial_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_max_initial_size = ((unsigned int)10);
}
if (values[5]) {
- __pyx_v_max_length = __Pyx_PyInt_AsUnsignedInt(values[5]); if (unlikely((__pyx_v_max_length == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_max_length = __Pyx_PyInt_AsUnsignedInt(values[5]); if (unlikely((__pyx_v_max_length == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_max_length = ((unsigned int)5);
}
if (values[6]) {
- __pyx_v_max_nonterminals = __Pyx_PyInt_AsUnsignedInt(values[6]); if (unlikely((__pyx_v_max_nonterminals == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_max_nonterminals = __Pyx_PyInt_AsUnsignedInt(values[6]); if (unlikely((__pyx_v_max_nonterminals == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_max_nonterminals = ((unsigned int)2);
}
__pyx_v_max_target_chunks = values[7];
__pyx_v_max_target_length = values[8];
if (values[9]) {
- __pyx_v_min_gap_size = __Pyx_PyInt_AsUnsignedInt(values[9]); if (unlikely((__pyx_v_min_gap_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_min_gap_size = __Pyx_PyInt_AsUnsignedInt(values[9]); if (unlikely((__pyx_v_min_gap_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_min_gap_size = ((unsigned int)2);
}
__pyx_v_precompute_file = values[10];
if (values[11]) {
- __pyx_v_precompute_secondary_rank = __Pyx_PyInt_AsUnsignedInt(values[11]); if (unlikely((__pyx_v_precompute_secondary_rank == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_precompute_secondary_rank = __Pyx_PyInt_AsUnsignedInt(values[11]); if (unlikely((__pyx_v_precompute_secondary_rank == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_precompute_secondary_rank = ((unsigned int)20);
}
if (values[12]) {
- __pyx_v_precompute_rank = __Pyx_PyInt_AsUnsignedInt(values[12]); if (unlikely((__pyx_v_precompute_rank == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_precompute_rank = __Pyx_PyInt_AsUnsignedInt(values[12]); if (unlikely((__pyx_v_precompute_rank == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_precompute_rank = ((unsigned int)100);
}
if (values[13]) {
- __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 = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __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 = 334; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":316
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":334
* unsigned precompute_rank=100,
* # require extracted rules to have at least one aligned word
* bint require_aligned_terminal=True, # <<<<<<<<<<<<<<
@@ -39725,10 +40832,10 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_require_aligned_terminal = ((int)1);
}
if (values[14]) {
- __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 = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __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 = 336; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":318
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":336
* bint require_aligned_terminal=True,
* # require each contiguous chunk of extracted rules to have at least one aligned word
* bint require_aligned_chunks=False, # <<<<<<<<<<<<<<
@@ -39738,20 +40845,20 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_require_aligned_chunks = ((int)0);
}
if (values[15]) {
- __pyx_v_train_max_initial_size = __Pyx_PyInt_AsUnsignedInt(values[15]); if (unlikely((__pyx_v_train_max_initial_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_train_max_initial_size = __Pyx_PyInt_AsUnsignedInt(values[15]); if (unlikely((__pyx_v_train_max_initial_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_train_max_initial_size = ((unsigned int)10);
}
if (values[16]) {
- __pyx_v_train_min_gap_size = __Pyx_PyInt_AsUnsignedInt(values[16]); if (unlikely((__pyx_v_train_min_gap_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_train_min_gap_size = __Pyx_PyInt_AsUnsignedInt(values[16]); if (unlikely((__pyx_v_train_min_gap_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_train_min_gap_size = ((unsigned int)2);
}
if (values[17]) {
- __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 = 324; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __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 = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":324
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":342
* unsigned train_min_gap_size=2,
* # False if phrases should be loose (better but slower), True otherwise
* bint tight_phrases=True, # <<<<<<<<<<<<<<
@@ -39761,10 +40868,10 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_tight_phrases = ((int)1);
}
if (values[18]) {
- __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 = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __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 = 344; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":326
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":344
* bint tight_phrases=True,
* # True to require use of double-binary alg, false otherwise
* bint use_baeza_yates=True, # <<<<<<<<<<<<<<
@@ -39774,10 +40881,10 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_use_baeza_yates = ((int)1);
}
if (values[19]) {
- __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 = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __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 = 346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":328
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":346
* bint use_baeza_yates=True,
* # True to enable used of precomputed collocations
* bint use_collocations=True, # <<<<<<<<<<<<<<
@@ -39787,10 +40894,10 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
__pyx_v_use_collocations = ((int)1);
}
if (values[20]) {
- __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 = 330; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __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 = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":330
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":348
* bint use_collocations=True,
* # True to enable use of precomputed inverted indices
* bint use_index=True): # <<<<<<<<<<<<<<
@@ -39802,14 +40909,14 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 21, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 21, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alignment), __pyx_ptype_3_sa_Alignment, 1, "alignment", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_alignment, __pyx_v_by_slack_factor, __pyx_v_category, __pyx_v_max_chunks, __pyx_v_max_initial_size, __pyx_v_max_length, __pyx_v_max_nonterminals, __pyx_v_max_target_chunks, __pyx_v_max_target_length, __pyx_v_min_gap_size, __pyx_v_precompute_file, __pyx_v_precompute_secondary_rank, __pyx_v_precompute_rank, __pyx_v_require_aligned_terminal, __pyx_v_require_aligned_chunks, __pyx_v_train_max_initial_size, __pyx_v_train_min_gap_size, __pyx_v_tight_phrases, __pyx_v_use_baeza_yates, __pyx_v_use_collocations, __pyx_v_use_index);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alignment), __pyx_ptype_4cdec_2sa_3_sa_Alignment, 1, "alignment", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_alignment, __pyx_v_by_slack_factor, __pyx_v_category, __pyx_v_max_chunks, __pyx_v_max_initial_size, __pyx_v_max_length, __pyx_v_max_nonterminals, __pyx_v_max_target_chunks, __pyx_v_max_target_length, __pyx_v_min_gap_size, __pyx_v_precompute_file, __pyx_v_precompute_secondary_rank, __pyx_v_precompute_rank, __pyx_v_require_aligned_terminal, __pyx_v_require_aligned_chunks, __pyx_v_train_max_initial_size, __pyx_v_train_min_gap_size, __pyx_v_tight_phrases, __pyx_v_use_baeza_yates, __pyx_v_use_collocations, __pyx_v_use_index);
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = -1;
@@ -39818,195 +40925,15 @@ static int __pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject *__pyx_v_
return __pyx_r;
}
-/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9__cinit___lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_9__cinit___lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_9__cinit___lambda1, METH_NOARGS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9__cinit___lambda1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
- __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":406
- * self.phrases_f = defaultdict(int)
- * self.phrases_e = defaultdict(int)
- * self.phrases_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<<
- * self.phrases_al = defaultdict(lambda: defaultdict(tuple))
- *
- */
-
-static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("lambda1", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
- __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.__cinit__.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9__cinit___1lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_9__cinit___1lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_9__cinit___1lambda2, METH_NOARGS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9__cinit___1lambda2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
- __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":407
- * self.phrases_e = defaultdict(int)
- * self.phrases_fe = defaultdict(lambda: defaultdict(int))
- * self.phrases_al = defaultdict(lambda: defaultdict(tuple)) # <<<<<<<<<<<<<<
- *
- * # Bilexical counts
- */
-
-static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("lambda2", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)((PyObject*)(&PyTuple_Type))));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyTuple_Type))));
- __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyTuple_Type))));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.__cinit__.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9__cinit___2lambda3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_9__cinit___2lambda3 = {__Pyx_NAMESTR("lambda3"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_9__cinit___2lambda3, METH_NOARGS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9__cinit___2lambda3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
- __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":412
- * self.bilex_f = defaultdict(int)
- * self.bilex_e = defaultdict(int)
- * self.bilex_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<<
- *
- * def configure(self, SuffixArray fsarray, DataArray edarray,
- */
-
-static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("lambda3", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
- __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.__cinit__.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":288
- * cdef bilex_fe
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":306
+ * cdef online_stats
*
* def __cinit__(self, # <<<<<<<<<<<<<<
* # compiled alignment object (REQUIRED)
* Alignment alignment,
*/
-static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_3_sa_Alignment *__pyx_v_alignment, float __pyx_v_by_slack_factor, char *__pyx_v_category, PyObject *__pyx_v_max_chunks, unsigned int __pyx_v_max_initial_size, unsigned int __pyx_v_max_length, unsigned int __pyx_v_max_nonterminals, PyObject *__pyx_v_max_target_chunks, PyObject *__pyx_v_max_target_length, unsigned int __pyx_v_min_gap_size, PyObject *__pyx_v_precompute_file, unsigned int __pyx_v_precompute_secondary_rank, unsigned int __pyx_v_precompute_rank, int __pyx_v_require_aligned_terminal, int __pyx_v_require_aligned_chunks, unsigned int __pyx_v_train_max_initial_size, unsigned int __pyx_v_train_min_gap_size, int __pyx_v_tight_phrases, int __pyx_v_use_baeza_yates, int __pyx_v_use_collocations, int __pyx_v_use_index) {
+static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_Alignment *__pyx_v_alignment, float __pyx_v_by_slack_factor, char *__pyx_v_category, PyObject *__pyx_v_max_chunks, unsigned int __pyx_v_max_initial_size, unsigned int __pyx_v_max_length, unsigned int __pyx_v_max_nonterminals, PyObject *__pyx_v_max_target_chunks, PyObject *__pyx_v_max_target_length, unsigned int __pyx_v_min_gap_size, PyObject *__pyx_v_precompute_file, unsigned int __pyx_v_precompute_secondary_rank, unsigned int __pyx_v_precompute_rank, int __pyx_v_require_aligned_terminal, int __pyx_v_require_aligned_chunks, unsigned int __pyx_v_train_max_initial_size, unsigned int __pyx_v_train_min_gap_size, int __pyx_v_tight_phrases, int __pyx_v_use_baeza_yates, int __pyx_v_use_collocations, int __pyx_v_use_index) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -40020,43 +40947,43 @@ 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":336
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":354
* respectively. This is because Chiang's model does not require
* them to be the same, therefore we don't either.'''
* self.rules = TrieTable(True) # cache # <<<<<<<<<<<<<<
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
* if alignment is None:
*/
- __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_TrieTable)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_TrieTable)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->rules);
__Pyx_DECREF(((PyObject *)__pyx_v_self->rules));
- __pyx_v_self->rules = ((struct __pyx_obj_3_sa_TrieTable *)__pyx_t_1);
+ __pyx_v_self->rules = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":337
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":355
* them to be the same, therefore we don't either.'''
* self.rules = TrieTable(True) # cache
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) # <<<<<<<<<<<<<<
* if alignment is None:
* raise Exception("Must specify an alignment object")
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_2);
@@ -40065,7 +40992,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":338
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":356
* self.rules = TrieTable(True) # cache
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
* if alignment is None: # <<<<<<<<<<<<<<
@@ -40076,23 +41003,23 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_t_4 = (__pyx_t_3 != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":339
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":357
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
* if alignment is None:
* raise Exception("Must specify an alignment object") # <<<<<<<<<<<<<<
* self.alignment = alignment
*
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_111), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":340
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":358
* if alignment is None:
* raise Exception("Must specify an alignment object")
* self.alignment = alignment # <<<<<<<<<<<<<<
@@ -40105,7 +41032,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":344
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":362
* # grammar parameters and settings
* # NOTE: setting max_nonterminals > 2 is not currently supported in Hiero
* self.max_length = max_length # <<<<<<<<<<<<<<
@@ -40114,7 +41041,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":345
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":363
* # NOTE: setting max_nonterminals > 2 is not currently supported in Hiero
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals # <<<<<<<<<<<<<<
@@ -40123,7 +41050,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":346
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":364
* self.max_length = max_length
* self.max_nonterminals = max_nonterminals
* self.max_initial_size = max_initial_size # <<<<<<<<<<<<<<
@@ -40132,7 +41059,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":347
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":365
* self.max_nonterminals = max_nonterminals
* self.max_initial_size = max_initial_size
* self.train_max_initial_size = train_max_initial_size # <<<<<<<<<<<<<<
@@ -40141,7 +41068,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":348
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":366
* self.max_initial_size = max_initial_size
* self.train_max_initial_size = train_max_initial_size
* self.min_gap_size = min_gap_size # <<<<<<<<<<<<<<
@@ -40150,7 +41077,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":349
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":367
* 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 # <<<<<<<<<<<<<<
@@ -40159,16 +41086,16 @@ 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":350
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":368
* self.min_gap_size = min_gap_size
* self.train_min_gap_size = train_min_gap_size
* self.category = sym_fromstring(category, False) # <<<<<<<<<<<<<<
*
* if max_chunks is None:
*/
- __pyx_v_self->category = __pyx_f_3_sa_sym_fromstring(__pyx_v_category, 0);
+ __pyx_v_self->category = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_v_category, 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":352
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":370
* self.category = sym_fromstring(category, False)
*
* if max_chunks is None: # <<<<<<<<<<<<<<
@@ -40179,7 +41106,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_t_3 = (__pyx_t_4 != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":353
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":371
*
* if max_chunks is None:
* self.max_chunks = self.max_nonterminals + 1 # <<<<<<<<<<<<<<
@@ -40191,19 +41118,19 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":355
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":373
* self.max_chunks = self.max_nonterminals + 1
* else:
* self.max_chunks = max_chunks # <<<<<<<<<<<<<<
*
* if max_target_chunks is None:
*/
- __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_max_chunks); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_max_chunks); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->max_chunks = __pyx_t_5;
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":357
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":375
* self.max_chunks = max_chunks
*
* if max_target_chunks is None: # <<<<<<<<<<<<<<
@@ -40214,7 +41141,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_t_4 = (__pyx_t_3 != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":358
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":376
*
* if max_target_chunks is None:
* self.max_target_chunks = self.max_nonterminals + 1 # <<<<<<<<<<<<<<
@@ -40226,19 +41153,19 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":360
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":378
* self.max_target_chunks = self.max_nonterminals + 1
* else:
* self.max_target_chunks = max_target_chunks # <<<<<<<<<<<<<<
*
* if max_target_length is None:
*/
- __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_max_target_chunks); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_max_target_chunks); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->max_target_chunks = __pyx_t_5;
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":362
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":380
* self.max_target_chunks = max_target_chunks
*
* if max_target_length is None: # <<<<<<<<<<<<<<
@@ -40249,7 +41176,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_t_3 = (__pyx_t_4 != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":363
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":381
*
* if max_target_length is None:
* self.max_target_length = max_initial_size # <<<<<<<<<<<<<<
@@ -40261,26 +41188,26 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":365
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":383
* self.max_target_length = max_initial_size
* else:
* self.max_target_length = max_target_length # <<<<<<<<<<<<<<
*
* # algorithmic parameters and settings
*/
- __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_max_target_length); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_max_target_length); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->max_target_length = __pyx_t_5;
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":368
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":386
*
* # algorithmic parameters and settings
* self.precomputed_collocations = {} # <<<<<<<<<<<<<<
* self.precomputed_index = {}
* self.use_index = use_index
*/
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
__Pyx_GOTREF(__pyx_v_self->precomputed_collocations);
@@ -40288,14 +41215,14 @@ 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":369
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":387
* # algorithmic parameters and settings
* self.precomputed_collocations = {}
* self.precomputed_index = {} # <<<<<<<<<<<<<<
* self.use_index = use_index
* self.use_collocations = use_collocations
*/
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
__Pyx_GOTREF(__pyx_v_self->precomputed_index);
@@ -40303,7 +41230,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":370
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":388
* self.precomputed_collocations = {}
* self.precomputed_index = {}
* self.use_index = use_index # <<<<<<<<<<<<<<
@@ -40312,7 +41239,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":371
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":389
* self.precomputed_index = {}
* self.use_index = use_index
* self.use_collocations = use_collocations # <<<<<<<<<<<<<<
@@ -40321,14 +41248,14 @@ 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":372
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":390
* self.use_index = use_index
* self.use_collocations = use_collocations
* self.max_rank = {} # <<<<<<<<<<<<<<
* self.precompute_file = precompute_file
* self.precompute_rank = precompute_rank
*/
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
__Pyx_GOTREF(__pyx_v_self->max_rank);
@@ -40336,7 +41263,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":373
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":391
* self.use_collocations = use_collocations
* self.max_rank = {}
* self.precompute_file = precompute_file # <<<<<<<<<<<<<<
@@ -40349,7 +41276,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":374
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":392
* self.max_rank = {}
* self.precompute_file = precompute_file
* self.precompute_rank = precompute_rank # <<<<<<<<<<<<<<
@@ -40358,7 +41285,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":375
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":393
* self.precompute_file = precompute_file
* self.precompute_rank = precompute_rank
* self.precompute_secondary_rank = precompute_secondary_rank # <<<<<<<<<<<<<<
@@ -40367,7 +41294,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":376
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":394
* self.precompute_rank = precompute_rank
* self.precompute_secondary_rank = precompute_secondary_rank
* self.use_baeza_yates = use_baeza_yates # <<<<<<<<<<<<<<
@@ -40376,7 +41303,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":377
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":395
* self.precompute_secondary_rank = precompute_secondary_rank
* self.use_baeza_yates = use_baeza_yates
* self.by_slack_factor = by_slack_factor # <<<<<<<<<<<<<<
@@ -40385,7 +41312,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":378
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":396
* self.use_baeza_yates = use_baeza_yates
* self.by_slack_factor = by_slack_factor
* self.tight_phrases = tight_phrases # <<<<<<<<<<<<<<
@@ -40394,7 +41321,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":380
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":398
* self.tight_phrases = tight_phrases
*
* if require_aligned_chunks: # <<<<<<<<<<<<<<
@@ -40404,7 +41331,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_t_3 = (__pyx_v_require_aligned_chunks != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":382
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":400
* if require_aligned_chunks:
* # one condition is a stronger version of the other.
* self.require_aligned_chunks = self.require_aligned_terminal = True # <<<<<<<<<<<<<<
@@ -40416,7 +41343,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":383
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":401
* # one condition is a stronger version of the other.
* self.require_aligned_chunks = self.require_aligned_terminal = True
* elif require_aligned_terminal: # <<<<<<<<<<<<<<
@@ -40426,7 +41353,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__pyx_t_3 = (__pyx_v_require_aligned_terminal != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":384
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":402
* self.require_aligned_chunks = self.require_aligned_terminal = True
* elif require_aligned_terminal:
* self.require_aligned_chunks = False # <<<<<<<<<<<<<<
@@ -40435,7 +41362,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":385
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":403
* elif require_aligned_terminal:
* self.require_aligned_chunks = False
* self.require_aligned_terminal = True # <<<<<<<<<<<<<<
@@ -40447,7 +41374,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":387
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":405
* self.require_aligned_terminal = True
* else:
* self.require_aligned_chunks = self.require_aligned_terminal = False # <<<<<<<<<<<<<<
@@ -40459,7 +41386,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":390
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":408
*
* # diagnostics
* self.prev_norm_prefix = () # <<<<<<<<<<<<<<
@@ -40472,249 +41399,75 @@ 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":392
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":410
* self.prev_norm_prefix = ()
*
* self.findexes = IntList(initial_len=10) # <<<<<<<<<<<<<<
* self.findexes1 = IntList(initial_len=10)
*
*/
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
- if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__initial_len), __pyx_int_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__initial_len), __pyx_int_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->findexes);
__Pyx_DECREF(((PyObject *)__pyx_v_self->findexes));
- __pyx_v_self->findexes = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->findexes = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":393
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":411
*
* self.findexes = IntList(initial_len=10)
* self.findexes1 = IntList(initial_len=10) # <<<<<<<<<<<<<<
*
* # Online stats
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_int_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_int_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->findexes1);
__Pyx_DECREF(((PyObject *)__pyx_v_self->findexes1));
- __pyx_v_self->findexes1 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
+ __pyx_v_self->findexes1 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":398
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":416
*
* # True after data is added
* self.online = False # <<<<<<<<<<<<<<
+ * self.online_stats = defaultdict(OnlineStats)
*
- * # Keep track of everything that can be sampled:
*/
__pyx_v_self->online = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":401
- *
- * # Keep track of everything that can be sampled:
- * self.samples_f = defaultdict(int) # <<<<<<<<<<<<<<
- *
- * # Phrase counts
- */
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
- __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __Pyx_GIVEREF(__pyx_t_6);
- __Pyx_GOTREF(__pyx_v_self->samples_f);
- __Pyx_DECREF(__pyx_v_self->samples_f);
- __pyx_v_self->samples_f = __pyx_t_6;
- __pyx_t_6 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":404
- *
- * # Phrase counts
- * self.phrases_f = defaultdict(int) # <<<<<<<<<<<<<<
- * self.phrases_e = defaultdict(int)
- * self.phrases_fe = defaultdict(lambda: defaultdict(int))
- */
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
- __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __Pyx_GIVEREF(__pyx_t_2);
- __Pyx_GOTREF(__pyx_v_self->phrases_f);
- __Pyx_DECREF(__pyx_v_self->phrases_f);
- __pyx_v_self->phrases_f = __pyx_t_2;
- __pyx_t_2 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":405
- * # Phrase counts
- * self.phrases_f = defaultdict(int)
- * self.phrases_e = defaultdict(int) # <<<<<<<<<<<<<<
- * self.phrases_fe = defaultdict(lambda: defaultdict(int))
- * self.phrases_al = defaultdict(lambda: defaultdict(tuple))
- */
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
- __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __Pyx_GIVEREF(__pyx_t_6);
- __Pyx_GOTREF(__pyx_v_self->phrases_e);
- __Pyx_DECREF(__pyx_v_self->phrases_e);
- __pyx_v_self->phrases_e = __pyx_t_6;
- __pyx_t_6 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":406
- * self.phrases_f = defaultdict(int)
- * self.phrases_e = defaultdict(int)
- * self.phrases_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<<
- * self.phrases_al = defaultdict(lambda: defaultdict(tuple))
- *
- */
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_9__cinit___lambda1, 0, __pyx_n_s_110, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 406; __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_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __Pyx_GIVEREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_v_self->phrases_fe);
- __Pyx_DECREF(__pyx_v_self->phrases_fe);
- __pyx_v_self->phrases_fe = __pyx_t_1;
- __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":407
- * self.phrases_e = defaultdict(int)
- * self.phrases_fe = defaultdict(lambda: defaultdict(int))
- * self.phrases_al = defaultdict(lambda: defaultdict(tuple)) # <<<<<<<<<<<<<<
- *
- * # Bilexical counts
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_9__cinit___1lambda2, 0, __pyx_n_s_110, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __Pyx_GIVEREF(__pyx_t_2);
- __Pyx_GOTREF(__pyx_v_self->phrases_al);
- __Pyx_DECREF(__pyx_v_self->phrases_al);
- __pyx_v_self->phrases_al = __pyx_t_2;
- __pyx_t_2 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":410
- *
- * # Bilexical counts
- * self.bilex_f = defaultdict(int) # <<<<<<<<<<<<<<
- * self.bilex_e = defaultdict(int)
- * self.bilex_fe = defaultdict(lambda: defaultdict(int))
- */
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
- __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __Pyx_GIVEREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_v_self->bilex_f);
- __Pyx_DECREF(__pyx_v_self->bilex_f);
- __pyx_v_self->bilex_f = __pyx_t_1;
- __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":411
- * # Bilexical counts
- * self.bilex_f = defaultdict(int)
- * self.bilex_e = defaultdict(int) # <<<<<<<<<<<<<<
- * self.bilex_fe = defaultdict(lambda: defaultdict(int))
- *
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
- __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __Pyx_GIVEREF(__pyx_t_2);
- __Pyx_GOTREF(__pyx_v_self->bilex_e);
- __Pyx_DECREF(__pyx_v_self->bilex_e);
- __pyx_v_self->bilex_e = __pyx_t_2;
- __pyx_t_2 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":412
- * self.bilex_f = defaultdict(int)
- * self.bilex_e = defaultdict(int)
- * self.bilex_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<<
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":417
+ * # True after data is added
+ * self.online = False
+ * self.online_stats = defaultdict(OnlineStats) # <<<<<<<<<<<<<<
*
* def configure(self, SuffixArray fsarray, DataArray edarray,
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_9__cinit___2lambda3, 0, __pyx_n_s_110, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_6);
- __pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_OnlineStats)));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_OnlineStats)));
+ __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_OnlineStats)));
+ __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_6);
- __Pyx_GOTREF(__pyx_v_self->bilex_fe);
- __Pyx_DECREF(__pyx_v_self->bilex_fe);
- __pyx_v_self->bilex_fe = __pyx_t_6;
+ __Pyx_GOTREF(__pyx_v_self->online_stats);
+ __Pyx_DECREF(__pyx_v_self->online_stats);
+ __pyx_v_self->online_stats = __pyx_t_6;
__pyx_t_6 = 0;
__pyx_r = 0;
@@ -40723,7 +41476,7 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -40731,13 +41484,13 @@ static int __pyx_pf_3_sa_23HieroCachingRuleFactory___cinit__(struct __pyx_obj_3_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_3_sa_23HieroCachingRuleFactory_2configure[] = "This gives the RuleFactory access to the Context object.\n Here we also use it to precompute the most expensive intersections\n in the corpus quickly.";
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- struct __pyx_obj_3_sa_SuffixArray *__pyx_v_fsarray = 0;
- struct __pyx_obj_3_sa_DataArray *__pyx_v_edarray = 0;
- struct __pyx_obj_3_sa_Sampler *__pyx_v_sampler = 0;
- struct __pyx_obj_3_sa_Scorer *__pyx_v_scorer = 0;
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure[] = "This gives the RuleFactory access to the Context object.\n Here we also use it to precompute the most expensive intersections\n in the corpus quickly.";
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_fsarray = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_edarray = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_Sampler *__pyx_v_sampler = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_Scorer *__pyx_v_scorer = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -40766,21 +41519,21 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__edarray)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sampler)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scorer)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "configure") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "configure") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
goto __pyx_L5_argtuple_error;
@@ -40790,24 +41543,24 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
}
- __pyx_v_fsarray = ((struct __pyx_obj_3_sa_SuffixArray *)values[0]);
- __pyx_v_edarray = ((struct __pyx_obj_3_sa_DataArray *)values[1]);
- __pyx_v_sampler = ((struct __pyx_obj_3_sa_Sampler *)values[2]);
- __pyx_v_scorer = ((struct __pyx_obj_3_sa_Scorer *)values[3]);
+ __pyx_v_fsarray = ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)values[0]);
+ __pyx_v_edarray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)values[1]);
+ __pyx_v_sampler = ((struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)values[2]);
+ __pyx_v_scorer = ((struct __pyx_obj_4cdec_2sa_3_sa_Scorer *)values[3]);
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.configure", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.configure", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fsarray), __pyx_ptype_3_sa_SuffixArray, 1, "fsarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_edarray), __pyx_ptype_3_sa_DataArray, 1, "edarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sampler), __pyx_ptype_3_sa_Sampler, 1, "sampler", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_scorer), __pyx_ptype_3_sa_Scorer, 1, "scorer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_fsarray, __pyx_v_edarray, __pyx_v_sampler, __pyx_v_scorer);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fsarray), __pyx_ptype_4cdec_2sa_3_sa_SuffixArray, 1, "fsarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_edarray), __pyx_ptype_4cdec_2sa_3_sa_DataArray, 1, "edarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sampler), __pyx_ptype_4cdec_2sa_3_sa_Sampler, 1, "sampler", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_scorer), __pyx_ptype_4cdec_2sa_3_sa_Scorer, 1, "scorer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_fsarray, __pyx_v_edarray, __pyx_v_sampler, __pyx_v_scorer);
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = NULL;
@@ -40816,15 +41569,15 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_3configure(PyObject *__
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":414
- * self.bilex_fe = defaultdict(lambda: defaultdict(int))
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":419
+ * self.online_stats = defaultdict(OnlineStats)
*
* def configure(self, SuffixArray fsarray, DataArray edarray, # <<<<<<<<<<<<<<
* Sampler sampler, Scorer scorer):
* '''This gives the RuleFactory access to the Context object.
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_3_sa_SuffixArray *__pyx_v_fsarray, struct __pyx_obj_3_sa_DataArray *__pyx_v_edarray, struct __pyx_obj_3_sa_Sampler *__pyx_v_sampler, struct __pyx_obj_3_sa_Scorer *__pyx_v_scorer) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *__pyx_v_fsarray, struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_edarray, struct __pyx_obj_4cdec_2sa_3_sa_Sampler *__pyx_v_sampler, struct __pyx_obj_4cdec_2sa_3_sa_Scorer *__pyx_v_scorer) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -40834,7 +41587,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":419
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":424
* Here we also use it to precompute the most expensive intersections
* in the corpus quickly.'''
* self.fsa = fsarray # <<<<<<<<<<<<<<
@@ -40847,7 +41600,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":420
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":425
* in the corpus quickly.'''
* self.fsa = fsarray
* self.fda = fsarray.darray # <<<<<<<<<<<<<<
@@ -40859,10 +41612,10 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->fda);
__Pyx_DECREF(((PyObject *)__pyx_v_self->fda));
- __pyx_v_self->fda = ((struct __pyx_obj_3_sa_DataArray *)__pyx_t_1);
+ __pyx_v_self->fda = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":421
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":426
* self.fsa = fsarray
* self.fda = fsarray.darray
* self.eda = edarray # <<<<<<<<<<<<<<
@@ -40875,7 +41628,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":422
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":427
* self.fda = fsarray.darray
* self.eda = edarray
* self.fid2symid = self.set_idmap(self.fda) # <<<<<<<<<<<<<<
@@ -40884,17 +41637,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
*/
__pyx_t_1 = ((PyObject *)__pyx_v_self->fda);
__Pyx_INCREF(__pyx_t_1);
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->set_idmap(__pyx_v_self, ((struct __pyx_obj_3_sa_DataArray *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->set_idmap(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->fid2symid);
__Pyx_DECREF(((PyObject *)__pyx_v_self->fid2symid));
- __pyx_v_self->fid2symid = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
+ __pyx_v_self->fid2symid = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":423
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":428
* self.eda = edarray
* self.fid2symid = self.set_idmap(self.fda)
* self.eid2symid = self.set_idmap(self.eda) # <<<<<<<<<<<<<<
@@ -40903,31 +41656,31 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
*/
__pyx_t_2 = ((PyObject *)__pyx_v_self->eda);
__Pyx_INCREF(__pyx_t_2);
- __pyx_t_1 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->set_idmap(__pyx_v_self, ((struct __pyx_obj_3_sa_DataArray *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->set_idmap(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->eid2symid);
__Pyx_DECREF(((PyObject *)__pyx_v_self->eid2symid));
- __pyx_v_self->eid2symid = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_self->eid2symid = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":424
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":429
* self.fid2symid = self.set_idmap(self.fda)
* self.eid2symid = self.set_idmap(self.eda)
* self.precompute() # <<<<<<<<<<<<<<
* self.sampler = sampler
* self.scorer = scorer
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__precompute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__precompute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":425
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":430
* self.eid2symid = self.set_idmap(self.eda)
* self.precompute()
* self.sampler = sampler # <<<<<<<<<<<<<<
@@ -40940,7 +41693,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":426
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":431
* self.precompute()
* self.sampler = sampler
* self.scorer = scorer # <<<<<<<<<<<<<<
@@ -40958,7 +41711,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.configure", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.configure", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -40966,7 +41719,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":428
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":433
* self.scorer = scorer
*
* cdef set_idmap(self, DataArray darray): # <<<<<<<<<<<<<<
@@ -40974,11 +41727,11 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_2configure(struct __pyx
* cdef IntList idmap
*/
-static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_3_sa_DataArray *__pyx_v_darray) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_DataArray *__pyx_v_darray) {
int __pyx_v_word_id;
int __pyx_v_new_word_id;
int __pyx_v_N;
- struct __pyx_obj_3_sa_IntList *__pyx_v_idmap = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_idmap = 0;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -40991,7 +41744,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":432
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":437
* cdef IntList idmap
*
* N = len(darray.id2word) # <<<<<<<<<<<<<<
@@ -41000,30 +41753,30 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED
*/
__pyx_t_1 = __pyx_v_darray->id2word;
__Pyx_INCREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_N = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":433
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":438
*
* N = len(darray.id2word)
* idmap = IntList(initial_len=N) # <<<<<<<<<<<<<<
* for word_id from 0 <= word_id < N:
* new_word_id = sym_fromstring(darray.id2word[word_id], True)
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_3 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_v_idmap = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
+ __pyx_v_idmap = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":434
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":439
* N = len(darray.id2word)
* idmap = IntList(initial_len=N)
* for word_id from 0 <= word_id < N: # <<<<<<<<<<<<<<
@@ -41033,20 +41786,20 @@ 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":435
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":440
* idmap = IntList(initial_len=N)
* for word_id from 0 <= word_id < N:
* new_word_id = sym_fromstring(darray.id2word[word_id], True) # <<<<<<<<<<<<<<
* idmap.arr[word_id] = new_word_id
* return idmap
*/
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_darray->id2word, __pyx_v_word_id, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_darray->id2word, __pyx_v_word_id, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_v_new_word_id = __pyx_f_3_sa_sym_fromstring(__pyx_t_5, 1);
+ __pyx_v_new_word_id = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_t_5, 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":436
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":441
* 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 # <<<<<<<<<<<<<<
@@ -41056,7 +41809,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":437
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":442
* new_word_id = sym_fromstring(darray.id2word[word_id], True)
* idmap.arr[word_id] = new_word_id
* return idmap # <<<<<<<<<<<<<<
@@ -41073,7 +41826,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.set_idmap", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.set_idmap", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_idmap);
@@ -41083,17 +41836,17 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap(CYTHON_UNUSED
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5pattern2phrase(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5pattern2phrase(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5pattern2phrase(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5pattern2phrase(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("pattern2phrase (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), ((PyObject *)__pyx_v_pattern));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phrase(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), ((PyObject *)__pyx_v_pattern));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":440
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":445
*
*
* def pattern2phrase(self, pattern): # <<<<<<<<<<<<<<
@@ -41101,7 +41854,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5pattern2phrase(PyObjec
* result = ()
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_pattern) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_pattern) {
PyObject *__pyx_v_result = NULL;
PyObject *__pyx_v_arity = NULL;
PyObject *__pyx_v_word_id = NULL;
@@ -41121,7 +41874,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":442
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":447
* def pattern2phrase(self, pattern):
* # pattern is a tuple, which we must convert to a hiero Phrase
* result = () # <<<<<<<<<<<<<<
@@ -41131,7 +41884,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":443
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":448
* # pattern is a tuple, which we must convert to a hiero Phrase
* result = ()
* arity = 0 # <<<<<<<<<<<<<<
@@ -41141,7 +41894,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":444
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":449
* result = ()
* arity = 0
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -41152,7 +41905,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
__pyx_t_1 = __pyx_v_pattern; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -41160,23 +41913,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __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[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -41186,74 +41939,74 @@ 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":445
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":450
* arity = 0
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
* arity = arity + 1
* new_id = sym_setindex(self.category, arity)
*/
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":446
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":451
* for word_id in pattern:
* if word_id == -1:
* arity = arity + 1 # <<<<<<<<<<<<<<
* new_id = sym_setindex(self.category, arity)
* else:
*/
- __pyx_t_4 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_v_arity);
__pyx_v_arity = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":447
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":452
* if word_id == -1:
* arity = arity + 1
* new_id = sym_setindex(self.category, arity) # <<<<<<<<<<<<<<
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
*/
- __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_arity); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_new_id = __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_t_6);
+ __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_arity); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_new_id = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_t_6);
goto __pyx_L5;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":449
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":454
* new_id = sym_setindex(self.category, arity)
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True) # <<<<<<<<<<<<<<
* result = result + (new_id,)
* return Phrase(result)
*/
- __pyx_t_4 = PyObject_GetItem(__pyx_v_self->fda->id2word, __pyx_v_word_id); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_self->fda->id2word, __pyx_v_word_id); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_new_id = __pyx_f_3_sa_sym_fromstring(__pyx_t_7, 1);
+ __pyx_v_new_id = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_t_7, 1);
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":450
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":455
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,) # <<<<<<<<<<<<<<
* return Phrase(result)
*
*/
- __pyx_t_4 = PyInt_FromLong(__pyx_v_new_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_new_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_result));
@@ -41262,7 +42015,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":451
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":456
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,)
* return Phrase(result) # <<<<<<<<<<<<<<
@@ -41270,12 +42023,12 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
* def pattern2phrase_plus(self, pattern):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_result));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
__Pyx_GIVEREF(((PyObject *)__pyx_v_result));
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__pyx_r = __pyx_t_4;
@@ -41288,7 +42041,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.pattern2phrase", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.pattern2phrase", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
@@ -41300,17 +42053,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_4pattern2phrase(struct
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_7pattern2phrase_plus(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_7pattern2phrase_plus(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_7pattern2phrase_plus(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_7pattern2phrase_plus(PyObject *__pyx_v_self, PyObject *__pyx_v_pattern) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("pattern2phrase_plus (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), ((PyObject *)__pyx_v_pattern));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), ((PyObject *)__pyx_v_pattern));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":453
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":458
* return Phrase(result)
*
* def pattern2phrase_plus(self, pattern): # <<<<<<<<<<<<<<
@@ -41318,7 +42071,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_7pattern2phrase_plus(Py
* # suffixed/prefixed with the NT category.
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_pattern) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_pattern) {
PyObject *__pyx_v_patterns = NULL;
PyObject *__pyx_v_result = NULL;
PyObject *__pyx_v_arity = NULL;
@@ -41340,19 +42093,19 @@ 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":456
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":461
* # returns a list containing both the pattern, and pattern
* # suffixed/prefixed with the NT category.
* patterns = [] # <<<<<<<<<<<<<<
* result = ()
* arity = 0
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_patterns = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":457
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":462
* # suffixed/prefixed with the NT category.
* patterns = []
* result = () # <<<<<<<<<<<<<<
@@ -41362,7 +42115,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":458
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":463
* patterns = []
* result = ()
* arity = 0 # <<<<<<<<<<<<<<
@@ -41372,7 +42125,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":459
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":464
* result = ()
* arity = 0
* for word_id in pattern: # <<<<<<<<<<<<<<
@@ -41383,7 +42136,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__pyx_t_1 = __pyx_v_pattern; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -41391,23 +42144,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __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[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -41417,74 +42170,74 @@ 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":460
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":465
* arity = 0
* for word_id in pattern:
* if word_id == -1: # <<<<<<<<<<<<<<
* arity = arity + 1
* new_id = sym_setindex(self.category, arity)
*/
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":461
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":466
* for word_id in pattern:
* if word_id == -1:
* arity = arity + 1 # <<<<<<<<<<<<<<
* new_id = sym_setindex(self.category, arity)
* else:
*/
- __pyx_t_4 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_v_arity);
__pyx_v_arity = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":462
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":467
* if word_id == -1:
* arity = arity + 1
* new_id = sym_setindex(self.category, arity) # <<<<<<<<<<<<<<
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
*/
- __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_arity); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_new_id = __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_t_6);
+ __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_arity); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_new_id = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_t_6);
goto __pyx_L5;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":464
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":469
* new_id = sym_setindex(self.category, arity)
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True) # <<<<<<<<<<<<<<
* result = result + (new_id,)
* patterns.append(Phrase(result))
*/
- __pyx_t_4 = PyObject_GetItem(__pyx_v_self->fda->id2word, __pyx_v_word_id); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_self->fda->id2word, __pyx_v_word_id); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_new_id = __pyx_f_3_sa_sym_fromstring(__pyx_t_7, 1);
+ __pyx_v_new_id = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_t_7, 1);
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":465
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":470
* else:
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,) # <<<<<<<<<<<<<<
* patterns.append(Phrase(result))
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),)))
*/
- __pyx_t_4 = PyInt_FromLong(__pyx_v_new_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_new_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_result));
@@ -41493,81 +42246,81 @@ 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":466
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":471
* new_id = sym_fromstring(self.fda.id2word[word_id], True)
* result = result + (new_id,)
* patterns.append(Phrase(result)) # <<<<<<<<<<<<<<
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),)))
* patterns.append(Phrase((sym_setindex(self.category, 1),) + result))
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_result));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
__Pyx_GIVEREF(((PyObject *)__pyx_v_result));
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 471; __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":467
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":472
* result = result + (new_id,)
* patterns.append(Phrase(result))
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) # <<<<<<<<<<<<<<
* patterns.append(Phrase((sym_setindex(self.category, 1),) + result))
* return patterns
*/
- __pyx_t_4 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_result), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4));
__Pyx_GIVEREF(((PyObject *)__pyx_t_4));
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __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":468
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":473
* patterns.append(Phrase(result))
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),)))
* patterns.append(Phrase((sym_setindex(self.category, 1),) + result)) # <<<<<<<<<<<<<<
* return patterns
*
*/
- __pyx_t_4 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_v_result)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_v_result)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4));
__Pyx_GIVEREF(((PyObject *)__pyx_t_4));
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 473; __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":469
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":474
* patterns.append(Phrase(result + (sym_setindex(self.category, 1),)))
* patterns.append(Phrase((sym_setindex(self.category, 1),) + result))
* return patterns # <<<<<<<<<<<<<<
@@ -41585,7 +42338,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.pattern2phrase_plus", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.pattern2phrase_plus", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_patterns);
@@ -41598,17 +42351,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_6pattern2phrase_plus(st
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9precompute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9precompute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9precompute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9precompute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("precompute (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":471
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":476
* return patterns
*
* def precompute(self): # <<<<<<<<<<<<<<
@@ -41616,8 +42369,8 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9precompute(PyObject *_
*
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self) {
- struct __pyx_obj_3_sa_Precomputation *__pyx_v_pre = 0;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *__pyx_v_pre = 0;
PyObject *__pyx_v_start_time = NULL;
PyObject *__pyx_v_pattern = NULL;
PyObject *__pyx_v_arr = NULL;
@@ -41643,7 +42396,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":474
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":479
* cdef Precomputation pre
*
* if self.precompute_file is not None: # <<<<<<<<<<<<<<
@@ -41654,64 +42407,64 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":475
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":480
*
* if self.precompute_file is not None:
* start_time = monitor_cpu() # <<<<<<<<<<<<<<
* logger.info("Reading precomputed data from file %s... ", self.precompute_file)
* pre = Precomputation(from_binary=self.precompute_file)
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_start_time = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":476
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":481
* if self.precompute_file is not None:
* start_time = monitor_cpu()
* logger.info("Reading precomputed data from file %s... ", self.precompute_file) # <<<<<<<<<<<<<<
* pre = Precomputation(from_binary=self.precompute_file)
* # check parameters of precomputation -- some are critical and some are not
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_111));
- PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_111));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_111));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_112));
+ PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_112));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_112));
__Pyx_INCREF(__pyx_v_self->precompute_file);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->precompute_file);
__Pyx_GIVEREF(__pyx_v_self->precompute_file);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":477
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":482
* start_time = monitor_cpu()
* logger.info("Reading precomputed data from file %s... ", self.precompute_file)
* pre = Precomputation(from_binary=self.precompute_file) # <<<<<<<<<<<<<<
* # check parameters of precomputation -- some are critical and some are not
* if pre.max_nonterminals != self.max_nonterminals:
*/
- __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__from_binary), __pyx_v_self->precompute_file) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Precomputation)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__from_binary), __pyx_v_self->precompute_file) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Precomputation)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- __pyx_v_pre = ((struct __pyx_obj_3_sa_Precomputation *)__pyx_t_4);
+ __pyx_v_pre = ((struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":479
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":484
* 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: # <<<<<<<<<<<<<<
@@ -41721,34 +42474,34 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_2 = ((__pyx_v_pre->max_nonterminals != __pyx_v_self->max_nonterminals) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":480
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":485
* # check parameters of precomputation -- some are critical and some are not
* if pre.max_nonterminals != self.max_nonterminals:
* logger.warn("Precomputation done with max nonterminals %d, decoder uses %d", pre.max_nonterminals, self.max_nonterminals) # <<<<<<<<<<<<<<
* if pre.max_length != self.max_length:
* logger.warn("Precomputation done with max terminals %d, decoder uses %d", pre.max_length, self.max_length)
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__warn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__warn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromLong(__pyx_v_pre->max_nonterminals); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_pre->max_nonterminals); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyInt_FromLong(__pyx_v_self->max_nonterminals); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_self->max_nonterminals); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_112));
- PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_112));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_112));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_113));
+ PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_113));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_113));
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_4 = 0;
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
@@ -41757,7 +42510,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":481
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":486
* 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: # <<<<<<<<<<<<<<
@@ -41767,34 +42520,34 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_2 = ((__pyx_v_pre->max_length != __pyx_v_self->max_length) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":482
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":487
* logger.warn("Precomputation done with max nonterminals %d, decoder uses %d", pre.max_nonterminals, self.max_nonterminals)
* if pre.max_length != self.max_length:
* logger.warn("Precomputation done with max terminals %d, decoder uses %d", pre.max_length, self.max_length) # <<<<<<<<<<<<<<
* if pre.train_max_initial_size != self.train_max_initial_size:
* raise Exception("Precomputation done with max initial size %d, decoder uses %d" % (pre.train_max_initial_size, self.train_max_initial_size))
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__warn); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__warn); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyInt_FromLong(__pyx_v_pre->max_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_pre->max_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyInt_FromLong(__pyx_v_self->max_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(__pyx_v_self->max_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_113));
- PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_113));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_113));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_114));
+ PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_114));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_114));
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_3 = 0;
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
@@ -41803,7 +42556,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":483
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":488
* 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: # <<<<<<<<<<<<<<
@@ -41813,18 +42566,18 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_2 = ((__pyx_v_pre->train_max_initial_size != __pyx_v_self->train_max_initial_size) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":484
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":489
* logger.warn("Precomputation done with max terminals %d, decoder uses %d", pre.max_length, self.max_length)
* if pre.train_max_initial_size != self.train_max_initial_size:
* raise Exception("Precomputation done with max initial size %d, decoder uses %d" % (pre.train_max_initial_size, self.train_max_initial_size)) # <<<<<<<<<<<<<<
* if pre.train_min_gap_size != self.train_min_gap_size:
* raise Exception("Precomputation done with min gap size %d, decoder uses %d" % (pre.train_min_gap_size, self.train_min_gap_size))
*/
- __pyx_t_5 = PyInt_FromLong(__pyx_v_pre->train_max_initial_size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(__pyx_v_pre->train_max_initial_size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyInt_FromLong(__pyx_v_self->train_max_initial_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_self->train_max_initial_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
@@ -41832,25 +42585,25 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_5 = 0;
__pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_114), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_115), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_4));
__Pyx_GIVEREF(((PyObject *)__pyx_t_4));
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":485
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":490
* 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: # <<<<<<<<<<<<<<
@@ -41860,18 +42613,18 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_2 = ((__pyx_v_pre->train_min_gap_size != __pyx_v_self->train_min_gap_size) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":486
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":491
* raise Exception("Precomputation done with max initial size %d, decoder uses %d" % (pre.train_max_initial_size, self.train_max_initial_size))
* if pre.train_min_gap_size != self.train_min_gap_size:
* raise Exception("Precomputation done with min gap size %d, decoder uses %d" % (pre.train_min_gap_size, self.train_min_gap_size)) # <<<<<<<<<<<<<<
* if self.use_index:
* logger.info("Converting %d hash keys on precomputed inverted index... ", len(pre.precomputed_index))
*/
- __pyx_t_4 = PyInt_FromLong(__pyx_v_pre->train_min_gap_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_pre->train_min_gap_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyInt_FromLong(__pyx_v_self->train_min_gap_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_self->train_min_gap_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
@@ -41879,25 +42632,25 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_4 = 0;
__pyx_t_6 = 0;
- __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_115), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_116), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L7;
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":487
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":492
* 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: # <<<<<<<<<<<<<<
@@ -41907,39 +42660,39 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_2 = (__pyx_v_self->use_index != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":488
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":493
* raise Exception("Precomputation done with min gap size %d, decoder uses %d" % (pre.train_min_gap_size, self.train_min_gap_size))
* if self.use_index:
* logger.info("Converting %d hash keys on precomputed inverted index... ", len(pre.precomputed_index)) # <<<<<<<<<<<<<<
* for pattern, arr in pre.precomputed_index.iteritems():
* phrases = self.pattern2phrase_plus(pattern)
*/
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = __pyx_v_pre->precomputed_index;
__Pyx_INCREF(__pyx_t_6);
- __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_116));
- PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_116));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_116));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_117));
+ PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_117));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_117));
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":489
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":494
* 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(): # <<<<<<<<<<<<<<
@@ -41949,9 +42702,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_7 = 0;
if (unlikely(__pyx_v_pre->precomputed_index == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_pre->precomputed_index, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_pre->precomputed_index, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_6);
__pyx_t_6 = __pyx_t_4;
@@ -41959,7 +42712,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
while (1) {
__pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_8, &__pyx_t_7, &__pyx_t_4, &__pyx_t_5, NULL, __pyx_t_9);
if (unlikely(__pyx_t_10 == 0)) break;
- if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_v_pattern);
@@ -41969,21 +42722,21 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_v_arr = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":490
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":495
* logger.info("Converting %d hash keys on precomputed inverted index... ", len(pre.precomputed_index))
* for pattern, arr in pre.precomputed_index.iteritems():
* phrases = self.pattern2phrase_plus(pattern) # <<<<<<<<<<<<<<
* for phrase in phrases:
* self.precomputed_index[phrase] = arr
*/
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__pattern2phrase_plus); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__pattern2phrase_plus); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_pattern);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pattern);
__Pyx_GIVEREF(__pyx_v_pattern);
- __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
@@ -41991,7 +42744,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":491
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":496
* for pattern, arr in pre.precomputed_index.iteritems():
* phrases = self.pattern2phrase_plus(pattern)
* for phrase in phrases: # <<<<<<<<<<<<<<
@@ -42002,7 +42755,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_3 = __pyx_v_phrases; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0;
__pyx_t_12 = NULL;
} else {
- __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_phrases); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_phrases); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
@@ -42010,23 +42763,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_12(__pyx_t_3);
if (unlikely(!__pyx_t_4)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -42036,14 +42789,14 @@ 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":492
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":497
* phrases = self.pattern2phrase_plus(pattern)
* for phrase in phrases:
* self.precomputed_index[phrase] = arr # <<<<<<<<<<<<<<
* if self.use_collocations:
* logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations))
*/
- if (PyObject_SetItem(__pyx_v_self->precomputed_index, __pyx_v_phrase, __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_v_self->precomputed_index, __pyx_v_phrase, __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
@@ -42052,7 +42805,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":493
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":498
* for phrase in phrases:
* self.precomputed_index[phrase] = arr
* if self.use_collocations: # <<<<<<<<<<<<<<
@@ -42062,39 +42815,39 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_2 = (__pyx_v_self->use_collocations != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":494
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":499
* self.precomputed_index[phrase] = arr
* if self.use_collocations:
* logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations)) # <<<<<<<<<<<<<<
* for pattern, arr in pre.precomputed_collocations.iteritems():
* phrase = self.pattern2phrase(pattern)
*/
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s__info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = __pyx_v_pre->precomputed_collocations;
__Pyx_INCREF(__pyx_t_6);
- __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_117));
- PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_117));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_117));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_118));
+ PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_118));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_118));
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":495
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":500
* 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(): # <<<<<<<<<<<<<<
@@ -42104,9 +42857,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_t_8 = 0;
if (unlikely(__pyx_v_pre->precomputed_collocations == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_pre->precomputed_collocations, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_7), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_pre->precomputed_collocations, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_7), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_6);
__pyx_t_6 = __pyx_t_4;
@@ -42114,7 +42867,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
while (1) {
__pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_8, &__pyx_t_4, &__pyx_t_3, NULL, __pyx_t_9);
if (unlikely(__pyx_t_10 == 0)) break;
- if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_v_pattern);
@@ -42124,21 +42877,21 @@ 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":496
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":501
* logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations))
* for pattern, arr in pre.precomputed_collocations.iteritems():
* phrase = self.pattern2phrase(pattern) # <<<<<<<<<<<<<<
* self.precomputed_collocations[phrase] = arr
* stop_time = monitor_cpu()
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__pattern2phrase); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__pattern2phrase); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_pattern);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pattern);
__Pyx_GIVEREF(__pyx_v_pattern);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
@@ -42146,58 +42899,58 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__pyx_v_phrase = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":497
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":502
* for pattern, arr in pre.precomputed_collocations.iteritems():
* phrase = self.pattern2phrase(pattern)
* self.precomputed_collocations[phrase] = arr # <<<<<<<<<<<<<<
* stop_time = monitor_cpu()
* logger.info("Processing precomputations took %f seconds", stop_time - start_time)
*/
- if (PyObject_SetItem(__pyx_v_self->precomputed_collocations, __pyx_v_phrase, __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_v_self->precomputed_collocations, __pyx_v_phrase, __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L13;
}
__pyx_L13:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":498
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":503
* phrase = self.pattern2phrase(pattern)
* self.precomputed_collocations[phrase] = arr
* stop_time = monitor_cpu() # <<<<<<<<<<<<<<
* logger.info("Processing precomputations took %f seconds", stop_time - start_time)
*
*/
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_v_stop_time = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":499
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":504
* self.precomputed_collocations[phrase] = arr
* stop_time = monitor_cpu()
* logger.info("Processing precomputations took %f seconds", stop_time - start_time) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s__info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyNumber_Subtract(__pyx_v_stop_time, __pyx_v_start_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Subtract(__pyx_v_stop_time, __pyx_v_start_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_118));
- PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_118));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_118));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_119));
+ PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_119));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_119));
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
@@ -42213,7 +42966,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.precompute", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_pre);
@@ -42229,17 +42982,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8precompute(struct __py
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_11get_precomputed_collocation(PyObject *__pyx_v_self, PyObject *__pyx_v_phrase); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_11get_precomputed_collocation(PyObject *__pyx_v_self, PyObject *__pyx_v_phrase) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_11get_precomputed_collocation(PyObject *__pyx_v_self, PyObject *__pyx_v_phrase); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_11get_precomputed_collocation(PyObject *__pyx_v_self, PyObject *__pyx_v_phrase) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_precomputed_collocation (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collocation(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), ((PyObject *)__pyx_v_phrase));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomputed_collocation(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), ((PyObject *)__pyx_v_phrase));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":502
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":507
*
*
* def get_precomputed_collocation(self, phrase): # <<<<<<<<<<<<<<
@@ -42247,7 +43000,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_11get_precomputed_collo
* arr = self.precomputed_collocations[phrase]
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collocation(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_phrase) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomputed_collocation(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_phrase) {
PyObject *__pyx_v_arr = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -42262,30 +43015,30 @@ 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":503
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":508
*
* def get_precomputed_collocation(self, phrase):
* if phrase in self.precomputed_collocations: # <<<<<<<<<<<<<<
* arr = self.precomputed_collocations[phrase]
* return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1)
*/
- __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_phrase, __pyx_v_self->precomputed_collocations, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_phrase, __pyx_v_self->precomputed_collocations, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":504
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":509
* def get_precomputed_collocation(self, phrase):
* if phrase in self.precomputed_collocations:
* arr = self.precomputed_collocations[phrase] # <<<<<<<<<<<<<<
* return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1)
* return None
*/
- __pyx_t_3 = PyObject_GetItem(__pyx_v_self->precomputed_collocations, __pyx_v_phrase); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_self->precomputed_collocations, __pyx_v_phrase); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_arr = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":505
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":510
* 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) # <<<<<<<<<<<<<<
@@ -42293,26 +43046,26 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
- if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__arr), __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__arr_low), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__arr), __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__arr_low), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__arr_high), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__arr_high), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_phrase, __pyx_n_s__arity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_phrase, __pyx_n_s__arity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__num_subpatterns), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__num_subpatterns), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__pyx_r = __pyx_t_5;
@@ -42322,7 +43075,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":506
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":511
* arr = self.precomputed_collocations[phrase]
* return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1)
* return None # <<<<<<<<<<<<<<
@@ -42340,7 +43093,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.get_precomputed_collocation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_precomputed_collocation", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_arr);
@@ -42349,7 +43102,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":509
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":514
*
*
* cdef int* baeza_yates_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<<
@@ -42357,7 +43110,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_10get_precomputed_collo
* int offset_by_one, int len_last, int num_subpatterns, int* result_len):
*/
-static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_low1, int __pyx_v_high1, int *__pyx_v_arr1, int __pyx_v_step1, int __pyx_v_low2, int __pyx_v_high2, int *__pyx_v_arr2, int __pyx_v_step2, int __pyx_v_offset_by_one, int __pyx_v_len_last, int __pyx_v_num_subpatterns, int *__pyx_v_result_len) {
+static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_low1, int __pyx_v_high1, int *__pyx_v_arr1, int __pyx_v_step1, int __pyx_v_low2, int __pyx_v_high2, int *__pyx_v_arr2, int __pyx_v_step2, int __pyx_v_offset_by_one, int __pyx_v_len_last, int __pyx_v_num_subpatterns, int *__pyx_v_result_len) {
int __pyx_v_i1;
int __pyx_v_i2;
int __pyx_v_med1;
@@ -42380,8 +43133,8 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
int *__pyx_v_low_result;
int *__pyx_v_med_result;
int *__pyx_v_high_result;
- struct __pyx_t_3_sa_Matching __pyx_v_loc1;
- struct __pyx_t_3_sa_Matching __pyx_v_loc2;
+ struct __pyx_t_4cdec_2sa_3_sa_Matching __pyx_v_loc1;
+ struct __pyx_t_4cdec_2sa_3_sa_Matching __pyx_v_loc2;
int *__pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -42395,7 +43148,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":522
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":527
* cdef Matching loc1, loc2
*
* result = <int*> malloc(0*sizeof(int*)) # <<<<<<<<<<<<<<
@@ -42404,7 +43157,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":524
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":529
* result = <int*> malloc(0*sizeof(int*))
*
* d_first = 0 # <<<<<<<<<<<<<<
@@ -42413,7 +43166,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":525
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":530
*
* d_first = 0
* if high1 - low1 > high2 - low2: # <<<<<<<<<<<<<<
@@ -42423,7 +43176,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)) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":526
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":531
* d_first = 0
* if high1 - low1 > high2 - low2:
* d_first = 1 # <<<<<<<<<<<<<<
@@ -42435,7 +43188,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":530
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":535
* # 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: # <<<<<<<<<<<<<<
@@ -42451,7 +43204,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":531
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":536
* # Case 1: one of the sets is empty
* if low1 >= high1 or low2 >= high2:
* return result # <<<<<<<<<<<<<<
@@ -42464,35 +43217,35 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":534
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":539
*
* # 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)
* if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == -1:
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, (__pyx_v_high1 - __pyx_v_step1), __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":535
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":540
* # 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) # <<<<<<<<<<<<<<
* if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == -1:
* return result
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_low2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":536
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":541
* 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: # <<<<<<<<<<<<<<
* return result
*
*/
- __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) != 0);
+ __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) == -1) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":537
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":542
* 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 # <<<<<<<<<<<<<<
@@ -42505,35 +43258,35 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":539
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":544
* return result
*
* 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:
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_low1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":540
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":545
*
* 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:
* return result
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, (__pyx_v_high2 - __pyx_v_step2), __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":541
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":546
* 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: # <<<<<<<<<<<<<<
* return result
*
*/
- __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) != 0);
+ __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) == 1) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":542
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":547
* 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 # <<<<<<<<<<<<<<
@@ -42546,7 +43299,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":546
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":551
* # Case 3: query set and data set do not meet size mismatch constraints;
* # We use mergesort instead in this case
* qsetsize = (high1-low1) / step1 # <<<<<<<<<<<<<<
@@ -42562,7 +43315,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
else if (sizeof(int) == sizeof(long) && unlikely(__pyx_v_step1 == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_4))) {
#ifdef WITH_THREAD
@@ -42572,11 +43325,11 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_qsetsize = __Pyx_div_int(__pyx_t_4, __pyx_v_step1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":547
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":552
* # We use mergesort instead in this case
* qsetsize = (high1-low1) / step1
* dsetsize = (high2-low2) / step2 # <<<<<<<<<<<<<<
@@ -42592,7 +43345,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
else if (sizeof(int) == sizeof(long) && unlikely(__pyx_v_step2 == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_4))) {
#ifdef WITH_THREAD
@@ -42602,11 +43355,11 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_dsetsize = __Pyx_div_int(__pyx_t_4, __pyx_v_step2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":548
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":553
* qsetsize = (high1-low1) / step1
* dsetsize = (high2-low2) / step2
* if d_first: # <<<<<<<<<<<<<<
@@ -42616,7 +43369,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_d_first != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":549
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":554
* dsetsize = (high2-low2) / step2
* if d_first:
* tmp = qsetsize # <<<<<<<<<<<<<<
@@ -42625,7 +43378,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":550
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":555
* if d_first:
* tmp = qsetsize
* qsetsize = dsetsize # <<<<<<<<<<<<<<
@@ -42634,7 +43387,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":551
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":556
* tmp = qsetsize
* qsetsize = dsetsize
* dsetsize = tmp # <<<<<<<<<<<<<<
@@ -42646,7 +43399,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":553
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":558
* dsetsize = tmp
*
* if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize: # <<<<<<<<<<<<<<
@@ -42663,12 +43416,12 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_3 = (((__pyx_t_5 / __pyx_t_6) > __pyx_v_dsetsize) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":554
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":559
*
* if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize:
* free(result) # <<<<<<<<<<<<<<
@@ -42677,20 +43430,20 @@ 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":555
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":560
* 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) # <<<<<<<<<<<<<<
*
* # binary search. There are two flavors, depending on
*/
- __pyx_r = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->merge_helper(__pyx_v_self, __pyx_v_low1, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_low2, __pyx_v_high2, __pyx_v_arr2, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, __pyx_v_result_len);
+ __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->merge_helper(__pyx_v_self, __pyx_v_low1, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_low2, __pyx_v_high2, __pyx_v_arr2, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, __pyx_v_result_len);
goto __pyx_L0;
goto __pyx_L8;
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":559
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":564
* # binary search. There are two flavors, depending on
* # whether the queryset or dataset is first
* if d_first: # <<<<<<<<<<<<<<
@@ -42700,25 +43453,25 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_d_first != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":560
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":565
* # whether the queryset or dataset is first
* if d_first:
* med2 = median(low2, high2, step2) # <<<<<<<<<<<<<<
* assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr)
*
*/
- __pyx_v_med2 = __pyx_f_3_sa_median(__pyx_v_low2, __pyx_v_high2, __pyx_v_step2);
+ __pyx_v_med2 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_low2, __pyx_v_high2, __pyx_v_step2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":561
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":566
* if d_first:
* med2 = median(low2, high2, step2)
* assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
*
* search_low = low1
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_med2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":563
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":568
* assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr)
*
* search_low = low1 # <<<<<<<<<<<<<<
@@ -42727,7 +43480,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":564
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":569
*
* search_low = low1
* search_high = high1 # <<<<<<<<<<<<<<
@@ -42736,7 +43489,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":565
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":570
* search_low = low1
* search_high = high1
* while search_low < search_high: # <<<<<<<<<<<<<<
@@ -42747,34 +43500,34 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_search_low < __pyx_v_search_high) != 0);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":566
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":571
* search_high = high1
* while search_low < search_high:
* 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)
*/
- __pyx_v_med1 = __pyx_f_3_sa_median(__pyx_v_search_low, __pyx_v_search_high, __pyx_v_step1);
+ __pyx_v_med1 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_search_low, __pyx_v_search_high, __pyx_v_step1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":567
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":572
* while search_low < search_high:
* 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)
* if comparison == -1:
*/
- __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));
+ __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(__pyx_v_low1, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_med1, (&__pyx_v_med1_minus), (&__pyx_v_med1_plus));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":568
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":573
* 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) # <<<<<<<<<<<<<<
* if comparison == -1:
* search_low = med1_plus
*/
- __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);
+ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings_set(__pyx_v_self, __pyx_v_med1_minus, __pyx_v_med1_plus, __pyx_v_arr1, __pyx_v_step1, (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":571
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":576
* if comparison == -1:
* search_low = med1_plus
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -42783,7 +43536,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":569
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":574
* 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: # <<<<<<<<<<<<<<
@@ -42792,7 +43545,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case -1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":570
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":575
* comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last)
* if comparison == -1:
* search_low = med1_plus # <<<<<<<<<<<<<<
@@ -42802,7 +43555,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":571
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":576
* if comparison == -1:
* search_low = med1_plus
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -42811,7 +43564,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case 1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":572
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":577
* search_low = med1_plus
* elif comparison == 1:
* search_high = med1_minus # <<<<<<<<<<<<<<
@@ -42822,7 +43575,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
break;
default:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":574
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":579
* search_high = med1_minus
* else:
* break # <<<<<<<<<<<<<<
@@ -42838,25 +43591,25 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":576
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":581
* break
* else:
* med1 = median(low1, high1, step1) # <<<<<<<<<<<<<<
* find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus)
*
*/
- __pyx_v_med1 = __pyx_f_3_sa_median(__pyx_v_low1, __pyx_v_high1, __pyx_v_step1);
+ __pyx_v_med1 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_low1, __pyx_v_high1, __pyx_v_step1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":577
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":582
* else:
* med1 = median(low1, high1, step1)
* find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) # <<<<<<<<<<<<<<
*
* search_low = low2
*/
- __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));
+ __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(__pyx_v_low1, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_med1, (&__pyx_v_med1_minus), (&__pyx_v_med1_plus));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":579
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":584
* find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus)
*
* search_low = low2 # <<<<<<<<<<<<<<
@@ -42865,7 +43618,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":580
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":585
*
* search_low = low2
* search_high = high2 # <<<<<<<<<<<<<<
@@ -42874,7 +43627,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":581
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":586
* search_low = low2
* search_high = high2
* while search_low < search_high: # <<<<<<<<<<<<<<
@@ -42885,34 +43638,34 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_search_low < __pyx_v_search_high) != 0);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":582
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":587
* search_high = high2
* while search_low < search_high:
* 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)
*/
- __pyx_v_med2 = __pyx_f_3_sa_median(__pyx_v_search_low, __pyx_v_search_high, __pyx_v_step2);
+ __pyx_v_med2 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_search_low, __pyx_v_search_high, __pyx_v_step2);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":583
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":588
* while search_low < search_high:
* 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)
* if comparison == -1:
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_med2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":584
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":589
* 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) # <<<<<<<<<<<<<<
* if comparison == -1:
* search_high = med2
*/
- __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);
+ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings_set(__pyx_v_self, __pyx_v_med1_minus, __pyx_v_med1_plus, __pyx_v_arr1, __pyx_v_step1, (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":587
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":592
* if comparison == -1:
* search_high = med2
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -42921,7 +43674,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":585
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":590
* 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: # <<<<<<<<<<<<<<
@@ -42930,7 +43683,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case -1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":586
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":591
* comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last)
* if comparison == -1:
* search_high = med2 # <<<<<<<<<<<<<<
@@ -42940,7 +43693,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":587
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":592
* if comparison == -1:
* search_high = med2
* elif comparison == 1: # <<<<<<<<<<<<<<
@@ -42949,7 +43702,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
*/
case 1:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":588
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":593
* search_high = med2
* elif comparison == 1:
* search_low = med2 + step2 # <<<<<<<<<<<<<<
@@ -42960,7 +43713,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
break;
default:
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":590
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":595
* search_low = med2 + step2
* else:
* break # <<<<<<<<<<<<<<
@@ -42975,7 +43728,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":592
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":597
* break
*
* med_result_len = 0 # <<<<<<<<<<<<<<
@@ -42984,7 +43737,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":593
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":598
*
* med_result_len = 0
* med_result = <int*> malloc(0*sizeof(int*)) # <<<<<<<<<<<<<<
@@ -42993,7 +43746,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":594
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":599
* med_result_len = 0
* med_result = <int*> malloc(0*sizeof(int*))
* if search_high > search_low: # <<<<<<<<<<<<<<
@@ -43003,7 +43756,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_search_high > __pyx_v_search_low) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":600
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":605
* # want to store the bindings for all of those elements. We can
* # subsequently throw all of them away.
* med2_minus = med2 # <<<<<<<<<<<<<<
@@ -43012,7 +43765,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":601
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":606
* # subsequently throw all of them away.
* med2_minus = med2
* med2_plus = med2 + step2 # <<<<<<<<<<<<<<
@@ -43021,7 +43774,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":602
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":607
* med2_minus = med2
* med2_plus = med2 + step2
* i1 = med1_minus # <<<<<<<<<<<<<<
@@ -43030,7 +43783,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":603
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":608
* med2_plus = med2 + step2
* i1 = med1_minus
* while i1 < med1_plus: # <<<<<<<<<<<<<<
@@ -43041,16 +43794,16 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_i1 < __pyx_v_med1_plus) != 0);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":604
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":609
* i1 = med1_minus
* while i1 < med1_plus:
* 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)
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":605
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":610
* while i1 < med1_plus:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* while med2_minus-step2 >= low2: # <<<<<<<<<<<<<<
@@ -43061,26 +43814,26 @@ 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) != 0);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":606
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":611
* 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) # <<<<<<<<<<<<<<
* if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) < 1:
* med2_minus = med2_minus - step2
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, (__pyx_v_med2_minus - __pyx_v_step2), __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":607
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":612
* 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: # <<<<<<<<<<<<<<
* med2_minus = med2_minus - step2
* else:
*/
- __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) != 0);
+ __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) < 1) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":608
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":613
* 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 # <<<<<<<<<<<<<<
@@ -43092,7 +43845,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":610
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":615
* med2_minus = med2_minus - step2
* else:
* break # <<<<<<<<<<<<<<
@@ -43105,7 +43858,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":611
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":616
* else:
* break
* i2 = med2_minus # <<<<<<<<<<<<<<
@@ -43114,7 +43867,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":612
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":617
* break
* i2 = med2_minus
* while i2 < high2: # <<<<<<<<<<<<<<
@@ -43125,25 +43878,25 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_i2 < __pyx_v_high2) != 0);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":613
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":618
* i2 = med2_minus
* 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)
* if comparison == 0:
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_i2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":614
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":619
* 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) # <<<<<<<<<<<<<<
* if comparison == 0:
* pass
*/
- __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);
+ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":615
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":620
* 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: # <<<<<<<<<<<<<<
@@ -43153,19 +43906,19 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_comparison == 0) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":617
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":622
* if comparison == 0:
* pass
* med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len) # <<<<<<<<<<<<<<
* if comparison == -1:
* break
*/
- __pyx_v_med_result = __pyx_f_3_sa_append_combined_matching(__pyx_v_med_result, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_num_subpatterns, (&__pyx_v_med_result_len));
+ __pyx_v_med_result = __pyx_f_4cdec_2sa_3_sa_append_combined_matching(__pyx_v_med_result, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_num_subpatterns, (&__pyx_v_med_result_len));
goto __pyx_L22;
}
__pyx_L22:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":618
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":623
* pass
* med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len)
* if comparison == -1: # <<<<<<<<<<<<<<
@@ -43175,7 +43928,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_comparison == -1) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":619
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":624
* med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len)
* if comparison == -1:
* break # <<<<<<<<<<<<<<
@@ -43187,7 +43940,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L23:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":620
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":625
* if comparison == -1:
* break
* i2 = i2 + step2 # <<<<<<<<<<<<<<
@@ -43198,7 +43951,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":621
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":626
* break
* i2 = i2 + step2
* if i2 > med2_plus: # <<<<<<<<<<<<<<
@@ -43208,7 +43961,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_i2 > __pyx_v_med2_plus) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":622
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":627
* i2 = i2 + step2
* if i2 > med2_plus:
* med2_plus = i2 # <<<<<<<<<<<<<<
@@ -43220,7 +43973,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":623
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":628
* if i2 > med2_plus:
* med2_plus = i2
* i1 = i1 + step1 # <<<<<<<<<<<<<<
@@ -43230,7 +43983,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":625
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":630
* i1 = i1 + step1
*
* tmp = med1_minus # <<<<<<<<<<<<<<
@@ -43239,7 +43992,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":626
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":631
*
* tmp = med1_minus
* med1_minus = med1_plus # <<<<<<<<<<<<<<
@@ -43248,7 +44001,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":627
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":632
* tmp = med1_minus
* med1_minus = med1_plus
* med1_plus = tmp # <<<<<<<<<<<<<<
@@ -43260,7 +44013,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":630
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":635
* else:
* # No match; need to figure out the point of division in D and Q
* med2_minus = med2 # <<<<<<<<<<<<<<
@@ -43269,7 +44022,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":631
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":636
* # No match; need to figure out the point of division in D and Q
* med2_minus = med2
* med2_plus = med2 # <<<<<<<<<<<<<<
@@ -43278,7 +44031,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":632
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":637
* med2_minus = med2
* med2_plus = med2
* if d_first: # <<<<<<<<<<<<<<
@@ -43288,7 +44041,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = (__pyx_v_d_first != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":633
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":638
* med2_plus = med2
* if d_first:
* med2_minus = med2_minus + step2 # <<<<<<<<<<<<<<
@@ -43297,7 +44050,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":634
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":639
* if d_first:
* med2_minus = med2_minus + step2
* if comparison == -1: # <<<<<<<<<<<<<<
@@ -43307,7 +44060,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_comparison == -1) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":635
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":640
* med2_minus = med2_minus + step2
* if comparison == -1:
* med1_minus = med1_plus # <<<<<<<<<<<<<<
@@ -43319,7 +44072,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L26:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":636
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":641
* if comparison == -1:
* med1_minus = med1_plus
* if comparison == 1: # <<<<<<<<<<<<<<
@@ -43329,7 +44082,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_comparison == 1) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":637
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":642
* med1_minus = med1_plus
* if comparison == 1:
* med1_plus = med1_minus # <<<<<<<<<<<<<<
@@ -43344,7 +44097,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":639
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":644
* med1_plus = med1_minus
* else:
* tmp = med1_minus # <<<<<<<<<<<<<<
@@ -43353,7 +44106,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":640
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":645
* else:
* tmp = med1_minus
* med1_minus = med1_plus # <<<<<<<<<<<<<<
@@ -43362,7 +44115,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":641
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":646
* tmp = med1_minus
* med1_minus = med1_plus
* med1_plus = tmp # <<<<<<<<<<<<<<
@@ -43371,7 +44124,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":642
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":647
* med1_minus = med1_plus
* med1_plus = tmp
* if comparison == 1: # <<<<<<<<<<<<<<
@@ -43381,7 +44134,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_t_3 = ((__pyx_v_comparison == 1) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":643
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":648
* med1_plus = tmp
* if comparison == 1:
* med2_minus = med2_minus + step2 # <<<<<<<<<<<<<<
@@ -43390,7 +44143,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":644
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":649
* if comparison == 1:
* med2_minus = med2_minus + step2
* med2_plus = med2_plus + step2 # <<<<<<<<<<<<<<
@@ -43406,7 +44159,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
}
__pyx_L14:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":646
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":651
* med2_plus = med2_plus + step2
*
* low_result_len = 0 # <<<<<<<<<<<<<<
@@ -43415,16 +44168,16 @@ 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":647
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":652
*
* 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
* 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)
*/
- __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));
+ __pyx_v_low_result = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->baeza_yates_helper(__pyx_v_self, __pyx_v_low1, __pyx_v_med1_plus, __pyx_v_arr1, __pyx_v_step1, __pyx_v_low2, __pyx_v_med2_plus, __pyx_v_arr2, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, (&__pyx_v_low_result_len));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":648
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":653
* 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 # <<<<<<<<<<<<<<
@@ -43433,43 +44186,43 @@ 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":649
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":654
* 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) # <<<<<<<<<<<<<<
*
* result = extend_arr(result, result_len, low_result, low_result_len)
*/
- __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));
+ __pyx_v_high_result = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->baeza_yates_helper(__pyx_v_self, __pyx_v_med1_minus, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_med2_minus, __pyx_v_high2, __pyx_v_arr2, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, (&__pyx_v_high_result_len));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":651
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":656
* 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) # <<<<<<<<<<<<<<
* result = extend_arr(result, result_len, med_result, med_result_len)
* result = extend_arr(result, result_len, high_result, high_result_len)
*/
- __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);
+ __pyx_v_result = __pyx_f_4cdec_2sa_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_low_result, __pyx_v_low_result_len);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":652
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":657
*
* 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)
* free(low_result)
*/
- __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);
+ __pyx_v_result = __pyx_f_4cdec_2sa_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_med_result, __pyx_v_med_result_len);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":653
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":658
* 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) # <<<<<<<<<<<<<<
* free(low_result)
* free(med_result)
*/
- __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);
+ __pyx_v_result = __pyx_f_4cdec_2sa_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_high_result, __pyx_v_high_result_len);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":654
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":659
* 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) # <<<<<<<<<<<<<<
@@ -43478,7 +44231,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":655
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":660
* result = extend_arr(result, result_len, high_result, high_result_len)
* free(low_result)
* free(med_result) # <<<<<<<<<<<<<<
@@ -43487,7 +44240,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":656
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":661
* free(low_result)
* free(med_result)
* free(high_result) # <<<<<<<<<<<<<<
@@ -43496,7 +44249,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":658
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":663
* free(high_result)
*
* return result # <<<<<<<<<<<<<<
@@ -43509,14 +44262,14 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_WriteUnraisable("_sa.HieroCachingRuleFactory.baeza_yates_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.HieroCachingRuleFactory.baeza_yates_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":662
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":667
*
*
* cdef long compare_matchings_set(self, int i1_minus, int i1_plus, int* arr1, int step1, # <<<<<<<<<<<<<<
@@ -43524,18 +44277,18 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper(struct __p
* """
*/
-static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_i1_minus, int __pyx_v_i1_plus, int *__pyx_v_arr1, int __pyx_v_step1, struct __pyx_t_3_sa_Matching *__pyx_v_loc2, int __pyx_v_offset_by_one, int __pyx_v_len_last) {
+static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_i1_minus, int __pyx_v_i1_plus, int *__pyx_v_arr1, int __pyx_v_step1, struct __pyx_t_4cdec_2sa_3_sa_Matching *__pyx_v_loc2, int __pyx_v_offset_by_one, int __pyx_v_len_last) {
int __pyx_v_i1;
int __pyx_v_comparison;
int __pyx_v_prev_comparison;
- struct __pyx_t_3_sa_Matching __pyx_v_l1_stack;
- struct __pyx_t_3_sa_Matching *__pyx_v_loc1;
+ struct __pyx_t_4cdec_2sa_3_sa_Matching __pyx_v_l1_stack;
+ struct __pyx_t_4cdec_2sa_3_sa_Matching *__pyx_v_loc1;
long __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("compare_matchings_set", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":673
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":678
* cdef Matching* loc1
*
* loc1 = &l1_stack # <<<<<<<<<<<<<<
@@ -43544,7 +44297,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":675
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":680
* loc1 = &l1_stack
*
* i1 = i1_minus # <<<<<<<<<<<<<<
@@ -43553,7 +44306,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":676
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":681
*
* i1 = i1_minus
* while i1 < i1_plus: # <<<<<<<<<<<<<<
@@ -43564,25 +44317,25 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
__pyx_t_1 = ((__pyx_v_i1 < __pyx_v_i1_plus) != 0);
if (!__pyx_t_1) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":677
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":682
* i1 = i1_minus
* 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)
* if comparison == 0:
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching(__pyx_v_loc1, __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":678
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":683
* 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) # <<<<<<<<<<<<<<
* if comparison == 0:
* prev_comparison = 0
*/
- __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);
+ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, __pyx_v_loc1, __pyx_v_loc2, __pyx_v_offset_by_one, __pyx_v_len_last);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":679
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":684
* 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: # <<<<<<<<<<<<<<
@@ -43592,7 +44345,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
__pyx_t_1 = ((__pyx_v_comparison == 0) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":680
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":685
* comparison = self.compare_matchings(loc1, loc2, offset_by_one, len_last)
* if comparison == 0:
* prev_comparison = 0 # <<<<<<<<<<<<<<
@@ -43601,7 +44354,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":681
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":686
* if comparison == 0:
* prev_comparison = 0
* break # <<<<<<<<<<<<<<
@@ -43612,7 +44365,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
goto __pyx_L5;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":682
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":687
* prev_comparison = 0
* break
* elif i1 == i1_minus: # <<<<<<<<<<<<<<
@@ -43622,7 +44375,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
__pyx_t_1 = ((__pyx_v_i1 == __pyx_v_i1_minus) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":683
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":688
* break
* elif i1 == i1_minus:
* prev_comparison = comparison # <<<<<<<<<<<<<<
@@ -43634,7 +44387,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":685
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":690
* prev_comparison = comparison
* else:
* if comparison != prev_comparison: # <<<<<<<<<<<<<<
@@ -43644,7 +44397,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
__pyx_t_1 = ((__pyx_v_comparison != __pyx_v_prev_comparison) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":686
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":691
* else:
* if comparison != prev_comparison:
* prev_comparison = 0 # <<<<<<<<<<<<<<
@@ -43653,7 +44406,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":687
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":692
* if comparison != prev_comparison:
* prev_comparison = 0
* break # <<<<<<<<<<<<<<
@@ -43667,7 +44420,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":688
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":693
* prev_comparison = 0
* break
* i1 = i1 + step1 # <<<<<<<<<<<<<<
@@ -43678,7 +44431,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
}
__pyx_L4_break:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":689
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":694
* break
* i1 = i1 + step1
* return prev_comparison # <<<<<<<<<<<<<<
@@ -43694,7 +44447,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":692
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":697
*
*
* cdef long compare_matchings(self, Matching* loc1, Matching* loc2, int offset_by_one, int len_last): # <<<<<<<<<<<<<<
@@ -43702,7 +44455,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set(struct
*
*/
-static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_t_3_sa_Matching *__pyx_v_loc1, struct __pyx_t_3_sa_Matching *__pyx_v_loc2, int __pyx_v_offset_by_one, int __pyx_v_len_last) {
+static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_t_4cdec_2sa_3_sa_Matching *__pyx_v_loc1, struct __pyx_t_4cdec_2sa_3_sa_Matching *__pyx_v_loc2, int __pyx_v_offset_by_one, int __pyx_v_len_last) {
int __pyx_v_i;
long __pyx_r;
__Pyx_RefNannyDeclarations
@@ -43712,7 +44465,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":695
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":700
* cdef int i
*
* if loc1.sent_id > loc2.sent_id: # <<<<<<<<<<<<<<
@@ -43722,7 +44475,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":696
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":701
*
* if loc1.sent_id > loc2.sent_id:
* return 1 # <<<<<<<<<<<<<<
@@ -43735,7 +44488,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":697
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":702
* if loc1.sent_id > loc2.sent_id:
* return 1
* if loc2.sent_id > loc1.sent_id: # <<<<<<<<<<<<<<
@@ -43745,7 +44498,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) != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":698
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":703
* return 1
* if loc2.sent_id > loc1.sent_id:
* return -1 # <<<<<<<<<<<<<<
@@ -43758,7 +44511,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":700
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":705
* return -1
*
* if loc1.size == 1 and loc2.size == 1: # <<<<<<<<<<<<<<
@@ -43774,7 +44527,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":701
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":706
*
* if loc1.size == 1 and loc2.size == 1:
* if loc2.arr[loc2.start] - loc1.arr[loc1.start] <= self.train_min_gap_size: # <<<<<<<<<<<<<<
@@ -43784,7 +44537,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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":702
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":707
* if loc1.size == 1 and loc2.size == 1:
* if loc2.arr[loc2.start] - loc1.arr[loc1.start] <= self.train_min_gap_size:
* return 1 # <<<<<<<<<<<<<<
@@ -43799,7 +44552,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
goto __pyx_L5;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":704
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":709
* return 1
*
* elif offset_by_one: # <<<<<<<<<<<<<<
@@ -43809,7 +44562,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
__pyx_t_3 = (__pyx_v_offset_by_one != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":705
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":710
*
* elif offset_by_one:
* for i from 1 <= i < loc1.size: # <<<<<<<<<<<<<<
@@ -43819,7 +44572,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":706
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":711
* elif offset_by_one:
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]: # <<<<<<<<<<<<<<
@@ -43829,7 +44582,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)])) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":707
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":712
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]:
* return 1 # <<<<<<<<<<<<<<
@@ -43842,7 +44595,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":708
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":713
* 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]: # <<<<<<<<<<<<<<
@@ -43852,7 +44605,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)])) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":709
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":714
* return 1
* if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i-1]:
* return -1 # <<<<<<<<<<<<<<
@@ -43869,7 +44622,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":712
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":717
*
* else:
* if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]: # <<<<<<<<<<<<<<
@@ -43879,7 +44632,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])) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":713
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":718
* else:
* if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]:
* return 1 # <<<<<<<<<<<<<<
@@ -43892,7 +44645,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":714
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":719
* if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]:
* return 1
* if loc1.arr[loc1.start]+1 < loc2.arr[loc2.start]: # <<<<<<<<<<<<<<
@@ -43902,7 +44655,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])) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":715
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":720
* return 1
* if loc1.arr[loc1.start]+1 < loc2.arr[loc2.start]:
* return -1 # <<<<<<<<<<<<<<
@@ -43915,7 +44668,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":717
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":722
* return -1
*
* for i from 1 <= i < loc1.size: # <<<<<<<<<<<<<<
@@ -43925,7 +44678,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":718
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":723
*
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]: # <<<<<<<<<<<<<<
@@ -43935,7 +44688,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)])) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":719
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":724
* for i from 1 <= i < loc1.size:
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]:
* return 1 # <<<<<<<<<<<<<<
@@ -43948,7 +44701,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":720
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":725
* if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]:
* return 1
* if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i]: # <<<<<<<<<<<<<<
@@ -43958,7 +44711,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)])) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":721
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":726
* return 1
* if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i]:
* return -1 # <<<<<<<<<<<<<<
@@ -43974,7 +44727,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":723
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":728
* return -1
*
* if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size: # <<<<<<<<<<<<<<
@@ -43984,7 +44737,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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":724
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":729
*
* if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size:
* return -1 # <<<<<<<<<<<<<<
@@ -43997,7 +44750,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":725
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":730
* if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size:
* return -1
* return 0 # <<<<<<<<<<<<<<
@@ -44013,7 +44766,7 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":728
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":733
*
*
* cdef int* merge_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<<
@@ -44021,15 +44774,15 @@ static long __pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings(struct __py
* int offset_by_one, int len_last, int num_subpatterns, int* result_len):
*/
-static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_low1, int __pyx_v_high1, int *__pyx_v_arr1, int __pyx_v_step1, int __pyx_v_low2, int __pyx_v_high2, int *__pyx_v_arr2, int __pyx_v_step2, int __pyx_v_offset_by_one, int __pyx_v_len_last, int __pyx_v_num_subpatterns, int *__pyx_v_result_len) {
+static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_low1, int __pyx_v_high1, int *__pyx_v_arr1, int __pyx_v_step1, int __pyx_v_low2, int __pyx_v_high2, int *__pyx_v_arr2, int __pyx_v_step2, int __pyx_v_offset_by_one, int __pyx_v_len_last, int __pyx_v_num_subpatterns, int *__pyx_v_result_len) {
int __pyx_v_i1;
int __pyx_v_i2;
int __pyx_v_j1;
int __pyx_v_j2;
long __pyx_v_comparison;
int *__pyx_v_result;
- struct __pyx_t_3_sa_Matching __pyx_v_loc1;
- struct __pyx_t_3_sa_Matching __pyx_v_loc2;
+ struct __pyx_t_4cdec_2sa_3_sa_Matching __pyx_v_loc1;
+ struct __pyx_t_4cdec_2sa_3_sa_Matching __pyx_v_loc2;
int *__pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
@@ -44037,7 +44790,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":736
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":741
* cdef Matching loc1, loc2
*
* result_len[0] = 0 # <<<<<<<<<<<<<<
@@ -44046,7 +44799,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":737
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":742
*
* result_len[0] = 0
* result = <int*> malloc(0*sizeof(int)) # <<<<<<<<<<<<<<
@@ -44055,7 +44808,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":739
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":744
* result = <int*> malloc(0*sizeof(int))
*
* i1 = low1 # <<<<<<<<<<<<<<
@@ -44064,7 +44817,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":740
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":745
*
* i1 = low1
* i2 = low2 # <<<<<<<<<<<<<<
@@ -44073,7 +44826,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":741
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":746
* i1 = low1
* i2 = low2
* while i1 < high1 and i2 < high2: # <<<<<<<<<<<<<<
@@ -44090,16 +44843,16 @@ 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":744
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":749
*
* # First, pop all unneeded loc2's off the stack
* 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)
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":745
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":750
* # First, pop all unneeded loc2's off the stack
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* while i2 < high2: # <<<<<<<<<<<<<<
@@ -44110,26 +44863,26 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
__pyx_t_3 = ((__pyx_v_i2 < __pyx_v_high2) != 0);
if (!__pyx_t_3) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":746
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":751
* 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) # <<<<<<<<<<<<<<
* if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == 1:
* i2 = i2 + step2
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_i2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":747
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":752
* 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: # <<<<<<<<<<<<<<
* i2 = i2 + step2
* else:
*/
- __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) != 0);
+ __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) == 1) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":748
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":753
* 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 # <<<<<<<<<<<<<<
@@ -44141,7 +44894,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":750
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":755
* i2 = i2 + step2
* else:
* break # <<<<<<<<<<<<<<
@@ -44154,7 +44907,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":753
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":758
*
* # Next: process all loc1's with the same starting val
* j1 = i1 # <<<<<<<<<<<<<<
@@ -44163,7 +44916,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":754
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":759
* # Next: process all loc1's with the same starting val
* j1 = i1
* while i1 < high1 and arr1[j1] == arr1[i1]: # <<<<<<<<<<<<<<
@@ -44180,16 +44933,16 @@ 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":755
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":760
* j1 = i1
* while i1 < high1 and arr1[j1] == arr1[i1]:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<<
* j2 = i2
* while j2 < high2:
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":756
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":761
* while i1 < high1 and arr1[j1] == arr1[i1]:
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* j2 = i2 # <<<<<<<<<<<<<<
@@ -44198,7 +44951,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":757
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":762
* assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr)
* j2 = i2
* while j2 < high2: # <<<<<<<<<<<<<<
@@ -44209,25 +44962,25 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
__pyx_t_2 = ((__pyx_v_j2 < __pyx_v_high2) != 0);
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":758
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":763
* j2 = i2
* 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)
* if comparison == 0:
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_j2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":759
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":764
* 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) # <<<<<<<<<<<<<<
* if comparison == 0:
* result = append_combined_matching(result, &loc1, &loc2, offset_by_one, num_subpatterns, result_len)
*/
- __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);
+ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":760
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":765
* 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: # <<<<<<<<<<<<<<
@@ -44237,19 +44990,19 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
__pyx_t_2 = ((__pyx_v_comparison == 0) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":761
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":766
* 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) # <<<<<<<<<<<<<<
* if comparison == 1:
* pass
*/
- __pyx_v_result = __pyx_f_3_sa_append_combined_matching(__pyx_v_result, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_num_subpatterns, __pyx_v_result_len);
+ __pyx_v_result = __pyx_f_4cdec_2sa_3_sa_append_combined_matching(__pyx_v_result, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_num_subpatterns, __pyx_v_result_len);
goto __pyx_L12;
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":762
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":767
* if comparison == 0:
* result = append_combined_matching(result, &loc1, &loc2, offset_by_one, num_subpatterns, result_len)
* if comparison == 1: # <<<<<<<<<<<<<<
@@ -44262,7 +45015,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
__pyx_L13:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":764
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":769
* if comparison == 1:
* pass
* if comparison == -1: # <<<<<<<<<<<<<<
@@ -44272,7 +45025,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
__pyx_t_2 = ((__pyx_v_comparison == -1) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":765
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":770
* pass
* if comparison == -1:
* break # <<<<<<<<<<<<<<
@@ -44284,7 +45037,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":767
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":772
* break
* else:
* j2 = j2 + step2 # <<<<<<<<<<<<<<
@@ -44297,7 +45050,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":768
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":773
* else:
* j2 = j2 + step2
* i1 = i1 + step1 # <<<<<<<<<<<<<<
@@ -44308,7 +45061,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":769
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":774
* j2 = j2 + step2
* i1 = i1 + step1
* return result # <<<<<<<<<<<<<<
@@ -44324,7 +45077,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":772
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":777
*
*
* cdef void sort_phrase_loc(self, IntList arr, PhraseLocation loc, Phrase phrase): # <<<<<<<<<<<<<<
@@ -44332,10 +45085,10 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_obj
* cdef VEB veb
*/
-static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_3_sa_IntList *__pyx_v_arr, struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_loc, struct __pyx_obj_3_sa_Phrase *__pyx_v_phrase) {
+static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_arr, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_loc, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_phrase) {
int __pyx_v_i;
int __pyx_v_j;
- struct __pyx_obj_3_sa_VEB *__pyx_v_veb = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_VEB *__pyx_v_veb = 0;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
@@ -44347,79 +45100,79 @@ 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":777
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":782
* cdef IntList result
*
* if phrase in self.precomputed_index: # <<<<<<<<<<<<<<
* loc.arr = self.precomputed_index[phrase]
* else:
*/
- __pyx_t_1 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_phrase), __pyx_v_self->precomputed_index, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_phrase), __pyx_v_self->precomputed_index, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":778
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":783
*
* if phrase in self.precomputed_index:
* loc.arr = self.precomputed_index[phrase] # <<<<<<<<<<<<<<
* else:
* loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low)
*/
- __pyx_t_3 = PyObject_GetItem(__pyx_v_self->precomputed_index, ((PyObject *)__pyx_v_phrase)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_self->precomputed_index, ((PyObject *)__pyx_v_phrase)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_v_loc->arr);
__Pyx_DECREF(((PyObject *)__pyx_v_loc->arr));
- __pyx_v_loc->arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
+ __pyx_v_loc->arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L3;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":780
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":785
* loc.arr = self.precomputed_index[phrase]
* else:
* loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low) # <<<<<<<<<<<<<<
* veb = VEB(arr.len)
* for i from loc.sa_low <= i < loc.sa_high:
*/
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
- __pyx_t_4 = PyInt_FromLong((__pyx_v_loc->sa_high - __pyx_v_loc->sa_low)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong((__pyx_v_loc->sa_high - __pyx_v_loc->sa_low)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_GIVEREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_v_loc->arr);
__Pyx_DECREF(((PyObject *)__pyx_v_loc->arr));
- __pyx_v_loc->arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_4);
+ __pyx_v_loc->arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":781
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":786
* else:
* loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low)
* veb = VEB(arr.len) # <<<<<<<<<<<<<<
* for i from loc.sa_low <= i < loc.sa_high:
* veb._insert(arr.arr[i])
*/
- __pyx_t_4 = PyInt_FromLong(__pyx_v_arr->len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_arr->len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 786; __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(((PyObject *)((PyObject*)__pyx_ptype_3_sa_VEB)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_VEB)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_v_veb = ((struct __pyx_obj_3_sa_VEB *)__pyx_t_4);
+ __pyx_v_veb = ((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":782
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":787
* 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: # <<<<<<<<<<<<<<
@@ -44429,17 +45182,17 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__pyx_t_5 = __pyx_v_loc->sa_high;
for (__pyx_v_i = __pyx_v_loc->sa_low; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":783
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":788
* veb = VEB(arr.len)
* for i from loc.sa_low <= i < loc.sa_high:
* veb._insert(arr.arr[i]) # <<<<<<<<<<<<<<
* i = veb.veb.min_val
* for j from 0 <= j < loc.sa_high-loc.sa_low:
*/
- ((struct __pyx_vtabstruct_3_sa_VEB *)__pyx_v_veb->__pyx_vtab)->_insert(__pyx_v_veb, (__pyx_v_arr->arr[__pyx_v_i]));
+ ((struct __pyx_vtabstruct_4cdec_2sa_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":784
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":789
* for i from loc.sa_low <= i < loc.sa_high:
* veb._insert(arr.arr[i])
* i = veb.veb.min_val # <<<<<<<<<<<<<<
@@ -44449,7 +45202,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__pyx_t_5 = __pyx_v_veb->veb->min_val;
__pyx_v_i = __pyx_t_5;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":785
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":790
* veb._insert(arr.arr[i])
* i = veb.veb.min_val
* for j from 0 <= j < loc.sa_high-loc.sa_low: # <<<<<<<<<<<<<<
@@ -44459,7 +45212,7 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__pyx_t_5 = (__pyx_v_loc->sa_high - __pyx_v_loc->sa_low);
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":786
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":791
* i = veb.veb.min_val
* for j from 0 <= j < loc.sa_high-loc.sa_low:
* loc.arr.arr[j] = i # <<<<<<<<<<<<<<
@@ -44468,19 +45221,19 @@ 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":787
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":792
* for j from 0 <= j < loc.sa_high-loc.sa_low:
* loc.arr.arr[j] = i
* i = veb._findsucc(i) # <<<<<<<<<<<<<<
* loc.arr_low = 0
* loc.arr_high = loc.arr.len
*/
- __pyx_v_i = ((struct __pyx_vtabstruct_3_sa_VEB *)__pyx_v_veb->__pyx_vtab)->_findsucc(__pyx_v_veb, __pyx_v_i);
+ __pyx_v_i = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *)__pyx_v_veb->__pyx_vtab)->_findsucc(__pyx_v_veb, __pyx_v_i);
}
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":788
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":793
* loc.arr.arr[j] = i
* i = veb._findsucc(i)
* loc.arr_low = 0 # <<<<<<<<<<<<<<
@@ -44489,7 +45242,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":789
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":794
* i = veb._findsucc(i)
* loc.arr_low = 0
* loc.arr_high = loc.arr.len # <<<<<<<<<<<<<<
@@ -44503,13 +45256,13 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("_sa.HieroCachingRuleFactory.sort_phrase_loc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.HieroCachingRuleFactory.sort_phrase_loc", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_veb);
__Pyx_RefNannyFinishContext();
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":792
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":797
*
*
* cdef intersect_helper(self, Phrase prefix, Phrase suffix, # <<<<<<<<<<<<<<
@@ -44517,10 +45270,10 @@ static void __pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(struct __pyx_
*
*/
-static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_3_sa_Phrase *__pyx_v_prefix, struct __pyx_obj_3_sa_Phrase *__pyx_v_suffix, struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_prefix_loc, struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_suffix_loc, int __pyx_v_algorithm) {
- struct __pyx_obj_3_sa_IntList *__pyx_v_arr1 = 0;
- struct __pyx_obj_3_sa_IntList *__pyx_v_arr2 = 0;
- struct __pyx_obj_3_sa_IntList *__pyx_v_result = 0;
+static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_helper(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_prefix, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_suffix, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_prefix_loc, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_suffix_loc, int __pyx_v_algorithm) {
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_arr1 = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_arr2 = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_result = 0;
int __pyx_v_low1;
int __pyx_v_high1;
int __pyx_v_step1;
@@ -44546,7 +45299,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":799
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":804
* cdef int* result_ptr
*
* result_len = 0 # <<<<<<<<<<<<<<
@@ -44555,21 +45308,21 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_v_result_len = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":801
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":806
* result_len = 0
*
* if sym_isvar(suffix[0]): # <<<<<<<<<<<<<<
* offset_by_one = 1
* else:
*/
- __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_suffix), 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_suffix), 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = (__pyx_f_3_sa_sym_isvar(__pyx_t_2) != 0);
+ __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_2) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":802
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":807
*
* if sym_isvar(suffix[0]):
* offset_by_one = 1 # <<<<<<<<<<<<<<
@@ -44581,7 +45334,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":804
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":809
* offset_by_one = 1
* else:
* offset_by_one = 0 # <<<<<<<<<<<<<<
@@ -44592,34 +45345,34 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":806
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":811
* offset_by_one = 0
*
* len_last = len(suffix.getchunk(suffix.arity())) # <<<<<<<<<<<<<<
*
* if prefix_loc.arr is None:
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_suffix), __pyx_n_s__getchunk); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_suffix), __pyx_n_s__getchunk); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_suffix), __pyx_n_s__arity); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_suffix), __pyx_n_s__arity); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__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":808
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":813
* len_last = len(suffix.getchunk(suffix.arity()))
*
* if prefix_loc.arr is None: # <<<<<<<<<<<<<<
@@ -44630,7 +45383,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_7 = (__pyx_t_3 != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":809
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":814
*
* if prefix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix) # <<<<<<<<<<<<<<
@@ -44639,13 +45392,13 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_t_5 = ((PyObject *)__pyx_v_self->fsa->sa);
__Pyx_INCREF(__pyx_t_5);
- ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->sort_phrase_loc(__pyx_v_self, ((struct __pyx_obj_3_sa_IntList *)__pyx_t_5), __pyx_v_prefix_loc, __pyx_v_prefix);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->sort_phrase_loc(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5), __pyx_v_prefix_loc, __pyx_v_prefix);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
goto __pyx_L4;
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":810
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":815
* if prefix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix)
* arr1 = prefix_loc.arr # <<<<<<<<<<<<<<
@@ -44654,10 +45407,10 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_t_5 = ((PyObject *)__pyx_v_prefix_loc->arr);
__Pyx_INCREF(__pyx_t_5);
- __pyx_v_arr1 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_5);
+ __pyx_v_arr1 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":811
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":816
* self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix)
* arr1 = prefix_loc.arr
* low1 = prefix_loc.arr_low # <<<<<<<<<<<<<<
@@ -44667,7 +45420,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_2 = __pyx_v_prefix_loc->arr_low;
__pyx_v_low1 = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":812
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":817
* arr1 = prefix_loc.arr
* low1 = prefix_loc.arr_low
* high1 = prefix_loc.arr_high # <<<<<<<<<<<<<<
@@ -44677,7 +45430,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_2 = __pyx_v_prefix_loc->arr_high;
__pyx_v_high1 = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":813
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":818
* low1 = prefix_loc.arr_low
* high1 = prefix_loc.arr_high
* step1 = prefix_loc.num_subpatterns # <<<<<<<<<<<<<<
@@ -44687,7 +45440,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_2 = __pyx_v_prefix_loc->num_subpatterns;
__pyx_v_step1 = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":815
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":820
* step1 = prefix_loc.num_subpatterns
*
* if suffix_loc.arr is None: # <<<<<<<<<<<<<<
@@ -44698,7 +45451,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_3 = (__pyx_t_7 != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":816
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":821
*
* if suffix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix) # <<<<<<<<<<<<<<
@@ -44707,13 +45460,13 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_t_5 = ((PyObject *)__pyx_v_self->fsa->sa);
__Pyx_INCREF(__pyx_t_5);
- ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->sort_phrase_loc(__pyx_v_self, ((struct __pyx_obj_3_sa_IntList *)__pyx_t_5), __pyx_v_suffix_loc, __pyx_v_suffix);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->sort_phrase_loc(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5), __pyx_v_suffix_loc, __pyx_v_suffix);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
goto __pyx_L5;
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":817
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":822
* if suffix_loc.arr is None:
* self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix)
* arr2 = suffix_loc.arr # <<<<<<<<<<<<<<
@@ -44722,10 +45475,10 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
*/
__pyx_t_5 = ((PyObject *)__pyx_v_suffix_loc->arr);
__Pyx_INCREF(__pyx_t_5);
- __pyx_v_arr2 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_5);
+ __pyx_v_arr2 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":818
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":823
* self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix)
* arr2 = suffix_loc.arr
* low2 = suffix_loc.arr_low # <<<<<<<<<<<<<<
@@ -44735,7 +45488,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_2 = __pyx_v_suffix_loc->arr_low;
__pyx_v_low2 = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":819
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":824
* arr2 = suffix_loc.arr
* low2 = suffix_loc.arr_low
* high2 = suffix_loc.arr_high # <<<<<<<<<<<<<<
@@ -44745,7 +45498,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_2 = __pyx_v_suffix_loc->arr_high;
__pyx_v_high2 = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":820
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":825
* low2 = suffix_loc.arr_low
* high2 = suffix_loc.arr_high
* step2 = suffix_loc.num_subpatterns # <<<<<<<<<<<<<<
@@ -44755,59 +45508,59 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_2 = __pyx_v_suffix_loc->num_subpatterns;
__pyx_v_step2 = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":822
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":827
* step2 = suffix_loc.num_subpatterns
*
* num_subpatterns = prefix.arity()+1 # <<<<<<<<<<<<<<
*
* if algorithm == MERGE:
*/
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_prefix), __pyx_n_s__arity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_prefix), __pyx_n_s__arity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_num_subpatterns = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":824
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":829
* num_subpatterns = prefix.arity()+1
*
* if algorithm == MERGE: # <<<<<<<<<<<<<<
* result_ptr = self.merge_helper(low1, high1, arr1.arr, step1,
* low2, high2, arr2.arr, step2,
*/
- __pyx_t_3 = ((__pyx_v_algorithm == __pyx_v_3_sa_MERGE) != 0);
+ __pyx_t_3 = ((__pyx_v_algorithm == __pyx_v_4cdec_2sa_3_sa_MERGE) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":827
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":832
* result_ptr = self.merge_helper(low1, high1, arr1.arr, step1,
* low2, high2, arr2.arr, step2,
* offset_by_one, len_last, num_subpatterns, &result_len) # <<<<<<<<<<<<<<
* else:
* result_ptr = self.baeza_yates_helper(low1, high1, arr1.arr, step1,
*/
- __pyx_v_result_ptr = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->merge_helper(__pyx_v_self, __pyx_v_low1, __pyx_v_high1, __pyx_v_arr1->arr, __pyx_v_step1, __pyx_v_low2, __pyx_v_high2, __pyx_v_arr2->arr, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, (&__pyx_v_result_len));
+ __pyx_v_result_ptr = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->merge_helper(__pyx_v_self, __pyx_v_low1, __pyx_v_high1, __pyx_v_arr1->arr, __pyx_v_step1, __pyx_v_low2, __pyx_v_high2, __pyx_v_arr2->arr, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, (&__pyx_v_result_len));
goto __pyx_L6;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":831
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":836
* 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) # <<<<<<<<<<<<<<
*
* if result_len == 0:
*/
- __pyx_v_result_ptr = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->baeza_yates_helper(__pyx_v_self, __pyx_v_low1, __pyx_v_high1, __pyx_v_arr1->arr, __pyx_v_step1, __pyx_v_low2, __pyx_v_high2, __pyx_v_arr2->arr, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, (&__pyx_v_result_len));
+ __pyx_v_result_ptr = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->baeza_yates_helper(__pyx_v_self, __pyx_v_low1, __pyx_v_high1, __pyx_v_arr1->arr, __pyx_v_step1, __pyx_v_low2, __pyx_v_high2, __pyx_v_arr2->arr, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, (&__pyx_v_result_len));
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":833
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":838
* offset_by_one, len_last, num_subpatterns, &result_len)
*
* if result_len == 0: # <<<<<<<<<<<<<<
@@ -44817,7 +45570,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__pyx_t_3 = ((__pyx_v_result_len == 0) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":834
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":839
*
* if result_len == 0:
* free(result_ptr) # <<<<<<<<<<<<<<
@@ -44826,7 +45579,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":835
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":840
* if result_len == 0:
* free(result_ptr)
* return None # <<<<<<<<<<<<<<
@@ -44841,19 +45594,19 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":837
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":842
* return None
* else:
* result = IntList() # <<<<<<<<<<<<<<
* free(result.arr)
* result.arr = result_ptr
*/
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_v_result = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_5);
+ __pyx_v_result = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":838
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":843
* else:
* result = IntList()
* free(result.arr) # <<<<<<<<<<<<<<
@@ -44862,7 +45615,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":839
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":844
* result = IntList()
* free(result.arr)
* result.arr = result_ptr # <<<<<<<<<<<<<<
@@ -44871,7 +45624,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":840
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":845
* free(result.arr)
* result.arr = result_ptr
* result.len = result_len # <<<<<<<<<<<<<<
@@ -44880,7 +45633,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":841
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":846
* result.arr = result_ptr
* result.len = result_len
* result.size = result_len # <<<<<<<<<<<<<<
@@ -44889,7 +45642,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":842
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":847
* result.len = result_len
* result.size = result_len
* return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns) # <<<<<<<<<<<<<<
@@ -44897,19 +45650,19 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
* cdef loc2str(self, PhraseLocation loc):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__arr_low), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = PyInt_FromLong(__pyx_v_result_len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__arr_low), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_result_len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__arr_high), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__arr_high), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_v_result)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = PyInt_FromLong(__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__arr), ((PyObject *)__pyx_v_result)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__num_subpatterns), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__num_subpatterns), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__pyx_r = __pyx_t_4;
@@ -44924,7 +45677,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.intersect_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.intersect_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_arr1);
@@ -44935,7 +45688,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":844
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":849
* return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns)
*
* cdef loc2str(self, PhraseLocation loc): # <<<<<<<<<<<<<<
@@ -44943,7 +45696,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper(struct
* result = "{"
*/
-static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_loc) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_loc) {
int __pyx_v_i;
int __pyx_v_j;
PyObject *__pyx_v_result = NULL;
@@ -44958,17 +45711,17 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("loc2str", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":846
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":851
* cdef loc2str(self, PhraseLocation loc):
* cdef int i, j
* result = "{" # <<<<<<<<<<<<<<
* i = 0
* while i < loc.arr_high:
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_119));
- __pyx_v_result = ((PyObject *)__pyx_kp_s_119);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_120));
+ __pyx_v_result = ((PyObject *)__pyx_kp_s_120);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":847
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":852
* cdef int i, j
* result = "{"
* i = 0 # <<<<<<<<<<<<<<
@@ -44977,7 +45730,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":848
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":853
* result = "{"
* i = 0
* while i < loc.arr_high: # <<<<<<<<<<<<<<
@@ -44988,20 +45741,20 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
__pyx_t_1 = ((__pyx_v_i < __pyx_v_loc->arr_high) != 0);
if (!__pyx_t_1) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":849
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":854
* i = 0
* while i < loc.arr_high:
* result = result + "(" # <<<<<<<<<<<<<<
* for j from i <= j < i + loc.num_subpatterns:
* result = result + ("%d " %loc.arr[j])
*/
- __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_kp_s_120)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_kp_s_121)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_result);
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":850
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":855
* while i < loc.arr_high:
* result = result + "("
* for j from i <= j < i + loc.num_subpatterns: # <<<<<<<<<<<<<<
@@ -45011,19 +45764,19 @@ 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":851
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":856
* result = result + "("
* for j from i <= j < i + loc.num_subpatterns:
* result = result + ("%d " %loc.arr[j]) # <<<<<<<<<<<<<<
* result = result + ")"
* i = i + loc.num_subpatterns
*/
- __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_loc->arr), __pyx_v_j, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_loc->arr), __pyx_v_j, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_v_result);
@@ -45031,20 +45784,20 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
__pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":852
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":857
* for j from i <= j < i + loc.num_subpatterns:
* result = result + ("%d " %loc.arr[j])
* result = result + ")" # <<<<<<<<<<<<<<
* i = i + loc.num_subpatterns
* result = result + "}"
*/
- __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_kp_s_61)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_kp_s_61)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_result);
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":853
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":858
* result = result + ("%d " %loc.arr[j])
* result = result + ")"
* i = i + loc.num_subpatterns # <<<<<<<<<<<<<<
@@ -45054,20 +45807,20 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
__pyx_v_i = (__pyx_v_i + __pyx_v_loc->num_subpatterns);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":854
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":859
* result = result + ")"
* i = i + loc.num_subpatterns
* result = result + "}" # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_kp_s_121)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_v_result, ((PyObject *)__pyx_kp_s_122)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_result);
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":855
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":860
* i = i + loc.num_subpatterns
* result = result + "}"
* return result # <<<<<<<<<<<<<<
@@ -45084,7 +45837,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.loc2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.loc2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
@@ -45093,7 +45846,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":857
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":862
* return result
*
* cdef PhraseLocation intersect(self, prefix_node, suffix_node, Phrase phrase): # <<<<<<<<<<<<<<
@@ -45101,14 +45854,14 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON_UNUSED st
* cdef PhraseLocation prefix_loc, suffix_loc, result
*/
-static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFactory_intersect(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_prefix_node, PyObject *__pyx_v_suffix_node, struct __pyx_obj_3_sa_Phrase *__pyx_v_phrase) {
- struct __pyx_obj_3_sa_Phrase *__pyx_v_prefix = 0;
- struct __pyx_obj_3_sa_Phrase *__pyx_v_suffix = 0;
- struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_prefix_loc = 0;
- struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_suffix_loc = 0;
- struct __pyx_obj_3_sa_PhraseLocation *__pyx_v_result = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_prefix_node, PyObject *__pyx_v_suffix_node, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_phrase) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_prefix = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_suffix = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_prefix_loc = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_suffix_loc = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_v_result = 0;
CYTHON_UNUSED PyObject *__pyx_v_intersect_method = NULL;
- struct __pyx_obj_3_sa_PhraseLocation *__pyx_r = NULL;
+ struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
@@ -45120,81 +45873,81 @@ 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":861
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":866
* cdef PhraseLocation prefix_loc, suffix_loc, result
*
* prefix = prefix_node.phrase # <<<<<<<<<<<<<<
* suffix = suffix_node.phrase
* prefix_loc = prefix_node.phrase_location
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prefix_node, __pyx_n_s__phrase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prefix_node, __pyx_n_s__phrase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3_sa_Phrase))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_prefix = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_1);
+ if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_Phrase))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_prefix = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":862
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":867
*
* prefix = prefix_node.phrase
* suffix = suffix_node.phrase # <<<<<<<<<<<<<<
* prefix_loc = prefix_node.phrase_location
* suffix_loc = suffix_node.phrase_location
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_suffix_node, __pyx_n_s__phrase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_suffix_node, __pyx_n_s__phrase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3_sa_Phrase))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_suffix = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_1);
+ if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_Phrase))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_suffix = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":863
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":868
* prefix = prefix_node.phrase
* suffix = suffix_node.phrase
* prefix_loc = prefix_node.phrase_location # <<<<<<<<<<<<<<
* suffix_loc = suffix_node.phrase_location
*
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prefix_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prefix_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_prefix_loc = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_1);
+ if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_prefix_loc = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":864
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":869
* suffix = suffix_node.phrase
* prefix_loc = prefix_node.phrase_location
* suffix_loc = suffix_node.phrase_location # <<<<<<<<<<<<<<
*
* result = self.get_precomputed_collocation(phrase)
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_suffix_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_suffix_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_suffix_loc = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_1);
+ if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_suffix_loc = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":866
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":871
* suffix_loc = suffix_node.phrase_location
*
* result = self.get_precomputed_collocation(phrase) # <<<<<<<<<<<<<<
* if result is not None:
* intersect_method = "precomputed"
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_122); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_123); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_phrase));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_phrase));
__Pyx_GIVEREF(((PyObject *)__pyx_v_phrase));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_result = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_3);
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_result = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":867
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":872
*
* result = self.get_precomputed_collocation(phrase)
* if result is not None: # <<<<<<<<<<<<<<
@@ -45205,7 +45958,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_t_5 = (__pyx_t_4 != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":868
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":873
* result = self.get_precomputed_collocation(phrase)
* if result is not None:
* intersect_method = "precomputed" # <<<<<<<<<<<<<<
@@ -45218,7 +45971,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":870
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":875
* intersect_method = "precomputed"
*
* if result is None: # <<<<<<<<<<<<<<
@@ -45229,7 +45982,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_t_4 = (__pyx_t_5 != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":871
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":876
*
* if result is None:
* if self.use_baeza_yates: # <<<<<<<<<<<<<<
@@ -45239,49 +45992,49 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_t_4 = (__pyx_v_self->use_baeza_yates != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":872
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":877
* if result is None:
* if self.use_baeza_yates:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, BAEZA_YATES) # <<<<<<<<<<<<<<
* intersect_method="double binary"
* else:
*/
- __pyx_t_3 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->intersect_helper(__pyx_v_self, __pyx_v_prefix, __pyx_v_suffix, __pyx_v_prefix_loc, __pyx_v_suffix_loc, __pyx_v_3_sa_BAEZA_YATES); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->intersect_helper(__pyx_v_self, __pyx_v_prefix, __pyx_v_suffix, __pyx_v_prefix_loc, __pyx_v_suffix_loc, __pyx_v_4cdec_2sa_3_sa_BAEZA_YATES); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_v_result));
- __pyx_v_result = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_3);
+ __pyx_v_result = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":873
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":878
* if self.use_baeza_yates:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, BAEZA_YATES)
* intersect_method="double binary" # <<<<<<<<<<<<<<
* else:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE)
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_123));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_124));
__Pyx_XDECREF(__pyx_v_intersect_method);
- __pyx_v_intersect_method = ((PyObject *)__pyx_kp_s_123);
+ __pyx_v_intersect_method = ((PyObject *)__pyx_kp_s_124);
goto __pyx_L5;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":875
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":880
* intersect_method="double binary"
* else:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE) # <<<<<<<<<<<<<<
* intersect_method="merge"
* return result
*/
- __pyx_t_3 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->intersect_helper(__pyx_v_self, __pyx_v_prefix, __pyx_v_suffix, __pyx_v_prefix_loc, __pyx_v_suffix_loc, __pyx_v_3_sa_MERGE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->intersect_helper(__pyx_v_self, __pyx_v_prefix, __pyx_v_suffix, __pyx_v_prefix_loc, __pyx_v_suffix_loc, __pyx_v_4cdec_2sa_3_sa_MERGE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_v_result));
- __pyx_v_result = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_3);
+ __pyx_v_result = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":876
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":881
* else:
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE)
* intersect_method="merge" # <<<<<<<<<<<<<<
@@ -45297,7 +46050,7 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":877
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":882
* result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE)
* intersect_method="merge"
* return result # <<<<<<<<<<<<<<
@@ -45309,13 +46062,13 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- __pyx_r = ((struct __pyx_obj_3_sa_PhraseLocation *)Py_None); __Pyx_INCREF(Py_None);
+ __pyx_r = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)Py_None); __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_prefix);
@@ -45330,8 +46083,8 @@ static struct __pyx_obj_3_sa_PhraseLocation *__pyx_f_3_sa_23HieroCachingRuleFact
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_frontier = 0;
PyObject *__pyx_v_res = 0;
PyObject *__pyx_v_fwords = 0;
@@ -45362,16 +46115,16 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__p
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__res)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fwords)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "advance") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "advance") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -45386,18 +46139,18 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__p
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.advance", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.advance", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_frontier, __pyx_v_res, __pyx_v_fwords);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_frontier, __pyx_v_res, __pyx_v_fwords);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":879
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":884
* return result
*
* def advance(self, frontier, res, fwords): # <<<<<<<<<<<<<<
@@ -45405,7 +46158,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13advance(PyObject *__p
* nf = []
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_frontier, PyObject *__pyx_v_res, PyObject *__pyx_v_fwords) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_frontier, PyObject *__pyx_v_res, PyObject *__pyx_v_fwords) {
unsigned int __pyx_v_na;
PyObject *__pyx_v_nf = NULL;
PyObject *__pyx_v_toskip = NULL;
@@ -45438,19 +46191,19 @@ 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":881
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":886
* def advance(self, frontier, res, fwords):
* cdef unsigned na
* nf = [] # <<<<<<<<<<<<<<
* for toskip, (i, alt, pathlen) in frontier:
* spanlen = fwords[i][alt][2]
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_nf = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":882
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":887
* cdef unsigned na
* nf = []
* for toskip, (i, alt, pathlen) in frontier: # <<<<<<<<<<<<<<
@@ -45461,7 +46214,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__pyx_t_1 = __pyx_v_frontier; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_frontier); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_frontier); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -45469,23 +46222,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __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[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -45501,7 +46254,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -45514,16 +46267,16 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(__pyx_t_6);
#else
- __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
#endif
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
@@ -45531,7 +46284,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_GOTREF(__pyx_t_5);
index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_6);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L6_unpacking_done;
@@ -45539,7 +46292,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L6_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_toskip);
@@ -45555,7 +46308,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
if (unlikely(size != 3)) {
if (size > 3) __Pyx_RaiseTooManyValuesError(3);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -45571,18 +46324,18 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_INCREF(__pyx_t_9);
__Pyx_INCREF(__pyx_t_10);
#else
- __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
#endif
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext;
@@ -45592,7 +46345,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_GOTREF(__pyx_t_9);
index = 2; __pyx_t_10 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L7_unpacking_failed;
__Pyx_GOTREF(__pyx_t_10);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
goto __pyx_L8_unpacking_done;
@@ -45600,7 +46353,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L8_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_i);
@@ -45613,45 +46366,45 @@ 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":883
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":888
* nf = []
* for toskip, (i, alt, pathlen) in frontier:
* spanlen = fwords[i][alt][2] # <<<<<<<<<<<<<<
* if toskip == 0:
* res.append((i, alt, pathlen))
*/
- __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_i); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_i); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_v_alt); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_v_alt); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_v_spanlen);
__pyx_v_spanlen = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":884
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":889
* for toskip, (i, alt, pathlen) in frontier:
* spanlen = fwords[i][alt][2]
* if toskip == 0: # <<<<<<<<<<<<<<
* res.append((i, alt, pathlen))
* ni = i + spanlen
*/
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_toskip, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_toskip, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_12) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":885
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":890
* spanlen = fwords[i][alt][2]
* if toskip == 0:
* res.append((i, alt, pathlen)) # <<<<<<<<<<<<<<
* ni = i + spanlen
* if ni < len(fwords) and pathlen + 1 < self.max_initial_size:
*/
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_i);
@@ -45662,7 +46415,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_INCREF(__pyx_v_pathlen);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_pathlen);
__Pyx_GIVEREF(__pyx_v_pathlen);
- __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_res, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_res, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -45670,42 +46423,42 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":886
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":891
* if toskip == 0:
* res.append((i, alt, pathlen))
* ni = i + spanlen # <<<<<<<<<<<<<<
* if ni < len(fwords) and pathlen + 1 < self.max_initial_size:
* for na in range(len(fwords[ni])):
*/
- __pyx_t_6 = PyNumber_Add(__pyx_v_i, __pyx_v_spanlen); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Add(__pyx_v_i, __pyx_v_spanlen); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_v_ni);
__pyx_v_ni = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":887
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":892
* res.append((i, alt, pathlen))
* ni = i + spanlen
* if ni < len(fwords) and pathlen + 1 < self.max_initial_size: # <<<<<<<<<<<<<<
* for na in range(len(fwords[ni])):
* nf.append((toskip - 1, (ni, na, pathlen + 1)))
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_fwords); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_fwords); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_ni, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_ni, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_12) {
- __pyx_t_4 = PyNumber_Add(__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyInt_FromLong(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_15 = __pyx_t_14;
} else {
@@ -45713,34 +46466,34 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
if (__pyx_t_15) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":888
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":893
* ni = i + spanlen
* if ni < len(fwords) and pathlen + 1 < self.max_initial_size:
* for na in range(len(fwords[ni])): # <<<<<<<<<<<<<<
* nf.append((toskip - 1, (ni, na, pathlen + 1)))
* if len(nf) > 0:
*/
- __pyx_t_5 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ni); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ni); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_13 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
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":889
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":894
* if ni < len(fwords) and pathlen + 1 < self.max_initial_size:
* for na in range(len(fwords[ni])):
* nf.append((toskip - 1, (ni, na, pathlen + 1))) # <<<<<<<<<<<<<<
* if len(nf) > 0:
* return self.advance(nf, res, fwords)
*/
- __pyx_t_5 = PyNumber_Subtract(__pyx_v_toskip, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Subtract(__pyx_v_toskip, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyLong_FromUnsignedLong(__pyx_v_na); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyLong_FromUnsignedLong(__pyx_v_na); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = PyNumber_Add(__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_INCREF(__pyx_v_ni);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_ni);
@@ -45751,7 +46504,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_6 = 0;
__pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
@@ -45759,7 +46512,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_GIVEREF(((PyObject *)__pyx_t_10));
__pyx_t_5 = 0;
__pyx_t_10 = 0;
- __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_nf, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_nf, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
}
goto __pyx_L10;
@@ -45768,18 +46521,18 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":890
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":895
* for na in range(len(fwords[ni])):
* nf.append((toskip - 1, (ni, na, pathlen + 1)))
* if len(nf) > 0: # <<<<<<<<<<<<<<
* return self.advance(nf, res, fwords)
* else:
*/
- __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_nf)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_nf)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_15 = ((__pyx_t_2 > 0) != 0);
if (__pyx_t_15) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":891
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":896
* nf.append((toskip - 1, (ni, na, pathlen + 1)))
* if len(nf) > 0:
* return self.advance(nf, res, fwords) # <<<<<<<<<<<<<<
@@ -45787,9 +46540,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
* return res
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__advance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__advance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_v_nf));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_nf));
@@ -45800,7 +46553,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_INCREF(__pyx_v_fwords);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_fwords);
__Pyx_GIVEREF(__pyx_v_fwords);
- __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
@@ -45811,7 +46564,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":893
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":898
* return self.advance(nf, res, fwords)
* else:
* return res # <<<<<<<<<<<<<<
@@ -45836,7 +46589,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.advance", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.advance", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_nf);
@@ -45852,8 +46605,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12advance(struct __pyx_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_away(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_away(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_away(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_away(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_skip = 0;
PyObject *__pyx_v_i = 0;
PyObject *__pyx_v_spanlen = 0;
@@ -45892,36 +46645,36 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__spanlen)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pathlen)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fwords)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 5:
if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__next_states)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 6:
if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__reachable_buffer)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_all_nodes_isteps_away") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_all_nodes_isteps_away") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
goto __pyx_L5_argtuple_error;
@@ -45944,18 +46697,18 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.get_all_nodes_isteps_away", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_all_nodes_isteps_away", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_away(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_skip, __pyx_v_i, __pyx_v_spanlen, __pyx_v_pathlen, __pyx_v_fwords, __pyx_v_next_states, __pyx_v_reachable_buffer);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_away(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_skip, __pyx_v_i, __pyx_v_spanlen, __pyx_v_pathlen, __pyx_v_fwords, __pyx_v_next_states, __pyx_v_reachable_buffer);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":895
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":900
* return res
*
* def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer): # <<<<<<<<<<<<<<
@@ -45963,7 +46716,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_
* frontier = []
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_away(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_skip, PyObject *__pyx_v_i, PyObject *__pyx_v_spanlen, PyObject *__pyx_v_pathlen, PyObject *__pyx_v_fwords, PyObject *__pyx_v_next_states, PyObject *__pyx_v_reachable_buffer) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_away(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_skip, PyObject *__pyx_v_i, PyObject *__pyx_v_spanlen, PyObject *__pyx_v_pathlen, PyObject *__pyx_v_fwords, PyObject *__pyx_v_next_states, PyObject *__pyx_v_reachable_buffer) {
PyObject *__pyx_v_frontier = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_v_reachable = NULL;
@@ -45994,41 +46747,41 @@ 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":897
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":902
* def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer):
* cdef unsigned alt_it
* frontier = [] # <<<<<<<<<<<<<<
* if i+spanlen+skip >= len(next_states):
* return frontier
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_frontier = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":898
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":903
* cdef unsigned alt_it
* frontier = []
* if i+spanlen+skip >= len(next_states): # <<<<<<<<<<<<<<
* return frontier
* key = tuple([i,spanlen])
*/
- __pyx_t_1 = PyNumber_Add(__pyx_v_i, __pyx_v_spanlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_v_i, __pyx_v_spanlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_skip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_skip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = PyObject_Length(__pyx_v_next_states); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v_next_states); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":899
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":904
* frontier = []
* if i+spanlen+skip >= len(next_states):
* return frontier # <<<<<<<<<<<<<<
@@ -46043,14 +46796,14 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":900
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":905
* if i+spanlen+skip >= len(next_states):
* return frontier
* key = tuple([i,spanlen]) # <<<<<<<<<<<<<<
* reachable = []
* if key in reachable_buffer:
*/
- __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_i);
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_i);
@@ -46058,43 +46811,43 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__Pyx_INCREF(__pyx_v_spanlen);
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_v_spanlen);
__Pyx_GIVEREF(__pyx_v_spanlen);
- __pyx_t_1 = ((PyObject *)PyList_AsTuple(((PyObject*)__pyx_t_4))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)PyList_AsTuple(((PyObject*)__pyx_t_4))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__pyx_v_key = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":901
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":906
* return frontier
* key = tuple([i,spanlen])
* reachable = [] # <<<<<<<<<<<<<<
* if key in reachable_buffer:
* reachable = reachable_buffer[key]
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_reachable = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":902
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":907
* key = tuple([i,spanlen])
* reachable = []
* if key in reachable_buffer: # <<<<<<<<<<<<<<
* reachable = reachable_buffer[key]
* else:
*/
- __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 = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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 = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_6 = (__pyx_t_5 != 0);
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":903
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":908
* reachable = []
* if key in reachable_buffer:
* reachable = reachable_buffer[key] # <<<<<<<<<<<<<<
* else:
* reachable = self.reachable(fwords, i, spanlen)
*/
- __pyx_t_1 = PyObject_GetItem(__pyx_v_reachable_buffer, ((PyObject *)__pyx_v_key)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_reachable_buffer, ((PyObject *)__pyx_v_key)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_v_reachable);
__pyx_v_reachable = __pyx_t_1;
@@ -46103,16 +46856,16 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":905
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":910
* reachable = reachable_buffer[key]
* else:
* reachable = self.reachable(fwords, i, spanlen) # <<<<<<<<<<<<<<
* reachable_buffer[key] = reachable
* for nextreachable in reachable:
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__reachable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__reachable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_fwords);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fwords);
@@ -46123,7 +46876,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__Pyx_INCREF(__pyx_v_spanlen);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_spanlen);
__Pyx_GIVEREF(__pyx_v_spanlen);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
@@ -46131,18 +46884,18 @@ 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":906
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":911
* else:
* reachable = self.reachable(fwords, i, spanlen)
* reachable_buffer[key] = reachable # <<<<<<<<<<<<<<
* for nextreachable in reachable:
* for next_id in next_states[nextreachable]:
*/
- if (PyObject_SetItem(__pyx_v_reachable_buffer, ((PyObject *)__pyx_v_key), __pyx_v_reachable) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_v_reachable_buffer, ((PyObject *)__pyx_v_key), __pyx_v_reachable) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":907
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":912
* reachable = self.reachable(fwords, i, spanlen)
* reachable_buffer[key] = reachable
* for nextreachable in reachable: # <<<<<<<<<<<<<<
@@ -46153,7 +46906,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_t_2 = __pyx_v_reachable; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_7 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_reachable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_reachable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
@@ -46161,23 +46914,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_7(__pyx_t_2);
if (unlikely(!__pyx_t_4)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -46187,20 +46940,20 @@ 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":908
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":913
* reachable_buffer[key] = reachable
* for nextreachable in reachable:
* for next_id in next_states[nextreachable]: # <<<<<<<<<<<<<<
* jump = self.shortest(fwords,i,next_id)
* if jump < skip:
*/
- __pyx_t_4 = PyObject_GetItem(__pyx_v_next_states, __pyx_v_nextreachable); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_next_states, __pyx_v_nextreachable); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
__pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
} else {
- __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -46209,23 +46962,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_9(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -46235,16 +46988,16 @@ 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":909
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":914
* for nextreachable in reachable:
* for next_id in next_states[nextreachable]:
* jump = self.shortest(fwords,i,next_id) # <<<<<<<<<<<<<<
* if jump < skip:
* continue
*/
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__shortest); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__shortest); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_INCREF(__pyx_v_fwords);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_fwords);
@@ -46255,7 +47008,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__Pyx_INCREF(__pyx_v_next_id);
PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_next_id);
__Pyx_GIVEREF(__pyx_v_next_id);
- __pyx_t_11 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
@@ -46263,19 +47016,19 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_jump = __pyx_t_11;
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":910
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":915
* for next_id in next_states[nextreachable]:
* jump = self.shortest(fwords,i,next_id)
* if jump < skip: # <<<<<<<<<<<<<<
* continue
* if pathlen+jump <= self.max_initial_size:
*/
- __pyx_t_11 = PyObject_RichCompare(__pyx_v_jump, __pyx_v_skip, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_RichCompare(__pyx_v_jump, __pyx_v_skip, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":911
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":916
* jump = self.shortest(fwords,i,next_id)
* if jump < skip:
* continue # <<<<<<<<<<<<<<
@@ -46287,50 +47040,50 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":912
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":917
* if jump < skip:
* continue
* if pathlen+jump <= self.max_initial_size: # <<<<<<<<<<<<<<
* for alt_id in range(len(fwords[next_id])):
* if fwords[next_id][alt_id][0] != EPSILON:
*/
- __pyx_t_11 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_10 = PyInt_FromLong(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_11, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_11, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":913
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":918
* continue
* if pathlen+jump <= self.max_initial_size:
* for alt_id in range(len(fwords[next_id])): # <<<<<<<<<<<<<<
* if fwords[next_id][alt_id][0] != EPSILON:
* newel = (next_id,alt_id,pathlen+jump)
*/
- __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_next_id); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_next_id); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
__pyx_t_10 = __pyx_t_4; __Pyx_INCREF(__pyx_t_10); __pyx_t_12 = 0;
__pyx_t_13 = NULL;
} else {
- __pyx_t_12 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_13 = Py_TYPE(__pyx_t_10)->tp_iternext;
}
@@ -46339,23 +47092,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_10)) {
if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_10)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_10)) {
if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_13(__pyx_t_10);
if (unlikely(!__pyx_t_4)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -46365,40 +47118,40 @@ 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":914
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":919
* if pathlen+jump <= self.max_initial_size:
* for alt_id in range(len(fwords[next_id])):
* if fwords[next_id][alt_id][0] != EPSILON: # <<<<<<<<<<<<<<
* newel = (next_id,alt_id,pathlen+jump)
* if newel not in frontier:
*/
- __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_next_id); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_next_id); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_11 = PyObject_GetItem(__pyx_t_4, __pyx_v_alt_id); if (!__pyx_t_11) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_GetItem(__pyx_t_4, __pyx_v_alt_id); if (!__pyx_t_11) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_11, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_11, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = PyInt_FromLong(__pyx_v_3_sa_EPSILON); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_14 = PyObject_RichCompare(__pyx_t_4, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_RichCompare(__pyx_t_4, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":915
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":920
* for alt_id in range(len(fwords[next_id])):
* if fwords[next_id][alt_id][0] != EPSILON:
* newel = (next_id,alt_id,pathlen+jump) # <<<<<<<<<<<<<<
* if newel not in frontier:
* frontier.append((next_id,alt_id,pathlen+jump))
*/
- __pyx_t_14 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_INCREF(__pyx_v_next_id);
PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_next_id);
@@ -46413,27 +47166,27 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__pyx_v_newel = ((PyObject*)__pyx_t_11);
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":916
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":921
* if fwords[next_id][alt_id][0] != EPSILON:
* newel = (next_id,alt_id,pathlen+jump)
* if newel not in frontier: # <<<<<<<<<<<<<<
* frontier.append((next_id,alt_id,pathlen+jump))
* return frontier
*/
- __pyx_t_6 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_newel), ((PyObject *)__pyx_v_frontier), Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_newel), ((PyObject *)__pyx_v_frontier), Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = (__pyx_t_6 != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":917
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":922
* newel = (next_id,alt_id,pathlen+jump)
* if newel not in frontier:
* frontier.append((next_id,alt_id,pathlen+jump)) # <<<<<<<<<<<<<<
* return frontier
*
*/
- __pyx_t_11 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_INCREF(__pyx_v_next_id);
PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_next_id);
@@ -46444,7 +47197,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_11);
__Pyx_GIVEREF(__pyx_t_11);
__pyx_t_11 = 0;
- __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_frontier, ((PyObject *)__pyx_t_14)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_frontier, ((PyObject *)__pyx_t_14)); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
goto __pyx_L14;
}
@@ -46463,7 +47216,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":918
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":923
* if newel not in frontier:
* frontier.append((next_id,alt_id,pathlen+jump))
* return frontier # <<<<<<<<<<<<<<
@@ -46484,7 +47237,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_14);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.get_all_nodes_isteps_away", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_all_nodes_isteps_away", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_frontier);
@@ -46501,8 +47254,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_14get_all_nodes_isteps_
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_fwords = 0;
PyObject *__pyx_v_ifrom = 0;
PyObject *__pyx_v_dist = 0;
@@ -46533,16 +47286,16 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *_
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ifrom)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dist)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reachable") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reachable") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -46557,18 +47310,18 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *_
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.reachable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.reachable", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_fwords, __pyx_v_ifrom, __pyx_v_dist);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_fwords, __pyx_v_ifrom, __pyx_v_dist);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":920
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":925
* return frontier
*
* def reachable(self, fwords, ifrom, dist): # <<<<<<<<<<<<<<
@@ -46576,7 +47329,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_17reachable(PyObject *_
* if ifrom >= len(fwords):
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_ifrom, PyObject *__pyx_v_dist) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_ifrom, PyObject *__pyx_v_dist) {
PyObject *__pyx_v_ret = NULL;
PyObject *__pyx_v_alt_id = NULL;
PyObject *__pyx_v_ifromchild = NULL;
@@ -46599,35 +47352,35 @@ 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":921
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":926
*
* def reachable(self, fwords, ifrom, dist):
* ret = [] # <<<<<<<<<<<<<<
* if ifrom >= len(fwords):
* return ret
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_ret = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":922
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":927
* def reachable(self, fwords, ifrom, dist):
* ret = []
* if ifrom >= len(fwords): # <<<<<<<<<<<<<<
* return ret
* for alt_id in range(len(fwords[ifrom])):
*/
- __pyx_t_2 = PyObject_Length(__pyx_v_fwords); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_v_fwords); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":923
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":928
* ret = []
* if ifrom >= len(fwords):
* return ret # <<<<<<<<<<<<<<
@@ -46642,32 +47395,32 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":924
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":929
* if ifrom >= len(fwords):
* return ret
* for alt_id in range(len(fwords[ifrom])): # <<<<<<<<<<<<<<
* if fwords[ifrom][alt_id][0] == EPSILON:
* ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist))
*/
- __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
__pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -46676,23 +47429,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_3 = __pyx_t_5(__pyx_t_1);
if (unlikely(!__pyx_t_3)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -46702,53 +47455,53 @@ 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":925
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":930
* return ret
* for alt_id in range(len(fwords[ifrom])):
* if fwords[ifrom][alt_id][0] == EPSILON: # <<<<<<<<<<<<<<
* ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist))
* else:
*/
- __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_v_alt_id); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_3, __pyx_v_alt_id); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyInt_FromLong(__pyx_v_3_sa_EPSILON); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":926
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":931
* for alt_id in range(len(fwords[ifrom])):
* if fwords[ifrom][alt_id][0] == EPSILON:
* ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist)) # <<<<<<<<<<<<<<
* else:
* if dist == 0:
*/
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ret), __pyx_n_s__extend); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_ret), __pyx_n_s__extend); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__reachable); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__reachable); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_v_alt_id); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(__pyx_t_3, __pyx_v_alt_id); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_8, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_8, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_fwords);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fwords);
@@ -46759,16 +47512,16 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_dist);
__Pyx_GIVEREF(__pyx_v_dist);
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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 = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
@@ -46777,37 +47530,37 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":928
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":933
* ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist))
* else:
* if dist == 0: # <<<<<<<<<<<<<<
* if ifrom not in ret:
* ret.append(ifrom)
*/
- __pyx_t_8 = PyObject_RichCompare(__pyx_v_dist, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_v_dist, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":929
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":934
* else:
* if dist == 0:
* if ifrom not in ret: # <<<<<<<<<<<<<<
* ret.append(ifrom)
* else:
*/
- __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 = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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 = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = (__pyx_t_4 != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":930
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":935
* if dist == 0:
* if ifrom not in ret:
* ret.append(ifrom) # <<<<<<<<<<<<<<
* else:
* for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1):
*/
- __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_v_ifrom); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_v_ifrom); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L8;
}
__pyx_L8:;
@@ -46815,29 +47568,29 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":932
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":937
* ret.append(ifrom)
* else:
* for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1): # <<<<<<<<<<<<<<
* if ifromchild not in ret:
* ret.append(ifromchild)
*/
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__reachable); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__reachable); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_v_alt_id); if (!__pyx_t_7) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetItem(__pyx_t_3, __pyx_v_alt_id); if (!__pyx_t_7) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyNumber_Subtract(__pyx_v_dist, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Subtract(__pyx_v_dist, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_fwords);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_fwords);
@@ -46848,7 +47601,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_7 = 0;
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
@@ -46856,7 +47609,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_11 = 0;
__pyx_t_12 = NULL;
} else {
- __pyx_t_11 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext;
}
@@ -46865,23 +47618,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_6)) {
if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_6)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_6)) {
if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_3 = __pyx_t_12(__pyx_t_6);
if (unlikely(!__pyx_t_3)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -46891,25 +47644,25 @@ 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":933
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":938
* else:
* for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1):
* if ifromchild not in ret: # <<<<<<<<<<<<<<
* ret.append(ifromchild)
*
*/
- __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_ifromchild, ((PyObject *)__pyx_v_ret), Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_ifromchild, ((PyObject *)__pyx_v_ret), Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = (__pyx_t_9 != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":934
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":939
* for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1):
* if ifromchild not in ret:
* ret.append(ifromchild) # <<<<<<<<<<<<<<
*
* return ret
*/
- __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_v_ifromchild); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_v_ifromchild); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L11;
}
__pyx_L11:;
@@ -46922,7 +47675,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":936
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":941
* ret.append(ifromchild)
*
* return ret # <<<<<<<<<<<<<<
@@ -46942,7 +47695,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.reachable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.reachable", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_ret);
@@ -46954,8 +47707,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_16reachable(struct __py
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_fwords = 0;
PyObject *__pyx_v_ifrom = 0;
PyObject *__pyx_v_ito = 0;
@@ -46986,16 +47739,16 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ifrom)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ito)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortest") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortest") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -47010,18 +47763,18 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.shortest", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.shortest", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_fwords, __pyx_v_ifrom, __pyx_v_ito);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_fwords, __pyx_v_ifrom, __pyx_v_ito);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":938
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":943
* return ret
*
* def shortest(self, fwords, ifrom, ito): # <<<<<<<<<<<<<<
@@ -47029,7 +47782,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_19shortest(PyObject *__
* min = 1000
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_ifrom, PyObject *__pyx_v_ito) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_ifrom, PyObject *__pyx_v_ito) {
unsigned int __pyx_v_alt_id;
PyObject *__pyx_v_min = NULL;
PyObject *__pyx_v_currmin = NULL;
@@ -47046,7 +47799,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":940
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":945
* def shortest(self, fwords, ifrom, ito):
* cdef unsigned alt_id
* min = 1000 # <<<<<<<<<<<<<<
@@ -47056,19 +47809,19 @@ 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":941
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":946
* cdef unsigned alt_id
* min = 1000
* if ifrom > ito: # <<<<<<<<<<<<<<
* return min
* if ifrom == ito:
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_v_ito, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_v_ito, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":942
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":947
* min = 1000
* if ifrom > ito:
* return min # <<<<<<<<<<<<<<
@@ -47083,19 +47836,19 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":943
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":948
* if ifrom > ito:
* return min
* if ifrom == ito: # <<<<<<<<<<<<<<
* return 0
* for alt_id in range(len(fwords[ifrom])):
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_v_ito, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_v_ito, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":944
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":949
* return min
* if ifrom == ito:
* return 0 # <<<<<<<<<<<<<<
@@ -47110,41 +47863,41 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":945
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":950
* if ifrom == ito:
* return 0
* for alt_id in range(len(fwords[ifrom])): # <<<<<<<<<<<<<<
* currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito)
* if fwords[ifrom][alt_id][0] != EPSILON:
*/
- __pyx_t_1 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_alt_id = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":946
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":951
* return 0
* for alt_id in range(len(fwords[ifrom])):
* currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito) # <<<<<<<<<<<<<<
* if fwords[ifrom][alt_id][0] != EPSILON:
* currmin += 1
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__shortest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__shortest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_alt_id, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_alt_id, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_fwords);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_fwords);
@@ -47155,7 +47908,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_ito);
__Pyx_GIVEREF(__pyx_v_ito);
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
@@ -47163,38 +47916,38 @@ 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":947
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":952
* for alt_id in range(len(fwords[ifrom])):
* currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito)
* if fwords[ifrom][alt_id][0] != EPSILON: # <<<<<<<<<<<<<<
* currmin += 1
* if currmin < min:
*/
- __pyx_t_6 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_alt_id, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_alt_id, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyInt_FromLong(__pyx_v_3_sa_EPSILON); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":948
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":953
* currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito)
* if fwords[ifrom][alt_id][0] != EPSILON:
* currmin += 1 # <<<<<<<<<<<<<<
* if currmin < min:
* min = currmin
*/
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_currmin, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_currmin, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_v_currmin);
__pyx_v_currmin = __pyx_t_1;
@@ -47203,19 +47956,19 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":949
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":954
* if fwords[ifrom][alt_id][0] != EPSILON:
* currmin += 1
* if currmin < min: # <<<<<<<<<<<<<<
* min = currmin
* return min
*/
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_currmin, __pyx_v_min, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_currmin, __pyx_v_min, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":950
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":955
* currmin += 1
* if currmin < min:
* min = currmin # <<<<<<<<<<<<<<
@@ -47230,7 +47983,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
__pyx_L8:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":951
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":956
* if currmin < min:
* min = currmin
* return min # <<<<<<<<<<<<<<
@@ -47248,7 +48001,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.shortest", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.shortest", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_min);
@@ -47259,8 +48012,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_18shortest(struct __pyx
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v__columns = 0;
PyObject *__pyx_v_curr_idx = 0;
PyObject *__pyx_v_min_dist = 0;
@@ -47292,7 +48045,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObj
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__curr_idx)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("get_next_states", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_next_states", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
@@ -47301,7 +48054,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObj
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_next_states") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_next_states") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -47318,18 +48071,18 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObj
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("get_next_states", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_next_states", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.get_next_states", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_next_states", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v__columns, __pyx_v_curr_idx, __pyx_v_min_dist);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_states(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v__columns, __pyx_v_curr_idx, __pyx_v_min_dist);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":953
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":958
* return min
*
* def get_next_states(self, _columns, curr_idx, min_dist=2): # <<<<<<<<<<<<<<
@@ -47337,7 +48090,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_21get_next_states(PyObj
* candidate = [[curr_idx,0]]
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v__columns, PyObject *__pyx_v_curr_idx, PyObject *__pyx_v_min_dist) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_states(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v__columns, PyObject *__pyx_v_curr_idx, PyObject *__pyx_v_min_dist) {
PyObject *__pyx_v_result = NULL;
PyObject *__pyx_v_candidate = NULL;
PyObject *__pyx_v_curr = NULL;
@@ -47362,26 +48115,26 @@ 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":954
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":959
*
* def get_next_states(self, _columns, curr_idx, min_dist=2):
* result = [] # <<<<<<<<<<<<<<
* candidate = [[curr_idx,0]]
*
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_result = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":955
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":960
* def get_next_states(self, _columns, curr_idx, min_dist=2):
* result = []
* candidate = [[curr_idx,0]] # <<<<<<<<<<<<<<
*
* while len(candidate) > 0:
*/
- __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_curr_idx);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_curr_idx);
@@ -47389,7 +48142,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__Pyx_INCREF(__pyx_int_0);
PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
@@ -47397,7 +48150,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_v_candidate = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":957
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":962
* candidate = [[curr_idx,0]]
*
* while len(candidate) > 0: # <<<<<<<<<<<<<<
@@ -47405,43 +48158,43 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
* if curr[0] >= len(_columns):
*/
while (1) {
- __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_candidate)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_candidate)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = ((__pyx_t_3 > 0) != 0);
if (!__pyx_t_4) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":958
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":963
*
* while len(candidate) > 0:
* curr = candidate.pop() # <<<<<<<<<<<<<<
* if curr[0] >= len(_columns):
* continue
*/
- __pyx_t_2 = __Pyx_PyObject_Pop(((PyObject *)__pyx_v_candidate)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Pop(((PyObject *)__pyx_v_candidate)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_v_curr);
__pyx_v_curr = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":959
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":964
* while len(candidate) > 0:
* curr = candidate.pop()
* if curr[0] >= len(_columns): # <<<<<<<<<<<<<<
* continue
* if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size:
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_curr, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_curr, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Length(__pyx_v__columns); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Length(__pyx_v__columns); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":960
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":965
* curr = candidate.pop()
* if curr[0] >= len(_columns):
* continue # <<<<<<<<<<<<<<
@@ -47453,30 +48206,30 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":961
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":966
* if curr[0] >= len(_columns):
* continue
* if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size: # <<<<<<<<<<<<<<
* result.append(curr[0]);
* curr_col = _columns[curr[0]]
*/
- __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_curr, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_curr, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_t_5, ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_t_5, ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_4) {
- __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_curr, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_curr, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_min_dist, __pyx_t_5, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_min_dist, __pyx_t_5, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
__Pyx_DECREF(__pyx_t_1);
- __pyx_t_2 = PyInt_FromLong(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_7 = __pyx_t_6;
} else {
@@ -47484,38 +48237,38 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":962
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":967
* continue
* if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size:
* result.append(curr[0]); # <<<<<<<<<<<<<<
* curr_col = _columns[curr[0]]
* for alt in curr_col:
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L6;
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":963
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":968
* if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size:
* result.append(curr[0]);
* curr_col = _columns[curr[0]] # <<<<<<<<<<<<<<
* for alt in curr_col:
* next_id = curr[0]+alt[2]
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyObject_GetItem(__pyx_v__columns, __pyx_t_1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_GetItem(__pyx_v__columns, __pyx_t_1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_v_curr_col);
__pyx_v_curr_col = __pyx_t_5;
__pyx_t_5 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":964
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":969
* result.append(curr[0]);
* curr_col = _columns[curr[0]]
* for alt in curr_col: # <<<<<<<<<<<<<<
@@ -47526,7 +48279,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_t_5 = __pyx_v_curr_col; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0;
__pyx_t_9 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_curr_col); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_curr_col); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext;
}
@@ -47534,23 +48287,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_5)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_5)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_1 = __pyx_t_9(__pyx_t_5);
if (unlikely(!__pyx_t_1)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -47560,18 +48313,18 @@ 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":965
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":970
* curr_col = _columns[curr[0]]
* for alt in curr_col:
* next_id = curr[0]+alt[2] # <<<<<<<<<<<<<<
* jump = 1
* if alt[0] == EPSILON:
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_alt, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_alt, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -47579,7 +48332,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":966
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":971
* for alt in curr_col:
* next_id = curr[0]+alt[2]
* jump = 1 # <<<<<<<<<<<<<<
@@ -47590,25 +48343,25 @@ 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":967
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":972
* next_id = curr[0]+alt[2]
* jump = 1
* if alt[0] == EPSILON: # <<<<<<<<<<<<<<
* jump = 0
* if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1:
*/
- __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_alt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_alt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_2 = PyInt_FromLong(__pyx_v_3_sa_EPSILON); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_10, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_10, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":968
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":973
* jump = 1
* if alt[0] == EPSILON:
* jump = 0 # <<<<<<<<<<<<<<
@@ -47622,30 +48375,30 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":969
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":974
* if alt[0] == EPSILON:
* jump = 0
* if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1: # <<<<<<<<<<<<<<
* candidate.append([next_id,curr[1]+jump])
* return sorted(result);
*/
- __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_next_id, ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_next_id, ((PyObject *)__pyx_v_result), Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_7) {
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_jump); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_jump); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_min_dist, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_min_dist, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
__Pyx_DECREF(__pyx_t_1);
- __pyx_t_10 = PyInt_FromLong((__pyx_v_self->max_initial_size + 1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong((__pyx_v_self->max_initial_size + 1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_6 = __pyx_t_4;
} else {
@@ -47653,19 +48406,19 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
}
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":970
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":975
* jump = 0
* if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1:
* candidate.append([next_id,curr[1]+jump]) # <<<<<<<<<<<<<<
* return sorted(result);
*
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_jump); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_jump); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_next_id);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_next_id);
@@ -47673,7 +48426,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_candidate, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_candidate, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
goto __pyx_L10;
}
@@ -47683,20 +48436,20 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__pyx_L3_continue:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":971
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":976
* 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); # <<<<<<<<<<<<<<
*
- * def input(self, fwords, meta):
+ * def input(self, fwords, meta, ctx_name=None):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(((PyObject *)__pyx_v_result));
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result));
__Pyx_GIVEREF(((PyObject *)__pyx_v_result));
- __pyx_t_1 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
__pyx_r = __pyx_t_1;
@@ -47710,7 +48463,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.get_next_states", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_next_states", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
@@ -47724,14 +48477,15 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_20get_next_states(struc
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_23input(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_3_sa_23HieroCachingRuleFactory_22input[] = "When this function is called on the RuleFactory,\n it looks up all of the rules that can be used to translate\n the input sentence";
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_23input(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_23input(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4cdec_2sa_3_sa_23HieroCachingRuleFactory_22input[] = "When this function is called on the RuleFactory,\n it looks up all of the rules that can be used to translate\n the input sentence";
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_23input(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_fwords = 0;
PyObject *__pyx_v_meta = 0;
+ PyObject *__pyx_v_ctx_name = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -47739,12 +48493,22 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_23input(PyObject *__pyx
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("input (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fwords,&__pyx_n_s__meta,0};
- PyObject* values[2] = {0,0};
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__fwords,&__pyx_n_s__meta,&__pyx_n_s__ctx_name,0};
+ PyObject* values[3] = {0,0,0};
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":978
+ * return sorted(result);
+ *
+ * def input(self, fwords, meta, ctx_name=None): # <<<<<<<<<<<<<<
+ * '''When this function is called on the RuleFactory,
+ * it looks up all of the rules that can be used to translate
+ */
+ values[2] = ((PyObject *)Py_None);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
+ case 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;
@@ -47758,38 +48522,47 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_23input(PyObject *__pyx
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__meta)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("input", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("input", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ctx_name);
+ if (value) { values[2] = value; kw_args--; }
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "input") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "input") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
- goto __pyx_L5_argtuple_error;
} else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
}
__pyx_v_fwords = values[0];
__pyx_v_meta = values[1];
+ __pyx_v_ctx_name = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("input", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("input", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.input", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.input", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_22input(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_fwords, __pyx_v_meta);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_22input(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_fwords, __pyx_v_meta, __pyx_v_ctx_name);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_lambda4(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_5input_lambda4 = {__Pyx_NAMESTR("lambda4"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_lambda4, METH_NOARGS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_lambda4(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_lambda4(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_lambda4 = {__Pyx_NAMESTR("lambda4"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_lambda4, METH_NOARGS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_lambda4(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
@@ -47799,9 +48572,9 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_lambda4(PyObject
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5 = {__Pyx_NAMESTR("lambda5"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5, METH_NOARGS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5 = {__Pyx_NAMESTR("lambda5"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5, METH_NOARGS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);
@@ -47810,7 +48583,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1142
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1147
* if len(extracts) > 0:
* fcount = Counter()
* fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) # <<<<<<<<<<<<<<
@@ -47829,14 +48602,14 @@ static PyObject *__pyx_lambda_funcdef_lambda5(CYTHON_UNUSED PyObject *__pyx_self
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("lambda5", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyList_Type))));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyList_Type))));
__Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyList_Type))));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
@@ -47850,7 +48623,7 @@ static PyObject *__pyx_lambda_funcdef_lambda5(CYTHON_UNUSED PyObject *__pyx_self
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.input.lambda4.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.input.lambda4.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -47869,16 +48642,16 @@ static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("lambda4", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5, 0, __pyx_n_s_124, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_7lambda4_lambda5, 0, __pyx_n_s_125, NULL, __pyx_n_s_102, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
@@ -47892,7 +48665,7 @@ static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.input.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.input.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -47901,9 +48674,9 @@ static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_1lambda6(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_5input_1lambda6 = {__Pyx_NAMESTR("lambda6"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_1lambda6, METH_O, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_1lambda6(PyObject *__pyx_self, PyObject *__pyx_v_x) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_1lambda6(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_1lambda6 = {__Pyx_NAMESTR("lambda6"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_1lambda6, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_1lambda6(PyObject *__pyx_self, PyObject *__pyx_v_x) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("lambda6 (wrapper)", 0);
@@ -47912,7 +48685,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_5input_1lambda6(PyObjec
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1148
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1153
* for f, elist in fphrases.iteritems():
* for e, alslist in elist.iteritems():
* alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) # <<<<<<<<<<<<<<
@@ -47930,11 +48703,11 @@ static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("lambda6", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -47944,42 +48717,42 @@ static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.input.lambda6", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.input.lambda6", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_5input_4generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1187
- * # Online rule extraction and scoring
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1193
* if self.online:
+ * stats = self.online_stats[ctx_name]
* f_syms = tuple(word[0][0] for word in fwords) # <<<<<<<<<<<<<<
* for f, lex_i, lex_j in self.get_f_phrases(f_syms):
* spanlen = (lex_j - lex_i) + 1
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_5input_2genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_2genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_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_20_genexpr *)__pyx_tp_new_3_sa___pyx_scope_struct_20_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_20_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_20_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_19_input *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *) __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_23HieroCachingRuleFactory_5input_4generator14, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4generator14, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -47988,7 +48761,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_5input_2genexpr(PyObjec
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.input.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.input.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -47997,9 +48770,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_5input_2genexpr(PyObjec
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_5input_4generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -48019,13 +48792,13 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_5input_4generator14(__p
return NULL;
}
__pyx_L3_first_run:;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords)) { __Pyx_RaiseClosureNameError("fwords"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords)) { __Pyx_RaiseClosureNameError("fwords"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords)) {
__pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -48033,23 +48806,23 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_5input_4generator14(__p
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __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[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -48060,9 +48833,9 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_5input_4generator14(__p
__Pyx_GIVEREF(__pyx_t_4);
__pyx_cur_scope->__pyx_v_word = __pyx_t_4;
__pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_word, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_word, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_5;
@@ -48082,7 +48855,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_5input_4generator14(__p
__Pyx_XGOTREF(__pyx_t_1);
__pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
__pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyErr_SetNone(PyExc_StopIteration);
@@ -48100,23 +48873,23 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_5input_4generator14(__p
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":973
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":978
* return sorted(result);
*
- * def input(self, fwords, meta): # <<<<<<<<<<<<<<
+ * def input(self, fwords, meta, ctx_name=None): # <<<<<<<<<<<<<<
* '''When this function is called on the RuleFactory,
* it looks up all of the rules that can be used to translate
*/
-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_19_input *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_22input(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_fwords, PyObject *__pyx_v_meta, PyObject *__pyx_v_ctx_name) {
+ struct __pyx_obj_4cdec_2sa_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_19_input *)__pyx_tp_new_3_sa___pyx_scope_struct_19_input(__pyx_ptype_3_sa___pyx_scope_struct_19_input, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_19_input(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_19_input, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -48131,8 +48904,11 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_22input(struct __pyx_ob
__pyx_cur_scope->__pyx_v_meta = __pyx_v_meta;
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_meta);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_meta);
+ __pyx_cur_scope->__pyx_v_ctx_name = __pyx_v_ctx_name;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ctx_name);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ctx_name);
{
- __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -48141,7 +48917,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_22input(struct __pyx_ob
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.input", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.input", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -48150,9 +48926,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_22input(struct __pyx_ob
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- 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);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -48197,9 +48973,9 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
return NULL;
}
__pyx_L3_first_run:;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":984
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":989
* cdef Phrase hiero_phrase
*
* flen = len(fwords) # <<<<<<<<<<<<<<
@@ -48208,27 +48984,27 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_t_1 = __pyx_cur_scope->__pyx_v_fwords;
__Pyx_INCREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_cur_scope->__pyx_v_flen = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":985
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":990
*
* flen = len(fwords)
* start_time = monitor_cpu() # <<<<<<<<<<<<<<
* self.extract_time = 0.0
* self.intersect_time = 0.0
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_cur_scope->__pyx_v_start_time = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":986
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":991
* flen = len(fwords)
* start_time = monitor_cpu()
* self.extract_time = 0.0 # <<<<<<<<<<<<<<
@@ -48237,7 +49013,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":987
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":992
* start_time = monitor_cpu()
* self.extract_time = 0.0
* self.intersect_time = 0.0 # <<<<<<<<<<<<<<
@@ -48246,20 +49022,20 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_cur_scope->__pyx_v_self->intersect_time = 0.0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":988
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":993
* self.extract_time = 0.0
* self.intersect_time = 0.0
* nodes_isteps_away_buffer = {} # <<<<<<<<<<<<<<
* hit = 0
* reachable_buffer = {}
*/
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
__Pyx_GIVEREF(((PyObject *)__pyx_t_3));
__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":989
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":994
* self.intersect_time = 0.0
* nodes_isteps_away_buffer = {}
* hit = 0 # <<<<<<<<<<<<<<
@@ -48268,46 +49044,46 @@ 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":990
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":995
* nodes_isteps_away_buffer = {}
* hit = 0
* reachable_buffer = {} # <<<<<<<<<<<<<<
*
* # Phrase pairs processed by suffix array extractor. Do not re-extract
*/
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
__Pyx_GIVEREF(((PyObject *)__pyx_t_3));
__pyx_cur_scope->__pyx_v_reachable_buffer = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":995
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1000
* # during online extraction. This is probably the hackiest part of
* # online grammar extraction.
* seen_phrases = set() # <<<<<<<<<<<<<<
*
* # Do not cache between sentences
*/
- __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
__Pyx_GIVEREF(((PyObject *)__pyx_t_3));
__pyx_cur_scope->__pyx_v_seen_phrases = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":998
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1003
*
* # Do not cache between sentences
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) # <<<<<<<<<<<<<<
*
* frontier = []
*/
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_GIVEREF(__pyx_t_1);
@@ -48316,20 +49092,20 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_self->rules->root = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1000
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1005
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
*
* frontier = [] # <<<<<<<<<<<<<<
* for i in range(len(fwords)):
* for alt in range(0, len(fwords[i])):
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_cur_scope->__pyx_v_frontier = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1001
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1006
*
* frontier = []
* for i in range(len(fwords)): # <<<<<<<<<<<<<<
@@ -48338,72 +49114,72 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_t_1 = __pyx_cur_scope->__pyx_v_fwords;
__Pyx_INCREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) {
__pyx_cur_scope->__pyx_v_i = __pyx_t_5;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1002
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1007
* frontier = []
* for i in range(len(fwords)):
* for alt in range(0, len(fwords[i])): # <<<<<<<<<<<<<<
* if fwords[i][alt][0] != EPSILON:
* frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False))
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
__pyx_cur_scope->__pyx_v_alt = __pyx_t_7;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1003
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1008
* for i in range(len(fwords)):
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON: # <<<<<<<<<<<<<<
* frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False))
*
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_alt, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_alt, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyInt_FromLong(__pyx_v_3_sa_EPSILON); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1004
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1009
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON:
* frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False)) # <<<<<<<<<<<<<<
*
* xroot = None
*/
- __pyx_t_8 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
@@ -48429,7 +49205,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_10 = 0;
__pyx_t_1 = 0;
__pyx_t_11 = 0;
- __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, ((PyObject *)__pyx_t_12)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, ((PyObject *)__pyx_t_12)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
goto __pyx_L8;
}
@@ -48437,7 +49213,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1006
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1011
* frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False))
*
* xroot = None # <<<<<<<<<<<<<<
@@ -48448,42 +49224,42 @@ 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":1007
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1012
*
* xroot = None
* x1 = sym_setindex(self.category, 1) # <<<<<<<<<<<<<<
* if x1 in self.rules.root.children:
* xroot = self.rules.root.children[x1]
*/
- __pyx_cur_scope->__pyx_v_x1 = __pyx_f_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, 1);
+ __pyx_cur_scope->__pyx_v_x1 = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1008
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1013
* xroot = None
* x1 = sym_setindex(self.category, 1)
* if x1 in self.rules.root.children: # <<<<<<<<<<<<<<
* xroot = self.rules.root.children[x1]
* else:
*/
- __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_x1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_x1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s__children); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s__children); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_t_12, __pyx_t_11, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_t_12, __pyx_t_11, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_14 = (__pyx_t_9 != 0);
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1009
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1014
* x1 = sym_setindex(self.category, 1)
* if x1 in self.rules.root.children:
* xroot = self.rules.root.children[x1] # <<<<<<<<<<<<<<
* else:
* xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation())
*/
- __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s__children); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s__children); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_11, __pyx_cur_scope->__pyx_v_x1, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_11, __pyx_cur_scope->__pyx_v_x1, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_xroot);
@@ -48495,21 +49271,21 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1011
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1016
* xroot = self.rules.root.children[x1]
* else:
* xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation()) # <<<<<<<<<<<<<<
* self.rules.root.children[x1] = xroot
*
*/
- __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_12));
- if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__suffix_link), __pyx_cur_scope->__pyx_v_self->rules->root) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__suffix_link), __pyx_cur_scope->__pyx_v_self->rules->root) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_xroot);
@@ -48518,21 +49294,21 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_xroot = __pyx_t_11;
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1012
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1017
* else:
* xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation())
* self.rules.root.children[x1] = xroot # <<<<<<<<<<<<<<
*
* for i in range(self.min_gap_size, len(fwords)):
*/
- __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s__children); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s__children); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- if (__Pyx_SetItemInt(__pyx_t_11, __pyx_cur_scope->__pyx_v_x1, __pyx_cur_scope->__pyx_v_xroot, sizeof(int), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_11, __pyx_cur_scope->__pyx_v_x1, __pyx_cur_scope->__pyx_v_xroot, sizeof(int), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
}
__pyx_L9:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1014
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1019
* self.rules.root.children[x1] = xroot
*
* for i in range(self.min_gap_size, len(fwords)): # <<<<<<<<<<<<<<
@@ -48541,81 +49317,81 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_t_11 = __pyx_cur_scope->__pyx_v_fwords;
__Pyx_INCREF(__pyx_t_11);
- __pyx_t_2 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
for (__pyx_t_5 = __pyx_cur_scope->__pyx_v_self->min_gap_size; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) {
__pyx_cur_scope->__pyx_v_i = __pyx_t_5;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1015
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1020
*
* for i in range(self.min_gap_size, len(fwords)):
* for alt in range(0, len(fwords[i])): # <<<<<<<<<<<<<<
* if fwords[i][alt][0] != EPSILON:
* frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True))
*/
- __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_11) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_11) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_6 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
__pyx_cur_scope->__pyx_v_alt = __pyx_t_7;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1016
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1021
* for i in range(self.min_gap_size, len(fwords)):
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON: # <<<<<<<<<<<<<<
* frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True))
*
*/
- __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_11) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_11) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_11, __pyx_cur_scope->__pyx_v_alt, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_11, __pyx_cur_scope->__pyx_v_alt, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_11) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_11) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = PyInt_FromLong(__pyx_v_3_sa_EPSILON); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_11, __pyx_t_12, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_11, __pyx_t_12, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1017
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1022
* for alt in range(0, len(fwords[i])):
* if fwords[i][alt][0] != EPSILON:
* frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True)) # <<<<<<<<<<<<<<
*
* next_states = []
*/
- __pyx_t_1 = PyInt_FromLong((__pyx_cur_scope->__pyx_v_i - __pyx_cur_scope->__pyx_v_self->min_gap_size)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong((__pyx_cur_scope->__pyx_v_i - __pyx_cur_scope->__pyx_v_self->min_gap_size)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
__Pyx_GIVEREF(__pyx_t_11);
__pyx_t_11 = 0;
- __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_x1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_x1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_8 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
@@ -48641,7 +49417,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_3 = 0;
__pyx_t_15 = 0;
__pyx_t_8 = 0;
- __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, ((PyObject *)__pyx_t_16)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, ((PyObject *)__pyx_t_16)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
goto __pyx_L14;
}
@@ -48649,20 +49425,20 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1019
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1024
* frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True))
*
* next_states = [] # <<<<<<<<<<<<<<
* for i in range(len(fwords)):
* next_states.append(self.get_next_states(fwords,i,self.min_gap_size))
*/
- __pyx_t_16 = PyList_New(0); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyList_New(0); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
__Pyx_GIVEREF(((PyObject *)__pyx_t_16));
__pyx_cur_scope->__pyx_v_next_states = ((PyObject*)__pyx_t_16);
__pyx_t_16 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1020
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1025
*
* next_states = []
* for i in range(len(fwords)): # <<<<<<<<<<<<<<
@@ -48671,25 +49447,25 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__pyx_t_16 = __pyx_cur_scope->__pyx_v_fwords;
__Pyx_INCREF(__pyx_t_16);
- __pyx_t_2 = PyObject_Length(__pyx_t_16); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_16); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) {
__pyx_cur_scope->__pyx_v_i = __pyx_t_5;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1021
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1026
* next_states = []
* for i in range(len(fwords)):
* next_states.append(self.get_next_states(fwords,i,self.min_gap_size)) # <<<<<<<<<<<<<<
*
* while len(frontier) > 0:
*/
- __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__get_next_states); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__get_next_states); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
- __pyx_t_8 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_15 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_fwords);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_fwords);
@@ -48700,15 +49476,15 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GIVEREF(__pyx_t_15);
__pyx_t_8 = 0;
__pyx_t_15 = 0;
- __pyx_t_15 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_next_states, __pyx_t_15); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_next_states, __pyx_t_15); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1023
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1028
* next_states.append(self.get_next_states(fwords,i,self.min_gap_size))
*
* while len(frontier) > 0: # <<<<<<<<<<<<<<
@@ -48716,18 +49492,18 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
* for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier:
*/
while (1) {
- __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_cur_scope->__pyx_v_frontier)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_cur_scope->__pyx_v_frontier)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_14 = ((__pyx_t_2 > 0) != 0);
if (!__pyx_t_14) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1024
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1029
*
* while len(frontier) > 0:
* new_frontier = [] # <<<<<<<<<<<<<<
* for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier:
* word_id = fwords[i][alt][0]
*/
- __pyx_t_15 = PyList_New(0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyList_New(0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_new_frontier));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_new_frontier));
@@ -48735,7 +49511,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_new_frontier = ((PyObject*)__pyx_t_15);
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1025
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1030
* while len(frontier) > 0:
* new_frontier = []
* for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier: # <<<<<<<<<<<<<<
@@ -48746,9 +49522,9 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
for (;;) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_15)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_15, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_15, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
PyObject* sequence = __pyx_t_3;
@@ -48760,7 +49536,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (unlikely(size != 8)) {
if (size > 8) __Pyx_RaiseTooManyValuesError(8);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -48794,7 +49570,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
Py_ssize_t i;
PyObject** temps[8] = {&__pyx_t_16,&__pyx_t_8,&__pyx_t_11,&__pyx_t_10,&__pyx_t_12,&__pyx_t_1,&__pyx_t_17,&__pyx_t_18};
for (i=0; i < 8; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
@@ -48804,7 +49580,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
{
Py_ssize_t index = -1;
PyObject** temps[8] = {&__pyx_t_16,&__pyx_t_8,&__pyx_t_11,&__pyx_t_10,&__pyx_t_12,&__pyx_t_1,&__pyx_t_17,&__pyx_t_18};
- __pyx_t_19 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_19 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_19);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext;
@@ -48813,7 +49589,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 8) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 8) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_20 = NULL;
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
goto __pyx_L22_unpacking_done;
@@ -48821,14 +49597,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
__pyx_t_20 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L22_unpacking_done:;
}
- __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_16); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_16); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_cur_scope->__pyx_v_k = __pyx_t_5;
__pyx_cur_scope->__pyx_v_i = __pyx_t_7;
@@ -48859,19 +49635,19 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_is_shadow_path = __pyx_t_18;
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1026
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1031
* new_frontier = []
* for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier:
* word_id = fwords[i][alt][0] # <<<<<<<<<<<<<<
* spanlen = fwords[i][alt][2]
* # TODO get rid of k -- pathlen is replacing it
*/
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_3, __pyx_cur_scope->__pyx_v_alt, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_3, __pyx_cur_scope->__pyx_v_alt, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_18, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_18, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_word_id);
@@ -48880,19 +49656,19 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_word_id = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1027
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1032
* for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier:
* word_id = fwords[i][alt][0]
* spanlen = fwords[i][alt][2] # <<<<<<<<<<<<<<
* # TODO get rid of k -- pathlen is replacing it
* if word_id == EPSILON:
*/
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_3, __pyx_cur_scope->__pyx_v_alt, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_3, __pyx_cur_scope->__pyx_v_alt, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_18, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_18, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_spanlen);
@@ -48901,47 +49677,47 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_spanlen = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1029
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1034
* spanlen = fwords[i][alt][2]
* # TODO get rid of k -- pathlen is replacing it
* if word_id == EPSILON: # <<<<<<<<<<<<<<
* # skipping because word_id is epsilon
* if i+spanlen >= len(fwords):
*/
- __pyx_t_3 = PyInt_FromLong(__pyx_v_3_sa_EPSILON); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_18 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1031
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1036
* if word_id == EPSILON:
* # skipping because word_id is epsilon
* if i+spanlen >= len(fwords): # <<<<<<<<<<<<<<
* continue
* for nualt in range(0,len(fwords[i+spanlen])):
*/
- __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_3 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__pyx_t_18 = __pyx_cur_scope->__pyx_v_fwords;
__Pyx_INCREF(__pyx_t_18);
- __pyx_t_6 = PyObject_Length(__pyx_t_18); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Length(__pyx_t_18); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_17 = PyObject_RichCompare(__pyx_t_3, __pyx_t_18, Py_GE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyObject_RichCompare(__pyx_t_3, __pyx_t_18, Py_GE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1032
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1037
* # skipping because word_id is epsilon
* if i+spanlen >= len(fwords):
* continue # <<<<<<<<<<<<<<
@@ -48953,43 +49729,43 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1033
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1038
* if i+spanlen >= len(fwords):
* continue
* for nualt in range(0,len(fwords[i+spanlen])): # <<<<<<<<<<<<<<
* frontier.append((k, i+spanlen, input_match, nualt, pathlen, node, prefix, is_shadow_path))
* continue
*/
- __pyx_t_17 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fwords, __pyx_t_18); if (!__pyx_t_17) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fwords, __pyx_t_18); if (!__pyx_t_17) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_6 = PyObject_Length(__pyx_t_17); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Length(__pyx_t_17); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_6; __pyx_t_21+=1) {
__pyx_cur_scope->__pyx_v_nualt = __pyx_t_21;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1034
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1039
* continue
* for nualt in range(0,len(fwords[i+spanlen])):
* frontier.append((k, i+spanlen, input_match, nualt, pathlen, node, prefix, is_shadow_path)) # <<<<<<<<<<<<<<
* continue
*
*/
- __pyx_t_17 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_3 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_nualt); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_nualt); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_17);
__Pyx_GIVEREF(__pyx_t_17);
@@ -49015,11 +49791,11 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_17 = 0;
__pyx_t_3 = 0;
__pyx_t_18 = 0;
- __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1035
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1040
* for nualt in range(0,len(fwords[i+spanlen])):
* frontier.append((k, i+spanlen, input_match, nualt, pathlen, node, prefix, is_shadow_path))
* continue # <<<<<<<<<<<<<<
@@ -49031,19 +49807,19 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L23:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1037
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1042
* continue
*
* phrase = prefix + (word_id,) # <<<<<<<<<<<<<<
* hiero_phrase = Phrase(phrase)
* arity = hiero_phrase.arity()
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_word_id);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_word_id);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_word_id);
- __pyx_t_18 = PyNumber_Add(__pyx_cur_scope->__pyx_v_prefix, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyNumber_Add(__pyx_cur_scope->__pyx_v_prefix, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_phrase);
@@ -49052,44 +49828,44 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_phrase = __pyx_t_18;
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1038
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1043
*
* phrase = prefix + (word_id,)
* hiero_phrase = Phrase(phrase) # <<<<<<<<<<<<<<
* arity = hiero_phrase.arity()
*
*/
- __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_phrase);
PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_cur_scope->__pyx_v_phrase);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_phrase);
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase));
__Pyx_GIVEREF(__pyx_t_1);
- __pyx_cur_scope->__pyx_v_hiero_phrase = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_hiero_phrase = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1039
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1044
* phrase = prefix + (word_id,)
* hiero_phrase = Phrase(phrase)
* arity = hiero_phrase.arity() # <<<<<<<<<<<<<<
*
* lookup_required = False
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase), __pyx_n_s__arity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase), __pyx_n_s__arity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_18 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_t_18); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_t_18); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__pyx_cur_scope->__pyx_v_arity = __pyx_t_21;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1041
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1046
* arity = hiero_phrase.arity()
*
* lookup_required = False # <<<<<<<<<<<<<<
@@ -49098,30 +49874,30 @@ 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":1042
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1047
*
* lookup_required = False
* if word_id in node.children: # <<<<<<<<<<<<<<
* if node.children[word_id] is None:
* # Path dead-ends at this node
*/
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_18, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_18, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__pyx_t_9 = (__pyx_t_14 != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1043
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1048
* lookup_required = False
* if word_id in node.children:
* if node.children[word_id] is None: # <<<<<<<<<<<<<<
* # Path dead-ends at this node
* continue
*/
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_1 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__pyx_t_9 = (__pyx_t_1 == Py_None);
@@ -49129,7 +49905,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_14 = (__pyx_t_9 != 0);
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1045
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1050
* if node.children[word_id] is None:
* # Path dead-ends at this node
* continue # <<<<<<<<<<<<<<
@@ -49141,16 +49917,16 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1048
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1053
* else:
* # Path continues at this node
* node = node.children[word_id] # <<<<<<<<<<<<<<
* else:
* if node.suffix_link is None:
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_18 = PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_node);
@@ -49164,21 +49940,21 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1050
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1055
* node = node.children[word_id]
* else:
* if node.suffix_link is None: # <<<<<<<<<<<<<<
* # Current node is root; lookup required
* lookup_required = True
*/
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__pyx_t_14 = (__pyx_t_18 == Py_None);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__pyx_t_9 = (__pyx_t_14 != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1052
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1057
* if node.suffix_link is None:
* # Current node is root; lookup required
* lookup_required = True # <<<<<<<<<<<<<<
@@ -49190,36 +49966,36 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1054
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1059
* lookup_required = True
* else:
* if word_id in node.suffix_link.children: # <<<<<<<<<<<<<<
* if node.suffix_link.children[word_id] is None:
* # Suffix link reports path is dead end
*/
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s__children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s__children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_14 = (__pyx_t_9 != 0);
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1055
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1060
* else:
* if word_id in node.suffix_link.children:
* if node.suffix_link.children[word_id] is None: # <<<<<<<<<<<<<<
* # Suffix link reports path is dead end
* node.children[word_id] = None
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__pyx_t_14 = (__pyx_t_1 == Py_None);
@@ -49227,19 +50003,19 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_9 = (__pyx_t_14 != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1057
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1062
* if node.suffix_link.children[word_id] is None:
* # Suffix link reports path is dead end
* node.children[word_id] = None # <<<<<<<<<<<<<<
* continue
* else:
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyObject_SetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1062; __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":1058
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1063
* # Suffix link reports path is dead end
* node.children[word_id] = None
* continue # <<<<<<<<<<<<<<
@@ -49251,7 +50027,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1061
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1066
* else:
* # Suffix link indicates lookup is reqired
* lookup_required = True # <<<<<<<<<<<<<<
@@ -49265,18 +50041,18 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1064
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1069
* else:
* #ERROR: We never get here
* raise Exception("Keyword trie error") # <<<<<<<<<<<<<<
* # checking whether lookup_required
* if lookup_required:
*/
- __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_126), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_127), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L30:;
}
@@ -49284,7 +50060,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L27:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1066
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1071
* raise Exception("Keyword trie error")
* # checking whether lookup_required
* if lookup_required: # <<<<<<<<<<<<<<
@@ -49294,7 +50070,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_9 = (__pyx_cur_scope->__pyx_v_lookup_required != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1067
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1072
* # checking whether lookup_required
* if lookup_required:
* new_node = None # <<<<<<<<<<<<<<
@@ -49307,66 +50083,66 @@ 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":1068
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1073
* if lookup_required:
* new_node = None
* if is_shadow_path: # <<<<<<<<<<<<<<
* # Extending shadow path
* # on the shadow path we don't do any search, we just use info from suffix link
*/
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1071
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1076
* # Extending shadow path
* # on the shadow path we don't do any search, we just use info from suffix link
* new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location, # <<<<<<<<<<<<<<
* suffix_link=node.suffix_link.children[word_id],
* phrase=hiero_phrase)
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s__children); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s__children); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_18 = PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1076; __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":1072
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1077
* # on the shadow path we don't do any search, we just use info from suffix link
* new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location,
* suffix_link=node.suffix_link.children[word_id], # <<<<<<<<<<<<<<
* phrase=hiero_phrase)
* else:
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__suffix_link), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__suffix_link), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1076; __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":1073
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1078
* new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location,
* suffix_link=node.suffix_link.children[word_id],
* phrase=hiero_phrase) # <<<<<<<<<<<<<<
* else:
* if arity > 0:
*/
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__phrase), ((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__phrase), ((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_new_node);
@@ -49378,7 +50154,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1075
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1080
* phrase=hiero_phrase)
* else:
* if arity > 0: # <<<<<<<<<<<<<<
@@ -49388,16 +50164,16 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_9 = ((__pyx_cur_scope->__pyx_v_arity > 0) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1077
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1082
* if arity > 0:
* # Intersecting because of arity > 0
* intersect_start_time = monitor_cpu() # <<<<<<<<<<<<<<
* phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase)
* intersect_stop_time = monitor_cpu()
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_intersect_start_time);
@@ -49406,40 +50182,40 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_intersect_start_time = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1078
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1083
* # Intersecting because of arity > 0
* intersect_start_time = monitor_cpu()
* phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase) # <<<<<<<<<<<<<<
* intersect_stop_time = monitor_cpu()
* self.intersect_time += intersect_stop_time - intersect_start_time
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__children); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__children); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->intersect(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_node, __pyx_t_1, __pyx_cur_scope->__pyx_v_hiero_phrase)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->intersect(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_node, __pyx_t_1, __pyx_cur_scope->__pyx_v_hiero_phrase)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location));
__Pyx_GIVEREF(__pyx_t_3);
- __pyx_cur_scope->__pyx_v_phrase_location = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_3);
+ __pyx_cur_scope->__pyx_v_phrase_location = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1079
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1084
* intersect_start_time = monitor_cpu()
* phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase)
* intersect_stop_time = monitor_cpu() # <<<<<<<<<<<<<<
* self.intersect_time += intersect_stop_time - intersect_start_time
* else:
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_intersect_stop_time);
@@ -49448,67 +50224,67 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_intersect_stop_time = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1080
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1085
* phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase)
* intersect_stop_time = monitor_cpu()
* self.intersect_time += intersect_stop_time - intersect_start_time # <<<<<<<<<<<<<<
* else:
* # Suffix array search
*/
- __pyx_t_1 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->intersect_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->intersect_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_intersect_stop_time, __pyx_cur_scope->__pyx_v_intersect_start_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_intersect_stop_time, __pyx_cur_scope->__pyx_v_intersect_start_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_18); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_18); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__pyx_cur_scope->__pyx_v_self->intersect_time = __pyx_t_4;
goto __pyx_L34;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1083
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1088
* else:
* # Suffix array search
* phrase_location = node.phrase_location # <<<<<<<<<<<<<<
* sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high)
* if sa_range is not None:
*/
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location));
__Pyx_GIVEREF(__pyx_t_18);
- __pyx_cur_scope->__pyx_v_phrase_location = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_18);
+ __pyx_cur_scope->__pyx_v_phrase_location = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_18);
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1084
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1089
* # Suffix array search
* phrase_location = node.phrase_location
* sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high) # <<<<<<<<<<<<<<
* if sa_range is not None:
* phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1])
*/
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->fsa), __pyx_n_s__lookup); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->fsa), __pyx_n_s__lookup); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_phrase, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_phrase, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_21)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring(__pyx_t_21)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
- __pyx_t_6 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_6 - 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_6 - 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_17 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_phrase_location->sa_low); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_phrase_location->sa_low); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_phrase_location->sa_high); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_phrase_location->sa_high); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_3));
__Pyx_GIVEREF(((PyObject *)__pyx_t_3));
@@ -49522,7 +50298,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_1 = 0;
__pyx_t_17 = 0;
__pyx_t_12 = 0;
- __pyx_t_12 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
@@ -49532,7 +50308,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_sa_range = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1085
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1090
* 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: # <<<<<<<<<<<<<<
@@ -49543,36 +50319,36 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_14 = (__pyx_t_9 != 0);
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1086
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1091
* sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high)
* if sa_range is not None:
* phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1]) # <<<<<<<<<<<<<<
* else:
* phrase_location = None
*/
- __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_12));
- __pyx_t_10 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sa_range, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sa_range, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__sa_low), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__sa_low), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sa_range, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sa_range, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__sa_high), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__sa_high), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
__Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location));
__Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location));
__Pyx_GIVEREF(__pyx_t_10);
- __pyx_cur_scope->__pyx_v_phrase_location = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_10);
+ __pyx_cur_scope->__pyx_v_phrase_location = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_10);
__pyx_t_10 = 0;
goto __pyx_L35;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1088
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1093
* phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1])
* else:
* phrase_location = None # <<<<<<<<<<<<<<
@@ -49583,13 +50359,13 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location));
__Pyx_DECREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location));
__Pyx_GIVEREF(Py_None);
- __pyx_cur_scope->__pyx_v_phrase_location = ((struct __pyx_obj_3_sa_PhraseLocation *)Py_None);
+ __pyx_cur_scope->__pyx_v_phrase_location = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)Py_None);
}
__pyx_L35:;
}
__pyx_L34:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1090
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1095
* phrase_location = None
*
* if phrase_location is None: # <<<<<<<<<<<<<<
@@ -49600,19 +50376,19 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_9 = (__pyx_t_14 != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1091
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1096
*
* if phrase_location is None:
* node.children[word_id] = None # <<<<<<<<<<<<<<
* # Search failed
* continue
*/
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- if (PyObject_SetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1093
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1098
* node.children[word_id] = None
* # Search failed
* continue # <<<<<<<<<<<<<<
@@ -49624,7 +50400,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L36:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1095
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1100
* continue
* # Search succeeded
* suffix_link = self.rules.root # <<<<<<<<<<<<<<
@@ -49639,33 +50415,33 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_suffix_link = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1096
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1101
* # Search succeeded
* suffix_link = self.rules.root
* if node.suffix_link is not None: # <<<<<<<<<<<<<<
* suffix_link = node.suffix_link.children[word_id]
* new_node = ExtendedTrieNode(phrase_location=phrase_location,
*/
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_9 = (__pyx_t_10 != Py_None);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_14 = (__pyx_t_9 != 0);
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1097
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1102
* suffix_link = self.rules.root
* if node.suffix_link is not None:
* suffix_link = node.suffix_link.children[word_id] # <<<<<<<<<<<<<<
* new_node = ExtendedTrieNode(phrase_location=phrase_location,
* suffix_link=suffix_link,
*/
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__children); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__children); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_GetItem(__pyx_t_12, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetItem(__pyx_t_12, __pyx_cur_scope->__pyx_v_word_id); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_suffix_link);
@@ -49677,35 +50453,35 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L37:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1098
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1103
* if node.suffix_link is not None:
* suffix_link = node.suffix_link.children[word_id]
* new_node = ExtendedTrieNode(phrase_location=phrase_location, # <<<<<<<<<<<<<<
* suffix_link=suffix_link,
* phrase=hiero_phrase)
*/
- __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_10));
- if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__phrase_location), ((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__phrase_location), ((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1099
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1104
* suffix_link = node.suffix_link.children[word_id]
* new_node = ExtendedTrieNode(phrase_location=phrase_location,
* suffix_link=suffix_link, # <<<<<<<<<<<<<<
* phrase=hiero_phrase)
* node.children[word_id] = new_node
*/
- if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__suffix_link), __pyx_cur_scope->__pyx_v_suffix_link) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__suffix_link), __pyx_cur_scope->__pyx_v_suffix_link) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1100
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1105
* new_node = ExtendedTrieNode(phrase_location=phrase_location,
* suffix_link=suffix_link,
* phrase=hiero_phrase) # <<<<<<<<<<<<<<
* node.children[word_id] = new_node
* node = new_node
*/
- if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__phrase), ((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__phrase), ((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_new_node);
@@ -49716,19 +50492,19 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L33:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1101
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1106
* suffix_link=suffix_link,
* phrase=hiero_phrase)
* node.children[word_id] = new_node # <<<<<<<<<<<<<<
* node = new_node
*
*/
- __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- if (PyObject_SetItem(__pyx_t_12, __pyx_cur_scope->__pyx_v_word_id, __pyx_cur_scope->__pyx_v_new_node) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_12, __pyx_cur_scope->__pyx_v_word_id, __pyx_cur_scope->__pyx_v_new_node) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1102
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1107
* phrase=hiero_phrase)
* node.children[word_id] = new_node
* node = new_node # <<<<<<<<<<<<<<
@@ -49741,7 +50517,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":1107
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1112
* This should happen before we get to extraction (so that
* the node will exist if needed)'''
* if arity < self.max_nonterminals: # <<<<<<<<<<<<<<
@@ -49751,14 +50527,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_14 = ((__pyx_cur_scope->__pyx_v_arity < __pyx_cur_scope->__pyx_v_self->max_nonterminals) != 0);
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1108
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1113
* the node will exist if needed)'''
* if arity < self.max_nonterminals:
* xcat_index = arity+1 # <<<<<<<<<<<<<<
* xcat = sym_setindex(self.category, xcat_index)
* suffix_link_xcat_index = xcat_index
*/
- __pyx_t_12 = PyInt_FromLong((__pyx_cur_scope->__pyx_v_arity + 1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyInt_FromLong((__pyx_cur_scope->__pyx_v_arity + 1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_xcat_index);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_xcat_index);
@@ -49766,17 +50542,17 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_xcat_index = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1109
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1114
* if arity < self.max_nonterminals:
* xcat_index = arity+1
* xcat = sym_setindex(self.category, xcat_index) # <<<<<<<<<<<<<<
* suffix_link_xcat_index = xcat_index
* if is_shadow_path:
*/
- __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_xcat_index); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_cur_scope->__pyx_v_xcat = __pyx_f_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_21);
+ __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_xcat_index); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_cur_scope->__pyx_v_xcat = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_21);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1110
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1115
* xcat_index = arity+1
* xcat = sym_setindex(self.category, xcat_index)
* suffix_link_xcat_index = xcat_index # <<<<<<<<<<<<<<
@@ -49789,24 +50565,24 @@ 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":1111
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1116
* xcat = sym_setindex(self.category, xcat_index)
* suffix_link_xcat_index = xcat_index
* if is_shadow_path: # <<<<<<<<<<<<<<
* suffix_link_xcat_index = xcat_index-1
* suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index)
*/
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1112
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1117
* suffix_link_xcat_index = xcat_index
* if is_shadow_path:
* suffix_link_xcat_index = xcat_index-1 # <<<<<<<<<<<<<<
* suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index)
* node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location,
*/
- __pyx_t_12 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_xcat_index, __pyx_int_1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_xcat_index, __pyx_int_1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index);
__Pyx_DECREF(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index);
@@ -49817,169 +50593,169 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L39:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1113
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1118
* if is_shadow_path:
* suffix_link_xcat_index = xcat_index-1
* suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) # <<<<<<<<<<<<<<
* node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location,
* suffix_link=node.suffix_link.children[suffix_link_xcat],
*/
- __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_cur_scope->__pyx_v_suffix_link_xcat = __pyx_f_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_21);
+ __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_cur_scope->__pyx_v_suffix_link_xcat = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_21);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1114
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1119
* suffix_link_xcat_index = xcat_index-1
* suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index)
* node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, # <<<<<<<<<<<<<<
* suffix_link=node.suffix_link.children[suffix_link_xcat],
* phrase= Phrase(phrase + (xcat,)))
*/
- __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_12));
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__phrase_location), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1115
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1120
* suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index)
* node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location,
* suffix_link=node.suffix_link.children[suffix_link_xcat], # <<<<<<<<<<<<<<
* phrase= Phrase(phrase + (xcat,)))
*
*/
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__suffix_link); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_18, __pyx_cur_scope->__pyx_v_suffix_link_xcat, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_18, __pyx_cur_scope->__pyx_v_suffix_link_xcat, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__suffix_link), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__suffix_link), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1116
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1121
* node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location,
* suffix_link=node.suffix_link.children[suffix_link_xcat],
* phrase= Phrase(phrase + (xcat,))) # <<<<<<<<<<<<<<
*
* # sample from range
*/
- __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_xcat); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_xcat); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
__pyx_t_10 = 0;
- __pyx_t_10 = PyNumber_Add(__pyx_cur_scope->__pyx_v_phrase, ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyNumber_Add(__pyx_cur_scope->__pyx_v_phrase, ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
- __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
__pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
- if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__phrase), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__phrase), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1114
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1119
* suffix_link_xcat_index = xcat_index-1
* suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index)
* node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, # <<<<<<<<<<<<<<
* suffix_link=node.suffix_link.children[suffix_link_xcat],
* phrase= Phrase(phrase + (xcat,)))
*/
- __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- if (__Pyx_SetItemInt(__pyx_t_12, __pyx_cur_scope->__pyx_v_xcat, __pyx_t_10, sizeof(int), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_12, __pyx_cur_scope->__pyx_v_xcat, __pyx_t_10, sizeof(int), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L38;
}
__pyx_L38:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1119
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1124
*
* # sample from range
* if not is_shadow_path: # <<<<<<<<<<<<<<
* sample = self.sampler.sample(node.phrase_location)
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns
*/
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = ((!__pyx_t_14) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1120
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1125
* # sample from range
* if not is_shadow_path:
* sample = self.sampler.sample(node.phrase_location) # <<<<<<<<<<<<<<
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns
* chunklen = IntList(initial_len=num_subpatterns)
*/
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->sampler), __pyx_n_s__sample); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->sampler), __pyx_n_s__sample); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_12);
__Pyx_GIVEREF(__pyx_t_12);
__pyx_t_12 = 0;
- __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
- if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_sample));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_sample));
__Pyx_GIVEREF(__pyx_t_12);
- __pyx_cur_scope->__pyx_v_sample = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_12);
+ __pyx_cur_scope->__pyx_v_sample = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1121
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1126
* if not is_shadow_path:
* sample = self.sampler.sample(node.phrase_location)
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns # <<<<<<<<<<<<<<
* chunklen = IntList(initial_len=num_subpatterns)
* for j from 0 <= j < num_subpatterns:
*/
- __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__phrase_location); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_21 = ((struct __pyx_obj_3_sa_PhraseLocation *)__pyx_t_12)->num_subpatterns;
+ __pyx_t_21 = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_12)->num_subpatterns;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_cur_scope->__pyx_v_num_subpatterns = __pyx_t_21;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1122
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1127
* sample = self.sampler.sample(node.phrase_location)
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns
* chunklen = IntList(initial_len=num_subpatterns) # <<<<<<<<<<<<<<
* for j from 0 <= j < num_subpatterns:
* chunklen.arr[j] = hiero_phrase.chunklen(j)
*/
- __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_12));
- __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_18) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__initial_len), __pyx_t_18) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_chunklen));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_chunklen));
__Pyx_GIVEREF(__pyx_t_18);
- __pyx_cur_scope->__pyx_v_chunklen = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_18);
+ __pyx_cur_scope->__pyx_v_chunklen = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_18);
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1123
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1128
* num_subpatterns = (<PhraseLocation> node.phrase_location).num_subpatterns
* chunklen = IntList(initial_len=num_subpatterns)
* for j from 0 <= j < num_subpatterns: # <<<<<<<<<<<<<<
@@ -49989,24 +50765,24 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_21 = __pyx_cur_scope->__pyx_v_num_subpatterns;
for (__pyx_cur_scope->__pyx_v_j = 0; __pyx_cur_scope->__pyx_v_j < __pyx_t_21; __pyx_cur_scope->__pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1124
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1129
* chunklen = IntList(initial_len=num_subpatterns)
* for j from 0 <= j < num_subpatterns:
* chunklen.arr[j] = hiero_phrase.chunklen(j) # <<<<<<<<<<<<<<
* extracts = []
* j = 0
*/
- (__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);
+ (__pyx_cur_scope->__pyx_v_chunklen->arr[__pyx_cur_scope->__pyx_v_j]) = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *)__pyx_cur_scope->__pyx_v_hiero_phrase->__pyx_vtab)->chunklen(__pyx_cur_scope->__pyx_v_hiero_phrase, __pyx_cur_scope->__pyx_v_j);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1125
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1130
* for j from 0 <= j < num_subpatterns:
* chunklen.arr[j] = hiero_phrase.chunklen(j)
* extracts = [] # <<<<<<<<<<<<<<
* j = 0
* extract_start = monitor_cpu()
*/
- __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_extracts));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_extracts));
@@ -50014,7 +50790,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_extracts = ((PyObject*)__pyx_t_18);
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1126
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1131
* chunklen.arr[j] = hiero_phrase.chunklen(j)
* extracts = []
* j = 0 # <<<<<<<<<<<<<<
@@ -50023,16 +50799,16 @@ 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":1127
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1132
* extracts = []
* j = 0
* extract_start = monitor_cpu() # <<<<<<<<<<<<<<
* while j < sample.len:
* extract = []
*/
- __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_12 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_extract_start);
@@ -50041,7 +50817,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_extract_start = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1128
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1133
* j = 0
* extract_start = monitor_cpu()
* while j < sample.len: # <<<<<<<<<<<<<<
@@ -50052,14 +50828,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_9 = ((__pyx_cur_scope->__pyx_v_j < __pyx_cur_scope->__pyx_v_sample->len) != 0);
if (!__pyx_t_9) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1129
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1134
* extract_start = monitor_cpu()
* while j < sample.len:
* extract = [] # <<<<<<<<<<<<<<
*
* assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr)
*/
- __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_extract);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_extract);
@@ -50067,30 +50843,30 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_extract = ((PyObject *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1131
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1136
* extract = []
*
* 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)
*/
- __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);
+ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_cur_scope->__pyx_v_matching), __pyx_cur_scope->__pyx_v_sample->arr, __pyx_cur_scope->__pyx_v_j, __pyx_cur_scope->__pyx_v_num_subpatterns, __pyx_cur_scope->__pyx_v_self->fda->sent_id->arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1132
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1137
*
* assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr)
* loc = tuple(sample[j:j+num_subpatterns]) # <<<<<<<<<<<<<<
* extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns)
* extracts.extend([(e, loc) for e in extract])
*/
- __pyx_t_12 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_cur_scope->__pyx_v_sample), __pyx_cur_scope->__pyx_v_j, (__pyx_cur_scope->__pyx_v_j + __pyx_cur_scope->__pyx_v_num_subpatterns), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_cur_scope->__pyx_v_sample), __pyx_cur_scope->__pyx_v_j, (__pyx_cur_scope->__pyx_v_j + __pyx_cur_scope->__pyx_v_num_subpatterns), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_12);
__Pyx_GIVEREF(__pyx_t_12);
__pyx_t_12 = 0;
- __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_loc);
@@ -50099,14 +50875,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_loc = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1133
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1138
* assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr)
* loc = tuple(sample[j:j+num_subpatterns])
* extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns) # <<<<<<<<<<<<<<
* extracts.extend([(e, loc) for e in extract])
* j = j + num_subpatterns
*/
- __pyx_t_12 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->extract(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_hiero_phrase, (&__pyx_cur_scope->__pyx_v_matching), __pyx_cur_scope->__pyx_v_chunklen->arr, __pyx_cur_scope->__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->extract(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_hiero_phrase, (&__pyx_cur_scope->__pyx_v_matching), __pyx_cur_scope->__pyx_v_chunklen->arr, __pyx_cur_scope->__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_extract);
__Pyx_DECREF(__pyx_cur_scope->__pyx_v_extract);
@@ -50114,22 +50890,22 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_extract = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1134
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1139
* loc = tuple(sample[j:j+num_subpatterns])
* extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns)
* extracts.extend([(e, loc) for e in extract]) # <<<<<<<<<<<<<<
* j = j + num_subpatterns
*
*/
- __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_extracts), __pyx_n_s__extend); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_extracts), __pyx_n_s__extend); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_extract) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_extract)) {
__pyx_t_10 = __pyx_cur_scope->__pyx_v_extract; __Pyx_INCREF(__pyx_t_10); __pyx_t_6 = 0;
__pyx_t_22 = NULL;
} else {
- __pyx_t_6 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_extract); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_extract); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_22 = Py_TYPE(__pyx_t_10)->tp_iternext;
}
@@ -50137,23 +50913,23 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (!__pyx_t_22 && PyList_CheckExact(__pyx_t_10)) {
if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_10)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_17 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_6); __Pyx_INCREF(__pyx_t_17); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_6); __Pyx_INCREF(__pyx_t_17); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_17 = PySequence_ITEM(__pyx_t_10, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PySequence_ITEM(__pyx_t_10, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_22 && PyTuple_CheckExact(__pyx_t_10)) {
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_17 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_6); __Pyx_INCREF(__pyx_t_17); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_6); __Pyx_INCREF(__pyx_t_17); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_17 = PySequence_ITEM(__pyx_t_10, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PySequence_ITEM(__pyx_t_10, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_17 = __pyx_t_22(__pyx_t_10);
if (unlikely(!__pyx_t_17)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -50164,7 +50940,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GIVEREF(__pyx_t_17);
__pyx_cur_scope->__pyx_v_e = __pyx_t_17;
__pyx_t_17 = 0;
- __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_e);
PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_cur_scope->__pyx_v_e);
@@ -50172,22 +50948,22 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_loc);
PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_cur_scope->__pyx_v_loc);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_loc);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_18, (PyObject*)__pyx_t_17))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_18, (PyObject*)__pyx_t_17))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_18));
__Pyx_GIVEREF(((PyObject *)__pyx_t_18));
__pyx_t_18 = 0;
- __pyx_t_18 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1135
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1140
* extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns)
* extracts.extend([(e, loc) for e in extract])
* j = j + num_subpatterns # <<<<<<<<<<<<<<
@@ -50197,7 +50973,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":1137
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1142
* j = j + num_subpatterns
*
* num_samples = sample.len/num_subpatterns # <<<<<<<<<<<<<<
@@ -50212,7 +50988,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
else if (sizeof(int) == sizeof(long) && unlikely(__pyx_cur_scope->__pyx_v_num_subpatterns == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_cur_scope->__pyx_v_sample->len))) {
#ifdef WITH_THREAD
@@ -50222,20 +50998,20 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_cur_scope->__pyx_v_num_samples = __Pyx_div_int(__pyx_cur_scope->__pyx_v_sample->len, __pyx_cur_scope->__pyx_v_num_subpatterns);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1138
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1143
*
* num_samples = sample.len/num_subpatterns
* extract_stop = monitor_cpu() # <<<<<<<<<<<<<<
* self.extract_time = self.extract_time + extract_stop - extract_start
* if len(extracts) > 0:
*/
- __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_10 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_extract_stop);
@@ -50244,46 +51020,46 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_extract_stop = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1139
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1144
* num_samples = sample.len/num_subpatterns
* extract_stop = monitor_cpu()
* self.extract_time = self.extract_time + extract_stop - extract_start # <<<<<<<<<<<<<<
* if len(extracts) > 0:
* fcount = Counter()
*/
- __pyx_t_10 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_18 = PyNumber_Add(__pyx_t_10, __pyx_cur_scope->__pyx_v_extract_stop); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyNumber_Add(__pyx_t_10, __pyx_cur_scope->__pyx_v_extract_stop); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyNumber_Subtract(__pyx_t_18, __pyx_cur_scope->__pyx_v_extract_start); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyNumber_Subtract(__pyx_t_18, __pyx_cur_scope->__pyx_v_extract_start); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_10); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_10); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_cur_scope->__pyx_v_self->extract_time = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1140
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1145
* extract_stop = monitor_cpu()
* self.extract_time = self.extract_time + extract_stop - extract_start
* if len(extracts) > 0: # <<<<<<<<<<<<<<
* fcount = Counter()
* fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
*/
- __pyx_t_6 = PyList_GET_SIZE(((PyObject *)__pyx_cur_scope->__pyx_v_extracts)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_GET_SIZE(((PyObject *)__pyx_cur_scope->__pyx_v_extracts)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = ((__pyx_t_6 > 0) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1141
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1146
* self.extract_time = self.extract_time + extract_stop - extract_start
* if len(extracts) > 0:
* fcount = Counter() # <<<<<<<<<<<<<<
* fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
* for (f, e, count, als), loc in extracts:
*/
- __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__Counter); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__Counter); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_18 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fcount);
@@ -50292,23 +51068,23 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_fcount = __pyx_t_18;
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1142
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1147
* if len(extracts) > 0:
* fcount = Counter()
* fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) # <<<<<<<<<<<<<<
* for (f, e, count, als), loc in extracts:
* fcount[f] += count
*/
- __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__defaultdict); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_5input_lambda4, 0, __pyx_n_s_127, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_lambda4, 0, __pyx_n_s_128, NULL, __pyx_n_s_102, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
__pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
@@ -50318,7 +51094,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_fphrases = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1143
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1148
* fcount = Counter()
* fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
* for (f, e, count, als), loc in extracts: # <<<<<<<<<<<<<<
@@ -50329,9 +51105,9 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
for (;;) {
if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_10)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_12 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_6); __Pyx_INCREF(__pyx_t_12); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_12 = PySequence_ITEM(__pyx_t_10, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_10, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) {
PyObject* sequence = __pyx_t_12;
@@ -50343,7 +51119,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -50356,16 +51132,16 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_INCREF(__pyx_t_18);
__Pyx_INCREF(__pyx_t_17);
#else
- __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
#endif
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_1 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_20 = Py_TYPE(__pyx_t_1)->tp_iternext;
@@ -50373,7 +51149,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GOTREF(__pyx_t_18);
index = 1; __pyx_t_17 = __pyx_t_20(__pyx_t_1); if (unlikely(!__pyx_t_17)) goto __pyx_L50_unpacking_failed;
__Pyx_GOTREF(__pyx_t_17);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_20 = NULL;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L51_unpacking_done;
@@ -50381,7 +51157,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_20 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L51_unpacking_done:;
}
if ((likely(PyTuple_CheckExact(__pyx_t_18))) || (PyList_CheckExact(__pyx_t_18))) {
@@ -50394,7 +51170,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (unlikely(size != 4)) {
if (size > 4) __Pyx_RaiseTooManyValuesError(4);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -50416,7 +51192,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
Py_ssize_t i;
PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_3,&__pyx_t_11,&__pyx_t_8};
for (i=0; i < 4; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
@@ -50426,7 +51202,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
{
Py_ssize_t index = -1;
PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_3,&__pyx_t_11,&__pyx_t_8};
- __pyx_t_16 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__pyx_t_20 = Py_TYPE(__pyx_t_16)->tp_iternext;
@@ -50435,7 +51211,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_16), 4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_16), 4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_20 = NULL;
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
goto __pyx_L53_unpacking_done;
@@ -50443,7 +51219,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
__pyx_t_20 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L53_unpacking_done:;
}
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
@@ -50472,7 +51248,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_loc = __pyx_t_17;
__pyx_t_17 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1144
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1149
* fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
* for (f, e, count, als), loc in extracts:
* fcount[f] += count # <<<<<<<<<<<<<<
@@ -50481,38 +51257,38 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
*/
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
__pyx_t_12 = __pyx_cur_scope->__pyx_v_f;
- __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_12); if (!__pyx_t_17) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_12); if (!__pyx_t_17) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_t_17, __pyx_cur_scope->__pyx_v_count); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_t_17, __pyx_cur_scope->__pyx_v_count); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- if (PyObject_SetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_12, __pyx_t_18) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_12, __pyx_t_18) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1145
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1150
* for (f, e, count, als), loc in extracts:
* fcount[f] += count
* fphrases[f][e][als].append(loc) # <<<<<<<<<<<<<<
* for f, elist in fphrases.iteritems():
* for e, alslist in elist.iteritems():
*/
- __pyx_t_12 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fphrases, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fphrases, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_18 = PyObject_GetItem(__pyx_t_12, __pyx_cur_scope->__pyx_v_e); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_GetItem(__pyx_t_12, __pyx_cur_scope->__pyx_v_e); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_als); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_als); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_18 = __Pyx_PyObject_Append(__pyx_t_12, __pyx_cur_scope->__pyx_v_loc); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_Append(__pyx_t_12, __pyx_cur_scope->__pyx_v_loc); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1146
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1151
* fcount[f] += count
* fphrases[f][e][als].append(loc)
* for f, elist in fphrases.iteritems(): # <<<<<<<<<<<<<<
@@ -50522,9 +51298,9 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_6 = 0;
if (unlikely(__pyx_cur_scope->__pyx_v_fphrases == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_18 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_fphrases, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_23), (&__pyx_t_21)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_fphrases, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_23), (&__pyx_t_21)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_XDECREF(__pyx_t_10);
__pyx_t_10 = __pyx_t_18;
@@ -50532,7 +51308,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
while (1) {
__pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_10, __pyx_t_23, &__pyx_t_6, &__pyx_t_18, &__pyx_t_12, NULL, __pyx_t_21);
if (unlikely(__pyx_t_7 == 0)) break;
- if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_GOTREF(__pyx_t_12);
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
@@ -50546,7 +51322,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_elist = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1147
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1152
* fphrases[f][e][als].append(loc)
* for f, elist in fphrases.iteritems():
* for e, alslist in elist.iteritems(): # <<<<<<<<<<<<<<
@@ -50556,9 +51332,9 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_24 = 0;
if (unlikely(__pyx_cur_scope->__pyx_v_elist == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_18 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_elist, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_25), (&__pyx_t_7)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_elist, 0, ((PyObject *)__pyx_n_s__iteritems), (&__pyx_t_25), (&__pyx_t_7)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_XDECREF(__pyx_t_12);
__pyx_t_12 = __pyx_t_18;
@@ -50566,7 +51342,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
while (1) {
__pyx_t_5 = __Pyx_dict_iter_next(__pyx_t_12, __pyx_t_25, &__pyx_t_24, &__pyx_t_18, &__pyx_t_17, NULL, __pyx_t_7);
if (unlikely(__pyx_t_5 == 0)) break;
- if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_GOTREF(__pyx_t_17);
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_e);
@@ -50580,30 +51356,30 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_alslist = __pyx_t_17;
__pyx_t_17 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1148
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1153
* for f, elist in fphrases.iteritems():
* for e, alslist in elist.iteritems():
* alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) # <<<<<<<<<<<<<<
* locs = tuple(itertools.chain.from_iterable(alslist.itervalues()))
* count = len(locs)
*/
- __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_alslist, __pyx_n_s__iteritems); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_alslist, __pyx_n_s__iteritems); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18);
__Pyx_GIVEREF(__pyx_t_18);
__pyx_t_18 = 0;
- __pyx_t_18 = PyDict_New(); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyDict_New(); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_18));
- __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_5input_1lambda6, 0, __pyx_n_s_127, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_1lambda6, 0, __pyx_n_s_128, NULL, __pyx_n_s_102, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- if (PyDict_SetItem(__pyx_t_18, ((PyObject *)__pyx_n_s__key), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_18, ((PyObject *)__pyx_n_s__key), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_17), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_builtin_max, ((PyObject *)__pyx_t_17), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
@@ -50617,7 +51393,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -50630,16 +51406,16 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_INCREF(__pyx_t_18);
__Pyx_INCREF(__pyx_t_17);
#else
- __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
#endif
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_20 = Py_TYPE(__pyx_t_11)->tp_iternext;
@@ -50647,7 +51423,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GOTREF(__pyx_t_18);
index = 1; __pyx_t_17 = __pyx_t_20(__pyx_t_11); if (unlikely(!__pyx_t_17)) goto __pyx_L58_unpacking_failed;
__Pyx_GOTREF(__pyx_t_17);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_20 = NULL;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
goto __pyx_L59_unpacking_done;
@@ -50655,7 +51431,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_20 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L59_unpacking_done:;
}
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_alignment);
@@ -50669,41 +51445,41 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_max_locs = __pyx_t_17;
__pyx_t_17 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1149
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1154
* for e, alslist in elist.iteritems():
* alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1]))
* locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) # <<<<<<<<<<<<<<
* count = len(locs)
* scores = self.scorer.score(FeatureContext(
*/
- __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__itertools); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__itertools); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__chain); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__chain); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s__from_iterable); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s__from_iterable); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_alslist, __pyx_n_s__itervalues); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_alslist, __pyx_n_s__itervalues); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18);
__Pyx_GIVEREF(__pyx_t_18);
__pyx_t_18 = 0;
- __pyx_t_18 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
- __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18);
__Pyx_GIVEREF(__pyx_t_18);
__pyx_t_18 = 0;
- __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_locs));
@@ -50712,15 +51488,15 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_locs = ((PyObject*)__pyx_t_18);
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1150
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1155
* alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1]))
* locs = tuple(itertools.chain.from_iterable(alslist.itervalues()))
* count = len(locs) # <<<<<<<<<<<<<<
* scores = self.scorer.score(FeatureContext(
* f, e, count, fcount[f], num_samples,
*/
- __pyx_t_26 = PyTuple_GET_SIZE(((PyObject *)__pyx_cur_scope->__pyx_v_locs)); if (unlikely(__pyx_t_26 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_26); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_26 = PyTuple_GET_SIZE(((PyObject *)__pyx_cur_scope->__pyx_v_locs)); if (unlikely(__pyx_t_26 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_26); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_count);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_count);
@@ -50728,43 +51504,43 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_count = __pyx_t_18;
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1151
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1156
* locs = tuple(itertools.chain.from_iterable(alslist.itervalues()))
* count = len(locs)
* scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<<
* f, e, count, fcount[f], num_samples,
* (k,i+spanlen), locs, input_match,
*/
- __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__FeatureContext); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__FeatureContext); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1152
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1157
* count = len(locs)
* scores = self.scorer.score(FeatureContext(
* f, e, count, fcount[f], num_samples, # <<<<<<<<<<<<<<
* (k,i+spanlen), locs, input_match,
* fwords, self.fda, self.eda,
*/
- __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_17) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_17) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- __pyx_t_8 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_num_samples); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_num_samples); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1153
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1158
* scores = self.scorer.score(FeatureContext(
* f, e, count, fcount[f], num_samples,
* (k,i+spanlen), locs, input_match, # <<<<<<<<<<<<<<
* fwords, self.fda, self.eda,
* meta,
*/
- __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11);
__Pyx_GIVEREF(__pyx_t_11);
@@ -50773,16 +51549,16 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_11 = 0;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1157
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1162
* meta,
* # Include online stats. None if none.
- * self.online_ctx_lookup(f, e))) # <<<<<<<<<<<<<<
+ * self.online_ctx_lookup(f, e, ctx_name))) # <<<<<<<<<<<<<<
* # Phrase pair processed
* if self.online:
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__online_ctx_lookup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__online_ctx_lookup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_cur_scope->__pyx_v_f);
@@ -50790,11 +51566,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_e);
PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_cur_scope->__pyx_v_e);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e);
- __pyx_t_16 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ctx_name);
+ PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_cur_scope->__pyx_v_ctx_name);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ctx_name);
+ __pyx_t_16 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
- __pyx_t_11 = PyTuple_New(13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyTuple_New(13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_cur_scope->__pyx_v_f);
@@ -50835,21 +51614,21 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_8 = 0;
__pyx_t_3 = 0;
__pyx_t_16 = 0;
- __pyx_t_16 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
- __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_3_sa_Scorer *)__pyx_cur_scope->__pyx_v_self->scorer->__pyx_vtab)->score(__pyx_cur_scope->__pyx_v_self->scorer, __pyx_t_16)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Scorer *)__pyx_cur_scope->__pyx_v_self->scorer->__pyx_vtab)->score(__pyx_cur_scope->__pyx_v_self->scorer, __pyx_t_16)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_scores));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_scores));
__Pyx_GIVEREF(__pyx_t_11);
- __pyx_cur_scope->__pyx_v_scores = ((struct __pyx_obj_3_sa_FeatureVector *)__pyx_t_11);
+ __pyx_cur_scope->__pyx_v_scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_t_11);
__pyx_t_11 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1159
- * self.online_ctx_lookup(f, e)))
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1164
+ * self.online_ctx_lookup(f, e, ctx_name)))
* # Phrase pair processed
* if self.online: # <<<<<<<<<<<<<<
* seen_phrases.add((f, e))
@@ -50858,14 +51637,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_9 = (__pyx_cur_scope->__pyx_v_self->online != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1160
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1165
* # Phrase pair processed
* if self.online:
* seen_phrases.add((f, e)) # <<<<<<<<<<<<<<
* yield Rule(self.category, f, e, scores, alignment)
*
*/
- __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_cur_scope->__pyx_v_f);
@@ -50873,22 +51652,22 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_e);
PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_cur_scope->__pyx_v_e);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e);
- __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_seen_phrases, ((PyObject *)__pyx_t_11)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_seen_phrases, ((PyObject *)__pyx_t_11)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
goto __pyx_L60;
}
__pyx_L60:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1161
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1166
* if self.online:
* seen_phrases.add((f, e))
* yield Rule(self.category, f, e, scores, alignment) # <<<<<<<<<<<<<<
*
* if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size:
*/
- __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->category); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->category); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_16 = PyTuple_New(5); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyTuple_New(5); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_11);
__Pyx_GIVEREF(__pyx_t_11);
@@ -50905,7 +51684,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_cur_scope->__pyx_v_alignment);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_alignment);
__pyx_t_11 = 0;
- __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Rule)), ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Rule)), ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
__pyx_r = __pyx_t_11;
@@ -50945,7 +51724,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_23 = __pyx_cur_scope->__pyx_t_7;
__pyx_t_24 = __pyx_cur_scope->__pyx_t_8;
__pyx_t_25 = __pyx_cur_scope->__pyx_t_9;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
@@ -50960,41 +51739,41 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L32:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1163
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1168
* yield Rule(self.category, f, e, scores, alignment)
*
* if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size: # <<<<<<<<<<<<<<
* for alt_id in range(len(fwords[i+spanlen])):
* new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path))
*/
- __pyx_t_23 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_23 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = (__pyx_t_23 < __pyx_cur_scope->__pyx_v_self->max_length);
if (__pyx_t_9) {
- __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_12 = PyNumber_Add(__pyx_t_10, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyNumber_Add(__pyx_t_10, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = __pyx_cur_scope->__pyx_v_fwords;
__Pyx_INCREF(__pyx_t_10);
- __pyx_t_23 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_23 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_23); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_23); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, __pyx_t_10, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, __pyx_t_10, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
if (__pyx_t_14) {
- __pyx_t_11 = PyNumber_Add(__pyx_cur_scope->__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyNumber_Add(__pyx_cur_scope->__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_28 = __pyx_t_27;
} else {
@@ -51006,45 +51785,45 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1164
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1169
*
* if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size:
* for alt_id in range(len(fwords[i+spanlen])): # <<<<<<<<<<<<<<
* new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path))
* num_subpatterns = arity
*/
- __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_10 = PyNumber_Add(__pyx_t_12, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyNumber_Add(__pyx_t_12, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fwords, __pyx_t_10); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fwords, __pyx_t_10); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_23 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_23 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_23; __pyx_t_21+=1) {
__pyx_cur_scope->__pyx_v_alt_id = __pyx_t_21;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1165
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1170
* if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size:
* for alt_id in range(len(fwords[i+spanlen])):
* new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path)) # <<<<<<<<<<<<<<
* num_subpatterns = arity
* if not is_shadow_path:
*/
- __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_11 = PyNumber_Add(__pyx_t_10, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyNumber_Add(__pyx_t_10, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt_id); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt_id); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_16 = PyNumber_Add(__pyx_cur_scope->__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyNumber_Add(__pyx_cur_scope->__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
- __pyx_t_18 = PyTuple_New(8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyTuple_New(8); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_12);
__Pyx_GIVEREF(__pyx_t_12);
@@ -51070,11 +51849,11 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_11 = 0;
__pyx_t_10 = 0;
__pyx_t_16 = 0;
- __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, ((PyObject *)__pyx_t_18)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, ((PyObject *)__pyx_t_18)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1166
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1171
* 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 # <<<<<<<<<<<<<<
@@ -51083,18 +51862,18 @@ 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":1167
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1172
* new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path))
* num_subpatterns = arity
* if not is_shadow_path: # <<<<<<<<<<<<<<
* num_subpatterns = num_subpatterns + 1
* if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks:
*/
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = ((!__pyx_t_14) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1168
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1173
* num_subpatterns = arity
* if not is_shadow_path:
* num_subpatterns = num_subpatterns + 1 # <<<<<<<<<<<<<<
@@ -51106,14 +51885,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L65:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1169
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1174
* if not is_shadow_path:
* num_subpatterns = num_subpatterns + 1
* if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks: # <<<<<<<<<<<<<<
* xcat = sym_setindex(self.category, arity+1)
* xnode = node.children[xcat]
*/
- __pyx_t_23 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_23 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = (((__pyx_t_23 + 1) < __pyx_cur_scope->__pyx_v_self->max_length) != 0);
if (__pyx_t_9) {
__pyx_t_14 = ((__pyx_cur_scope->__pyx_v_arity < __pyx_cur_scope->__pyx_v_self->max_nonterminals) != 0);
@@ -51129,25 +51908,25 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1170
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1175
* num_subpatterns = num_subpatterns + 1
* if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks:
* xcat = sym_setindex(self.category, arity+1) # <<<<<<<<<<<<<<
* xnode = node.children[xcat]
* # I put spanlen=1 below
*/
- __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));
+ __pyx_cur_scope->__pyx_v_xcat = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, (__pyx_cur_scope->__pyx_v_arity + 1));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1171
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1176
* if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks:
* xcat = sym_setindex(self.category, arity+1)
* xnode = node.children[xcat] # <<<<<<<<<<<<<<
* # I put spanlen=1 below
* key = tuple([self.min_gap_size, i, 1, pathlen])
*/
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s__children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_18, __pyx_cur_scope->__pyx_v_xcat, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_16) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_18, __pyx_cur_scope->__pyx_v_xcat, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_16) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_xnode);
@@ -51156,18 +51935,18 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_xnode = __pyx_t_16;
__pyx_t_16 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1173
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1178
* xnode = node.children[xcat]
* # I put spanlen=1 below
* key = tuple([self.min_gap_size, i, 1, pathlen]) # <<<<<<<<<<<<<<
* frontier_nodes = []
* if key in nodes_isteps_away_buffer:
*/
- __pyx_t_16 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
- __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_10 = PyList_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyList_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_16);
__Pyx_GIVEREF(__pyx_t_16);
@@ -51181,7 +51960,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pathlen);
__pyx_t_16 = 0;
__pyx_t_18 = 0;
- __pyx_t_18 = ((PyObject *)PyList_AsTuple(((PyObject*)__pyx_t_10))); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = ((PyObject *)PyList_AsTuple(((PyObject*)__pyx_t_10))); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_18));
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_key));
@@ -51190,14 +51969,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_key = ((PyObject*)__pyx_t_18);
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1174
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1179
* # I put spanlen=1 below
* key = tuple([self.min_gap_size, i, 1, pathlen])
* frontier_nodes = [] # <<<<<<<<<<<<<<
* if key in nodes_isteps_away_buffer:
* frontier_nodes = nodes_isteps_away_buffer[key]
*/
- __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_frontier_nodes);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_frontier_nodes);
@@ -51205,25 +51984,25 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_frontier_nodes = ((PyObject *)__pyx_t_18);
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1175
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1180
* key = tuple([self.min_gap_size, i, 1, pathlen])
* frontier_nodes = []
* if key in nodes_isteps_away_buffer: # <<<<<<<<<<<<<<
* frontier_nodes = nodes_isteps_away_buffer[key]
* else:
*/
- __pyx_t_14 = (__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_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = (__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_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = (__pyx_t_14 != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1176
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1181
* frontier_nodes = []
* if key in nodes_isteps_away_buffer:
* frontier_nodes = nodes_isteps_away_buffer[key] # <<<<<<<<<<<<<<
* else:
* frontier_nodes = self.get_all_nodes_isteps_away(self.min_gap_size, i, 1, pathlen, fwords, next_states, reachable_buffer)
*/
- __pyx_t_18 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer), ((PyObject *)__pyx_cur_scope->__pyx_v_key)); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer), ((PyObject *)__pyx_cur_scope->__pyx_v_key)); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_frontier_nodes);
__Pyx_DECREF(__pyx_cur_scope->__pyx_v_frontier_nodes);
@@ -51234,20 +52013,20 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1178
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1183
* frontier_nodes = nodes_isteps_away_buffer[key]
* else:
* frontier_nodes = self.get_all_nodes_isteps_away(self.min_gap_size, i, 1, pathlen, fwords, next_states, reachable_buffer) # <<<<<<<<<<<<<<
* nodes_isteps_away_buffer[key] = frontier_nodes
*
*/
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_128); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_129); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_16 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
- __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyTuple_New(7); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
@@ -51270,7 +52049,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_reachable_buffer));
__pyx_t_10 = 0;
__pyx_t_16 = 0;
- __pyx_t_16 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
@@ -51280,18 +52059,18 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_frontier_nodes = __pyx_t_16;
__pyx_t_16 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1179
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1184
* else:
* frontier_nodes = self.get_all_nodes_isteps_away(self.min_gap_size, i, 1, pathlen, fwords, next_states, reachable_buffer)
* nodes_isteps_away_buffer[key] = frontier_nodes # <<<<<<<<<<<<<<
*
* for i, alt, pathlen in frontier_nodes:
*/
- if (PyDict_SetItem(((PyObject *)__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer), ((PyObject *)__pyx_cur_scope->__pyx_v_key), __pyx_cur_scope->__pyx_v_frontier_nodes) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(((PyObject *)__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer), ((PyObject *)__pyx_cur_scope->__pyx_v_key), __pyx_cur_scope->__pyx_v_frontier_nodes) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L67:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1181
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1186
* nodes_isteps_away_buffer[key] = frontier_nodes
*
* for i, alt, pathlen in frontier_nodes: # <<<<<<<<<<<<<<
@@ -51302,7 +52081,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_16 = __pyx_cur_scope->__pyx_v_frontier_nodes; __Pyx_INCREF(__pyx_t_16); __pyx_t_23 = 0;
__pyx_t_22 = NULL;
} else {
- __pyx_t_23 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_frontier_nodes); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_23 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_frontier_nodes); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
__pyx_t_22 = Py_TYPE(__pyx_t_16)->tp_iternext;
}
@@ -51310,23 +52089,23 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (!__pyx_t_22 && PyList_CheckExact(__pyx_t_16)) {
if (__pyx_t_23 >= PyList_GET_SIZE(__pyx_t_16)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_11 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_23); __Pyx_INCREF(__pyx_t_11); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_23); __Pyx_INCREF(__pyx_t_11); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_11 = PySequence_ITEM(__pyx_t_16, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PySequence_ITEM(__pyx_t_16, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_22 && PyTuple_CheckExact(__pyx_t_16)) {
if (__pyx_t_23 >= PyTuple_GET_SIZE(__pyx_t_16)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_23); __Pyx_INCREF(__pyx_t_11); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_23); __Pyx_INCREF(__pyx_t_11); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_11 = PySequence_ITEM(__pyx_t_16, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PySequence_ITEM(__pyx_t_16, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_11 = __pyx_t_22(__pyx_t_16);
if (unlikely(!__pyx_t_11)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -51342,7 +52121,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (unlikely(size != 3)) {
if (size > 3) __Pyx_RaiseTooManyValuesError(3);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -51358,18 +52137,18 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(__pyx_t_12);
#else
- __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
#endif
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_20 = Py_TYPE(__pyx_t_3)->tp_iternext;
@@ -51379,7 +52158,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GOTREF(__pyx_t_10);
index = 2; __pyx_t_12 = __pyx_t_20(__pyx_t_3); if (unlikely(!__pyx_t_12)) goto __pyx_L70_unpacking_failed;
__Pyx_GOTREF(__pyx_t_12);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_3), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_3), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_20 = NULL;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L71_unpacking_done;
@@ -51387,12 +52166,12 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_20 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L71_unpacking_done:;
}
- __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_t_18); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_21 = __Pyx_PyInt_AsInt(__pyx_t_18); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_cur_scope->__pyx_v_i = __pyx_t_21;
__pyx_cur_scope->__pyx_v_alt = __pyx_t_7;
@@ -51402,40 +52181,40 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_pathlen = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1182
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1187
*
* for i, alt, pathlen in frontier_nodes:
* new_frontier.append((k, i, input_match + (i,), alt, pathlen, xnode, phrase +(xcat,), is_shadow_path)) # <<<<<<<<<<<<<<
* frontier = new_frontier
*
*/
- __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
__pyx_t_10 = 0;
- __pyx_t_10 = PyNumber_Add(__pyx_cur_scope->__pyx_v_input_match, ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyNumber_Add(__pyx_cur_scope->__pyx_v_input_match, ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
- __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_xcat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_xcat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyNumber_Add(__pyx_cur_scope->__pyx_v_phrase, ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Add(__pyx_cur_scope->__pyx_v_phrase, ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
__Pyx_GIVEREF(__pyx_t_11);
@@ -51461,7 +52240,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_10 = 0;
__pyx_t_18 = 0;
__pyx_t_3 = 0;
- __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, ((PyObject *)__pyx_t_8)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, ((PyObject *)__pyx_t_8)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
}
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
@@ -51475,7 +52254,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1183
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1188
* 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 # <<<<<<<<<<<<<<
@@ -51489,52 +52268,65 @@ 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":1186
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1191
*
* # Online rule extraction and scoring
* if self.online: # <<<<<<<<<<<<<<
+ * stats = self.online_stats[ctx_name]
* f_syms = tuple(word[0][0] for word in fwords)
- * for f, lex_i, lex_j in self.get_f_phrases(f_syms):
*/
__pyx_t_9 = (__pyx_cur_scope->__pyx_v_self->online != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1187
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1192
* # Online rule extraction and scoring
* if self.online:
+ * stats = self.online_stats[ctx_name] # <<<<<<<<<<<<<<
+ * f_syms = tuple(word[0][0] for word in fwords)
+ * for f, lex_i, lex_j in self.get_f_phrases(f_syms):
+ */
+ __pyx_t_15 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->online_stats, __pyx_cur_scope->__pyx_v_ctx_name); if (!__pyx_t_15) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ __pyx_cur_scope->__pyx_v_stats = __pyx_t_15;
+ __pyx_t_15 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1193
+ * if self.online:
+ * stats = self.online_stats[ctx_name]
* f_syms = tuple(word[0][0] for word in fwords) # <<<<<<<<<<<<<<
* for f, lex_i, lex_j in self.get_f_phrases(f_syms):
* spanlen = (lex_j - lex_i) + 1
*/
- __pyx_t_15 = __pyx_pf_3_sa_23HieroCachingRuleFactory_5input_2genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_2genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15);
__Pyx_GIVEREF(__pyx_t_15);
__pyx_t_15 = 0;
- __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
__Pyx_GIVEREF(__pyx_t_15);
__pyx_cur_scope->__pyx_v_f_syms = ((PyObject*)__pyx_t_15);
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1188
- * if self.online:
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1194
+ * stats = self.online_stats[ctx_name]
* f_syms = tuple(word[0][0] for word in fwords)
* for f, lex_i, lex_j in self.get_f_phrases(f_syms): # <<<<<<<<<<<<<<
* spanlen = (lex_j - lex_i) + 1
* if not sym_isvar(f[0]):
*/
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__get_f_phrases); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__get_f_phrases); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_syms));
PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_f_syms));
__Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_syms));
- __pyx_t_8 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
@@ -51542,7 +52334,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_t_16 = __pyx_t_8; __Pyx_INCREF(__pyx_t_16); __pyx_t_2 = 0;
__pyx_t_22 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
__pyx_t_22 = Py_TYPE(__pyx_t_16)->tp_iternext;
}
@@ -51551,23 +52343,23 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (!__pyx_t_22 && PyList_CheckExact(__pyx_t_16)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_16)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_16, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_16, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_22 && PyTuple_CheckExact(__pyx_t_16)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_16)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_16, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_16, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_8 = __pyx_t_22(__pyx_t_16);
if (unlikely(!__pyx_t_8)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -51583,7 +52375,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
if (unlikely(size != 3)) {
if (size > 3) __Pyx_RaiseTooManyValuesError(3);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -51599,18 +52391,18 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_18);
#else
- __pyx_t_15 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_18 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
#endif
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_10 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_20 = Py_TYPE(__pyx_t_10)->tp_iternext;
@@ -51620,7 +52412,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_GOTREF(__pyx_t_3);
index = 2; __pyx_t_18 = __pyx_t_20(__pyx_t_10); if (unlikely(!__pyx_t_18)) goto __pyx_L75_unpacking_failed;
__Pyx_GOTREF(__pyx_t_18);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_10), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_10), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_20 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L76_unpacking_done;
@@ -51628,7 +52420,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_20 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L76_unpacking_done:;
}
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f);
@@ -51647,16 +52439,16 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_lex_j = __pyx_t_18;
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1189
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1195
* f_syms = tuple(word[0][0] for word in fwords)
* for f, lex_i, lex_j in self.get_f_phrases(f_syms):
* spanlen = (lex_j - lex_i) + 1 # <<<<<<<<<<<<<<
* if not sym_isvar(f[0]):
* spanlen += 1
*/
- __pyx_t_8 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_lex_j, __pyx_cur_scope->__pyx_v_lex_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_lex_j, __pyx_cur_scope->__pyx_v_lex_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_18 = PyNumber_Add(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyNumber_Add(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_spanlen);
@@ -51665,28 +52457,28 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_spanlen = __pyx_t_18;
__pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1190
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1196
* for f, lex_i, lex_j in self.get_f_phrases(f_syms):
* spanlen = (lex_j - lex_i) + 1
* if not sym_isvar(f[0]): # <<<<<<<<<<<<<<
* spanlen += 1
* if not sym_isvar(f[1]):
*/
- __pyx_t_18 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_f, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_f, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_18); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_18); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_9 = ((!(__pyx_f_3_sa_sym_isvar(__pyx_t_7) != 0)) != 0);
+ __pyx_t_9 = ((!(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_7) != 0)) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1191
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1197
* spanlen = (lex_j - lex_i) + 1
* if not sym_isvar(f[0]):
* spanlen += 1 # <<<<<<<<<<<<<<
* if not sym_isvar(f[1]):
* spanlen += 1
*/
- __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_spanlen, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_spanlen, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_spanlen);
__Pyx_DECREF(__pyx_cur_scope->__pyx_v_spanlen);
@@ -51697,28 +52489,28 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L77:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1192
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1198
* if not sym_isvar(f[0]):
* spanlen += 1
* if not sym_isvar(f[1]): # <<<<<<<<<<<<<<
* spanlen += 1
- * for e in self.phrases_fe.get(f, ()):
+ * for e in stats.phrases_fe.get(f, ()):
*/
- __pyx_t_18 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_f, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_f, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_18) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_18); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_18); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_9 = ((!(__pyx_f_3_sa_sym_isvar(__pyx_t_7) != 0)) != 0);
+ __pyx_t_9 = ((!(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_7) != 0)) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1193
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1199
* spanlen += 1
* if not sym_isvar(f[1]):
* spanlen += 1 # <<<<<<<<<<<<<<
- * for e in self.phrases_fe.get(f, ()):
+ * for e in stats.phrases_fe.get(f, ()):
* if (f, e) not in seen_phrases:
*/
- __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_spanlen, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_spanlen, __pyx_int_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
__Pyx_GOTREF(__pyx_cur_scope->__pyx_v_spanlen);
__Pyx_DECREF(__pyx_cur_scope->__pyx_v_spanlen);
@@ -51729,57 +52521,60 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
}
__pyx_L78:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1194
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1200
* if not sym_isvar(f[1]):
* spanlen += 1
- * for e in self.phrases_fe.get(f, ()): # <<<<<<<<<<<<<<
+ * for e in stats.phrases_fe.get(f, ()): # <<<<<<<<<<<<<<
* if (f, e) not in seen_phrases:
* # Don't add multiple instances of the same phrase here
*/
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->phrases_fe, __pyx_n_s__get); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stats, __pyx_n_s__phrases_fe); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s__get); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
- PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_f);
+ PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_cur_scope->__pyx_v_f);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f);
__Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
- PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_empty_tuple));
+ PyTuple_SET_ITEM(__pyx_t_18, 1, ((PyObject *)__pyx_empty_tuple));
__Pyx_GIVEREF(((PyObject *)__pyx_empty_tuple));
- __pyx_t_3 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
- __pyx_t_8 = __pyx_t_3; __Pyx_INCREF(__pyx_t_8); __pyx_t_23 = 0;
+ __pyx_t_18 = __pyx_t_3; __Pyx_INCREF(__pyx_t_18); __pyx_t_23 = 0;
__pyx_t_29 = NULL;
} else {
- __pyx_t_23 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_29 = Py_TYPE(__pyx_t_8)->tp_iternext;
+ __pyx_t_23 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_29 = Py_TYPE(__pyx_t_18)->tp_iternext;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
for (;;) {
- if (!__pyx_t_29 && PyList_CheckExact(__pyx_t_8)) {
- if (__pyx_t_23 >= PyList_GET_SIZE(__pyx_t_8)) break;
+ if (!__pyx_t_29 && PyList_CheckExact(__pyx_t_18)) {
+ if (__pyx_t_23 >= PyList_GET_SIZE(__pyx_t_18)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_23); __Pyx_INCREF(__pyx_t_3); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_23); __Pyx_INCREF(__pyx_t_3); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_18, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- } else if (!__pyx_t_29 && PyTuple_CheckExact(__pyx_t_8)) {
- if (__pyx_t_23 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+ } else if (!__pyx_t_29 && PyTuple_CheckExact(__pyx_t_18)) {
+ if (__pyx_t_23 >= PyTuple_GET_SIZE(__pyx_t_18)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_23); __Pyx_INCREF(__pyx_t_3); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_23); __Pyx_INCREF(__pyx_t_3); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_18, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_3 = __pyx_t_29(__pyx_t_8);
+ __pyx_t_3 = __pyx_t_29(__pyx_t_18);
if (unlikely(!__pyx_t_3)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -51791,14 +52586,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__pyx_cur_scope->__pyx_v_e = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1195
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1201
* spanlen += 1
- * for e in self.phrases_fe.get(f, ()):
+ * for e in stats.phrases_fe.get(f, ()):
* if (f, e) not in seen_phrases: # <<<<<<<<<<<<<<
* # Don't add multiple instances of the same phrase here
* seen_phrases.add((f, e))
*/
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_f);
@@ -51806,19 +52601,19 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_e);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_e);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e);
- __pyx_t_9 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_cur_scope->__pyx_v_seen_phrases), Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_cur_scope->__pyx_v_seen_phrases), Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__pyx_t_14 = (__pyx_t_9 != 0);
if (__pyx_t_14) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1197
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1203
* if (f, e) not in seen_phrases:
* # Don't add multiple instances of the same phrase here
* seen_phrases.add((f, e)) # <<<<<<<<<<<<<<
* scores = self.scorer.score(FeatureContext(
* f, e, 0, 0, 0,
*/
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_f);
@@ -51826,29 +52621,29 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_e);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_e);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e);
- __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_seen_phrases, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_seen_phrases, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1198
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1204
* # Don't add multiple instances of the same phrase here
* seen_phrases.add((f, e))
* scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<<
* f, e, 0, 0, 0,
* spanlen, None, None,
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__FeatureContext); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__FeatureContext); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1203
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1209
* fwords, self.fda, self.eda,
* meta,
- * self.online_ctx_lookup(f, e))) # <<<<<<<<<<<<<<
- * alignment = self.phrases_al[f][e]
+ * self.online_ctx_lookup(f, e, ctx_name))) # <<<<<<<<<<<<<<
+ * alignment = stats.phrases_al[f][e]
* yield Rule(self.category, f, e, scores, alignment)
*/
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__online_ctx_lookup); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_18);
- __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__online_ctx_lookup); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_cur_scope->__pyx_v_f);
@@ -51856,11 +52651,14 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_e);
PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_cur_scope->__pyx_v_e);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e);
- __pyx_t_10 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ctx_name);
+ PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_cur_scope->__pyx_v_ctx_name);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ctx_name);
+ __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
- __pyx_t_15 = PyTuple_New(13); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(13); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_cur_scope->__pyx_v_f);
@@ -51901,73 +52699,76 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
PyTuple_SET_ITEM(__pyx_t_15, 12, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
__pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
- __pyx_t_15 = ((PyObject *)((struct __pyx_vtabstruct_3_sa_Scorer *)__pyx_cur_scope->__pyx_v_self->scorer->__pyx_vtab)->score(__pyx_cur_scope->__pyx_v_self->scorer, __pyx_t_10)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Scorer *)__pyx_cur_scope->__pyx_v_self->scorer->__pyx_vtab)->score(__pyx_cur_scope->__pyx_v_self->scorer, __pyx_t_10)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_scores));
__Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_scores));
__Pyx_GIVEREF(__pyx_t_15);
- __pyx_cur_scope->__pyx_v_scores = ((struct __pyx_obj_3_sa_FeatureVector *)__pyx_t_15);
+ __pyx_cur_scope->__pyx_v_scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_t_15);
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1204
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1210
* meta,
- * self.online_ctx_lookup(f, e)))
- * alignment = self.phrases_al[f][e] # <<<<<<<<<<<<<<
+ * self.online_ctx_lookup(f, e, ctx_name)))
+ * alignment = stats.phrases_al[f][e] # <<<<<<<<<<<<<<
* yield Rule(self.category, f, e, scores, alignment)
*
*/
- __pyx_t_15 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->phrases_al, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_15) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stats, __pyx_n_s__phrases_al); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_10 = PyObject_GetItem(__pyx_t_15, __pyx_cur_scope->__pyx_v_e); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetItem(__pyx_t_15, __pyx_cur_scope->__pyx_v_f); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = PyObject_GetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_e); if (!__pyx_t_15) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_alignment);
__Pyx_XDECREF(__pyx_cur_scope->__pyx_v_alignment);
- __Pyx_GIVEREF(__pyx_t_10);
- __pyx_cur_scope->__pyx_v_alignment = __pyx_t_10;
- __pyx_t_10 = 0;
+ __Pyx_GIVEREF(__pyx_t_15);
+ __pyx_cur_scope->__pyx_v_alignment = __pyx_t_15;
+ __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1205
- * self.online_ctx_lookup(f, e)))
- * alignment = self.phrases_al[f][e]
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1211
+ * self.online_ctx_lookup(f, e, ctx_name)))
+ * alignment = stats.phrases_al[f][e]
* yield Rule(self.category, f, e, scores, alignment) # <<<<<<<<<<<<<<
*
* stop_time = monitor_cpu()
*/
- __pyx_t_10 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->category); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_15 = PyTuple_New(5); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->category); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_10);
+ __pyx_t_10 = PyTuple_New(5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f);
- PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_cur_scope->__pyx_v_f);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_cur_scope->__pyx_v_f);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_e);
- PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_cur_scope->__pyx_v_e);
+ PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_cur_scope->__pyx_v_e);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_scores));
- PyTuple_SET_ITEM(__pyx_t_15, 3, ((PyObject *)__pyx_cur_scope->__pyx_v_scores));
+ PyTuple_SET_ITEM(__pyx_t_10, 3, ((PyObject *)__pyx_cur_scope->__pyx_v_scores));
__Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_scores));
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_alignment);
- PyTuple_SET_ITEM(__pyx_t_15, 4, __pyx_cur_scope->__pyx_v_alignment);
+ PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_cur_scope->__pyx_v_alignment);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_alignment);
- __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Rule)), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
- __pyx_r = __pyx_t_10;
- __pyx_t_10 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Rule)), ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
+ __pyx_r = __pyx_t_15;
+ __pyx_t_15 = 0;
__pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
- __Pyx_XGIVEREF(__pyx_t_8);
- __pyx_cur_scope->__pyx_t_3 = __pyx_t_8;
__Pyx_XGIVEREF(__pyx_t_16);
- __pyx_cur_scope->__pyx_t_4 = __pyx_t_16;
+ __pyx_cur_scope->__pyx_t_3 = __pyx_t_16;
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __pyx_cur_scope->__pyx_t_4 = __pyx_t_18;
__pyx_cur_scope->__pyx_t_10 = __pyx_t_22;
__pyx_cur_scope->__pyx_t_1 = __pyx_t_23;
__pyx_cur_scope->__pyx_t_11 = __pyx_t_29;
@@ -51978,146 +52779,146 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
return __pyx_r;
__pyx_L82_resume_from_yield:;
__pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
- __pyx_t_8 = __pyx_cur_scope->__pyx_t_3;
+ __pyx_t_16 = __pyx_cur_scope->__pyx_t_3;
__pyx_cur_scope->__pyx_t_3 = 0;
- __Pyx_XGOTREF(__pyx_t_8);
- __pyx_t_16 = __pyx_cur_scope->__pyx_t_4;
- __pyx_cur_scope->__pyx_t_4 = 0;
__Pyx_XGOTREF(__pyx_t_16);
+ __pyx_t_18 = __pyx_cur_scope->__pyx_t_4;
+ __pyx_cur_scope->__pyx_t_4 = 0;
+ __Pyx_XGOTREF(__pyx_t_18);
__pyx_t_22 = __pyx_cur_scope->__pyx_t_10;
__pyx_t_23 = __pyx_cur_scope->__pyx_t_1;
__pyx_t_29 = __pyx_cur_scope->__pyx_t_11;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L81;
}
__pyx_L81:;
}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
}
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
goto __pyx_L72;
}
__pyx_L72:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1207
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1213
* yield Rule(self.category, f, e, scores, alignment)
*
* stop_time = monitor_cpu() # <<<<<<<<<<<<<<
* logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time))
* gc.collect()
*/
- __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s__monitor_cpu); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
- __pyx_t_8 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_18 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_GIVEREF(__pyx_t_8);
- __pyx_cur_scope->__pyx_v_stop_time = __pyx_t_8;
- __pyx_t_8 = 0;
+ __Pyx_GIVEREF(__pyx_t_18);
+ __pyx_cur_scope->__pyx_v_stop_time = __pyx_t_18;
+ __pyx_t_18 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1208
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1214
*
* stop_time = monitor_cpu()
* logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time)) # <<<<<<<<<<<<<<
* gc.collect()
* logger.info(" Extract time = %f seconds", self.extract_time)
*/
- __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__info); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s__info); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_start_time); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_stop_time, __pyx_t_8); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_129));
- PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_kp_s_129));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_129));
- PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_10);
- __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __pyx_t_18 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_start_time); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_15 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_stop_time, __pyx_t_18); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_130));
+ PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_kp_s_130));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_130));
+ PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ __pyx_t_15 = 0;
+ __pyx_t_15 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1209
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1215
* stop_time = monitor_cpu()
* logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time))
* gc.collect() # <<<<<<<<<<<<<<
* logger.info(" Extract time = %f seconds", self.extract_time)
* logger.info(" Intersect time = %f seconds", self.intersect_time)
*/
- __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__gc); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__collect); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1210
+ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s__gc); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s__collect); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1216
* logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time))
* gc.collect()
* logger.info(" Extract time = %f seconds", self.extract_time) # <<<<<<<<<<<<<<
* logger.info(" Intersect time = %f seconds", self.intersect_time)
*
*/
- __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s__info); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_130));
- PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_kp_s_130));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_130));
- PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_10);
- __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_131));
+ PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_kp_s_131));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_131));
+ PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ __pyx_t_15 = 0;
+ __pyx_t_15 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1211
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1217
* gc.collect()
* logger.info(" Extract time = %f seconds", self.extract_time)
* logger.info(" Intersect time = %f seconds", self.intersect_time) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s__info); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s__info); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_16);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->intersect_time); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_131));
- PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_kp_s_131));
- __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_131));
- PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_10);
- __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->intersect_time); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_132));
+ PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_kp_s_132));
+ __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_132));
+ PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ __pyx_t_15 = 0;
+ __pyx_t_15 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_18), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
PyErr_SetNone(PyExc_StopIteration);
goto __pyx_L0;
__pyx_L1_error:;
@@ -52141,7 +52942,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1214
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1220
*
*
* cdef int find_fixpoint(self, # <<<<<<<<<<<<<<
@@ -52149,7 +52950,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_Gene
* int* f_links_low, int* f_links_high,
*/
-static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_f_low, PyObject *__pyx_v_f_high, int *__pyx_v_f_links_low, int *__pyx_v_f_links_high, int *__pyx_v_e_links_low, int *__pyx_v_e_links_high, int __pyx_v_e_in_low, int __pyx_v_e_in_high, int *__pyx_v_e_low, int *__pyx_v_e_high, int *__pyx_v_f_back_low, int *__pyx_v_f_back_high, int __pyx_v_f_sent_len, int __pyx_v_e_sent_len, int __pyx_v_max_f_len, int __pyx_v_max_e_len, int __pyx_v_min_fx_size, int __pyx_v_min_ex_size, int __pyx_v_max_new_x, int __pyx_v_allow_low_x, int __pyx_v_allow_high_x, int __pyx_v_allow_arbitrary_x, CYTHON_UNUSED int __pyx_v_write_log) {
+static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_f_low, PyObject *__pyx_v_f_high, int *__pyx_v_f_links_low, int *__pyx_v_f_links_high, int *__pyx_v_e_links_low, int *__pyx_v_e_links_high, int __pyx_v_e_in_low, int __pyx_v_e_in_high, int *__pyx_v_e_low, int *__pyx_v_e_high, int *__pyx_v_f_back_low, int *__pyx_v_f_back_high, int __pyx_v_f_sent_len, int __pyx_v_e_sent_len, int __pyx_v_max_f_len, int __pyx_v_max_e_len, int __pyx_v_min_fx_size, int __pyx_v_min_ex_size, int __pyx_v_max_new_x, int __pyx_v_allow_low_x, int __pyx_v_allow_high_x, int __pyx_v_allow_arbitrary_x, CYTHON_UNUSED int __pyx_v_write_log) {
int __pyx_v_e_low_prev;
int __pyx_v_e_high_prev;
int __pyx_v_f_low_prev;
@@ -52171,7 +52972,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":1229
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1235
* 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 # <<<<<<<<<<<<<<
@@ -52180,7 +52981,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":1230
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1236
*
* e_low[0] = e_in_low
* e_high[0] = e_in_high # <<<<<<<<<<<<<<
@@ -52189,19 +52990,19 @@ 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":1231
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1237
* e_low[0] = e_in_low
* e_high[0] = e_in_high
* self.find_projection(f_low, f_high, f_links_low, f_links_high, e_low, e_high) # <<<<<<<<<<<<<<
* if e_low[0] == -1:
* # low-priority corner case: if phrase w is unaligned,
*/
- __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_f_low, __pyx_t_1, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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 = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_f_low, __pyx_t_1, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1232
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1238
* 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: # <<<<<<<<<<<<<<
@@ -52211,7 +53012,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_3 = (((__pyx_v_e_low[0]) == -1) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1238
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1244
* # rule X -> X_1 w X_2 / X_1 X_2. This is probably
* # not worth the bother, though.
* return 0 # <<<<<<<<<<<<<<
@@ -52223,7 +53024,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":1239
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1245
* # not worth the bother, though.
* return 0
* elif e_in_low != -1 and e_low[0] != e_in_low: # <<<<<<<<<<<<<<
@@ -52239,7 +53040,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":1240
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1246
* return 0
* elif e_in_low != -1 and e_low[0] != e_in_low:
* if e_in_low - e_low[0] < min_ex_size: # <<<<<<<<<<<<<<
@@ -52249,7 +53050,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) != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1241
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1247
* 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 # <<<<<<<<<<<<<<
@@ -52258,7 +53059,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":1242
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1248
* if e_in_low - e_low[0] < min_ex_size:
* e_low[0] = e_in_low - min_ex_size
* if e_low[0] < 0: # <<<<<<<<<<<<<<
@@ -52268,7 +53069,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_5 = (((__pyx_v_e_low[0]) < 0) != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1243
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1249
* e_low[0] = e_in_low - min_ex_size
* if e_low[0] < 0:
* return 0 # <<<<<<<<<<<<<<
@@ -52287,7 +53088,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1245
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1251
* return 0
*
* if e_high[0] - e_low[0] > max_e_len: # <<<<<<<<<<<<<<
@@ -52297,7 +53098,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) != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1246
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1252
*
* if e_high[0] - e_low[0] > max_e_len:
* return 0 # <<<<<<<<<<<<<<
@@ -52309,7 +53110,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":1247
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1253
* if e_high[0] - e_low[0] > max_e_len:
* return 0
* elif e_in_high != -1 and e_high[0] != e_in_high: # <<<<<<<<<<<<<<
@@ -52325,7 +53126,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":1248
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1254
* return 0
* elif e_in_high != -1 and e_high[0] != e_in_high:
* if e_high[0] - e_in_high < min_ex_size: # <<<<<<<<<<<<<<
@@ -52335,7 +53136,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1249
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1255
* 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 # <<<<<<<<<<<<<<
@@ -52344,7 +53145,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":1250
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1256
* 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: # <<<<<<<<<<<<<<
@@ -52354,7 +53155,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1251
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1257
* e_high[0] = e_in_high + min_ex_size
* if e_high[0] > e_sent_len:
* return 0 # <<<<<<<<<<<<<<
@@ -52373,7 +53174,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1253
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1259
* return 0
*
* f_back_low[0] = -1 # <<<<<<<<<<<<<<
@@ -52382,7 +53183,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":1254
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1260
*
* f_back_low[0] = -1
* f_back_high[0] = -1 # <<<<<<<<<<<<<<
@@ -52391,7 +53192,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":1255
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1261
* f_back_low[0] = -1
* f_back_high[0] = -1
* f_low_prev = f_low # <<<<<<<<<<<<<<
@@ -52400,17 +53201,17 @@ 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":1256
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1262
* f_back_high[0] = -1
* f_low_prev = f_low
* f_high_prev = f_high # <<<<<<<<<<<<<<
* new_x = 0
* new_low_x = 0
*/
- __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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 = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_f_high_prev = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1257
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1263
* f_low_prev = f_low
* f_high_prev = f_high
* new_x = 0 # <<<<<<<<<<<<<<
@@ -52419,7 +53220,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":1258
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1264
* f_high_prev = f_high
* new_x = 0
* new_low_x = 0 # <<<<<<<<<<<<<<
@@ -52428,7 +53229,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":1259
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1265
* new_x = 0
* new_low_x = 0
* new_high_x = 0 # <<<<<<<<<<<<<<
@@ -52437,7 +53238,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":1261
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1267
* new_high_x = 0
*
* while True: # <<<<<<<<<<<<<<
@@ -52447,7 +53248,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":1263
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1269
* while True:
*
* if f_back_low[0] == -1: # <<<<<<<<<<<<<<
@@ -52457,45 +53258,45 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = (((__pyx_v_f_back_low[0]) == -1) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1264
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1270
*
* if f_back_low[0] == -1:
* self.find_projection(e_low[0], e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) # <<<<<<<<<<<<<<
* else:
* self.find_projection(e_low[0], e_low_prev, e_links_low, e_links_high, f_back_low, f_back_high)
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_e_low[0]), (__pyx_v_e_high[0]), __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_e_low[0]), (__pyx_v_e_high[0]), __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L11;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1266
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1272
* self.find_projection(e_low[0], e_high[0], e_links_low, e_links_high, f_back_low, f_back_high)
* else:
* self.find_projection(e_low[0], e_low_prev, e_links_low, e_links_high, f_back_low, f_back_high) # <<<<<<<<<<<<<<
* self.find_projection(e_high_prev, e_high[0], e_links_low, e_links_high, f_back_low, f_back_high)
*
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_e_low[0]), __pyx_v_e_low_prev, __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_e_low[0]), __pyx_v_e_low_prev, __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1267
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1273
* else:
* self.find_projection(e_low[0], e_low_prev, e_links_low, e_links_high, f_back_low, f_back_high)
* self.find_projection(e_high_prev, e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) # <<<<<<<<<<<<<<
*
* if f_back_low[0] > f_low:
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_e_high_prev, (__pyx_v_e_high[0]), __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_e_high_prev, (__pyx_v_e_high[0]), __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1269
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1275
* 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: # <<<<<<<<<<<<<<
@@ -52505,7 +53306,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1270
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1276
*
* if f_back_low[0] > f_low:
* f_back_low[0] = f_low # <<<<<<<<<<<<<<
@@ -52517,35 +53318,35 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L12:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1272
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1278
* f_back_low[0] = f_low
*
* if f_back_high[0] < f_high: # <<<<<<<<<<<<<<
* f_back_high[0] = f_high
*
*/
- __pyx_t_2 = PyInt_FromLong((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_v_f_high, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_v_f_high, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1273
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1279
*
* if f_back_high[0] < f_high:
* f_back_high[0] = f_high # <<<<<<<<<<<<<<
*
* if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev:
*/
- __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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 = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
(__pyx_v_f_back_high[0]) = __pyx_t_1;
goto __pyx_L13;
}
__pyx_L13:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1275
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1281
* f_back_high[0] = f_high
*
* if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev: # <<<<<<<<<<<<<<
@@ -52561,7 +53362,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":1276
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1282
*
* if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev:
* return 1 # <<<<<<<<<<<<<<
@@ -52574,7 +53375,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L14:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1278
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1284
* return 1
*
* if allow_low_x == 0 and f_back_low[0] < f_low: # <<<<<<<<<<<<<<
@@ -52590,7 +53391,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":1280
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1286
* if allow_low_x == 0 and f_back_low[0] < f_low:
* # FAIL: f phrase is not tight
* return 0 # <<<<<<<<<<<<<<
@@ -52603,7 +53404,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1282
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1288
* return 0
*
* if f_back_high[0] - f_back_low[0] > max_f_len: # <<<<<<<<<<<<<<
@@ -52613,7 +53414,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) != 0);
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1284
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1290
* if f_back_high[0] - f_back_low[0] > max_f_len:
* # FAIL: f back projection is too wide
* return 0 # <<<<<<<<<<<<<<
@@ -52626,7 +53427,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L16:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1286
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1292
* return 0
*
* if allow_high_x == 0 and f_back_high[0] > f_high: # <<<<<<<<<<<<<<
@@ -52635,11 +53436,11 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
*/
__pyx_t_5 = (__pyx_v_allow_high_x == 0);
if (__pyx_t_5) {
- __pyx_t_6 = PyInt_FromLong((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_f_high, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_f_high, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = __pyx_t_3;
} else {
@@ -52647,7 +53448,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":1288
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1294
* if allow_high_x == 0 and f_back_high[0] > f_high:
* # FAIL: extension on high side not allowed
* return 0 # <<<<<<<<<<<<<<
@@ -52660,7 +53461,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1290
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1296
* return 0
*
* if f_low != f_back_low[0]: # <<<<<<<<<<<<<<
@@ -52670,7 +53471,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])) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1291
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1297
*
* if f_low != f_back_low[0]:
* if new_low_x == 0: # <<<<<<<<<<<<<<
@@ -52680,7 +53481,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = ((__pyx_v_new_low_x == 0) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1292
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1298
* if f_low != f_back_low[0]:
* if new_low_x == 0:
* if new_x >= max_new_x: # <<<<<<<<<<<<<<
@@ -52690,7 +53491,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1294
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1300
* if new_x >= max_new_x:
* # FAIL: extension required on low side violates max # of gaps
* return 0 # <<<<<<<<<<<<<<
@@ -52703,7 +53504,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1296
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1302
* return 0
* else:
* new_x = new_x + 1 # <<<<<<<<<<<<<<
@@ -52712,7 +53513,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":1297
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1303
* else:
* new_x = new_x + 1
* new_low_x = 1 # <<<<<<<<<<<<<<
@@ -52726,7 +53527,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L19:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1298
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1304
* new_x = new_x + 1
* new_low_x = 1
* if f_low - f_back_low[0] < min_fx_size: # <<<<<<<<<<<<<<
@@ -52736,7 +53537,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1299
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1305
* new_low_x = 1
* if f_low - f_back_low[0] < min_fx_size:
* f_back_low[0] = f_low - min_fx_size # <<<<<<<<<<<<<<
@@ -52745,7 +53546,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":1300
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1306
* 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: # <<<<<<<<<<<<<<
@@ -52755,7 +53556,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1302
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1308
* if f_back_high[0] - f_back_low[0] > max_f_len:
* # FAIL: extension required on low side violates max initial length
* return 0 # <<<<<<<<<<<<<<
@@ -52768,7 +53569,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L22:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1303
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1309
* # FAIL: extension required on low side violates max initial length
* return 0
* if f_back_low[0] < 0: # <<<<<<<<<<<<<<
@@ -52778,7 +53579,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = (((__pyx_v_f_back_low[0]) < 0) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1305
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1311
* if f_back_low[0] < 0:
* # FAIL: extension required on low side violates sentence boundary
* return 0 # <<<<<<<<<<<<<<
@@ -52797,22 +53598,22 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L18:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1307
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1313
* return 0
*
* if f_high != f_back_high[0]: # <<<<<<<<<<<<<<
* if new_high_x == 0:
* if new_x >= max_new_x:
*/
- __pyx_t_2 = PyInt_FromLong((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyObject_RichCompare(__pyx_v_f_high, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_f_high, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1308
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1314
*
* if f_high != f_back_high[0]:
* if new_high_x == 0: # <<<<<<<<<<<<<<
@@ -52822,7 +53623,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_4 = ((__pyx_v_new_high_x == 0) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1309
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1315
* if f_high != f_back_high[0]:
* if new_high_x == 0:
* if new_x >= max_new_x: # <<<<<<<<<<<<<<
@@ -52832,7 +53633,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1311
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1317
* if new_x >= max_new_x:
* # FAIL: extension required on high side violates max # of gaps
* return 0 # <<<<<<<<<<<<<<
@@ -52845,7 +53646,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1313
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1319
* return 0
* else:
* new_x = new_x + 1 # <<<<<<<<<<<<<<
@@ -52854,7 +53655,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":1314
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1320
* else:
* new_x = new_x + 1
* new_high_x = 1 # <<<<<<<<<<<<<<
@@ -52868,44 +53669,44 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L25:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1315
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1321
* new_x = new_x + 1
* new_high_x = 1
* if f_back_high[0] - f_high < min_fx_size: # <<<<<<<<<<<<<<
* f_back_high[0] = f_high + min_fx_size
* if f_back_high[0] - f_back_low[0] > max_f_len:
*/
- __pyx_t_6 = PyInt_FromLong((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_v_f_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_v_f_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyInt_FromLong(__pyx_v_min_fx_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_min_fx_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1316
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1322
* new_high_x = 1
* if f_back_high[0] - f_high < min_fx_size:
* f_back_high[0] = f_high + min_fx_size # <<<<<<<<<<<<<<
* if f_back_high[0] - f_back_low[0] > max_f_len:
* # FAIL: extension required on high side violates max initial length
*/
- __pyx_t_7 = PyInt_FromLong(__pyx_v_min_fx_size); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyInt_FromLong(__pyx_v_min_fx_size); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = PyNumber_Add(__pyx_v_f_high, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Add(__pyx_v_f_high, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
(__pyx_v_f_back_high[0]) = __pyx_t_1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1317
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1323
* 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: # <<<<<<<<<<<<<<
@@ -52915,7 +53716,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1319
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1325
* if f_back_high[0] - f_back_low[0] > max_f_len:
* # FAIL: extension required on high side violates max initial length
* return 0 # <<<<<<<<<<<<<<
@@ -52928,7 +53729,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L28:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1320
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1326
* # FAIL: extension required on high side violates max initial length
* return 0
* if f_back_high[0] > f_sent_len: # <<<<<<<<<<<<<<
@@ -52938,7 +53739,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) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1322
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1328
* if f_back_high[0] > f_sent_len:
* # FAIL: extension required on high side violates sentence boundary
* return 0 # <<<<<<<<<<<<<<
@@ -52957,7 +53758,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1324
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1330
* return 0
*
* e_low_prev = e_low[0] # <<<<<<<<<<<<<<
@@ -52966,7 +53767,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":1325
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1331
*
* e_low_prev = e_low[0]
* e_high_prev = e_high[0] # <<<<<<<<<<<<<<
@@ -52975,29 +53776,29 @@ 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":1327
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1333
* e_high_prev = e_high[0]
*
* self.find_projection(f_back_low[0], f_low_prev, f_links_low, f_links_high, e_low, e_high) # <<<<<<<<<<<<<<
* self.find_projection(f_high_prev, f_back_high[0], f_links_low, f_links_high, e_low, e_high)
* if e_low[0] == e_low_prev and e_high[0] == e_high_prev:
*/
- __pyx_t_6 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_f_back_low[0]), __pyx_v_f_low_prev, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_f_back_low[0]), __pyx_v_f_low_prev, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1328
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1334
*
* self.find_projection(f_back_low[0], f_low_prev, f_links_low, f_links_high, e_low, e_high)
* self.find_projection(f_high_prev, f_back_high[0], f_links_low, f_links_high, e_low, e_high) # <<<<<<<<<<<<<<
* if e_low[0] == e_low_prev and e_high[0] == e_high_prev:
* return 1
*/
- __pyx_t_6 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_f_high_prev, (__pyx_v_f_back_high[0]), __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_f_high_prev, (__pyx_v_f_back_high[0]), __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1329
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1335
* 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: # <<<<<<<<<<<<<<
@@ -53013,7 +53814,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":1330
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1336
* 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 # <<<<<<<<<<<<<<
@@ -53026,7 +53827,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L30:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1331
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1337
* if e_low[0] == e_low_prev and e_high[0] == e_high_prev:
* return 1
* if allow_arbitrary_x == 0: # <<<<<<<<<<<<<<
@@ -53036,7 +53837,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__pyx_t_3 = ((__pyx_v_allow_arbitrary_x == 0) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1333
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1339
* if allow_arbitrary_x == 0:
* # FAIL: arbitrary expansion not permitted
* return 0 # <<<<<<<<<<<<<<
@@ -53049,7 +53850,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L31:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1334
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1340
* # FAIL: arbitrary expansion not permitted
* return 0
* if e_high[0] - e_low[0] > max_e_len: # <<<<<<<<<<<<<<
@@ -53059,7 +53860,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) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1336
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1342
* if e_high[0] - e_low[0] > max_e_len:
* # FAIL: re-projection violates sentence max phrase length
* return 0 # <<<<<<<<<<<<<<
@@ -53072,7 +53873,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
}
__pyx_L32:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1337
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1343
* # FAIL: re-projection violates sentence max phrase length
* return 0
* f_low_prev = f_back_low[0] # <<<<<<<<<<<<<<
@@ -53081,7 +53882,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":1338
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1344
* return 0
* f_low_prev = f_back_low[0]
* f_high_prev = f_back_high[0] # <<<<<<<<<<<<<<
@@ -53097,14 +53898,14 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_WriteUnraisable("_sa.HieroCachingRuleFactory.find_fixpoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_WriteUnraisable("cdec.sa._sa.HieroCachingRuleFactory.find_fixpoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1341
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1347
*
*
* cdef find_projection(self, int in_low, int in_high, int* in_links_low, int* in_links_high, # <<<<<<<<<<<<<<
@@ -53112,7 +53913,7 @@ static int __pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_obj
* cdef int i
*/
-static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_UNUSED struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_in_low, int __pyx_v_in_high, int *__pyx_v_in_links_low, int *__pyx_v_in_links_high, int *__pyx_v_out_low, int *__pyx_v_out_high) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_in_low, int __pyx_v_in_high, int *__pyx_v_in_links_low, int *__pyx_v_in_links_high, int *__pyx_v_out_low, int *__pyx_v_out_high) {
int __pyx_v_i;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -53122,7 +53923,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":1344
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1350
* int* out_low, int* out_high):
* cdef int i
* for i from in_low <= i < in_high: # <<<<<<<<<<<<<<
@@ -53132,7 +53933,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":1345
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1351
* cdef int i
* for i from in_low <= i < in_high:
* if in_links_low[i] != -1: # <<<<<<<<<<<<<<
@@ -53142,7 +53943,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
__pyx_t_2 = (((__pyx_v_in_links_low[__pyx_v_i]) != -1) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1346
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1352
* 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]: # <<<<<<<<<<<<<<
@@ -53158,7 +53959,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":1347
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1353
* 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] # <<<<<<<<<<<<<<
@@ -53170,7 +53971,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1348
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1354
* 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]: # <<<<<<<<<<<<<<
@@ -53186,7 +53987,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":1349
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1355
* 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] # <<<<<<<<<<<<<<
@@ -53208,7 +54009,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1352
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1358
*
*
* cdef int* int_arr_extend(self, int* arr, int* arr_len, int* data, int data_len): # <<<<<<<<<<<<<<
@@ -53216,13 +54017,13 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection(CYTHON_U
* new_len = arr_len[0] + data_len
*/
-static int *__pyx_f_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTHON_UNUSED struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, int *__pyx_v_arr, int *__pyx_v_arr_len, int *__pyx_v_data, int __pyx_v_data_len) {
+static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, int *__pyx_v_arr, int *__pyx_v_arr_len, int *__pyx_v_data, int __pyx_v_data_len) {
int __pyx_v_new_len;
int *__pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("int_arr_extend", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1354
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1360
* 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 # <<<<<<<<<<<<<<
@@ -53231,7 +54032,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":1355
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1361
* cdef int new_len
* new_len = arr_len[0] + data_len
* arr = <int*> realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -53240,7 +54041,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":1356
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1362
* 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)) # <<<<<<<<<<<<<<
@@ -53249,7 +54050,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":1357
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1363
* arr = <int*> realloc(arr, new_len*sizeof(int))
* memcpy(arr+arr_len[0], data, data_len*sizeof(int))
* arr_len[0] = new_len # <<<<<<<<<<<<<<
@@ -53258,7 +54059,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":1358
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1364
* memcpy(arr+arr_len[0], data, data_len*sizeof(int))
* arr_len[0] = new_len
* return arr # <<<<<<<<<<<<<<
@@ -53274,7 +54075,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":1361
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1367
*
*
* 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, # <<<<<<<<<<<<<<
@@ -53282,7 +54083,7 @@ static int *__pyx_f_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTHON_UNUSED
* int sent_id, int e_sent_len, int e_sent_start):
*/
-static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_e_low, int __pyx_v_e_high, int *__pyx_v_e_gap_low, int *__pyx_v_e_gap_high, int *__pyx_v_e_links_low, int __pyx_v_num_gaps, CYTHON_UNUSED int __pyx_v_f_low, CYTHON_UNUSED int __pyx_v_f_high, CYTHON_UNUSED int *__pyx_v_f_gap_low, CYTHON_UNUSED int *__pyx_v_f_gap_high, CYTHON_UNUSED int *__pyx_v_f_links_low, CYTHON_UNUSED int __pyx_v_sent_id, int __pyx_v_e_sent_len, int __pyx_v_e_sent_start) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrases(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, int __pyx_v_e_low, int __pyx_v_e_high, int *__pyx_v_e_gap_low, int *__pyx_v_e_gap_high, int *__pyx_v_e_links_low, int __pyx_v_num_gaps, CYTHON_UNUSED int __pyx_v_f_low, CYTHON_UNUSED int __pyx_v_f_high, CYTHON_UNUSED int *__pyx_v_f_gap_low, CYTHON_UNUSED int *__pyx_v_f_gap_high, CYTHON_UNUSED int *__pyx_v_f_links_low, CYTHON_UNUSED int __pyx_v_sent_id, int __pyx_v_e_sent_len, int __pyx_v_e_sent_start) {
int __pyx_v_i;
int __pyx_v_j;
int __pyx_v_k;
@@ -53299,9 +54100,9 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
int __pyx_v_len2;
int __pyx_v_step;
int __pyx_v_num_chunks;
- struct __pyx_obj_3_sa_IntList *__pyx_v_ephr_arr = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_ephr_arr = 0;
PyObject *__pyx_v_result = 0;
- struct __pyx_obj_3_sa_IntList *__pyx_v_indexes = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_indexes = 0;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -53319,19 +54120,19 @@ 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":1369
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1375
* cdef result
*
* result = [] # <<<<<<<<<<<<<<
* len1 = 0
* e_gaps1 = <int*> malloc(0)
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_result = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1370
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1376
*
* result = []
* len1 = 0 # <<<<<<<<<<<<<<
@@ -53340,7 +54141,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_len1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1371
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1377
* result = []
* len1 = 0
* e_gaps1 = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -53349,19 +54150,19 @@ 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":1372
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1378
* len1 = 0
* e_gaps1 = <int*> malloc(0)
* ephr_arr = IntList() # <<<<<<<<<<<<<<
*
* e_gap_order = <int*> malloc(num_gaps*sizeof(int))
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_v_ephr_arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_ephr_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1374
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1380
* ephr_arr = IntList()
*
* e_gap_order = <int*> malloc(num_gaps*sizeof(int)) # <<<<<<<<<<<<<<
@@ -53370,7 +54171,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":1375
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1381
*
* e_gap_order = <int*> malloc(num_gaps*sizeof(int))
* if num_gaps > 0: # <<<<<<<<<<<<<<
@@ -53380,7 +54181,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = ((__pyx_v_num_gaps > 0) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1376
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1382
* e_gap_order = <int*> malloc(num_gaps*sizeof(int))
* if num_gaps > 0:
* e_gap_order[0] = 0 # <<<<<<<<<<<<<<
@@ -53389,7 +54190,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":1377
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1383
* if num_gaps > 0:
* e_gap_order[0] = 0
* for i from 1 <= i < num_gaps: # <<<<<<<<<<<<<<
@@ -53399,7 +54200,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":1378
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1384
* e_gap_order[0] = 0
* for i from 1 <= i < num_gaps:
* for j from 0 <= j < i: # <<<<<<<<<<<<<<
@@ -53409,7 +54210,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":1379
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1385
* for i from 1 <= i < num_gaps:
* for j from 0 <= j < i:
* if e_gap_low[i] < e_gap_low[j]: # <<<<<<<<<<<<<<
@@ -53419,7 +54220,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])) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1380
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1386
* for j from 0 <= j < i:
* if e_gap_low[i] < e_gap_low[j]:
* for k from j <= k < i: # <<<<<<<<<<<<<<
@@ -53429,7 +54230,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":1381
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1387
* if e_gap_low[i] < e_gap_low[j]:
* for k from j <= k < i:
* e_gap_order[k+1] = e_gap_order[k] # <<<<<<<<<<<<<<
@@ -53439,7 +54240,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":1382
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1388
* for k from j <= k < i:
* e_gap_order[k+1] = e_gap_order[k]
* e_gap_order[j] = i # <<<<<<<<<<<<<<
@@ -53448,7 +54249,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":1383
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1389
* e_gap_order[k+1] = e_gap_order[k]
* e_gap_order[j] = i
* break # <<<<<<<<<<<<<<
@@ -53462,7 +54263,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1385
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1391
* break
* else:
* e_gap_order[i] = i # <<<<<<<<<<<<<<
@@ -53477,7 +54278,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1387
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1393
* e_gap_order[i] = i
*
* e_x_low = e_low # <<<<<<<<<<<<<<
@@ -53486,7 +54287,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":1388
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1394
*
* e_x_low = e_low
* e_x_high = e_high # <<<<<<<<<<<<<<
@@ -53495,7 +54296,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":1389
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1395
* e_x_low = e_low
* e_x_high = e_high
* if not self.tight_phrases: # <<<<<<<<<<<<<<
@@ -53505,7 +54306,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = ((!(__pyx_v_self->tight_phrases != 0)) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1390
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1396
* 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: # <<<<<<<<<<<<<<
@@ -53528,7 +54329,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":1391
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1397
* 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 # <<<<<<<<<<<<<<
@@ -53538,7 +54339,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":1392
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1398
* 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: # <<<<<<<<<<<<<<
@@ -53561,7 +54362,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":1393
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1399
* 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 # <<<<<<<<<<<<<<
@@ -53574,7 +54375,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L11:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1395
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1401
* e_x_high = e_x_high + 1
*
* for i from e_x_low <= i <= e_low: # <<<<<<<<<<<<<<
@@ -53584,17 +54385,17 @@ 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":1396
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1402
*
* for i from e_x_low <= i <= e_low:
* e_gaps1 = self.int_arr_extend(e_gaps1, &len1, &i, 1) # <<<<<<<<<<<<<<
*
* for i from 0 <= i < num_gaps:
*/
- __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);
+ __pyx_v_e_gaps1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps1, (&__pyx_v_len1), (&__pyx_v_i), 1);
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1398
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1404
* e_gaps1 = self.int_arr_extend(e_gaps1, &len1, &i, 1)
*
* for i from 0 <= i < num_gaps: # <<<<<<<<<<<<<<
@@ -53604,7 +54405,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":1399
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1405
*
* for i from 0 <= i < num_gaps:
* e_gaps2 = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -53613,7 +54414,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":1400
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1406
* for i from 0 <= i < num_gaps:
* e_gaps2 = <int*> malloc(0)
* len2 = 0 # <<<<<<<<<<<<<<
@@ -53622,7 +54423,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_len2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1402
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1408
* len2 = 0
*
* j = e_gap_order[i] # <<<<<<<<<<<<<<
@@ -53631,7 +54432,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":1403
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1409
*
* j = e_gap_order[i]
* e_x_gap_low = e_gap_low[j] # <<<<<<<<<<<<<<
@@ -53640,7 +54441,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":1404
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1410
* j = e_gap_order[i]
* e_x_gap_low = e_gap_low[j]
* e_x_gap_high = e_gap_high[j] # <<<<<<<<<<<<<<
@@ -53649,7 +54450,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":1405
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1411
* e_x_gap_low = e_gap_low[j]
* e_x_gap_high = e_gap_high[j]
* if not self.tight_phrases: # <<<<<<<<<<<<<<
@@ -53659,7 +54460,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = ((!(__pyx_v_self->tight_phrases != 0)) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1406
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1412
* 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: # <<<<<<<<<<<<<<
@@ -53676,7 +54477,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":1407
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1413
* 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 # <<<<<<<<<<<<<<
@@ -53686,7 +54487,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":1408
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1414
* 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: # <<<<<<<<<<<<<<
@@ -53703,7 +54504,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":1409
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1415
* 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 # <<<<<<<<<<<<<<
@@ -53716,7 +54517,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L20:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1411
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1417
* e_x_gap_high = e_x_gap_high + 1
*
* k = 0 # <<<<<<<<<<<<<<
@@ -53725,7 +54526,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_k = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1412
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1418
*
* k = 0
* step = 1+(i*2) # <<<<<<<<<<<<<<
@@ -53734,7 +54535,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":1413
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1419
* k = 0
* step = 1+(i*2)
* while k < len1: # <<<<<<<<<<<<<<
@@ -53745,7 +54546,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_6 = ((__pyx_v_k < __pyx_v_len1) != 0);
if (!__pyx_t_6) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1414
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1420
* step = 1+(i*2)
* while k < len1:
* for m from e_x_gap_low <= m <= e_gap_low[j]: # <<<<<<<<<<<<<<
@@ -53755,7 +54556,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":1415
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1421
* while k < len1:
* for m from e_x_gap_low <= m <= e_gap_low[j]:
* if m >= e_gaps1[k+step-1]: # <<<<<<<<<<<<<<
@@ -53765,7 +54566,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)])) != 0);
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1416
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1422
* 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: # <<<<<<<<<<<<<<
@@ -53775,7 +54576,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":1417
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1423
* 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 # <<<<<<<<<<<<<<
@@ -53785,32 +54586,32 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_6 = (((__pyx_v_n - __pyx_v_m) >= 1) != 0);
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1418
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1424
* 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) # <<<<<<<<<<<<<<
* e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &m, 1)
* e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1)
*/
- __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);
+ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (__pyx_v_e_gaps1 + __pyx_v_k), __pyx_v_step);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1419
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1425
* 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) # <<<<<<<<<<<<<<
* e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1)
* k = k + step
*/
- __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);
+ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (&__pyx_v_m), 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1420
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1426
* 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) # <<<<<<<<<<<<<<
* k = k + step
* free(e_gaps1)
*/
- __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_n), 1);
+ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (&__pyx_v_n), 1);
goto __pyx_L32;
}
__pyx_L32:;
@@ -53820,7 +54621,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_L29:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1421
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1427
* 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 # <<<<<<<<<<<<<<
@@ -53830,7 +54631,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":1422
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1428
* e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1)
* k = k + step
* free(e_gaps1) # <<<<<<<<<<<<<<
@@ -53839,7 +54640,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":1423
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1429
* k = k + step
* free(e_gaps1)
* e_gaps1 = e_gaps2 # <<<<<<<<<<<<<<
@@ -53848,7 +54649,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":1424
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1430
* free(e_gaps1)
* e_gaps1 = e_gaps2
* len1 = len2 # <<<<<<<<<<<<<<
@@ -53858,7 +54659,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":1426
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1432
* len1 = len2
*
* step = 1+(num_gaps*2) # <<<<<<<<<<<<<<
@@ -53867,7 +54668,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":1427
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1433
*
* step = 1+(num_gaps*2)
* e_gaps2 = <int*> malloc(0) # <<<<<<<<<<<<<<
@@ -53876,7 +54677,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":1428
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1434
* step = 1+(num_gaps*2)
* e_gaps2 = <int*> malloc(0)
* len2 = 0 # <<<<<<<<<<<<<<
@@ -53885,7 +54686,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_len2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1429
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1435
* e_gaps2 = <int*> malloc(0)
* len2 = 0
* for i from e_high <= i <= e_x_high: # <<<<<<<<<<<<<<
@@ -53895,7 +54696,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":1430
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1436
* len2 = 0
* for i from e_high <= i <= e_x_high:
* j = 0 # <<<<<<<<<<<<<<
@@ -53904,7 +54705,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_j = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1431
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1437
* for i from e_high <= i <= e_x_high:
* j = 0
* while j < len1: # <<<<<<<<<<<<<<
@@ -53915,7 +54716,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_6 = ((__pyx_v_j < __pyx_v_len1) != 0);
if (!__pyx_t_6) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1432
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1438
* j = 0
* while j < len1:
* if i - e_gaps1[j] <= self.train_max_initial_size and i >= e_gaps1[j+step-1]: # <<<<<<<<<<<<<<
@@ -53931,28 +54732,28 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1433
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1439
* 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) # <<<<<<<<<<<<<<
* e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &i, 1)
* j = j + step
*/
- __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);
+ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (__pyx_v_e_gaps1 + __pyx_v_j), __pyx_v_step);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1434
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1440
* 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) # <<<<<<<<<<<<<<
* j = j + step
* free(e_gaps1)
*/
- __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_i), 1);
+ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (&__pyx_v_i), 1);
goto __pyx_L37;
}
__pyx_L37:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1435
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1441
* 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 # <<<<<<<<<<<<<<
@@ -53963,7 +54764,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1436
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1442
* e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &i, 1)
* j = j + step
* free(e_gaps1) # <<<<<<<<<<<<<<
@@ -53972,7 +54773,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":1437
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1443
* j = j + step
* free(e_gaps1)
* e_gaps1 = e_gaps2 # <<<<<<<<<<<<<<
@@ -53981,7 +54782,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":1438
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1444
* free(e_gaps1)
* e_gaps1 = e_gaps2
* len1 = len2 # <<<<<<<<<<<<<<
@@ -53990,7 +54791,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":1440
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1446
* len1 = len2
*
* step = (num_gaps+1)*2 # <<<<<<<<<<<<<<
@@ -53999,7 +54800,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":1441
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1447
*
* step = (num_gaps+1)*2
* i = 0 # <<<<<<<<<<<<<<
@@ -54008,7 +54809,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_i = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1444
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1450
*
* cdef IntList indexes
* while i < len1: # <<<<<<<<<<<<<<
@@ -54019,16 +54820,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = ((__pyx_v_i < __pyx_v_len1) != 0);
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1445
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1451
* cdef IntList indexes
* while i < len1:
* ephr_arr._clear() # <<<<<<<<<<<<<<
* num_chunks = 0
* indexes = IntList()
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_clear(__pyx_v_ephr_arr);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_clear(__pyx_v_ephr_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1446
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1452
* while i < len1:
* ephr_arr._clear()
* num_chunks = 0 # <<<<<<<<<<<<<<
@@ -54037,20 +54838,20 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
*/
__pyx_v_num_chunks = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1447
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1453
* ephr_arr._clear()
* num_chunks = 0
* indexes = IntList() # <<<<<<<<<<<<<<
* for j from 0 <= j < num_gaps+1:
* if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]:
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF(((PyObject *)__pyx_v_indexes));
- __pyx_v_indexes = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_indexes = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1448
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1454
* num_chunks = 0
* indexes = IntList()
* for j from 0 <= j < num_gaps+1: # <<<<<<<<<<<<<<
@@ -54060,7 +54861,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":1449
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1455
* indexes = IntList()
* for j from 0 <= j < num_gaps+1:
* if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]: # <<<<<<<<<<<<<<
@@ -54070,7 +54871,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)])) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1450
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1456
* 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 # <<<<<<<<<<<<<<
@@ -54082,7 +54883,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
__pyx_L42:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1451
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1457
* 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]: # <<<<<<<<<<<<<<
@@ -54092,21 +54893,21 @@ 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":1452
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1458
* num_chunks = num_chunks + 1
* for k from e_gaps1[i+2*j] <= k < e_gaps1[i+(2*j)+1]:
* indexes.append(k) # <<<<<<<<<<<<<<
* ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]])
* if j < num_gaps:
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_indexes), __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_indexes), __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1453
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1459
* 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]]) # <<<<<<<<<<<<<<
@@ -54114,14 +54915,14 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
* indexes.append(sym_setindex(self.category, e_gap_order[j]+1))
*/
__pyx_t_4 = (__pyx_v_self->eda->data->arr[(__pyx_v_e_sent_start + __pyx_v_k)]);
- __pyx_t_10 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->eid2symid), __pyx_t_4, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->eid2symid), __pyx_t_4, sizeof(int), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_10) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_append(__pyx_v_ephr_arr, __pyx_t_4);
+ ((struct __pyx_vtabstruct_4cdec_2sa_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":1454
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1460
* indexes.append(k)
* ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]])
* if j < num_gaps: # <<<<<<<<<<<<<<
@@ -54131,34 +54932,34 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_t_2 = ((__pyx_v_j < __pyx_v_num_gaps) != 0);
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1455
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1461
* ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]])
* if j < num_gaps:
* indexes.append(sym_setindex(self.category, e_gap_order[j]+1)) # <<<<<<<<<<<<<<
* ephr_arr._append(sym_setindex(self.category, e_gap_order[j]+1))
* i = i + step
*/
- __pyx_t_10 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, ((__pyx_v_e_gap_order[__pyx_v_j]) + 1))); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, ((__pyx_v_e_gap_order[__pyx_v_j]) + 1))); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_indexes), __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_indexes), __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1456
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1462
* if j < num_gaps:
* indexes.append(sym_setindex(self.category, e_gap_order[j]+1))
* ephr_arr._append(sym_setindex(self.category, e_gap_order[j]+1)) # <<<<<<<<<<<<<<
* i = i + step
* if ephr_arr.len <= self.max_target_length and num_chunks <= self.max_target_chunks:
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_append(__pyx_v_ephr_arr, __pyx_f_3_sa_sym_setindex(__pyx_v_self->category, ((__pyx_v_e_gap_order[__pyx_v_j]) + 1)));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_append(__pyx_v_ephr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, ((__pyx_v_e_gap_order[__pyx_v_j]) + 1)));
goto __pyx_L45;
}
__pyx_L45:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1457
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1463
* 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 # <<<<<<<<<<<<<<
@@ -54167,7 +54968,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":1458
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1464
* 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: # <<<<<<<<<<<<<<
@@ -54183,22 +54984,22 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1459
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1465
* i = i + step
* if ephr_arr.len <= self.max_target_length and num_chunks <= self.max_target_chunks:
* result.append((Phrase(ephr_arr),indexes)) # <<<<<<<<<<<<<<
*
* free(e_gaps1)
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_ephr_arr));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_ephr_arr));
__Pyx_GIVEREF(((PyObject *)__pyx_v_ephr_arr));
- __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
@@ -54206,7 +55007,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_indexes));
__Pyx_GIVEREF(((PyObject *)__pyx_v_indexes));
__pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_result, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_result, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
@@ -54215,7 +55016,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_L46:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1461
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1467
* result.append((Phrase(ephr_arr),indexes))
*
* free(e_gaps1) # <<<<<<<<<<<<<<
@@ -54224,7 +55025,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":1462
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1468
*
* free(e_gaps1)
* free(e_gap_order) # <<<<<<<<<<<<<<
@@ -54233,7 +55034,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":1463
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1469
* free(e_gaps1)
* free(e_gap_order)
* return result # <<<<<<<<<<<<<<
@@ -54250,7 +55051,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.extract_phrases", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.extract_phrases", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_ephr_arr);
@@ -54261,7 +55062,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1465
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1471
* return result
*
* cdef IntList create_alignments(self, int* sent_links, int num_links, # <<<<<<<<<<<<<<
@@ -54269,13 +55070,13 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases(struct _
* cdef unsigned i
*/
-static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_create_alignments(CYTHON_UNUSED struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, int *__pyx_v_sent_links, int __pyx_v_num_links, struct __pyx_obj_3_sa_IntList *__pyx_v_findexes, struct __pyx_obj_3_sa_IntList *__pyx_v_eindexes) {
+static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_create_alignments(CYTHON_UNUSED struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, int *__pyx_v_sent_links, int __pyx_v_num_links, struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_findexes, struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_eindexes) {
unsigned int __pyx_v_i;
- struct __pyx_obj_3_sa_IntList *__pyx_v_ret = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_ret = 0;
int __pyx_v_s;
PyObject *__pyx_v_idx = NULL;
PyObject *__pyx_v_j = NULL;
- struct __pyx_obj_3_sa_IntList *__pyx_r = NULL;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
@@ -54289,19 +55090,19 @@ 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":1468
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1474
* IntList findexes, IntList eindexes):
* cdef unsigned i
* cdef IntList ret = IntList() # <<<<<<<<<<<<<<
* for i in range(findexes.len):
* s = findexes.arr[i]
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_v_ret = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_ret = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1469
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1475
* cdef unsigned i
* cdef IntList ret = IntList()
* for i in range(findexes.len): # <<<<<<<<<<<<<<
@@ -54312,7 +55113,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":1470
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1476
* cdef IntList ret = IntList()
* for i in range(findexes.len):
* s = findexes.arr[i] # <<<<<<<<<<<<<<
@@ -54321,7 +55122,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
*/
__pyx_v_s = (__pyx_v_findexes->arr[__pyx_v_i]);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1471
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1477
* for i in range(findexes.len):
* s = findexes.arr[i]
* if s < 0: continue # <<<<<<<<<<<<<<
@@ -54335,7 +55136,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":1472
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1478
* s = findexes.arr[i]
* if s < 0: continue
* idx = 0 # <<<<<<<<<<<<<<
@@ -54346,7 +55147,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":1473
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1479
* if s < 0: continue
* idx = 0
* while idx < num_links * 2: # <<<<<<<<<<<<<<
@@ -54354,46 +55155,46 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
* j = eindexes.index(sent_links[idx+1])
*/
while (1) {
- __pyx_t_1 = PyInt_FromLong((__pyx_v_num_links * 2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong((__pyx_v_num_links * 2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_idx, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_idx, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (!__pyx_t_4) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1474
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1480
* idx = 0
* while idx < num_links * 2:
* if sent_links[idx] == s: # <<<<<<<<<<<<<<
* j = eindexes.index(sent_links[idx+1])
* ret.append(i * ALIGNMENT_CODE + j)
*/
- __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = (((__pyx_v_sent_links[__pyx_t_6]) == __pyx_v_s) != 0);
if (__pyx_t_4) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1475
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1481
* while idx < num_links * 2:
* if sent_links[idx] == s:
* j = eindexes.index(sent_links[idx+1]) # <<<<<<<<<<<<<<
* ret.append(i * ALIGNMENT_CODE + j)
* idx += 2
*/
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_eindexes), __pyx_n_s__index); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_eindexes), __pyx_n_s__index); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = PyNumber_Add(__pyx_v_idx, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_v_idx, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromLong((__pyx_v_sent_links[__pyx_t_6])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong((__pyx_v_sent_links[__pyx_t_6])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
@@ -54401,19 +55202,19 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
__pyx_v_j = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1476
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1482
* if sent_links[idx] == s:
* j = eindexes.index(sent_links[idx+1])
* ret.append(i * ALIGNMENT_CODE + j) # <<<<<<<<<<<<<<
* idx += 2
* return ret
*/
- __pyx_t_1 = PyLong_FromUnsignedLong((__pyx_v_i * __pyx_v_3_sa_ALIGNMENT_CODE)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyLong_FromUnsignedLong((__pyx_v_i * __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyNumber_Add(__pyx_t_1, __pyx_v_j); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyNumber_Add(__pyx_t_1, __pyx_v_j); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_ret), __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_ret), __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -54421,14 +55222,14 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1477
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1483
* j = eindexes.index(sent_links[idx+1])
* ret.append(i * ALIGNMENT_CODE + j)
* idx += 2 # <<<<<<<<<<<<<<
* return ret
*
*/
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_idx, __pyx_int_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_idx, __pyx_int_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_v_idx);
__pyx_v_idx = __pyx_t_1;
@@ -54437,7 +55238,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":1478
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1484
* ret.append(i * ALIGNMENT_CODE + j)
* idx += 2
* return ret # <<<<<<<<<<<<<<
@@ -54449,13 +55250,13 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
__pyx_r = __pyx_v_ret;
goto __pyx_L0;
- __pyx_r = ((struct __pyx_obj_3_sa_IntList *)Py_None); __Pyx_INCREF(Py_None);
+ __pyx_r = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.create_alignments", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.create_alignments", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_ret);
@@ -54466,7 +55267,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":1480
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1486
* return ret
*
* cdef extract(self, Phrase phrase, Matching* matching, int* chunklen, int num_chunks): # <<<<<<<<<<<<<<
@@ -54474,7 +55275,7 @@ static struct __pyx_obj_3_sa_IntList *__pyx_f_3_sa_23HieroCachingRuleFactory_cre
* cdef int *f_gap_low, *f_gap_high, *e_gap_low, *e_gap_high, num_gaps, gap_start
*/
-static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_3_sa_Phrase *__pyx_v_phrase, struct __pyx_t_3_sa_Matching *__pyx_v_matching, int *__pyx_v_chunklen, int __pyx_v_num_chunks) {
+static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_phrase, struct __pyx_t_4cdec_2sa_3_sa_Matching *__pyx_v_matching, int *__pyx_v_chunklen, int __pyx_v_num_chunks) {
int *__pyx_v_sent_links;
int *__pyx_v_e_links_low;
int *__pyx_v_e_links_high;
@@ -54515,8 +55316,8 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
float __pyx_v_pair_count;
PyObject *__pyx_v_extracts = 0;
PyObject *__pyx_v_phrase_list = 0;
- struct __pyx_obj_3_sa_IntList *__pyx_v_fphr_arr = 0;
- struct __pyx_obj_3_sa_Phrase *__pyx_v_fphr = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_fphr_arr = 0;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_fphr = 0;
CYTHON_UNUSED PyObject *__pyx_v_reason_for_failure = 0;
PyObject *__pyx_v_sofar = NULL;
PyObject *__pyx_v_als = NULL;
@@ -54524,10 +55325,10 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
long __pyx_v_gap_error;
PyObject *__pyx_v_phrase2 = NULL;
PyObject *__pyx_v_eindexes = NULL;
- struct __pyx_obj_3_sa_IntList *__pyx_v_als1 = NULL;
- struct __pyx_obj_3_sa_IntList *__pyx_v_als2 = NULL;
- struct __pyx_obj_3_sa_IntList *__pyx_v_als3 = NULL;
- struct __pyx_obj_3_sa_IntList *__pyx_v_als4 = NULL;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_als1 = NULL;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_als2 = NULL;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_als3 = NULL;
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_v_als4 = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -54560,19 +55361,19 @@ 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":1493
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1499
* cdef reason_for_failure
*
* fphr_arr = IntList() # <<<<<<<<<<<<<<
* phrase_len = phrase.n
* extracts = []
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_v_fphr_arr = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1);
+ __pyx_v_fphr_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1494
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1500
*
* fphr_arr = IntList()
* phrase_len = phrase.n # <<<<<<<<<<<<<<
@@ -54582,28 +55383,28 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_2 = __pyx_v_phrase->n;
__pyx_v_phrase_len = __pyx_t_2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1495
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1501
* fphr_arr = IntList()
* phrase_len = phrase.n
* extracts = [] # <<<<<<<<<<<<<<
* sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links)
*
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_extracts = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1496
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1502
* phrase_len = phrase.n
* extracts = []
* sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links) # <<<<<<<<<<<<<<
*
* e_sent_start = self.eda.sent_index.arr[matching.sent_id]
*/
- __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));
+ __pyx_v_sent_links = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_self->alignment->__pyx_vtab)->_get_sent_links(__pyx_v_self->alignment, __pyx_v_matching->sent_id, (&__pyx_v_num_links));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1498
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1504
* sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links)
*
* e_sent_start = self.eda.sent_index.arr[matching.sent_id] # <<<<<<<<<<<<<<
@@ -54612,7 +55413,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":1499
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1505
*
* e_sent_start = self.eda.sent_index.arr[matching.sent_id]
* e_sent_end = self.eda.sent_index.arr[matching.sent_id+1] # <<<<<<<<<<<<<<
@@ -54621,7 +55422,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":1500
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1506
* 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 # <<<<<<<<<<<<<<
@@ -54630,7 +55431,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":1501
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1507
* 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] # <<<<<<<<<<<<<<
@@ -54639,7 +55440,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":1502
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1508
* 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] # <<<<<<<<<<<<<<
@@ -54648,7 +55449,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":1503
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1509
* 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 # <<<<<<<<<<<<<<
@@ -54657,21 +55458,21 @@ 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":1505
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1511
* f_sent_len = f_sent_end - f_sent_start - 1
*
* self.findexes1.reset() # <<<<<<<<<<<<<<
* sofar = 0
* for i in range(num_chunks):
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes1), __pyx_n_s__reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes1), __pyx_n_s__reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1506
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1512
*
* self.findexes1.reset()
* sofar = 0 # <<<<<<<<<<<<<<
@@ -54681,7 +55482,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":1507
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1513
* self.findexes1.reset()
* sofar = 0
* for i in range(num_chunks): # <<<<<<<<<<<<<<
@@ -54692,7 +55493,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1508
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1514
* sofar = 0
* for i in range(num_chunks):
* for j in range(chunklen[i]): # <<<<<<<<<<<<<<
@@ -54703,35 +55504,35 @@ 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":1509
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1515
* for i in range(num_chunks):
* for j in range(chunklen[i]):
* self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start); # <<<<<<<<<<<<<<
* sofar += 1
* if i+1 < num_chunks:
*/
- __pyx_t_3 = PyInt_FromLong((((__pyx_v_matching->arr[(__pyx_v_matching->start + __pyx_v_i)]) + __pyx_v_j) - __pyx_v_f_sent_start)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong((((__pyx_v_matching->arr[(__pyx_v_matching->start + __pyx_v_i)]) + __pyx_v_j) - __pyx_v_f_sent_start)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes1), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes1), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1510
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1516
* for j in range(chunklen[i]):
* self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start);
* sofar += 1 # <<<<<<<<<<<<<<
* if i+1 < num_chunks:
* self.findexes1.append(phrase[sofar])
*/
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sofar, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sofar, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_v_sofar);
__pyx_v_sofar = __pyx_t_1;
__pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1511
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1517
* self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start);
* sofar += 1
* if i+1 < num_chunks: # <<<<<<<<<<<<<<
@@ -54741,28 +55542,28 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = (((__pyx_v_i + 1) < __pyx_v_num_chunks) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1512
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1518
* sofar += 1
* if i+1 < num_chunks:
* self.findexes1.append(phrase[sofar]) # <<<<<<<<<<<<<<
* sofar += 1
*
*/
- __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_phrase), __pyx_v_sofar); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_phrase), __pyx_v_sofar); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes1), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes1), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1513
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1519
* if i+1 < num_chunks:
* self.findexes1.append(phrase[sofar])
* sofar += 1 # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sofar, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sofar, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_v_sofar);
__pyx_v_sofar = __pyx_t_3;
@@ -54772,7 +55573,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L7:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1516
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1522
*
*
* e_links_low = <int*> malloc(e_sent_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -54781,7 +55582,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":1517
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1523
*
* e_links_low = <int*> malloc(e_sent_len*sizeof(int))
* e_links_high = <int*> malloc(e_sent_len*sizeof(int)) # <<<<<<<<<<<<<<
@@ -54790,7 +55591,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":1518
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1524
* 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)) # <<<<<<<<<<<<<<
@@ -54799,7 +55600,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":1519
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1525
* 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)) # <<<<<<<<<<<<<<
@@ -54808,7 +55609,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":1520
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1526
* 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)) # <<<<<<<<<<<<<<
@@ -54817,7 +55618,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":1521
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1527
* 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)) # <<<<<<<<<<<<<<
@@ -54826,7 +55627,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":1522
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1528
* 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)) # <<<<<<<<<<<<<<
@@ -54835,7 +55636,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":1523
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1529
* 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)) # <<<<<<<<<<<<<<
@@ -54844,7 +55645,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":1524
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1530
* 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)) # <<<<<<<<<<<<<<
@@ -54853,7 +55654,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":1525
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1531
* 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)) # <<<<<<<<<<<<<<
@@ -54862,7 +55663,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":1526
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1532
* 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)) # <<<<<<<<<<<<<<
@@ -54871,7 +55672,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":1527
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1533
* 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)) # <<<<<<<<<<<<<<
@@ -54880,7 +55681,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":1529
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1535
* memset(e_gap_high, 0, (num_chunks+1)*sizeof(int))
*
* reason_for_failure = "" # <<<<<<<<<<<<<<
@@ -54890,7 +55691,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_INCREF(((PyObject *)__pyx_kp_s_47));
__pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_47);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1531
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1537
* reason_for_failure = ""
*
* for i from 0 <= i < e_sent_len: # <<<<<<<<<<<<<<
@@ -54900,7 +55701,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_2 = __pyx_v_e_sent_len;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1532
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1538
*
* for i from 0 <= i < e_sent_len:
* e_links_low[i] = -1 # <<<<<<<<<<<<<<
@@ -54909,7 +55710,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":1533
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1539
* for i from 0 <= i < e_sent_len:
* e_links_low[i] = -1
* e_links_high[i] = -1 # <<<<<<<<<<<<<<
@@ -54919,7 +55720,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":1534
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1540
* e_links_low[i] = -1
* e_links_high[i] = -1
* for i from 0 <= i < f_sent_len: # <<<<<<<<<<<<<<
@@ -54929,7 +55730,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_2 = __pyx_v_f_sent_len;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1535
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1541
* e_links_high[i] = -1
* for i from 0 <= i < f_sent_len:
* f_links_low[i] = -1 # <<<<<<<<<<<<<<
@@ -54938,7 +55739,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":1536
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1542
* for i from 0 <= i < f_sent_len:
* f_links_low[i] = -1
* f_links_high[i] = -1 # <<<<<<<<<<<<<<
@@ -54948,7 +55749,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":1542
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1548
* # links that we care about (but then how to look up
* # when we want to check something on the e side?)
* i = 0 # <<<<<<<<<<<<<<
@@ -54957,7 +55758,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":1543
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1549
* # when we want to check something on the e side?)
* i = 0
* while i < num_links*2: # <<<<<<<<<<<<<<
@@ -54968,7 +55769,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__pyx_v_i < (__pyx_v_num_links * 2)) != 0);
if (!__pyx_t_7) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1544
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1550
* i = 0
* while i < num_links*2:
* f_i = sent_links[i] # <<<<<<<<<<<<<<
@@ -54977,7 +55778,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":1545
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1551
* while i < num_links*2:
* f_i = sent_links[i]
* e_i = sent_links[i+1] # <<<<<<<<<<<<<<
@@ -54986,7 +55787,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":1546
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1552
* 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: # <<<<<<<<<<<<<<
@@ -55002,7 +55803,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":1547
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1553
* 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 # <<<<<<<<<<<<<<
@@ -55014,7 +55815,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L14:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1548
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1554
* 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: # <<<<<<<<<<<<<<
@@ -55030,7 +55831,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":1549
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1555
* 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 # <<<<<<<<<<<<<<
@@ -55042,7 +55843,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1550
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1556
* 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: # <<<<<<<<<<<<<<
@@ -55058,7 +55859,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":1551
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1557
* 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 # <<<<<<<<<<<<<<
@@ -55070,7 +55871,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L16:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1552
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1558
* 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: # <<<<<<<<<<<<<<
@@ -55086,7 +55887,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":1553
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1559
* 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 # <<<<<<<<<<<<<<
@@ -55098,7 +55899,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1554
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1560
* 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 # <<<<<<<<<<<<<<
@@ -55108,19 +55909,19 @@ 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":1556
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1562
* i = i + 2
*
* als = [] # <<<<<<<<<<<<<<
* for x in range(matching.start,matching.end):
* al = (matching.arr[x]-f_sent_start,f_links_low[matching.arr[x]-f_sent_start])
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_als = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1557
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1563
*
* als = []
* for x in range(matching.start,matching.end): # <<<<<<<<<<<<<<
@@ -55131,18 +55932,18 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
for (__pyx_t_4 = __pyx_v_matching->start; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) {
__pyx_v_x = __pyx_t_4;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1558
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1564
* als = []
* for x in range(matching.start,matching.end):
* al = (matching.arr[x]-f_sent_start,f_links_low[matching.arr[x]-f_sent_start]) # <<<<<<<<<<<<<<
* als.append(al)
* # check all source-side alignment constraints
*/
- __pyx_t_3 = PyInt_FromLong(((__pyx_v_matching->arr[__pyx_v_x]) - __pyx_v_f_sent_start)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(((__pyx_v_matching->arr[__pyx_v_x]) - __pyx_v_f_sent_start)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyInt_FromLong((__pyx_v_f_links_low[((__pyx_v_matching->arr[__pyx_v_x]) - __pyx_v_f_sent_start)])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong((__pyx_v_f_links_low[((__pyx_v_matching->arr[__pyx_v_x]) - __pyx_v_f_sent_start)])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyTuple_New(2); 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);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
@@ -55154,17 +55955,17 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_al = ((PyObject*)__pyx_t_10);
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1559
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1565
* for x in range(matching.start,matching.end):
* al = (matching.arr[x]-f_sent_start,f_links_low[matching.arr[x]-f_sent_start])
* als.append(al) # <<<<<<<<<<<<<<
* # check all source-side alignment constraints
* met_constraints = 1
*/
- __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_als, ((PyObject *)__pyx_v_al)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_als, ((PyObject *)__pyx_v_al)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1561
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1567
* als.append(al)
* # check all source-side alignment constraints
* met_constraints = 1 # <<<<<<<<<<<<<<
@@ -55173,7 +55974,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":1562
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1568
* # check all source-side alignment constraints
* met_constraints = 1
* if self.require_aligned_terminal: # <<<<<<<<<<<<<<
@@ -55183,7 +55984,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_self->require_aligned_terminal != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1563
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1569
* met_constraints = 1
* if self.require_aligned_terminal:
* num_aligned_chunks = 0 # <<<<<<<<<<<<<<
@@ -55192,7 +55993,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":1564
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1570
* if self.require_aligned_terminal:
* num_aligned_chunks = 0
* for i from 0 <= i < num_chunks: # <<<<<<<<<<<<<<
@@ -55202,7 +56003,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_2 = __pyx_v_num_chunks;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1565
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1571
* num_aligned_chunks = 0
* for i from 0 <= i < num_chunks:
* for j from 0 <= j < chunklen[i]: # <<<<<<<<<<<<<<
@@ -55212,7 +56013,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":1566
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1572
* 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: # <<<<<<<<<<<<<<
@@ -55222,7 +56023,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) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1567
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1573
* 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 # <<<<<<<<<<<<<<
@@ -55231,7 +56032,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":1568
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1574
* if f_links_low[matching.arr[matching.start+i]+j-f_sent_start] > -1:
* num_aligned_chunks = num_aligned_chunks + 1
* break # <<<<<<<<<<<<<<
@@ -55246,7 +56047,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_L24_break:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1569
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1575
* num_aligned_chunks = num_aligned_chunks + 1
* break
* if num_aligned_chunks == 0: # <<<<<<<<<<<<<<
@@ -55256,18 +56057,18 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_num_aligned_chunks == 0) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1570
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1576
* break
* if num_aligned_chunks == 0:
* reason_for_failure = "No aligned terminals" # <<<<<<<<<<<<<<
* met_constraints = 0
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks:
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_132));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_133));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_132);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_133);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1571
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1577
* if num_aligned_chunks == 0:
* reason_for_failure = "No aligned terminals"
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -55279,7 +56080,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L26:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1572
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1578
* reason_for_failure = "No aligned terminals"
* met_constraints = 0
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks: # <<<<<<<<<<<<<<
@@ -55294,18 +56095,18 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1573
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1579
* met_constraints = 0
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks:
* reason_for_failure = "Unaligned chunk" # <<<<<<<<<<<<<<
* met_constraints = 0
*
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_133));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_134));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_133);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_134);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1574
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1580
* if self.require_aligned_chunks and num_aligned_chunks < num_chunks:
* reason_for_failure = "Unaligned chunk"
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -55320,7 +56121,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L20:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1576
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1582
* met_constraints = 0
*
* if met_constraints and self.tight_phrases: # <<<<<<<<<<<<<<
@@ -55335,7 +56136,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":1578
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1584
* if met_constraints and self.tight_phrases:
* # outside edge constraints are checked later
* for i from 0 <= i < num_chunks-1: # <<<<<<<<<<<<<<
@@ -55345,7 +56146,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":1579
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1585
* # 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: # <<<<<<<<<<<<<<
@@ -55355,18 +56156,18 @@ 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) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1580
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1586
* for i from 0 <= i < num_chunks-1:
* if f_links_low[matching.arr[matching.start+i]+chunklen[i]-f_sent_start] == -1:
* reason_for_failure = "Gaps are not tight phrases" # <<<<<<<<<<<<<<
* met_constraints = 0
* break
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_134));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_135));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_134);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_135);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1581
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1587
* 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 # <<<<<<<<<<<<<<
@@ -55375,7 +56176,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":1582
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1588
* reason_for_failure = "Gaps are not tight phrases"
* met_constraints = 0
* break # <<<<<<<<<<<<<<
@@ -55387,7 +56188,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L31:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1583
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1589
* met_constraints = 0
* break
* if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1: # <<<<<<<<<<<<<<
@@ -55397,18 +56198,18 @@ 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) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1584
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1590
* break
* if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1:
* reason_for_failure = "Gaps are not tight phrases" # <<<<<<<<<<<<<<
* met_constraints = 0
* break
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_134));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_135));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_134);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_135);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1585
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1591
* 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 # <<<<<<<<<<<<<<
@@ -55417,7 +56218,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":1586
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1592
* reason_for_failure = "Gaps are not tight phrases"
* met_constraints = 0
* break # <<<<<<<<<<<<<<
@@ -55434,7 +56235,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L28:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1588
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1594
* break
*
* f_low = matching.arr[matching.start] - f_sent_start # <<<<<<<<<<<<<<
@@ -55443,7 +56244,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":1589
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1595
*
* 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 # <<<<<<<<<<<<<<
@@ -55452,7 +56253,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":1590
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1596
* 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: # <<<<<<<<<<<<<<
@@ -55462,28 +56263,28 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_met_constraints != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1592
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1598
* if met_constraints:
*
* if self.find_fixpoint(f_low, f_high, f_links_low, f_links_high, e_links_low, e_links_high, # <<<<<<<<<<<<<<
* -1, -1, &e_low, &e_high, &f_back_low, &f_back_high, f_sent_len, e_sent_len,
* self.train_max_initial_size, self.train_max_initial_size,
*/
- __pyx_t_10 = PyInt_FromLong(__pyx_v_f_high); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_v_f_high); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1596
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1602
* 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): # <<<<<<<<<<<<<<
* gap_error = 0
* num_gaps = 0
*/
- __pyx_t_9 = (((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_low, __pyx_t_10, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_links_low, __pyx_v_e_links_high, -1, -1, (&__pyx_v_e_low), (&__pyx_v_e_high), (&__pyx_v_f_back_low), (&__pyx_v_f_back_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, __pyx_v_self->train_min_gap_size, 0, ((__pyx_v_self->max_nonterminals - __pyx_v_num_chunks) + 1), 1, 1, 0, 0) != 0);
+ __pyx_t_9 = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_low, __pyx_t_10, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_links_low, __pyx_v_e_links_high, -1, -1, (&__pyx_v_e_low), (&__pyx_v_e_high), (&__pyx_v_f_back_low), (&__pyx_v_f_back_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, __pyx_v_self->train_min_gap_size, 0, ((__pyx_v_self->max_nonterminals - __pyx_v_num_chunks) + 1), 1, 1, 0, 0) != 0);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1597
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1603
* self.train_min_gap_size, 0,
* self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0):
* gap_error = 0 # <<<<<<<<<<<<<<
@@ -55492,7 +56293,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":1598
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1604
* self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0):
* gap_error = 0
* num_gaps = 0 # <<<<<<<<<<<<<<
@@ -55501,7 +56302,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":1600
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1606
* num_gaps = 0
*
* if f_back_low < f_low: # <<<<<<<<<<<<<<
@@ -55511,7 +56312,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_f_back_low < __pyx_v_f_low) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1601
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1607
*
* if f_back_low < f_low:
* f_gap_low[0] = f_back_low # <<<<<<<<<<<<<<
@@ -55520,7 +56321,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":1602
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1608
* if f_back_low < f_low:
* f_gap_low[0] = f_back_low
* f_gap_high[0] = f_low # <<<<<<<<<<<<<<
@@ -55529,7 +56330,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":1603
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1609
* f_gap_low[0] = f_back_low
* f_gap_high[0] = f_low
* num_gaps = 1 # <<<<<<<<<<<<<<
@@ -55538,7 +56339,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":1604
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1610
* f_gap_high[0] = f_low
* num_gaps = 1
* gap_start = 0 # <<<<<<<<<<<<<<
@@ -55547,7 +56348,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":1605
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1611
* num_gaps = 1
* gap_start = 0
* phrase_len = phrase_len+1 # <<<<<<<<<<<<<<
@@ -55556,7 +56357,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":1606
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1612
* gap_start = 0
* phrase_len = phrase_len+1
* if phrase_len > self.max_length: # <<<<<<<<<<<<<<
@@ -55566,7 +56367,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_phrase_len > __pyx_v_self->max_length) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1607
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1613
* phrase_len = phrase_len+1
* if phrase_len > self.max_length:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -55578,7 +56379,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L36:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1608
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1614
* if phrase_len > self.max_length:
* gap_error = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -55588,7 +56389,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_self->tight_phrases != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1609
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1615
* gap_error = 1
* if self.tight_phrases:
* if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1: # <<<<<<<<<<<<<<
@@ -55604,7 +56405,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":1610
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1616
* if self.tight_phrases:
* if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -55613,16 +56414,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_gap_error = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1611
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1617
* if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1:
* gap_error = 1
* reason_for_failure = "Inside edges of preceding subphrase are not tight" # <<<<<<<<<<<<<<
* else:
* gap_start = 1
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_135));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_136));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_135);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_136);
goto __pyx_L38;
}
__pyx_L38:;
@@ -55633,7 +56434,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1613
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1619
* reason_for_failure = "Inside edges of preceding subphrase are not tight"
* else:
* gap_start = 1 # <<<<<<<<<<<<<<
@@ -55642,7 +56443,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":1614
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1620
* else:
* gap_start = 1
* if self.tight_phrases and f_links_low[f_low] == -1: # <<<<<<<<<<<<<<
@@ -55657,7 +56458,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":1617
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1623
* # 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 # <<<<<<<<<<<<<<
@@ -55671,7 +56472,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L35:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1619
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1625
* met_constraints = 0
*
* for i from 0 <= i < matching.size - 1: # <<<<<<<<<<<<<<
@@ -55681,7 +56482,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":1620
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1626
*
* for i from 0 <= i < matching.size - 1:
* f_gap_low[1+i] = matching.arr[matching.start+i] + chunklen[i] - f_sent_start # <<<<<<<<<<<<<<
@@ -55690,7 +56491,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":1621
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1627
* 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 # <<<<<<<<<<<<<<
@@ -55699,7 +56500,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":1622
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1628
* 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 # <<<<<<<<<<<<<<
@@ -55709,7 +56510,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":1624
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1630
* num_gaps = num_gaps + 1
*
* if f_high < f_back_high: # <<<<<<<<<<<<<<
@@ -55719,7 +56520,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_f_high < __pyx_v_f_back_high) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1625
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1631
*
* if f_high < f_back_high:
* f_gap_low[gap_start+num_gaps] = f_high # <<<<<<<<<<<<<<
@@ -55728,7 +56529,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":1626
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1632
* 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 # <<<<<<<<<<<<<<
@@ -55737,7 +56538,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":1627
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1633
* f_gap_low[gap_start+num_gaps] = f_high
* f_gap_high[gap_start+num_gaps] = f_back_high
* num_gaps = num_gaps + 1 # <<<<<<<<<<<<<<
@@ -55746,7 +56547,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":1628
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1634
* f_gap_high[gap_start+num_gaps] = f_back_high
* num_gaps = num_gaps + 1
* phrase_len = phrase_len+1 # <<<<<<<<<<<<<<
@@ -55755,7 +56556,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":1629
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1635
* num_gaps = num_gaps + 1
* phrase_len = phrase_len+1
* if phrase_len > self.max_length: # <<<<<<<<<<<<<<
@@ -55765,7 +56566,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_phrase_len > __pyx_v_self->max_length) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1630
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1636
* phrase_len = phrase_len+1
* if phrase_len > self.max_length:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -55777,7 +56578,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L43:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1631
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1637
* if phrase_len > self.max_length:
* gap_error = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -55787,7 +56588,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_self->tight_phrases != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1632
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1638
* gap_error = 1
* if self.tight_phrases:
* if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1: # <<<<<<<<<<<<<<
@@ -55803,7 +56604,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":1633
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1639
* if self.tight_phrases:
* if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -55812,16 +56613,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_gap_error = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1634
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1640
* if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1:
* gap_error = 1
* reason_for_failure = "Inside edges of following subphrase are not tight" # <<<<<<<<<<<<<<
* else:
* if self.tight_phrases and f_links_low[f_high-1] == -1:
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_136));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_137));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_136);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_137);
goto __pyx_L45;
}
__pyx_L45:;
@@ -55832,7 +56633,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1636
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1642
* reason_for_failure = "Inside edges of following subphrase are not tight"
* else:
* if self.tight_phrases and f_links_low[f_high-1] == -1: # <<<<<<<<<<<<<<
@@ -55847,7 +56648,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":1637
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1643
* else:
* if self.tight_phrases and f_links_low[f_high-1] == -1:
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -55861,7 +56662,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L42:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1639
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1645
* met_constraints = 0
*
* if gap_error == 0: # <<<<<<<<<<<<<<
@@ -55871,7 +56672,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_gap_error == 0) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1640
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1646
*
* if gap_error == 0:
* e_word_count = e_high - e_low # <<<<<<<<<<<<<<
@@ -55880,7 +56681,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":1641
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1647
* if gap_error == 0:
* e_word_count = e_high - e_low
* for i from 0 <= i < num_gaps: # check integrity of subphrases # <<<<<<<<<<<<<<
@@ -55890,28 +56691,28 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_2 = __pyx_v_num_gaps;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1642
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1648
* e_word_count = e_high - e_low
* for i from 0 <= i < num_gaps: # check integrity of subphrases
* if self.find_fixpoint(f_gap_low[gap_start+i], f_gap_high[gap_start+i], # <<<<<<<<<<<<<<
* f_links_low, f_links_high, e_links_low, e_links_high,
* -1, -1, e_gap_low+gap_start+i, e_gap_high+gap_start+i,
*/
- __pyx_t_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 = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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 = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1647
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1653
* 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, # <<<<<<<<<<<<<<
* 0, 0, 0, 0, 0, 0, 0) == 0:
* gap_error = 1
*/
- __pyx_t_9 = ((((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, (__pyx_v_f_gap_low[(__pyx_v_gap_start + __pyx_v_i)]), __pyx_t_10, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_links_low, __pyx_v_e_links_high, -1, -1, ((__pyx_v_e_gap_low + __pyx_v_gap_start) + __pyx_v_i), ((__pyx_v_e_gap_high + __pyx_v_gap_start) + __pyx_v_i), ((__pyx_v_f_gap_low + __pyx_v_gap_start) + __pyx_v_i), ((__pyx_v_f_gap_high + __pyx_v_gap_start) + __pyx_v_i), __pyx_v_f_sent_len, __pyx_v_e_sent_len, __pyx_v_self->train_max_initial_size, __pyx_v_self->train_max_initial_size, 0, 0, 0, 0, 0, 0, 0) == 0) != 0);
+ __pyx_t_9 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, (__pyx_v_f_gap_low[(__pyx_v_gap_start + __pyx_v_i)]), __pyx_t_10, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_links_low, __pyx_v_e_links_high, -1, -1, ((__pyx_v_e_gap_low + __pyx_v_gap_start) + __pyx_v_i), ((__pyx_v_e_gap_high + __pyx_v_gap_start) + __pyx_v_i), ((__pyx_v_f_gap_low + __pyx_v_gap_start) + __pyx_v_i), ((__pyx_v_f_gap_high + __pyx_v_gap_start) + __pyx_v_i), __pyx_v_f_sent_len, __pyx_v_e_sent_len, __pyx_v_self->train_max_initial_size, __pyx_v_self->train_max_initial_size, 0, 0, 0, 0, 0, 0, 0) == 0) != 0);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1649
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1655
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0) == 0:
* gap_error = 1 # <<<<<<<<<<<<<<
@@ -55920,18 +56721,18 @@ 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":1650
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1656
* 0, 0, 0, 0, 0, 0, 0) == 0:
* gap_error = 1
* reason_for_failure = "Subphrase [%d, %d] failed integrity check" % (f_gap_low[gap_start+i], f_gap_high[gap_start+i]) # <<<<<<<<<<<<<<
* break
*
*/
- __pyx_t_10 = PyInt_FromLong((__pyx_v_f_gap_low[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong((__pyx_v_f_gap_low[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_1 = PyInt_FromLong((__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong((__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
@@ -55939,14 +56740,14 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_10 = 0;
__pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_137), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_138), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_v_reason_for_failure);
__pyx_v_reason_for_failure = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1651
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1657
* 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 # <<<<<<<<<<<<<<
@@ -55963,7 +56764,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L47:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1653
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1659
* break
*
* if gap_error == 0: # <<<<<<<<<<<<<<
@@ -55973,7 +56774,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_gap_error == 0) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1654
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1660
*
* if gap_error == 0:
* i = 1 # <<<<<<<<<<<<<<
@@ -55982,21 +56783,21 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1655
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1661
* if gap_error == 0:
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i))
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1656
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1662
* i = 1
* self.findexes.reset()
* if f_back_low < f_low: # <<<<<<<<<<<<<<
@@ -56006,16 +56807,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_f_back_low < __pyx_v_f_low) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1657
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1663
* self.findexes.reset()
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* i = i+1
* self.findexes.append(sym_setindex(self.category, i))
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1658
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1664
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -56024,16 +56825,16 @@ 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":1659
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1665
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
*/
- __pyx_t_3 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -56041,27 +56842,27 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L52:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1660
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1666
* i = i+1
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __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 = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self->findexes1));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->findexes1));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->findexes1));
- __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1661
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1667
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -56071,26 +56872,26 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_2 = __pyx_v_phrase->n;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1662
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1668
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1
*/
- __pyx_t_9 = (__pyx_f_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0);
+ __pyx_t_9 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1663
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1669
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* i = i + 1
* else:
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1664
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1670
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -56102,19 +56903,19 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1666
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1672
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i))
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, (__pyx_v_phrase->syms[__pyx_v_j]));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, (__pyx_v_phrase->syms[__pyx_v_j]));
}
__pyx_L55:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1667
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1673
* else:
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high: # <<<<<<<<<<<<<<
@@ -56124,25 +56925,25 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_f_back_high > __pyx_v_f_high) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1668
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1674
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* self.findexes.append(sym_setindex(self.category, i))
*
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1669
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1675
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
*
* fphr = Phrase(fphr_arr)
*/
- __pyx_t_10 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -56150,25 +56951,25 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L56:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1671
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1677
* self.findexes.append(sym_setindex(self.category, i))
*
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
* if met_constraints:
* phrase_list = self.extract_phrases(e_low, e_high, e_gap_low + gap_start, e_gap_high + gap_start, e_links_low, num_gaps,
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_fphr_arr));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_fphr_arr));
__Pyx_GIVEREF(((PyObject *)__pyx_v_fphr_arr));
- __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_v_fphr = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_10);
+ __pyx_v_fphr = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_10);
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1672
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1678
*
* fphr = Phrase(fphr_arr)
* if met_constraints: # <<<<<<<<<<<<<<
@@ -56178,37 +56979,37 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_met_constraints != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1675
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1681
* 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) # <<<<<<<<<<<<<<
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list)
*/
- __pyx_t_10 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_low, __pyx_v_e_high, (__pyx_v_e_gap_low + __pyx_v_gap_start), (__pyx_v_e_gap_high + __pyx_v_gap_start), __pyx_v_e_links_low, __pyx_v_num_gaps, __pyx_v_f_back_low, __pyx_v_f_back_high, (__pyx_v_f_gap_low + __pyx_v_gap_start), (__pyx_v_f_gap_high + __pyx_v_gap_start), __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_low, __pyx_v_e_high, (__pyx_v_e_gap_low + __pyx_v_gap_start), (__pyx_v_e_gap_high + __pyx_v_gap_start), __pyx_v_e_links_low, __pyx_v_num_gaps, __pyx_v_f_back_low, __pyx_v_f_back_high, (__pyx_v_f_gap_low + __pyx_v_gap_start), (__pyx_v_f_gap_high + __pyx_v_gap_start), __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__pyx_v_phrase_list = __pyx_t_10;
__pyx_t_10 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1676
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1682
* f_back_low, f_back_high, f_gap_low + gap_start, f_gap_high + gap_start, f_links_low,
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0: # <<<<<<<<<<<<<<
* pair_count = 1.0 / len(phrase_list)
* else:
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = ((__pyx_t_13 > 0) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1677
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1683
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
* else:
* pair_count = 0
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (unlikely(__pyx_t_13 == 0)) {
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
@@ -56217,14 +57018,14 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_pair_count = (1.0 / __pyx_t_13);
goto __pyx_L58;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1679
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1685
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -56233,22 +57034,22 @@ 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":1680
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1686
* else:
* pair_count = 0
* reason_for_failure = "Didn't extract anything from [%d, %d] -> [%d, %d]" % (f_back_low, f_back_high, e_low, e_high) # <<<<<<<<<<<<<<
* for phrase2, eindexes in phrase_list:
* als1 = self.create_alignments(sent_links,num_links,self.findexes,eindexes)
*/
- __pyx_t_10 = PyInt_FromLong(__pyx_v_f_back_low); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyInt_FromLong(__pyx_v_f_back_low); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = PyInt_FromLong(__pyx_v_f_back_high); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_f_back_high); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_e_low); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_e_low); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_14 = PyInt_FromLong(__pyx_v_e_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyInt_FromLong(__pyx_v_e_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_10);
@@ -56262,7 +57063,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_3 = 0;
__pyx_t_1 = 0;
__pyx_t_14 = 0;
- __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_138), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_139), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_14));
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_v_reason_for_failure);
@@ -56271,7 +57072,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L58:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1681
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1687
* 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: # <<<<<<<<<<<<<<
@@ -56282,7 +57083,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_14 = __pyx_v_phrase_list; __Pyx_INCREF(__pyx_t_14); __pyx_t_13 = 0;
__pyx_t_16 = NULL;
} else {
- __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__pyx_t_16 = Py_TYPE(__pyx_t_14)->tp_iternext;
}
@@ -56290,23 +57091,23 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_14)) {
if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_14)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_15 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_14)) {
if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_15 = __pyx_t_16(__pyx_t_14);
if (unlikely(!__pyx_t_15)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -56322,7 +57123,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -56335,16 +57136,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_3);
#else
- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
#endif
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_10 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__pyx_t_17 = Py_TYPE(__pyx_t_10)->tp_iternext;
@@ -56352,7 +57153,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_GOTREF(__pyx_t_1);
index = 1; __pyx_t_3 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L61_unpacking_failed;
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_17 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L62_unpacking_done;
@@ -56360,7 +57161,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_17 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L62_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_phrase2);
@@ -56370,7 +57171,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_eindexes = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1682
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1688
* 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) # <<<<<<<<<<<<<<
@@ -56379,32 +57180,32 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_t_15 = ((PyObject *)__pyx_v_self->findexes);
__Pyx_INCREF(__pyx_t_15);
- if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_3_sa_IntList *)__pyx_t_15), ((struct __pyx_obj_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_15), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_XDECREF(((PyObject *)__pyx_v_als1));
- __pyx_v_als1 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
+ __pyx_v_als1 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1683
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1689
* for phrase2, eindexes in phrase_list:
* als1 = self.create_alignments(sent_links,num_links,self.findexes,eindexes)
* extracts.append((fphr, phrase2, pair_count, tuple(als1))) # <<<<<<<<<<<<<<
* if (num_gaps < self.max_nonterminals and
* phrase_len < self.max_length and
*/
- __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_INCREF(((PyObject *)__pyx_v_als1));
PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_als1));
__Pyx_GIVEREF(((PyObject *)__pyx_v_als1));
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
- __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_INCREF(((PyObject *)__pyx_v_fphr));
PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_fphr));
@@ -56418,7 +57219,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_3 = 0;
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_extracts, ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_extracts, ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -56428,7 +57229,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L57:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1684
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1690
* als1 = self.create_alignments(sent_links,num_links,self.findexes,eindexes)
* extracts.append((fphr, phrase2, pair_count, tuple(als1)))
* if (num_gaps < self.max_nonterminals and # <<<<<<<<<<<<<<
@@ -56438,7 +57239,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_num_gaps < __pyx_v_self->max_nonterminals) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1685
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1691
* extracts.append((fphr, phrase2, pair_count, tuple(als1)))
* if (num_gaps < self.max_nonterminals and
* phrase_len < self.max_length and # <<<<<<<<<<<<<<
@@ -56448,7 +57249,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__pyx_v_phrase_len < __pyx_v_self->max_length) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1686
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1692
* 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): # <<<<<<<<<<<<<<
@@ -56466,7 +57267,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":1687
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1693
* 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 # <<<<<<<<<<<<<<
@@ -56476,7 +57277,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__pyx_v_f_back_low == __pyx_v_f_low) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1688
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1694
* 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 # <<<<<<<<<<<<<<
@@ -56486,7 +57287,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) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1689
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1695
* 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))): # <<<<<<<<<<<<<<
@@ -56516,7 +57317,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":1690
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1696
* 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 # <<<<<<<<<<<<<<
@@ -56525,7 +57326,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":1691
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1697
* ((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 # <<<<<<<<<<<<<<
@@ -56534,7 +57335,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":1692
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1698
* f_x_low = f_low-self.train_min_gap_size
* met_constraints = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -56544,7 +57345,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = (__pyx_v_self->tight_phrases != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1693
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1699
* met_constraints = 1
* if self.tight_phrases:
* while f_x_low >= 0 and f_links_low[f_x_low] == -1: # <<<<<<<<<<<<<<
@@ -56561,7 +57362,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":1694
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1700
* if self.tight_phrases:
* while f_x_low >= 0 and f_links_low[f_x_low] == -1:
* f_x_low = f_x_low - 1 # <<<<<<<<<<<<<<
@@ -56574,7 +57375,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L65:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1695
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1701
* 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: # <<<<<<<<<<<<<<
@@ -56590,7 +57391,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":1696
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1702
* 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 # <<<<<<<<<<<<<<
@@ -56602,7 +57403,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L68:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1698
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1704
* met_constraints = 0
*
* if (met_constraints and # <<<<<<<<<<<<<<
@@ -56611,28 +57412,28 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if ((__pyx_v_met_constraints != 0)) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1699
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1705
*
* if (met_constraints and
* (self.find_fixpoint(f_x_low, f_back_high, # <<<<<<<<<<<<<<
* f_links_low, f_links_high, e_links_low, e_links_high,
* e_low, e_high, &e_x_low, &e_x_high, &f_x_low, &f_x_high,
*/
- __pyx_t_14 = PyInt_FromLong(__pyx_v_f_back_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyInt_FromLong(__pyx_v_f_back_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1703
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1709
* 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, # <<<<<<<<<<<<<<
* 1, 1, 1, 1, 0, 1, 0) == 1) and
* ((not self.tight_phrases) or f_links_low[f_x_low] != -1) and
*/
- __pyx_t_7 = (((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) == 1);
+ __pyx_t_7 = (((struct __pyx_vtabstruct_4cdec_2sa_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) == 1);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1705
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1711
* self.train_max_initial_size, self.train_max_initial_size,
* 1, 1, 1, 1, 0, 1, 0) == 1) and
* ((not self.tight_phrases) or f_links_low[f_x_low] != -1) and # <<<<<<<<<<<<<<
@@ -56648,24 +57449,24 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1706
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1712
* 1, 1, 1, 1, 0, 1, 0) == 1) and
* ((not self.tight_phrases) or f_links_low[f_x_low] != -1) and
* self.find_fixpoint(f_x_low, f_low, # check integrity of new subphrase # <<<<<<<<<<<<<<
* f_links_low, f_links_high, e_links_low, e_links_high,
* -1, -1, e_gap_low, e_gap_high, f_gap_low, f_gap_high,
*/
- __pyx_t_14 = PyInt_FromLong(__pyx_v_f_low); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyInt_FromLong(__pyx_v_f_low); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1710
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1716
* -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, # <<<<<<<<<<<<<<
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
*/
- __pyx_t_18 = (((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, -1, -1, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_f_gap_low, __pyx_v_f_gap_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, 0, 0, 0, 0, 0, 0, 0) != 0);
+ __pyx_t_18 = (((struct __pyx_vtabstruct_4cdec_2sa_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, -1, -1, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_f_gap_low, __pyx_v_f_gap_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, 0, 0, 0, 0, 0, 0, 0) != 0);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
} else {
__pyx_t_18 = __pyx_t_8;
@@ -56680,16 +57481,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1712
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1718
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear() # <<<<<<<<<<<<<<
* i = 1
* self.findexes.reset()
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1713
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1719
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
* i = 1 # <<<<<<<<<<<<<<
@@ -56698,44 +57499,44 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1714
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1720
* fphr_arr._clear()
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i))
*/
- __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__reset); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__reset); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_1 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__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":1715
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1721
* i = 1
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_14 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1716
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1722
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* i = i+1
* self.findexes.extend(self.findexes1)
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1717
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1723
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -56744,27 +57545,27 @@ 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":1718
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1724
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
*/
- __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__extend); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__extend); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_self->findexes1));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->findexes1));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->findexes1));
- __pyx_t_15 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__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":1719
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1725
* i = i+1
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -56774,26 +57575,26 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_2 = __pyx_v_phrase->n;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1720
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1726
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1
*/
- __pyx_t_7 = (__pyx_f_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0);
+ __pyx_t_7 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1721
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1727
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* i = i + 1
* else:
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1722
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1728
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -56805,19 +57606,19 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1724
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1730
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i))
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, (__pyx_v_phrase->syms[__pyx_v_j]));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, (__pyx_v_phrase->syms[__pyx_v_j]));
}
__pyx_L72:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1725
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1731
* else:
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high: # <<<<<<<<<<<<<<
@@ -56827,25 +57628,25 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__pyx_v_f_back_high > __pyx_v_f_high) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1726
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1732
* fphr_arr._append(phrase.syms[j])
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr)
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1727
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1733
* if f_back_high > f_high:
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* fphr = Phrase(fphr_arr)
* phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+1,
*/
- __pyx_t_15 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -56853,57 +57654,57 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L73:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1728
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1734
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
* phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+1,
* f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low, matching.sent_id,
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_fphr_arr));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_fphr_arr));
__Pyx_GIVEREF(((PyObject *)__pyx_v_fphr_arr));
- __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_fphr));
- __pyx_v_fphr = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_15);
+ __pyx_v_fphr = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_15);
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1731
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1737
* 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) # <<<<<<<<<<<<<<
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list)
*/
- __pyx_t_15 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_e_links_low, (__pyx_v_num_gaps + 1), __pyx_v_f_x_low, __pyx_v_f_x_high, __pyx_v_f_gap_low, __pyx_v_f_gap_high, __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_e_links_low, (__pyx_v_num_gaps + 1), __pyx_v_f_x_low, __pyx_v_f_x_high, __pyx_v_f_gap_low, __pyx_v_f_gap_high, __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_XDECREF(__pyx_v_phrase_list);
__pyx_v_phrase_list = __pyx_t_15;
__pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1732
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1738
* f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low, matching.sent_id,
* e_sent_len, e_sent_start)
* if len(phrase_list) > 0: # <<<<<<<<<<<<<<
* pair_count = 1.0 / len(phrase_list)
* else:
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_7 = ((__pyx_t_13 > 0) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1733
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1739
* e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
* else:
* pair_count = 0
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (unlikely(__pyx_t_13 == 0)) {
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
@@ -56912,14 +57713,14 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_pair_count = (1.0 / __pyx_t_13);
goto __pyx_L74;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1735
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1741
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -56930,7 +57731,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L74:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1736
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1742
* else:
* pair_count = 0
* for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<<
@@ -56941,7 +57742,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_15 = __pyx_v_phrase_list; __Pyx_INCREF(__pyx_t_15); __pyx_t_13 = 0;
__pyx_t_16 = NULL;
} else {
- __pyx_t_13 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext;
}
@@ -56949,23 +57750,23 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_15)) {
if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_15)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_15)) {
if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_1 = __pyx_t_16(__pyx_t_15);
if (unlikely(!__pyx_t_1)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -56981,7 +57782,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -56994,16 +57795,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_INCREF(__pyx_t_14);
__Pyx_INCREF(__pyx_t_3);
#else
- __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
#endif
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_17 = Py_TYPE(__pyx_t_10)->tp_iternext;
@@ -57011,7 +57812,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_GOTREF(__pyx_t_14);
index = 1; __pyx_t_3 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L77_unpacking_failed;
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_17 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L78_unpacking_done;
@@ -57019,7 +57820,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_17 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L78_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_phrase2);
@@ -57029,7 +57830,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_eindexes = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1737
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1743
* pair_count = 0
* for phrase2, eindexes in phrase_list:
* als2 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<<
@@ -57038,32 +57839,32 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_t_1 = ((PyObject *)__pyx_v_self->findexes);
__Pyx_INCREF(__pyx_t_1);
- if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_3_sa_IntList *)__pyx_t_1), ((struct __pyx_obj_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(((PyObject *)__pyx_v_als2));
- __pyx_v_als2 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
+ __pyx_v_als2 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1738
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1744
* for phrase2, eindexes in phrase_list:
* als2 = self.create_alignments(sent_links,num_links,self.findexes,eindexes)
* extracts.append((fphr, phrase2, pair_count, tuple(als2))) # <<<<<<<<<<<<<<
*
* if (f_back_high == f_high and
*/
- __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_als2));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_als2));
__Pyx_GIVEREF(((PyObject *)__pyx_v_als2));
- __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_fphr));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_fphr));
@@ -57077,7 +57878,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_GIVEREF(__pyx_t_14);
__pyx_t_3 = 0;
__pyx_t_14 = 0;
- __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_extracts, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_extracts, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
@@ -57090,7 +57891,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L64:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1740
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1746
* extracts.append((fphr, phrase2, pair_count, tuple(als2)))
*
* if (f_back_high == f_high and # <<<<<<<<<<<<<<
@@ -57100,7 +57901,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__pyx_v_f_back_high == __pyx_v_f_high) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1741
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1747
*
* if (f_back_high == f_high and
* f_sent_len - f_high >= self.train_min_gap_size and # <<<<<<<<<<<<<<
@@ -57110,7 +57911,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_8 = (((__pyx_v_f_sent_len - __pyx_v_f_high) >= __pyx_v_self->train_min_gap_size) != 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1742
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1748
* 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))): # <<<<<<<<<<<<<<
@@ -57140,7 +57941,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":1743
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1749
* 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 # <<<<<<<<<<<<<<
@@ -57149,7 +57950,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":1744
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1750
* ((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 # <<<<<<<<<<<<<<
@@ -57158,7 +57959,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":1745
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1751
* f_x_high = f_high+self.train_min_gap_size
* met_constraints = 1
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -57168,7 +57969,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_8 = (__pyx_v_self->tight_phrases != 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1746
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1752
* met_constraints = 1
* if self.tight_phrases:
* while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: # <<<<<<<<<<<<<<
@@ -57185,7 +57986,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":1747
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1753
* 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 # <<<<<<<<<<<<<<
@@ -57198,7 +57999,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L80:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1748
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1754
* 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: # <<<<<<<<<<<<<<
@@ -57214,7 +58015,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":1749
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1755
* 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 # <<<<<<<<<<<<<<
@@ -57226,7 +58027,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L83:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1751
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1757
* met_constraints = 0
*
* if (met_constraints and # <<<<<<<<<<<<<<
@@ -57235,27 +58036,27 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if ((__pyx_v_met_constraints != 0)) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1752
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1758
*
* if (met_constraints and
* self.find_fixpoint(f_back_low, f_x_high, # <<<<<<<<<<<<<<
* f_links_low, f_links_high, e_links_low, e_links_high,
* e_low, e_high, &e_x_low, &e_x_high, &f_x_low, &f_x_high,
*/
- __pyx_t_15 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1756
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1762
* 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, # <<<<<<<<<<<<<<
* 1, 1, 1, 0, 1, 1, 0) and
* ((not self.tight_phrases) or f_links_low[f_x_high-1] != -1) and
*/
- 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) != 0)) {
+ if ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_back_low, __pyx_t_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) != 0)) {
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1758
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1764
* 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 # <<<<<<<<<<<<<<
@@ -57271,31 +58072,31 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1759
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1765
* 1, 1, 1, 0, 1, 1, 0) and
* ((not self.tight_phrases) or f_links_low[f_x_high-1] != -1) and
* self.find_fixpoint(f_high, f_x_high, # <<<<<<<<<<<<<<
* f_links_low, f_links_high, e_links_low, e_links_high,
* -1, -1, e_gap_low+gap_start+num_gaps, e_gap_high+gap_start+num_gaps,
*/
- __pyx_t_14 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1764
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1770
* 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, # <<<<<<<<<<<<<<
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
*/
- __pyx_t_7 = (((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_high, __pyx_t_14, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_links_low, __pyx_v_e_links_high, -1, -1, ((__pyx_v_e_gap_low + __pyx_v_gap_start) + __pyx_v_num_gaps), ((__pyx_v_e_gap_high + __pyx_v_gap_start) + __pyx_v_num_gaps), ((__pyx_v_f_gap_low + __pyx_v_gap_start) + __pyx_v_num_gaps), ((__pyx_v_f_gap_high + __pyx_v_gap_start) + __pyx_v_num_gaps), __pyx_v_f_sent_len, __pyx_v_e_sent_len, __pyx_v_self->train_max_initial_size, __pyx_v_self->train_max_initial_size, 0, 0, 0, 0, 0, 0, 0) != 0);
+ __pyx_t_7 = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_high, __pyx_t_14, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_links_low, __pyx_v_e_links_high, -1, -1, ((__pyx_v_e_gap_low + __pyx_v_gap_start) + __pyx_v_num_gaps), ((__pyx_v_e_gap_high + __pyx_v_gap_start) + __pyx_v_num_gaps), ((__pyx_v_f_gap_low + __pyx_v_gap_start) + __pyx_v_num_gaps), ((__pyx_v_f_gap_high + __pyx_v_gap_start) + __pyx_v_num_gaps), __pyx_v_f_sent_len, __pyx_v_e_sent_len, __pyx_v_self->train_max_initial_size, __pyx_v_self->train_max_initial_size, 0, 0, 0, 0, 0, 0, 0) != 0);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
} else {
__pyx_t_7 = __pyx_t_8;
}
__pyx_t_8 = __pyx_t_7;
} else {
- __pyx_t_8 = (((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) != 0);
+ __pyx_t_8 = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_back_low, __pyx_t_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) != 0);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
}
__pyx_t_7 = __pyx_t_8;
@@ -57304,16 +58105,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1766
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1772
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear() # <<<<<<<<<<<<<<
* i = 1
* self.findexes.reset()
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1767
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1773
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
* i = 1 # <<<<<<<<<<<<<<
@@ -57322,21 +58123,21 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1768
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1774
* fphr_arr._clear()
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i))
*/
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__reset); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__reset); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__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":1769
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1775
* i = 1
* self.findexes.reset()
* if f_back_low < f_low: # <<<<<<<<<<<<<<
@@ -57346,16 +58147,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_7 = ((__pyx_v_f_back_low < __pyx_v_f_low) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1770
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1776
* self.findexes.reset()
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* i = i+1
* self.findexes.append(sym_setindex(self.category, i))
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1771
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1777
* if f_back_low < f_low:
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -57364,16 +58165,16 @@ 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":1772
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1778
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
*/
- __pyx_t_14 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_15 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
@@ -57381,27 +58182,27 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L85:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1773
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1779
* i = i+1
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
*/
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__extend); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__extend); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_INCREF(((PyObject *)__pyx_v_self->findexes1));
PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_v_self->findexes1));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->findexes1));
- __pyx_t_1 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__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":1774
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1780
* self.findexes.append(sym_setindex(self.category, i))
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -57411,26 +58212,26 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_2 = __pyx_v_phrase->n;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1775
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1781
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1
*/
- __pyx_t_7 = (__pyx_f_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0);
+ __pyx_t_7 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1776
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1782
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* i = i + 1
* else:
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1777
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1783
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -57442,92 +58243,92 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1779
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1785
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, (__pyx_v_phrase->syms[__pyx_v_j]));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, (__pyx_v_phrase->syms[__pyx_v_j]));
}
__pyx_L88:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1780
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1786
* else:
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr)
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1781
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1787
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* fphr = Phrase(fphr_arr)
* phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low+gap_start, e_gap_high+gap_start, e_links_low, num_gaps+1,
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_14 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1782
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1788
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
* phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low+gap_start, e_gap_high+gap_start, e_links_low, num_gaps+1,
* f_x_low, f_x_high, f_gap_low+gap_start, f_gap_high+gap_start, f_links_low,
*/
- __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_INCREF(((PyObject *)__pyx_v_fphr_arr));
PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_v_fphr_arr));
__Pyx_GIVEREF(((PyObject *)__pyx_v_fphr_arr));
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_fphr));
- __pyx_v_fphr = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_1);
+ __pyx_v_fphr = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1785
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1791
* 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) # <<<<<<<<<<<<<<
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list)
*/
- __pyx_t_1 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, (__pyx_v_e_gap_low + __pyx_v_gap_start), (__pyx_v_e_gap_high + __pyx_v_gap_start), __pyx_v_e_links_low, (__pyx_v_num_gaps + 1), __pyx_v_f_x_low, __pyx_v_f_x_high, (__pyx_v_f_gap_low + __pyx_v_gap_start), (__pyx_v_f_gap_high + __pyx_v_gap_start), __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, (__pyx_v_e_gap_low + __pyx_v_gap_start), (__pyx_v_e_gap_high + __pyx_v_gap_start), __pyx_v_e_links_low, (__pyx_v_num_gaps + 1), __pyx_v_f_x_low, __pyx_v_f_x_high, (__pyx_v_f_gap_low + __pyx_v_gap_start), (__pyx_v_f_gap_high + __pyx_v_gap_start), __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_v_phrase_list);
__pyx_v_phrase_list = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1786
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1792
* f_x_low, f_x_high, f_gap_low+gap_start, f_gap_high+gap_start, f_links_low,
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0: # <<<<<<<<<<<<<<
* pair_count = 1.0 / len(phrase_list)
* else:
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_7 = ((__pyx_t_13 > 0) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1787
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1793
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
* else:
* pair_count = 0
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (unlikely(__pyx_t_13 == 0)) {
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
@@ -57536,14 +58337,14 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_pair_count = (1.0 / __pyx_t_13);
goto __pyx_L89;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1789
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1795
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -57554,7 +58355,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L89:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1790
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1796
* else:
* pair_count = 0
* for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<<
@@ -57565,7 +58366,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_1 = __pyx_v_phrase_list; __Pyx_INCREF(__pyx_t_1); __pyx_t_13 = 0;
__pyx_t_16 = NULL;
} else {
- __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_16 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -57573,23 +58374,23 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_14 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_14); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_14); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_14 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_14); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_14); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_14 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_14 = __pyx_t_16(__pyx_t_1);
if (unlikely(!__pyx_t_14)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -57605,7 +58406,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -57618,16 +58419,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_INCREF(__pyx_t_15);
__Pyx_INCREF(__pyx_t_3);
#else
- __pyx_t_15 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
#endif
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_10 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__pyx_t_17 = Py_TYPE(__pyx_t_10)->tp_iternext;
@@ -57635,7 +58436,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_GOTREF(__pyx_t_15);
index = 1; __pyx_t_3 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L92_unpacking_failed;
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_17 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L93_unpacking_done;
@@ -57643,7 +58444,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_17 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L93_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_phrase2);
@@ -57653,7 +58454,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_eindexes = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1791
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1797
* pair_count = 0
* for phrase2, eindexes in phrase_list:
* als3 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<<
@@ -57662,32 +58463,32 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_t_14 = ((PyObject *)__pyx_v_self->findexes);
__Pyx_INCREF(__pyx_t_14);
- if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_3_sa_IntList *)__pyx_t_14), ((struct __pyx_obj_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_14), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_XDECREF(((PyObject *)__pyx_v_als3));
- __pyx_v_als3 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
+ __pyx_v_als3 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1792
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1798
* for phrase2, eindexes in phrase_list:
* als3 = self.create_alignments(sent_links,num_links,self.findexes,eindexes)
* extracts.append((fphr, phrase2, pair_count, tuple(als3))) # <<<<<<<<<<<<<<
* if (num_gaps < self.max_nonterminals - 1 and
* phrase_len+1 < self.max_length and
*/
- __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_INCREF(((PyObject *)__pyx_v_als3));
PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_v_als3));
__Pyx_GIVEREF(((PyObject *)__pyx_v_als3));
- __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
- __pyx_t_14 = PyTuple_New(4); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyTuple_New(4); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_INCREF(((PyObject *)__pyx_v_fphr));
PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_v_fphr));
@@ -57701,7 +58502,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_GIVEREF(__pyx_t_15);
__pyx_t_3 = 0;
__pyx_t_15 = 0;
- __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_extracts, ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_extracts, ((PyObject *)__pyx_t_14)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
@@ -57714,7 +58515,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L79:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1793
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1799
* 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 # <<<<<<<<<<<<<<
@@ -57724,7 +58525,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)) != 0);
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1794
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1800
* extracts.append((fphr, phrase2, pair_count, tuple(als3)))
* if (num_gaps < self.max_nonterminals - 1 and
* phrase_len+1 < self.max_length and # <<<<<<<<<<<<<<
@@ -57734,7 +58535,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_8 = (((__pyx_v_phrase_len + 1) < __pyx_v_self->max_length) != 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1795
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1801
* if (num_gaps < self.max_nonterminals - 1 and
* phrase_len+1 < self.max_length and
* f_back_high == f_high and # <<<<<<<<<<<<<<
@@ -57744,7 +58545,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_18 = ((__pyx_v_f_back_high == __pyx_v_f_high) != 0);
if (__pyx_t_18) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1796
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1802
* phrase_len+1 < self.max_length and
* f_back_high == f_high and
* f_back_low == f_low and # <<<<<<<<<<<<<<
@@ -57754,7 +58555,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_9 = ((__pyx_v_f_back_low == __pyx_v_f_low) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1797
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1803
* 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 # <<<<<<<<<<<<<<
@@ -57764,7 +58565,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) != 0);
if (__pyx_t_19) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1798
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1804
* 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 # <<<<<<<<<<<<<<
@@ -57774,7 +58575,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) != 0);
if (__pyx_t_20) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1799
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1805
* 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 # <<<<<<<<<<<<<<
@@ -57784,7 +58585,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)) != 0);
if (__pyx_t_21) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1800
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1806
* 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))): # <<<<<<<<<<<<<<
@@ -57834,7 +58635,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":1802
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1808
* ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_high] != -1))):
*
* met_constraints = 1 # <<<<<<<<<<<<<<
@@ -57843,7 +58644,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":1803
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1809
*
* met_constraints = 1
* f_x_low = f_low-self.train_min_gap_size # <<<<<<<<<<<<<<
@@ -57852,7 +58653,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":1804
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1810
* met_constraints = 1
* f_x_low = f_low-self.train_min_gap_size
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -57862,7 +58663,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_8 = (__pyx_v_self->tight_phrases != 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1805
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1811
* 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: # <<<<<<<<<<<<<<
@@ -57879,7 +58680,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":1806
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1812
* if self.tight_phrases:
* while f_x_low >= 0 and f_links_low[f_x_low] == -1:
* f_x_low = f_x_low - 1 # <<<<<<<<<<<<<<
@@ -57892,7 +58693,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L95:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1807
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1813
* 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: # <<<<<<<<<<<<<<
@@ -57902,7 +58703,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_18 = ((__pyx_v_f_x_low < 0) != 0);
if (__pyx_t_18) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1808
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1814
* f_x_low = f_x_low - 1
* if f_x_low < 0:
* met_constraints = 0 # <<<<<<<<<<<<<<
@@ -57914,7 +58715,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L98:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1810
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1816
* met_constraints = 0
*
* f_x_high = f_high+self.train_min_gap_size # <<<<<<<<<<<<<<
@@ -57923,7 +58724,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":1811
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1817
*
* f_x_high = f_high+self.train_min_gap_size
* if self.tight_phrases: # <<<<<<<<<<<<<<
@@ -57933,7 +58734,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_18 = (__pyx_v_self->tight_phrases != 0);
if (__pyx_t_18) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1812
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1818
* 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: # <<<<<<<<<<<<<<
@@ -57950,7 +58751,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":1813
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1819
* 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 # <<<<<<<<<<<<<<
@@ -57963,7 +58764,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L99:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1814
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1820
* 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: # <<<<<<<<<<<<<<
@@ -57979,7 +58780,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":1815
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1821
* 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 # <<<<<<<<<<<<<<
@@ -57991,7 +58792,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L102:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1817
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1823
* met_constraints = 0
*
* if (met_constraints and # <<<<<<<<<<<<<<
@@ -58000,28 +58801,28 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
if ((__pyx_v_met_constraints != 0)) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1818
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1824
*
* if (met_constraints and
* (self.find_fixpoint(f_x_low, f_x_high, # <<<<<<<<<<<<<<
* f_links_low, f_links_high, e_links_low, e_links_high,
* e_low, e_high, &e_x_low, &e_x_high, &f_x_low, &f_x_high,
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1822
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1828
* 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, # <<<<<<<<<<<<<<
* 1, 1, 2, 1, 1, 1, 1) == 1) and
* ((not self.tight_phrases) or (f_links_low[f_x_low] != -1 and f_links_low[f_x_high-1] != -1)) and
*/
- __pyx_t_8 = (((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) == 1);
+ __pyx_t_8 = (((struct __pyx_vtabstruct_4cdec_2sa_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) == 1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1824
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1830
* self.train_max_initial_size, self.train_max_initial_size,
* 1, 1, 2, 1, 1, 1, 1) == 1) and
* ((not self.tight_phrases) or (f_links_low[f_x_low] != -1 and f_links_low[f_x_high-1] != -1)) and # <<<<<<<<<<<<<<
@@ -58043,45 +58844,45 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_18) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1825
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1831
* 1, 1, 2, 1, 1, 1, 1) == 1) and
* ((not self.tight_phrases) or (f_links_low[f_x_low] != -1 and f_links_low[f_x_high-1] != -1)) and
* self.find_fixpoint(f_x_low, f_low, # <<<<<<<<<<<<<<
* f_links_low, f_links_high, e_links_low, e_links_high,
* -1, -1, e_gap_low, e_gap_high, f_gap_low, f_gap_high,
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_f_low); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_f_low); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1829
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1835
* -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, # <<<<<<<<<<<<<<
* 0, 0, 0, 0, 0, 0, 0) and
* self.find_fixpoint(f_high, f_x_high,
*/
- __pyx_t_7 = (((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, -1, -1, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_f_gap_low, __pyx_v_f_gap_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, 0, 0, 0, 0, 0, 0, 0) != 0);
+ __pyx_t_7 = (((struct __pyx_vtabstruct_4cdec_2sa_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, -1, -1, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_f_gap_low, __pyx_v_f_gap_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, 0, 0, 0, 0, 0, 0, 0) != 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_7) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1831
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1837
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0) and
* self.find_fixpoint(f_high, f_x_high, # <<<<<<<<<<<<<<
* f_links_low, f_links_high, e_links_low, e_links_high,
* -1, -1, e_gap_low+1+num_gaps, e_gap_high+1+num_gaps,
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_f_x_high); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1836
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1842
* 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, # <<<<<<<<<<<<<<
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
*/
- __pyx_t_19 = (((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_high, __pyx_t_1, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_links_low, __pyx_v_e_links_high, -1, -1, ((__pyx_v_e_gap_low + 1) + __pyx_v_num_gaps), ((__pyx_v_e_gap_high + 1) + __pyx_v_num_gaps), ((__pyx_v_f_gap_low + 1) + __pyx_v_num_gaps), ((__pyx_v_f_gap_high + 1) + __pyx_v_num_gaps), __pyx_v_f_sent_len, __pyx_v_e_sent_len, __pyx_v_self->train_max_initial_size, __pyx_v_self->train_max_initial_size, 0, 0, 0, 0, 0, 0, 0) != 0);
+ __pyx_t_19 = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_high, __pyx_t_1, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_links_low, __pyx_v_e_links_high, -1, -1, ((__pyx_v_e_gap_low + 1) + __pyx_v_num_gaps), ((__pyx_v_e_gap_high + 1) + __pyx_v_num_gaps), ((__pyx_v_f_gap_low + 1) + __pyx_v_num_gaps), ((__pyx_v_f_gap_high + 1) + __pyx_v_num_gaps), __pyx_v_f_sent_len, __pyx_v_e_sent_len, __pyx_v_self->train_max_initial_size, __pyx_v_self->train_max_initial_size, 0, 0, 0, 0, 0, 0, 0) != 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_9 = __pyx_t_19;
} else {
@@ -58101,16 +58902,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1838
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1844
* self.train_max_initial_size, self.train_max_initial_size,
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear() # <<<<<<<<<<<<<<
* i = 1
* self.findexes.reset()
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr);
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1839
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1845
* 0, 0, 0, 0, 0, 0, 0)):
* fphr_arr._clear()
* i = 1 # <<<<<<<<<<<<<<
@@ -58119,44 +58920,44 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_v_i = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1840
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1846
* fphr_arr._clear()
* i = 1
* self.findexes.reset() # <<<<<<<<<<<<<<
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i))
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_15 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__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":1841
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1847
* i = 1
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
*/
- __pyx_t_15 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1842
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1848
* self.findexes.reset()
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* i = i+1
* self.findexes.extend(self.findexes1)
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1843
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1849
* self.findexes.append(sym_setindex(self.category, i))
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1 # <<<<<<<<<<<<<<
@@ -58165,27 +58966,27 @@ 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":1844
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1850
* fphr_arr._append(sym_setindex(self.category, i))
* i = i+1
* self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<<
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s__extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_INCREF(((PyObject *)__pyx_v_self->findexes1));
PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_self->findexes1));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->findexes1));
- __pyx_t_14 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__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":1845
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1851
* i = i+1
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<<
@@ -58195,26 +58996,26 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_2 = __pyx_v_phrase->n;
for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1846
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1852
* self.findexes.extend(self.findexes1)
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<<
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1
*/
- __pyx_t_8 = (__pyx_f_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0);
+ __pyx_t_8 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1847
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1853
* for j from 0 <= j < phrase.n:
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* i = i + 1
* else:
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1848
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1854
* if sym_isvar(phrase.syms[j]):
* fphr_arr._append(sym_setindex(self.category, i))
* i = i + 1 # <<<<<<<<<<<<<<
@@ -58226,92 +59027,92 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1850
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1856
* i = i + 1
* else:
* fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<<
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
*/
- ((struct __pyx_vtabstruct_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, (__pyx_v_phrase->syms[__pyx_v_j]));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, (__pyx_v_phrase->syms[__pyx_v_j]));
}
__pyx_L106:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1851
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1857
* else:
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr)
*/
- ((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));
+ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1852
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1858
* fphr_arr._append(phrase.syms[j])
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<<
* fphr = Phrase(fphr_arr)
* phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+2,
*/
- __pyx_t_14 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_15 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1853
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1859
* fphr_arr._append(sym_setindex(self.category, i))
* self.findexes.append(sym_setindex(self.category, i))
* fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<<
* phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+2,
* f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low,
*/
- __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_INCREF(((PyObject *)__pyx_v_fphr_arr));
PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_fphr_arr));
__Pyx_GIVEREF(((PyObject *)__pyx_v_fphr_arr));
- __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_fphr));
- __pyx_v_fphr = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_14);
+ __pyx_v_fphr = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_14);
__pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1856
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1862
* 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) # <<<<<<<<<<<<<<
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list)
*/
- __pyx_t_14 = ((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_e_links_low, (__pyx_v_num_gaps + 2), __pyx_v_f_x_low, __pyx_v_f_x_high, __pyx_v_f_gap_low, __pyx_v_f_gap_high, __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_e_links_low, (__pyx_v_num_gaps + 2), __pyx_v_f_x_low, __pyx_v_f_x_high, __pyx_v_f_gap_low, __pyx_v_f_gap_high, __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_XDECREF(__pyx_v_phrase_list);
__pyx_v_phrase_list = __pyx_t_14;
__pyx_t_14 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1857
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1863
* f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low,
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0: # <<<<<<<<<<<<<<
* pair_count = 1.0 / len(phrase_list)
* else:
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_8 = ((__pyx_t_13 > 0) != 0);
if (__pyx_t_8) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1858
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1864
* matching.sent_id, e_sent_len, e_sent_start)
* if len(phrase_list) > 0:
* pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<<
* else:
* pair_count = 0
*/
- __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (unlikely(__pyx_t_13 == 0)) {
#ifdef WITH_THREAD
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
@@ -58320,14 +59121,14 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
#ifdef WITH_THREAD
PyGILState_Release(__pyx_gilstate_save);
#endif
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_pair_count = (1.0 / __pyx_t_13);
goto __pyx_L107;
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1860
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1866
* pair_count = 1.0 / len(phrase_list)
* else:
* pair_count = 0 # <<<<<<<<<<<<<<
@@ -58338,7 +59139,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
__pyx_L107:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1861
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1867
* else:
* pair_count = 0
* for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<<
@@ -58349,7 +59150,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_t_14 = __pyx_v_phrase_list; __Pyx_INCREF(__pyx_t_14); __pyx_t_13 = 0;
__pyx_t_16 = NULL;
} else {
- __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__pyx_t_16 = Py_TYPE(__pyx_t_14)->tp_iternext;
}
@@ -58357,23 +59158,23 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_14)) {
if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_14)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_15 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_14)) {
if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_15 = __pyx_t_16(__pyx_t_14);
if (unlikely(!__pyx_t_15)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -58389,7 +59190,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -58402,16 +59203,16 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_3);
#else
- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
#endif
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_10 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__pyx_t_17 = Py_TYPE(__pyx_t_10)->tp_iternext;
@@ -58419,7 +59220,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_GOTREF(__pyx_t_1);
index = 1; __pyx_t_3 = __pyx_t_17(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L110_unpacking_failed;
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_17 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L111_unpacking_done;
@@ -58427,7 +59228,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_17 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L111_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_phrase2);
@@ -58437,7 +59238,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__pyx_v_eindexes = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1862
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1868
* pair_count = 0
* for phrase2, eindexes in phrase_list:
* als4 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<<
@@ -58446,32 +59247,32 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
__pyx_t_15 = ((PyObject *)__pyx_v_self->findexes);
__Pyx_INCREF(__pyx_t_15);
- if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_3_sa_IntList *)__pyx_t_15), ((struct __pyx_obj_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_15), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_XDECREF(((PyObject *)__pyx_v_als4));
- __pyx_v_als4 = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_3);
+ __pyx_v_als4 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1863
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1869
* for phrase2, eindexes in phrase_list:
* als4 = self.create_alignments(sent_links,num_links,self.findexes,eindexes)
* extracts.append((fphr, phrase2, pair_count, tuple(als4))) # <<<<<<<<<<<<<<
* else:
* reason_for_failure = "Unable to extract basic phrase"
*/
- __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_INCREF(((PyObject *)__pyx_v_als4));
PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_als4));
__Pyx_GIVEREF(((PyObject *)__pyx_v_als4));
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
- __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_INCREF(((PyObject *)__pyx_v_fphr));
PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_fphr));
@@ -58485,7 +59286,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_3 = 0;
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_extracts, ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_extracts, ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -58507,23 +59308,23 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1865
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1871
* extracts.append((fphr, phrase2, pair_count, tuple(als4)))
* else:
* reason_for_failure = "Unable to extract basic phrase" # <<<<<<<<<<<<<<
*
* free(sent_links)
*/
- __Pyx_INCREF(((PyObject *)__pyx_kp_s_139));
+ __Pyx_INCREF(((PyObject *)__pyx_kp_s_140));
__Pyx_DECREF(__pyx_v_reason_for_failure);
- __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_139);
+ __pyx_v_reason_for_failure = ((PyObject *)__pyx_kp_s_140);
}
__pyx_L34:;
goto __pyx_L33;
}
__pyx_L33:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1867
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1873
* reason_for_failure = "Unable to extract basic phrase"
*
* free(sent_links) # <<<<<<<<<<<<<<
@@ -58532,7 +59333,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":1868
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1874
*
* free(sent_links)
* free(f_links_low) # <<<<<<<<<<<<<<
@@ -58541,7 +59342,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":1869
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1875
* free(sent_links)
* free(f_links_low)
* free(f_links_high) # <<<<<<<<<<<<<<
@@ -58550,7 +59351,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":1870
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1876
* free(f_links_low)
* free(f_links_high)
* free(e_links_low) # <<<<<<<<<<<<<<
@@ -58559,7 +59360,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":1871
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1877
* free(f_links_high)
* free(e_links_low)
* free(e_links_high) # <<<<<<<<<<<<<<
@@ -58568,7 +59369,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":1872
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1878
* free(e_links_low)
* free(e_links_high)
* free(f_gap_low) # <<<<<<<<<<<<<<
@@ -58577,7 +59378,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":1873
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1879
* free(e_links_high)
* free(f_gap_low)
* free(f_gap_high) # <<<<<<<<<<<<<<
@@ -58586,7 +59387,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":1874
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1880
* free(f_gap_low)
* free(f_gap_high)
* free(e_gap_low) # <<<<<<<<<<<<<<
@@ -58595,7 +59396,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":1875
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1881
* free(f_gap_high)
* free(e_gap_low)
* free(e_gap_high) # <<<<<<<<<<<<<<
@@ -58604,7 +59405,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
*/
free(__pyx_v_e_gap_high);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1877
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1883
* free(e_gap_high)
*
* return extracts # <<<<<<<<<<<<<<
@@ -58624,7 +59425,7 @@ static PyObject *__pyx_f_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_obj
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_XDECREF(__pyx_t_15);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.extract", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.extract", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_extracts);
@@ -58647,11 +59448,12 @@ 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) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_26add_instance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_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_v_ctx_name = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -58659,12 +59461,22 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_26add_instance(PyObject
__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};
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__f_words,&__pyx_n_s__e_words,&__pyx_n_s__alignment,&__pyx_n_s__ctx_name,0};
+ PyObject* values[4] = {0,0,0,0};
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1891
+ * # Aggregate stats from a training instance
+ * # (Extract rules, update counts)
+ * def add_instance(self, f_words, e_words, alignment, ctx_name=None): # <<<<<<<<<<<<<<
+ *
+ * self.online = True
+ */
+ values[3] = ((PyObject *)Py_None);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
@@ -58679,45 +59491,54 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_26add_instance(PyObject
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 = 1885; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_instance", 0, 3, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1891; __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 = 1885; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_instance", 0, 3, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ctx_name);
+ if (value) { values[3] = value; kw_args--; }
}
}
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 = 1885; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_instance") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1891; __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);
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
}
__pyx_v_f_words = values[0];
__pyx_v_e_words = values[1];
__pyx_v_alignment = values[2];
+ __pyx_v_ctx_name = values[3];
}
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 = 1885; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_instance", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.add_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._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_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instance(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_f_words, __pyx_v_e_words, __pyx_v_alignment, __pyx_v_ctx_name);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_12add_instance_1extract(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_12add_instance_1extract = {__Pyx_NAMESTR("extract"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_12add_instance_1extract, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_12add_instance_1extract(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_1extract(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_1extract = {__Pyx_NAMESTR("extract"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_1extract, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_1extract(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_f_i = 0;
PyObject *__pyx_v_f_j = 0;
PyObject *__pyx_v_e_i = 0;
@@ -58760,46 +59581,46 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_12add_instance_1extract
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f_j)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e_i)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e_j)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__min_bound)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 5:
if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__wc)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 6:
if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__links)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 7:
if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nt)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 7); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 7); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 8:
if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nt_open)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 8); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 8); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
goto __pyx_L5_argtuple_error;
@@ -58826,18 +59647,18 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_12add_instance_1extract
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.add_instance.extract", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.add_instance.extract", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_self, __pyx_v_f_i, __pyx_v_f_j, __pyx_v_e_i, __pyx_v_e_j, __pyx_v_min_bound, __pyx_v_wc, __pyx_v_links, __pyx_v_nt, __pyx_v_nt_open);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_self, __pyx_v_f_i, __pyx_v_f_j, __pyx_v_e_i, __pyx_v_e_j, __pyx_v_min_bound, __pyx_v_wc, __pyx_v_links, __pyx_v_nt, __pyx_v_nt_open);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1919
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1925
* # f_ i and j are current, e_ i and j are previous
* # We care _considering_ f_j, so it is not yet in counts
* def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<<
@@ -58845,9 +59666,9 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_12add_instance_1extract
* if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size:
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(PyObject *__pyx_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_f_j, PyObject *__pyx_v_e_i, PyObject *__pyx_v_e_j, PyObject *__pyx_v_min_bound, PyObject *__pyx_v_wc, PyObject *__pyx_v_links, PyObject *__pyx_v_nt, PyObject *__pyx_v_nt_open) {
- struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *__pyx_cur_scope;
- struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *__pyx_outer_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(PyObject *__pyx_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_f_j, PyObject *__pyx_v_e_i, PyObject *__pyx_v_e_j, PyObject *__pyx_v_min_bound, PyObject *__pyx_v_wc, PyObject *__pyx_v_links, PyObject *__pyx_v_nt, PyObject *__pyx_v_nt_open) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *__pyx_cur_scope;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *__pyx_outer_scope;
PyObject *__pyx_v_link_i = NULL;
PyObject *__pyx_v_link_j = NULL;
PyObject *__pyx_v_new_e_i = NULL;
@@ -58879,36 +59700,36 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("extract", 0);
- __pyx_outer_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *) __Pyx_CyFunction_GetClosure(__pyx_self);
+ __pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *) __Pyx_CyFunction_GetClosure(__pyx_self);
__pyx_cur_scope = __pyx_outer_scope;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1921
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1927
* def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open):
* # Phrase extraction limits
* if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: # <<<<<<<<<<<<<<
* return
* # Unaligned word
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_f_len)) { __Pyx_RaiseClosureNameError("f_len"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_1 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_f_len)) { __Pyx_RaiseClosureNameError("f_len"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_1 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (!__pyx_t_3) {
- __pyx_t_2 = PyNumber_Subtract(__pyx_v_f_j, __pyx_v_f_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Subtract(__pyx_v_f_j, __pyx_v_f_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_2 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_2 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_6 = __pyx_t_5;
} else {
@@ -58916,7 +59737,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1922
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1928
* # Phrase extraction limits
* if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size:
* return # <<<<<<<<<<<<<<
@@ -58930,41 +59751,41 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1924
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1930
* return
* # Unaligned word
* if not al[f_j]: # <<<<<<<<<<<<<<
* # Adjacent to non-terminal: extend (non-terminal now open)
* if nt and nt[-1][2] == f_j - 1:
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_al)) { __Pyx_RaiseClosureNameError("al"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_al)) { __Pyx_RaiseClosureNameError("al"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = ((!__pyx_t_6) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1926
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1932
* if not al[f_j]:
* # Adjacent to non-terminal: extend (non-terminal now open)
* if nt and nt[-1][2] == f_j - 1: # <<<<<<<<<<<<<<
* nt[-1][2] += 1
* extract(f_i, f_j + 1, e_i, e_j, min_bound, wc, links, nt, True)
*/
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_3) {
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Subtract(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Subtract(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_5 = __pyx_t_6;
} else {
@@ -58972,80 +59793,80 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1927
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1933
* # Adjacent to non-terminal: extend (non-terminal now open)
* if nt and nt[-1][2] == f_j - 1:
* nt[-1][2] += 1 # <<<<<<<<<<<<<<
* extract(f_i, f_j + 1, e_i, e_j, min_bound, wc, links, nt, True)
* nt[-1][2] -= 1
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_7 = 2;
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_7, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_7, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__Pyx_SetItemInt(__pyx_t_1, __pyx_t_7, __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_1, __pyx_t_7, __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1928
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1934
* if nt and nt[-1][2] == f_j - 1:
* nt[-1][2] += 1
* extract(f_i, f_j + 1, e_i, e_j, min_bound, wc, links, nt, True) # <<<<<<<<<<<<<<
* nt[-1][2] -= 1
* # Unless non-terminal already open, always extend with word
*/
- __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_4 = __pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_1, __pyx_v_e_i, __pyx_v_e_j, __pyx_v_min_bound, __pyx_v_wc, __pyx_v_links, __pyx_v_nt, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_4 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_1, __pyx_v_e_i, __pyx_v_e_j, __pyx_v_min_bound, __pyx_v_wc, __pyx_v_links, __pyx_v_nt, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1929
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1935
* nt[-1][2] += 1
* extract(f_i, f_j + 1, e_i, e_j, min_bound, wc, links, nt, True)
* nt[-1][2] -= 1 # <<<<<<<<<<<<<<
* # Unless non-terminal already open, always extend with word
* # Make sure adding a word doesn't exceed length
*/
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_7 = 2;
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, __pyx_t_7, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, __pyx_t_7, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__Pyx_SetItemInt(__pyx_t_4, __pyx_t_7, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_4, __pyx_t_7, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L5;
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1932
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1938
* # Unless non-terminal already open, always extend with word
* # Make sure adding a word doesn't exceed length
* if not nt_open and wc < self.max_length: # <<<<<<<<<<<<<<
* extract(f_i, f_j + 1, e_i, e_j, min_bound, wc + 1, links, nt, False)
* return
*/
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_nt_open); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_nt_open); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = (!__pyx_t_5);
if (__pyx_t_3) {
- __pyx_t_4 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_6 = __pyx_t_5;
} else {
@@ -59053,21 +59874,21 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1933
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1939
* # Make sure adding a word doesn't exceed length
* if not nt_open and wc < self.max_length:
* extract(f_i, f_j + 1, e_i, e_j, min_bound, wc + 1, links, nt, False) # <<<<<<<<<<<<<<
* return
* # Aligned word
*/
- __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_8 = __pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_1, __pyx_v_e_i, __pyx_v_e_j, __pyx_v_min_bound, __pyx_t_4, __pyx_v_links, __pyx_v_nt, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_8 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_1, __pyx_v_e_i, __pyx_v_e_j, __pyx_v_min_bound, __pyx_t_4, __pyx_v_links, __pyx_v_nt, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -59077,7 +59898,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L6:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1934
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1940
* if not nt_open and wc < self.max_length:
* extract(f_i, f_j + 1, e_i, e_j, min_bound, wc + 1, links, nt, False)
* return # <<<<<<<<<<<<<<
@@ -59091,27 +59912,27 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1936
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1942
* return
* # Aligned word
* link_i = fe_span[f_j][0] # <<<<<<<<<<<<<<
* link_j = fe_span[f_j][1]
* new_e_i = min(link_i, e_i)
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_fe_span)) { __Pyx_RaiseClosureNameError("fe_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_fe_span)) { __Pyx_RaiseClosureNameError("fe_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f_j); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f_j); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_link_i = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1937
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1943
* # Aligned word
* link_i = fe_span[f_j][0]
* link_j = fe_span[f_j][1] # <<<<<<<<<<<<<<
@@ -59120,17 +59941,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
*/
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f_j); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f_j); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_link_j = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1938
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1944
* link_i = fe_span[f_j][0]
* link_j = fe_span[f_j][1]
* new_e_i = min(link_i, e_i) # <<<<<<<<<<<<<<
@@ -59141,8 +59962,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__pyx_t_8 = __pyx_v_e_i;
__Pyx_INCREF(__pyx_v_link_i);
__pyx_t_2 = __pyx_v_link_i;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_6) {
__Pyx_INCREF(__pyx_t_8);
@@ -59159,7 +59980,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__pyx_v_new_e_i = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1939
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1945
* link_j = fe_span[f_j][1]
* new_e_i = min(link_i, e_i)
* new_e_j = max(link_j, e_j) # <<<<<<<<<<<<<<
@@ -59170,8 +59991,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__pyx_t_8 = __pyx_v_e_j;
__Pyx_INCREF(__pyx_v_link_j);
__pyx_t_4 = __pyx_v_link_j;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_6) {
__Pyx_INCREF(__pyx_t_8);
@@ -59188,7 +60009,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__pyx_v_new_e_j = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1942
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1948
* # Check reverse links of newly covered words to see if they violate left
* # bound (return) or extend minimum right bound for chunk
* new_min_bound = min_bound # <<<<<<<<<<<<<<
@@ -59198,58 +60019,58 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_INCREF(__pyx_v_min_bound);
__pyx_v_new_min_bound = __pyx_v_min_bound;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1944
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1950
* new_min_bound = min_bound
* # First aligned word creates span
* if e_j == -1: # <<<<<<<<<<<<<<
* for i from new_e_i <= i <= new_e_j:
* if ef_span[i][0] < f_i:
*/
- __pyx_t_8 = PyObject_RichCompare(__pyx_v_e_j, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_v_e_j, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1945
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1951
* # First aligned word creates span
* if e_j == -1:
* for i from new_e_i <= i <= new_e_j: # <<<<<<<<<<<<<<
* if ef_span[i][0] < f_i:
* return
*/
- __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_v_new_e_i); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_new_e_j); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_v_new_e_i); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_new_e_j); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
for (__pyx_t_11 = __pyx_t_9; __pyx_t_11 <= __pyx_t_10; __pyx_t_11++) {
- __pyx_t_8 = PyInt_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1946
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1952
* if e_j == -1:
* for i from new_e_i <= i <= new_e_j:
* if ef_span[i][0] < f_i: # <<<<<<<<<<<<<<
* return
* new_min_bound = max(new_min_bound, ef_span[i][1])
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1947
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1953
* for i from new_e_i <= i <= new_e_j:
* if ef_span[i][0] < f_i:
* return # <<<<<<<<<<<<<<
@@ -59263,7 +60084,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L10:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1948
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1954
* if ef_span[i][0] < f_i:
* return
* new_min_bound = max(new_min_bound, ef_span[i][1]) # <<<<<<<<<<<<<<
@@ -59272,17 +60093,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
*/
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_INCREF(__pyx_v_new_min_bound);
__pyx_t_8 = __pyx_v_new_min_bound;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_6) {
__Pyx_INCREF(__pyx_t_2);
@@ -59299,17 +60120,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_DECREF(__pyx_v_new_min_bound);
__pyx_v_new_min_bound = __pyx_t_2;
__pyx_t_2 = 0;
- __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1945
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1951
* # First aligned word creates span
* if e_j == -1:
* for i from new_e_i <= i <= new_e_j: # <<<<<<<<<<<<<<
* if ef_span[i][0] < f_i:
* return
*/
- __pyx_t_2 = PyInt_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_2;
@@ -59318,46 +60139,46 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
/*else*/ {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1951
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1957
* # Other aligned words extend span
* else:
* for i from new_e_i <= i < e_i: # <<<<<<<<<<<<<<
* if ef_span[i][0] < f_i:
* return
*/
- __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_v_new_e_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_e_i); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_v_new_e_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_e_i); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
for (__pyx_t_9 = __pyx_t_11; __pyx_t_9 < __pyx_t_10; __pyx_t_9++) {
- __pyx_t_2 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1952
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1958
* else:
* for i from new_e_i <= i < e_i:
* if ef_span[i][0] < f_i: # <<<<<<<<<<<<<<
* return
* new_min_bound = max(new_min_bound, ef_span[i][1])
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1953
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1959
* for i from new_e_i <= i < e_i:
* if ef_span[i][0] < f_i:
* return # <<<<<<<<<<<<<<
@@ -59371,7 +60192,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L13:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1954
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1960
* if ef_span[i][0] < f_i:
* return
* new_min_bound = max(new_min_bound, ef_span[i][1]) # <<<<<<<<<<<<<<
@@ -59380,17 +60201,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
*/
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_new_min_bound);
__pyx_t_2 = __pyx_v_new_min_bound;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_6) {
__Pyx_INCREF(__pyx_t_4);
@@ -59407,62 +60228,62 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_DECREF(__pyx_v_new_min_bound);
__pyx_v_new_min_bound = __pyx_t_4;
__pyx_t_4 = 0;
- __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1951
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1957
* # Other aligned words extend span
* else:
* for i from new_e_i <= i < e_i: # <<<<<<<<<<<<<<
* if ef_span[i][0] < f_i:
* return
*/
- __pyx_t_4 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1955
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1961
* return
* new_min_bound = max(new_min_bound, ef_span[i][1])
* for i from e_j < i <= new_e_j: # <<<<<<<<<<<<<<
* if ef_span[i][0] < f_i:
* return
*/
- __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_v_e_j); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_new_e_j); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_v_e_j); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_new_e_j); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
for (__pyx_t_11 = __pyx_t_9+1; __pyx_t_11 <= __pyx_t_10; __pyx_t_11++) {
- __pyx_t_4 = PyInt_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1956
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1962
* new_min_bound = max(new_min_bound, ef_span[i][1])
* for i from e_j < i <= new_e_j:
* if ef_span[i][0] < f_i: # <<<<<<<<<<<<<<
* return
* new_min_bound = max(new_min_bound, ef_span[i][1])
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1957
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1963
* for i from e_j < i <= new_e_j:
* if ef_span[i][0] < f_i:
* return # <<<<<<<<<<<<<<
@@ -59476,7 +60297,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L16:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1958
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1964
* if ef_span[i][0] < f_i:
* return
* new_min_bound = max(new_min_bound, ef_span[i][1]) # <<<<<<<<<<<<<<
@@ -59485,17 +60306,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
*/
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_i); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(__pyx_v_new_min_bound);
__pyx_t_4 = __pyx_v_new_min_bound;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_6) {
__Pyx_INCREF(__pyx_t_8);
@@ -59512,17 +60333,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_DECREF(__pyx_v_new_min_bound);
__pyx_v_new_min_bound = __pyx_t_8;
__pyx_t_8 = 0;
- __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_v_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1955
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1961
* return
* new_min_bound = max(new_min_bound, ef_span[i][1])
* for i from e_j < i <= new_e_j: # <<<<<<<<<<<<<<
* if ef_span[i][0] < f_i:
* return
*/
- __pyx_t_8 = PyInt_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_8;
@@ -59530,18 +60351,18 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L7:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1960
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1966
* new_min_bound = max(new_min_bound, ef_span[i][1])
* # Extract, extend with word (unless non-terminal open)
* if not nt_open: # <<<<<<<<<<<<<<
* nt_collision = False
* for link in al[f_j]:
*/
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt_open); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt_open); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = ((!__pyx_t_6) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1961
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1967
* # Extract, extend with word (unless non-terminal open)
* if not nt_open:
* nt_collision = False # <<<<<<<<<<<<<<
@@ -59550,20 +60371,20 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
*/
__pyx_v_nt_collision = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1962
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1968
* if not nt_open:
* nt_collision = False
* for link in al[f_j]: # <<<<<<<<<<<<<<
* if e_nt_cover[link]:
* nt_collision = True
*/
- __pyx_t_8 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
__pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
__pyx_t_12 = NULL;
} else {
- __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
@@ -59572,23 +60393,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_8); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_8); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_8); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_8); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_8 = __pyx_t_12(__pyx_t_2);
if (unlikely(!__pyx_t_8)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -59598,25 +60419,25 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__pyx_v_link = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1963
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1969
* nt_collision = False
* for link in al[f_j]:
* if e_nt_cover[link]: # <<<<<<<<<<<<<<
* nt_collision = True
* # Non-terminal collisions block word extraction and extension, but
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover), __pyx_v_link); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover), __pyx_v_link); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1964
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1970
* for link in al[f_j]:
* if e_nt_cover[link]:
* nt_collision = True # <<<<<<<<<<<<<<
@@ -59630,7 +60451,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1967
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1973
* # Non-terminal collisions block word extraction and extension, but
* # may be okay for continuing non-terminals
* if not nt_collision and wc < self.max_length: # <<<<<<<<<<<<<<
@@ -59639,11 +60460,11 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
*/
__pyx_t_3 = (!(__pyx_v_nt_collision != 0));
if (__pyx_t_3) {
- __pyx_t_2 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_5 = __pyx_t_6;
} else {
@@ -59651,32 +60472,32 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1968
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1974
* # may be okay for continuing non-terminals
* if not nt_collision and wc < self.max_length:
* plus_links = [] # <<<<<<<<<<<<<<
* for link in al[f_j]:
* plus_links.append((f_j, link))
*/
- __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_v_plus_links = ((PyObject*)__pyx_t_8);
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1969
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1975
* if not nt_collision and wc < self.max_length:
* plus_links = []
* for link in al[f_j]: # <<<<<<<<<<<<<<
* plus_links.append((f_j, link))
* cover[link] += 1
*/
- __pyx_t_8 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
__pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
__pyx_t_12 = NULL;
} else {
- __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
@@ -59685,23 +60506,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_8); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_8); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_8); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_8); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_8 = __pyx_t_12(__pyx_t_2);
if (unlikely(!__pyx_t_8)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -59711,14 +60532,14 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__pyx_v_link = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1970
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1976
* plus_links = []
* for link in al[f_j]:
* plus_links.append((f_j, link)) # <<<<<<<<<<<<<<
* cover[link] += 1
* links.append(plus_links)
*/
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_f_j);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f_j);
@@ -59726,20 +60547,20 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_INCREF(__pyx_v_link);
PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_link);
__Pyx_GIVEREF(__pyx_v_link);
- __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_plus_links, ((PyObject *)__pyx_t_8)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_plus_links, ((PyObject *)__pyx_t_8)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1971
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1977
* for link in al[f_j]:
* plus_links.append((f_j, link))
* cover[link] += 1 # <<<<<<<<<<<<<<
* links.append(plus_links)
* if links and f_j >= new_min_bound:
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_cover) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
__pyx_t_14 = __pyx_cur_scope->__pyx_v_cover;
@@ -59747,46 +60568,46 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__pyx_t_8 = __pyx_v_link;
if (unlikely(((PyObject *)__pyx_t_14) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_t_14), __pyx_t_8); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_t_14), __pyx_t_8); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(((PyObject *)__pyx_t_14) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- if (PyObject_SetItem(((PyObject *)__pyx_t_14), __pyx_t_8, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(((PyObject *)__pyx_t_14), __pyx_t_8, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1972
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1978
* plus_links.append((f_j, link))
* cover[link] += 1
* links.append(plus_links) # <<<<<<<<<<<<<<
* if links and f_j >= new_min_bound:
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
*/
- __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_links, ((PyObject *)__pyx_v_plus_links)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_links, ((PyObject *)__pyx_v_plus_links)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1973
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1979
* cover[link] += 1
* links.append(plus_links)
* if links and f_j >= new_min_bound: # <<<<<<<<<<<<<<
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False)
*/
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_5) {
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_6 = __pyx_t_3;
} else {
@@ -59794,33 +60615,33 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1974
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1980
* links.append(plus_links)
* if links and f_j >= new_min_bound:
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) # <<<<<<<<<<<<<<
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False)
* links.pop()
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_rules) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__form_rule); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__form_rule); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_8 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_8 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_8 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_8 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_f_i);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f_i);
@@ -59840,62 +60661,62 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_GIVEREF(__pyx_v_links);
__pyx_t_1 = 0;
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __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_8)); __pyx_t_8 = 0;
- __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L24;
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1975
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1981
* if links and f_j >= new_min_bound:
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) # <<<<<<<<<<<<<<
* links.pop()
* for link in al[f_j]:
*/
- __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_1 = __pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_t_8, __pyx_v_links, __pyx_v_nt, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_t_8, __pyx_v_links, __pyx_v_nt, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__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":1976
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1982
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False)
* links.pop() # <<<<<<<<<<<<<<
* for link in al[f_j]:
* cover[link] -= 1
*/
- __pyx_t_1 = __Pyx_PyObject_Pop(__pyx_v_links); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Pop(__pyx_v_links); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1977
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1983
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False)
* links.pop()
* for link in al[f_j]: # <<<<<<<<<<<<<<
* cover[link] -= 1
* # Try to add a word to current non-terminal (if any), extract, extend
*/
- __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
__pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
__pyx_t_12 = NULL;
} else {
- __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
@@ -59904,23 +60725,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_1 = __pyx_t_12(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -59930,17 +60751,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__pyx_v_link = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1978
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1984
* links.pop()
* for link in al[f_j]:
* cover[link] -= 1 # <<<<<<<<<<<<<<
* # Try to add a word to current non-terminal (if any), extract, extend
* if nt and nt[-1][2] == f_j - 1:
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_cover) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
__pyx_t_14 = __pyx_cur_scope->__pyx_v_cover;
@@ -59948,18 +60769,18 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__pyx_t_1 = __pyx_v_link;
if (unlikely(((PyObject *)__pyx_t_14) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_t_14), __pyx_t_1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_GetItem(((PyObject *)__pyx_t_14), __pyx_t_1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (unlikely(((PyObject *)__pyx_t_14) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- if (PyObject_SetItem(((PyObject *)__pyx_t_14), __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(((PyObject *)__pyx_t_14), __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
@@ -59972,26 +60793,26 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L17:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1980
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1986
* cover[link] -= 1
* # Try to add a word to current non-terminal (if any), extract, extend
* if nt and nt[-1][2] == f_j - 1: # <<<<<<<<<<<<<<
* # Add to non-terminal, checking for collisions
* old_last_nt = nt[-1][:]
*/
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_6) {
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Subtract(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Subtract(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = __pyx_t_5;
} else {
@@ -59999,70 +60820,70 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1982
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1988
* if nt and nt[-1][2] == f_j - 1:
* # Add to non-terminal, checking for collisions
* old_last_nt = nt[-1][:] # <<<<<<<<<<<<<<
* nt[-1][2] = f_j
* if link_i < nt[-1][3]:
*/
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 0, NULL, NULL, &__pyx_k_slice_140, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 0, NULL, NULL, &__pyx_k_slice_141, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_old_last_nt = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1983
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1989
* # Add to non-terminal, checking for collisions
* old_last_nt = nt[-1][:]
* nt[-1][2] = f_j # <<<<<<<<<<<<<<
* if link_i < nt[-1][3]:
* if not span_check(cover, link_i, nt[-1][3] - 1):
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (__Pyx_SetItemInt(__pyx_t_2, 2, __pyx_v_f_j, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_2, 2, __pyx_v_f_j, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __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":1984
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1990
* old_last_nt = nt[-1][:]
* nt[-1][2] = f_j
* if link_i < nt[-1][3]: # <<<<<<<<<<<<<<
* if not span_check(cover, link_i, nt[-1][3] - 1):
* nt[-1] = old_last_nt
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_link_i, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_link_i, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1985
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1991
* nt[-1][2] = f_j
* if link_i < nt[-1][3]:
* if not span_check(cover, link_i, nt[-1][3] - 1): # <<<<<<<<<<<<<<
* nt[-1] = old_last_nt
* return
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_check); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_check); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_cover));
@@ -60073,25 +60894,25 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __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_1)); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_6 = ((!__pyx_t_3) != 0);
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1986
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1992
* if link_i < nt[-1][3]:
* if not span_check(cover, link_i, nt[-1][3] - 1):
* nt[-1] = old_last_nt # <<<<<<<<<<<<<<
* return
* span_inc(cover, link_i, nt[-1][3] - 1)
*/
- if (__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, sizeof(long), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, sizeof(long), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1987
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1993
* if not span_check(cover, link_i, nt[-1][3] - 1):
* nt[-1] = old_last_nt
* return # <<<<<<<<<<<<<<
@@ -60105,24 +60926,24 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L29:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1988
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1994
* nt[-1] = old_last_nt
* return
* span_inc(cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<<
* span_inc(e_nt_cover, link_i, nt[-1][3] - 1)
* nt[-1][3] = link_i
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_cover));
@@ -60133,31 +60954,31 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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 = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1989
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1995
* return
* span_inc(cover, link_i, nt[-1][3] - 1)
* span_inc(e_nt_cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<<
* nt[-1][3] = link_i
* if link_j > nt[-1][4]:
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Subtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Subtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
@@ -60168,64 +60989,64 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1990
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1996
* span_inc(cover, link_i, nt[-1][3] - 1)
* span_inc(e_nt_cover, link_i, nt[-1][3] - 1)
* nt[-1][3] = link_i # <<<<<<<<<<<<<<
* if link_j > nt[-1][4]:
* if not span_check(cover, nt[-1][4] + 1, link_j):
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (__Pyx_SetItemInt(__pyx_t_2, 3, __pyx_v_link_i, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_2, 3, __pyx_v_link_i, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L28;
}
__pyx_L28:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1991
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1997
* span_inc(e_nt_cover, link_i, nt[-1][3] - 1)
* nt[-1][3] = link_i
* if link_j > nt[-1][4]: # <<<<<<<<<<<<<<
* if not span_check(cover, nt[-1][4] + 1, link_j):
* nt[-1] = old_last_nt
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_link_j, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_link_j, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1992
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1998
* nt[-1][3] = link_i
* if link_j > nt[-1][4]:
* if not span_check(cover, nt[-1][4] + 1, link_j): # <<<<<<<<<<<<<<
* nt[-1] = old_last_nt
* return
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_check); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_check); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_cover));
@@ -60236,25 +61057,25 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __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_1)); __pyx_t_1 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = ((!__pyx_t_6) != 0);
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1993
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1999
* if link_j > nt[-1][4]:
* if not span_check(cover, nt[-1][4] + 1, link_j):
* nt[-1] = old_last_nt # <<<<<<<<<<<<<<
* return
* span_inc(cover, nt[-1][4] + 1, link_j)
*/
- if (__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, sizeof(long), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, sizeof(long), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1994
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2000
* if not span_check(cover, nt[-1][4] + 1, link_j):
* nt[-1] = old_last_nt
* return # <<<<<<<<<<<<<<
@@ -60268,24 +61089,24 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L31:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1995
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2001
* nt[-1] = old_last_nt
* return
* span_inc(cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<<
* span_inc(e_nt_cover, nt[-1][4] + 1, link_j)
* nt[-1][4] = link_j
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_cover));
@@ -60296,31 +61117,31 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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 = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1996
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2002
* return
* span_inc(cover, nt[-1][4] + 1, link_j)
* span_inc(e_nt_cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<<
* nt[-1][4] = link_j
* if links and f_j >= new_min_bound:
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
@@ -60331,38 +61152,38 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1997
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2003
* span_inc(cover, nt[-1][4] + 1, link_j)
* span_inc(e_nt_cover, nt[-1][4] + 1, link_j)
* nt[-1][4] = link_j # <<<<<<<<<<<<<<
* if links and f_j >= new_min_bound:
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (__Pyx_SetItemInt(__pyx_t_2, 4, __pyx_v_link_j, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_2, 4, __pyx_v_link_j, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L30;
}
__pyx_L30:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1998
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2004
* span_inc(e_nt_cover, nt[-1][4] + 1, link_j)
* nt[-1][4] = link_j
* if links and f_j >= new_min_bound: # <<<<<<<<<<<<<<
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False)
*/
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_3) {
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_5 = __pyx_t_6;
} else {
@@ -60370,33 +61191,33 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1999
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2005
* nt[-1][4] = link_j
* if links and f_j >= new_min_bound:
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) # <<<<<<<<<<<<<<
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False)
* nt[-1] = old_last_nt
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_rules) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__form_rule); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__form_rule); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_4 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_4 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_f_i);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_f_i);
@@ -60416,80 +61237,80 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_GIVEREF(__pyx_v_links);
__pyx_t_1 = 0;
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_8); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_8); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L32;
}
__pyx_L32:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2000
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2006
* if links and f_j >= new_min_bound:
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False) # <<<<<<<<<<<<<<
* nt[-1] = old_last_nt
* if link_i < nt[-1][3]:
*/
- __pyx_t_8 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_2 = __pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_8, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_v_wc, __pyx_v_links, __pyx_v_nt, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_8, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_v_wc, __pyx_v_links, __pyx_v_nt, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2001
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2007
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False)
* nt[-1] = old_last_nt # <<<<<<<<<<<<<<
* if link_i < nt[-1][3]:
* span_dec(cover, link_i, nt[-1][3] - 1)
*/
- if (__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, sizeof(long), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, sizeof(long), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2002
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2008
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False)
* nt[-1] = old_last_nt
* if link_i < nt[-1][3]: # <<<<<<<<<<<<<<
* span_dec(cover, link_i, nt[-1][3] - 1)
* span_dec(e_nt_cover, link_i, nt[-1][3] - 1)
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_link_i, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_link_i, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2003
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2009
* nt[-1] = old_last_nt
* if link_i < nt[-1][3]:
* span_dec(cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<<
* span_dec(e_nt_cover, link_i, nt[-1][3] - 1)
* if link_j > nt[-1][4]:
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Subtract(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Subtract(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_cover));
@@ -60500,31 +61321,31 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2004
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2010
* if link_i < nt[-1][3]:
* span_dec(cover, link_i, nt[-1][3] - 1)
* span_dec(e_nt_cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<<
* if link_j > nt[-1][4]:
* span_dec(cover, nt[-1][4] + 1, link_j)
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
@@ -60535,7 +61356,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
@@ -60544,43 +61365,43 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L33:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2005
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2011
* span_dec(cover, link_i, nt[-1][3] - 1)
* span_dec(e_nt_cover, link_i, nt[-1][3] - 1)
* if link_j > nt[-1][4]: # <<<<<<<<<<<<<<
* span_dec(cover, nt[-1][4] + 1, link_j)
* span_dec(e_nt_cover, nt[-1][4] + 1, link_j)
*/
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_RichCompare(__pyx_v_link_j, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_v_link_j, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_5) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2006
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2012
* span_dec(e_nt_cover, link_i, nt[-1][3] - 1)
* if link_j > nt[-1][4]:
* span_dec(cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<<
* span_dec(e_nt_cover, nt[-1][4] + 1, link_j)
* # Try to start a new non-terminal, extract, extend
*/
- __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_cover));
@@ -60591,31 +61412,31 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2007
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2013
* if link_j > nt[-1][4]:
* span_dec(cover, nt[-1][4] + 1, link_j)
* span_dec(e_nt_cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<<
* # Try to start a new non-terminal, extract, extend
* if (not nt or f_j - nt[-1][2] > 1) and wc < self.max_length and len(nt) < self.max_nonterminals:
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Add(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
@@ -60626,7 +61447,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
@@ -60638,41 +61459,41 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L27:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2009
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2015
* span_dec(e_nt_cover, nt[-1][4] + 1, link_j)
* # Try to start a new non-terminal, extract, extend
* if (not nt or f_j - nt[-1][2] > 1) and wc < self.max_length and len(nt) < self.max_nonterminals: # <<<<<<<<<<<<<<
* # Check for collisions
* if not span_check(cover, link_i, link_j):
*/
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = (!__pyx_t_5);
if (!__pyx_t_3) {
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Subtract(__pyx_v_f_j, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Subtract(__pyx_v_f_j, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_6 = __pyx_t_5;
} else {
__pyx_t_6 = __pyx_t_3;
}
if (__pyx_t_6) {
- __pyx_t_8 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_3) {
- __pyx_t_7 = PyObject_Length(__pyx_v_nt); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Length(__pyx_v_nt); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = (__pyx_t_7 < __pyx_cur_scope->__pyx_v_self->max_nonterminals);
__pyx_t_15 = __pyx_t_5;
} else {
@@ -60684,17 +61505,17 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2011
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2017
* if (not nt or f_j - nt[-1][2] > 1) and wc < self.max_length and len(nt) < self.max_nonterminals:
* # Check for collisions
* if not span_check(cover, link_i, link_j): # <<<<<<<<<<<<<<
* return
* span_inc(cover, link_i, link_j)
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_check); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_check); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_cover));
@@ -60705,16 +61526,16 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_INCREF(__pyx_v_link_j);
PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
- __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_6 = ((!__pyx_t_3) != 0);
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2012
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2018
* # Check for collisions
* if not span_check(cover, link_i, link_j):
* return # <<<<<<<<<<<<<<
@@ -60728,16 +61549,16 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
__pyx_L36:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2013
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2019
* if not span_check(cover, link_i, link_j):
* return
* span_inc(cover, link_i, link_j) # <<<<<<<<<<<<<<
* span_inc(e_nt_cover, link_i, link_j)
* nt.append([(nt[-1][0] + 1) if nt else 1, f_j, f_j, link_i, link_j])
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_cover));
@@ -60748,23 +61569,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_INCREF(__pyx_v_link_j);
PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
- __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __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_8)); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2014
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2020
* return
* span_inc(cover, link_i, link_j)
* span_inc(e_nt_cover, link_i, link_j) # <<<<<<<<<<<<<<
* nt.append([(nt[-1][0] + 1) if nt else 1, f_j, f_j, link_i, link_j])
* # Require at least one word in phrase
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_inc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
@@ -60775,27 +61596,27 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_INCREF(__pyx_v_link_j);
PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
- __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2015
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2021
* span_inc(cover, link_i, link_j)
* span_inc(e_nt_cover, link_i, link_j)
* nt.append([(nt[-1][0] + 1) if nt else 1, f_j, f_j, link_i, link_j]) # <<<<<<<<<<<<<<
* # Require at least one word in phrase
* if links and f_j >= new_min_bound:
*/
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_6) {
- __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_2 = __pyx_t_8;
@@ -60804,7 +61625,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_INCREF(__pyx_int_1);
__pyx_t_2 = __pyx_int_1;
}
- __pyx_t_8 = PyList_New(5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyList_New(5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
@@ -60821,22 +61642,22 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
PyList_SET_ITEM(__pyx_t_8, 4, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
__pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_nt, ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_nt, ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2017
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2023
* nt.append([(nt[-1][0] + 1) if nt else 1, f_j, f_j, link_i, link_j])
* # Require at least one word in phrase
* if links and f_j >= new_min_bound: # <<<<<<<<<<<<<<
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False)
*/
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_6) {
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_15 = __pyx_t_3;
} else {
@@ -60844,33 +61665,33 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
}
if (__pyx_t_15) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2018
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2024
* # Require at least one word in phrase
* if links and f_j >= new_min_bound:
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) # <<<<<<<<<<<<<<
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False)
* nt.pop()
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_rules) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__form_rule); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__form_rule); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_8 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_8 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_8 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_8 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_f_i);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f_i);
@@ -60890,58 +61711,58 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_GIVEREF(__pyx_v_links);
__pyx_t_4 = 0;
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_1); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_1); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L37;
}
__pyx_L37:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2019
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2025
* if links and f_j >= new_min_bound:
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) # <<<<<<<<<<<<<<
* nt.pop()
* span_dec(cover, link_i, link_j)
*/
- __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_4 = __pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_1, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_t_8, __pyx_v_links, __pyx_v_nt, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_4 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_1, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_t_8, __pyx_v_links, __pyx_v_nt, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__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":2020
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2026
* rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links))
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False)
* nt.pop() # <<<<<<<<<<<<<<
* span_dec(cover, link_i, link_j)
* span_dec(e_nt_cover, link_i, link_j)
*/
- __pyx_t_4 = __Pyx_PyObject_Pop(__pyx_v_nt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Pop(__pyx_v_nt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2021
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2027
* extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False)
* nt.pop()
* span_dec(cover, link_i, link_j) # <<<<<<<<<<<<<<
* span_dec(e_nt_cover, link_i, link_j)
*
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_cover));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_cover));
@@ -60952,22 +61773,22 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_INCREF(__pyx_v_link_j);
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
- __pyx_t_8 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2022
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2028
* nt.pop()
* span_dec(cover, link_i, link_j)
* span_dec(e_nt_cover, link_i, link_j) # <<<<<<<<<<<<<<
*
* # Try to extract phrases from every f index
*/
- __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__span_dec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_e_nt_cover));
@@ -60978,7 +61799,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_INCREF(__pyx_v_link_j);
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_link_j);
__Pyx_GIVEREF(__pyx_v_link_j);
- __pyx_t_4 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
@@ -60995,7 +61816,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(((PyObject *)__pyx_t_14));
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.add_instance.extract", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.add_instance.extract", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_link_i);
@@ -61012,21 +61833,22 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1885
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1891
* # Aggregate stats from a training instance
* # (Extract rules, update counts)
- * def add_instance(self, f_words, e_words, alignment): # <<<<<<<<<<<<<<
+ * def add_instance(self, f_words, e_words, alignment, ctx_name=None): # <<<<<<<<<<<<<<
*
* self.online = True
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_words, PyObject *__pyx_v_e_words, PyObject *__pyx_v_alignment) {
- struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instance(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_words, PyObject *__pyx_v_e_words, PyObject *__pyx_v_alignment, PyObject *__pyx_v_ctx_name) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *__pyx_cur_scope;
PyObject *__pyx_v_e_len = NULL;
PyObject *__pyx_v_f = NULL;
PyObject *__pyx_v_e = NULL;
CYTHON_UNUSED PyObject *__pyx_v_f_nt_cover = NULL;
long __pyx_v_f_i;
+ PyObject *__pyx_v_stats = NULL;
CYTHON_UNUSED PyObject *__pyx_v_lex_i = NULL;
CYTHON_UNUSED PyObject *__pyx_v_lex_j = NULL;
PyObject *__pyx_v_rule = NULL;
@@ -61057,7 +61879,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("add_instance", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *)__pyx_tp_new_3_sa___pyx_scope_struct_21_add_instance(__pyx_ptype_3_sa___pyx_scope_struct_21_add_instance, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -61073,8 +61895,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_words);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e_words);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1887
- * def add_instance(self, f_words, e_words, alignment):
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1893
+ * def add_instance(self, f_words, e_words, alignment, ctx_name=None):
*
* self.online = True # <<<<<<<<<<<<<<
*
@@ -61082,20 +61904,20 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
*/
__pyx_cur_scope->__pyx_v_self->online = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1894
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1900
* # span more than once.
* # (f, e, al, lex_f_i, lex_f_j)
* rules = set() # <<<<<<<<<<<<<<
*
* f_len = len(f_words)
*/
- __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_cur_scope->__pyx_v_rules = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1896
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1902
* rules = set()
*
* f_len = len(f_words) # <<<<<<<<<<<<<<
@@ -61104,15 +61926,15 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
*/
__pyx_t_1 = __pyx_cur_scope->__pyx_v_f_words;
__Pyx_INCREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_cur_scope->__pyx_v_f_len = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1897
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1903
*
* f_len = len(f_words)
* e_len = len(e_words) # <<<<<<<<<<<<<<
@@ -61121,35 +61943,35 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
*/
__pyx_t_1 = __pyx_cur_scope->__pyx_v_e_words;
__Pyx_INCREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_e_len = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1900
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1906
*
* # Pre-compute alignment info
* al = [[] for i in range(f_len)] # <<<<<<<<<<<<<<
* fe_span = [[e_len + 1, -1] for i in range(f_len)]
* ef_span = [[f_len + 1, -1] for i in range(e_len)]
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __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 = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_len);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_f_len);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_len);
- __pyx_t_4 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
__pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
@@ -61158,23 +61980,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_5(__pyx_t_3);
if (unlikely(!__pyx_t_4)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -61183,9 +62005,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_4;
__pyx_t_4 = 0;
- __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -61193,28 +62015,28 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_cur_scope->__pyx_v_al = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1901
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1907
* # Pre-compute alignment info
* al = [[] for i in range(f_len)]
* fe_span = [[e_len + 1, -1] for i in range(f_len)] # <<<<<<<<<<<<<<
* ef_span = [[f_len + 1, -1] for i in range(e_len)]
* for f, e in alignment:
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_len);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_f_len);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_len);
- __pyx_t_4 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
__pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
@@ -61223,23 +62045,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_5(__pyx_t_3);
if (unlikely(!__pyx_t_4)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -61248,9 +62070,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_4;
__pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Add(__pyx_v_e_len, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_e_len, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
@@ -61258,7 +62080,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
__pyx_t_4 = 0;
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -61266,28 +62088,28 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_cur_scope->__pyx_v_fe_span = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1902
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1908
* al = [[] for i in range(f_len)]
* fe_span = [[e_len + 1, -1] for i in range(f_len)]
* ef_span = [[f_len + 1, -1] for i in range(e_len)] # <<<<<<<<<<<<<<
* for f, e in alignment:
* al[f].append(e)
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_e_len);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_e_len);
__Pyx_GIVEREF(__pyx_v_e_len);
- __pyx_t_6 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
__pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
@@ -61296,23 +62118,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_6 = __pyx_t_5(__pyx_t_3);
if (unlikely(!__pyx_t_6)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -61321,9 +62143,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_6;
__pyx_t_6 = 0;
- __pyx_t_6 = PyNumber_Add(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Add(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
@@ -61331,7 +62153,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
__pyx_t_6 = 0;
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -61339,7 +62161,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_cur_scope->__pyx_v_ef_span = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1903
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1909
* fe_span = [[e_len + 1, -1] for i in range(f_len)]
* ef_span = [[f_len + 1, -1] for i in range(e_len)]
* for f, e in alignment: # <<<<<<<<<<<<<<
@@ -61350,7 +62172,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_t_1 = __pyx_v_alignment; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -61358,23 +62180,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_3 = __pyx_t_5(__pyx_t_1);
if (unlikely(!__pyx_t_3)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -61390,7 +62212,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -61403,16 +62225,16 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(__pyx_t_6);
#else
- __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
#endif
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
@@ -61420,7 +62242,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_GOTREF(__pyx_t_4);
index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed;
__Pyx_GOTREF(__pyx_t_6);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L12_unpacking_done;
@@ -61428,7 +62250,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L12_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_f);
@@ -61438,21 +62260,21 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_v_e = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1904
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1910
* ef_span = [[f_len + 1, -1] for i in range(e_len)]
* for f, e in alignment:
* al[f].append(e) # <<<<<<<<<<<<<<
* fe_span[f][0] = min(fe_span[f][0], e)
* fe_span[f][1] = max(fe_span[f][1], e)
*/
- __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_e); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_e); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1905
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1911
* for f, e in alignment:
* al[f].append(e)
* fe_span[f][0] = min(fe_span[f][0], e) # <<<<<<<<<<<<<<
@@ -61461,13 +62283,13 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
*/
__Pyx_INCREF(__pyx_v_e);
__pyx_t_6 = __pyx_v_e;
- __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_9) {
__Pyx_INCREF(__pyx_t_6);
@@ -61481,13 +62303,13 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_t_6 = __pyx_t_3;
__Pyx_INCREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_SetItemInt(__pyx_t_3, 0, __pyx_t_6, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_3, 0, __pyx_t_6, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1906
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1912
* al[f].append(e)
* fe_span[f][0] = min(fe_span[f][0], e)
* fe_span[f][1] = max(fe_span[f][1], e) # <<<<<<<<<<<<<<
@@ -61496,13 +62318,13 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
*/
__Pyx_INCREF(__pyx_v_e);
__pyx_t_6 = __pyx_v_e;
- __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_9) {
__Pyx_INCREF(__pyx_t_6);
@@ -61516,13 +62338,13 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_t_6 = __pyx_t_3;
__Pyx_INCREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_fe_span), __pyx_v_f); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_SetItemInt(__pyx_t_3, 1, __pyx_t_6, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_3, 1, __pyx_t_6, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1907
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1913
* fe_span[f][0] = min(fe_span[f][0], e)
* fe_span[f][1] = max(fe_span[f][1], e)
* ef_span[e][0] = min(ef_span[e][0], f) # <<<<<<<<<<<<<<
@@ -61531,13 +62353,13 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
*/
__Pyx_INCREF(__pyx_v_f);
__pyx_t_6 = __pyx_v_f;
- __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_e); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_e); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_9) {
__Pyx_INCREF(__pyx_t_6);
@@ -61551,13 +62373,13 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_t_6 = __pyx_t_3;
__Pyx_INCREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_e); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_e); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_SetItemInt(__pyx_t_3, 0, __pyx_t_6, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_3, 0, __pyx_t_6, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1908
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1914
* fe_span[f][1] = max(fe_span[f][1], e)
* ef_span[e][0] = min(ef_span[e][0], f)
* ef_span[e][1] = max(ef_span[e][1], f) # <<<<<<<<<<<<<<
@@ -61566,13 +62388,13 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
*/
__Pyx_INCREF(__pyx_v_f);
__pyx_t_6 = __pyx_v_f;
- __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_e); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_e); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_9) {
__Pyx_INCREF(__pyx_t_6);
@@ -61586,27 +62408,27 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_t_6 = __pyx_t_3;
__Pyx_INCREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_e); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_ef_span), __pyx_v_e); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_SetItemInt(__pyx_t_3, 1, __pyx_t_6, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_3, 1, __pyx_t_6, sizeof(long), PyInt_FromLong, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1911
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1917
*
* # Target side word coverage
* cover = [0] * e_len # <<<<<<<<<<<<<<
* # Non-terminal coverage
* f_nt_cover = [0] * f_len
*/
- __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_int_0);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
- { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_e_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_e_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_temp);
__Pyx_DECREF(__pyx_t_1);
__pyx_t_1 = __pyx_temp;
@@ -61615,19 +62437,19 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_cur_scope->__pyx_v_cover = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1913
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1919
* cover = [0] * e_len
* # Non-terminal coverage
* f_nt_cover = [0] * f_len # <<<<<<<<<<<<<<
* e_nt_cover = [0] * e_len
*
*/
- __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_int_0);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
- { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_cur_scope->__pyx_v_f_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_cur_scope->__pyx_v_f_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_temp);
__Pyx_DECREF(__pyx_t_1);
__pyx_t_1 = __pyx_temp;
@@ -61635,19 +62457,19 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_v_f_nt_cover = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1914
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1920
* # Non-terminal coverage
* f_nt_cover = [0] * f_len
* e_nt_cover = [0] * e_len # <<<<<<<<<<<<<<
*
* # Extract all possible hierarchical phrases starting at a source index
*/
- __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_int_0);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
- { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_e_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_e_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_temp);
__Pyx_DECREF(__pyx_t_1);
__pyx_t_1 = __pyx_temp;
@@ -61656,44 +62478,44 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_cur_scope->__pyx_v_e_nt_cover = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1919
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1925
* # f_ i and j are current, e_ i and j are previous
* # We care _considering_ f_j, so it is not yet in counts
* def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<<
* # Phrase extraction limits
* if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size:
*/
- __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_12add_instance_1extract, 0, __pyx_n_s_144, ((PyObject*)__pyx_cur_scope), __pyx_n_s___sa, ((PyObject *)__pyx_k_codeobj_142)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_1extract, 0, __pyx_n_s_145, ((PyObject*)__pyx_cur_scope), __pyx_n_s_102, ((PyObject *)__pyx_k_codeobj_143)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_cur_scope->__pyx_v_extract = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2025
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2031
*
* # Try to extract phrases from every f index
* for f_i from 0 <= f_i < f_len: # <<<<<<<<<<<<<<
* # Skip if phrases won't be tight on left side
* if not al[f_i]:
*/
- __pyx_t_10 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_f_len); if (unlikely((__pyx_t_10 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_f_len); if (unlikely((__pyx_t_10 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
for (__pyx_v_f_i = 0; __pyx_v_f_i < __pyx_t_10; __pyx_v_f_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2027
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2033
* for f_i from 0 <= f_i < f_len:
* # Skip if phrases won't be tight on left side
* if not al[f_i]: # <<<<<<<<<<<<<<
* continue
* extract(f_i, f_i, f_len + 1, -1, f_i, 0, [], [], False)
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_11 = ((!__pyx_t_9) != 0);
if (__pyx_t_11) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2028
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2034
* # Skip if phrases won't be tight on left side
* if not al[f_i]:
* continue # <<<<<<<<<<<<<<
@@ -61705,28 +62527,28 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
}
__pyx_L15:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2029
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2035
* if not al[f_i]:
* continue
* extract(f_i, f_i, f_len + 1, -1, f_i, 0, [], [], False) # <<<<<<<<<<<<<<
*
- * # Update possible phrases (samples)
+ * stats = self.online_stats[ctx_name]
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_f_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_f_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyInt_FromLong(__pyx_v_f_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_f_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = PyNumber_Add(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Add(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyInt_FromLong(__pyx_v_f_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_f_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_13 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
- __pyx_t_14 = __pyx_pf_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_t_1, __pyx_t_6, __pyx_t_3, __pyx_int_neg_1, __pyx_t_4, __pyx_int_0, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_12), __pyx_t_13); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_t_1, __pyx_t_6, __pyx_t_3, __pyx_int_neg_1, __pyx_t_4, __pyx_int_0, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_12), __pyx_t_13); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -61739,21 +62561,33 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_L13_continue:;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2034
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2037
+ * extract(f_i, f_i, f_len + 1, -1, f_i, 0, [], [], False)
+ *
+ * stats = self.online_stats[ctx_name] # <<<<<<<<<<<<<<
+ *
+ * # Update possible phrases (samples)
+ */
+ __pyx_t_14 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->online_stats, __pyx_v_ctx_name); if (!__pyx_t_14) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_v_stats = __pyx_t_14;
+ __pyx_t_14 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2042
* # This could be more efficiently integrated with extraction
* # at the cost of readability
* for f, lex_i, lex_j in self.get_f_phrases(f_words): # <<<<<<<<<<<<<<
- * self.samples_f[f] += 1
+ * stats.samples_f[f] += 1
*
*/
- __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__get_f_phrases); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__get_f_phrases); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_words);
PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_cur_scope->__pyx_v_f_words);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_words);
- __pyx_t_12 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
@@ -61761,7 +62595,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_t_13 = __pyx_t_12; __Pyx_INCREF(__pyx_t_13); __pyx_t_2 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__pyx_t_5 = Py_TYPE(__pyx_t_13)->tp_iternext;
}
@@ -61770,23 +62604,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_13)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_13)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_12); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_12); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_13)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_12); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_12); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_12 = __pyx_t_5(__pyx_t_13);
if (unlikely(!__pyx_t_12)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -61802,7 +62636,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (unlikely(size != 3)) {
if (size > 3) __Pyx_RaiseTooManyValuesError(3);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -61818,18 +62652,18 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(__pyx_t_4);
#else
- __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
#endif
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_3 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext;
@@ -61839,7 +62673,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_GOTREF(__pyx_t_7);
index = 2; __pyx_t_4 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L18_unpacking_failed;
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L19_unpacking_done;
@@ -61847,7 +62681,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L19_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_f);
@@ -61860,37 +62694,37 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_v_lex_j = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2035
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2043
* # at the cost of readability
* for f, lex_i, lex_j in self.get_f_phrases(f_words):
- * self.samples_f[f] += 1 # <<<<<<<<<<<<<<
+ * stats.samples_f[f] += 1 # <<<<<<<<<<<<<<
*
* # Update phrase counts
*/
- __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->samples_f);
- __pyx_t_12 = __pyx_cur_scope->__pyx_v_self->samples_f;
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__samples_f); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
__Pyx_INCREF(__pyx_v_f);
__pyx_t_4 = __pyx_v_f;
- __pyx_t_7 = PyObject_GetItem(__pyx_t_12, __pyx_t_4); if (!__pyx_t_7) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetItem(__pyx_t_12, __pyx_t_4); if (!__pyx_t_7) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (PyObject_SetItem(__pyx_t_12, __pyx_t_4, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_12, __pyx_t_4, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2038
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2046
*
* # Update phrase counts
* for rule in rules: # <<<<<<<<<<<<<<
* (f_ph, e_ph, al) = rule[:3]
- * self.phrases_f[f_ph] += 1
+ * stats.phrases_f[f_ph] += 1
*/
- __pyx_t_13 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_rules)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_rules)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__pyx_t_5 = Py_TYPE(__pyx_t_13)->tp_iternext;
for (;;) {
@@ -61899,7 +62733,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (unlikely(!__pyx_t_12)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -61909,14 +62743,14 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_v_rule = __pyx_t_12;
__pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2039
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2047
* # Update phrase counts
* for rule in rules:
* (f_ph, e_ph, al) = rule[:3] # <<<<<<<<<<<<<<
- * self.phrases_f[f_ph] += 1
- * self.phrases_e[e_ph] += 1
+ * stats.phrases_f[f_ph] += 1
+ * stats.phrases_e[e_ph] += 1
*/
- __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_rule, 0, 3, NULL, NULL, &__pyx_k_slice_145, 0, 1, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_rule, 0, 3, NULL, NULL, &__pyx_k_slice_146, 0, 1, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) {
PyObject* sequence = __pyx_t_12;
@@ -61928,7 +62762,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (unlikely(size != 3)) {
if (size > 3) __Pyx_RaiseTooManyValuesError(3);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -61944,18 +62778,18 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_INCREF(__pyx_t_14);
__Pyx_INCREF(__pyx_t_7);
#else
- __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
#endif
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_3 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext;
@@ -61965,7 +62799,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_GOTREF(__pyx_t_14);
index = 2; __pyx_t_7 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_7)) goto __pyx_L22_unpacking_failed;
__Pyx_GOTREF(__pyx_t_7);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L23_unpacking_done;
@@ -61973,7 +62807,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L23_unpacking_done:;
}
__Pyx_XDECREF(__pyx_v_f_ph);
@@ -61988,115 +62822,124 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__pyx_cur_scope->__pyx_v_al = __pyx_t_7;
__pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2040
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2048
* for rule in rules:
* (f_ph, e_ph, al) = rule[:3]
- * self.phrases_f[f_ph] += 1 # <<<<<<<<<<<<<<
- * self.phrases_e[e_ph] += 1
- * self.phrases_fe[f_ph][e_ph] += 1
+ * stats.phrases_f[f_ph] += 1 # <<<<<<<<<<<<<<
+ * stats.phrases_e[e_ph] += 1
+ * stats.phrases_fe[f_ph][e_ph] += 1
*/
- __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->phrases_f);
- __pyx_t_12 = __pyx_cur_scope->__pyx_v_self->phrases_f;
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__phrases_f); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
__Pyx_INCREF(__pyx_v_f_ph);
__pyx_t_7 = __pyx_v_f_ph;
- __pyx_t_14 = PyObject_GetItem(__pyx_t_12, __pyx_t_7); if (!__pyx_t_14) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyObject_GetItem(__pyx_t_12, __pyx_t_7); if (!__pyx_t_14) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- if (PyObject_SetItem(__pyx_t_12, __pyx_t_7, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_12, __pyx_t_7, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2041
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2049
* (f_ph, e_ph, al) = rule[:3]
- * self.phrases_f[f_ph] += 1
- * self.phrases_e[e_ph] += 1 # <<<<<<<<<<<<<<
- * self.phrases_fe[f_ph][e_ph] += 1
- * if not self.phrases_al[f_ph][e_ph]:
+ * stats.phrases_f[f_ph] += 1
+ * stats.phrases_e[e_ph] += 1 # <<<<<<<<<<<<<<
+ * stats.phrases_fe[f_ph][e_ph] += 1
+ * if not stats.phrases_al[f_ph][e_ph]:
*/
- __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->phrases_e);
- __pyx_t_12 = __pyx_cur_scope->__pyx_v_self->phrases_e;
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__phrases_e); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
__Pyx_INCREF(__pyx_v_e_ph);
__pyx_t_7 = __pyx_v_e_ph;
- __pyx_t_4 = PyObject_GetItem(__pyx_t_12, __pyx_t_7); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_12, __pyx_t_7); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (PyObject_SetItem(__pyx_t_12, __pyx_t_7, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_12, __pyx_t_7, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2042
- * self.phrases_f[f_ph] += 1
- * self.phrases_e[e_ph] += 1
- * self.phrases_fe[f_ph][e_ph] += 1 # <<<<<<<<<<<<<<
- * if not self.phrases_al[f_ph][e_ph]:
- * self.phrases_al[f_ph][e_ph] = al
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2050
+ * stats.phrases_f[f_ph] += 1
+ * stats.phrases_e[e_ph] += 1
+ * stats.phrases_fe[f_ph][e_ph] += 1 # <<<<<<<<<<<<<<
+ * if not stats.phrases_al[f_ph][e_ph]:
+ * stats.phrases_al[f_ph][e_ph] = al
*/
- __pyx_t_12 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->phrases_fe, __pyx_v_f_ph); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__phrases_fe); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_7 = PyObject_GetItem(__pyx_t_12, __pyx_v_f_ph); if (!__pyx_t_7) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_INCREF(__pyx_v_e_ph);
- __pyx_t_7 = __pyx_v_e_ph;
- __pyx_t_14 = PyObject_GetItem(__pyx_t_12, __pyx_t_7); if (!__pyx_t_14) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __pyx_v_e_ph;
+ __pyx_t_14 = PyObject_GetItem(__pyx_t_7, __pyx_t_12); if (!__pyx_t_14) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- if (PyObject_SetItem(__pyx_t_12, __pyx_t_7, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_7, __pyx_t_12, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2043
- * self.phrases_e[e_ph] += 1
- * self.phrases_fe[f_ph][e_ph] += 1
- * if not self.phrases_al[f_ph][e_ph]: # <<<<<<<<<<<<<<
- * self.phrases_al[f_ph][e_ph] = al
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2051
+ * stats.phrases_e[e_ph] += 1
+ * stats.phrases_fe[f_ph][e_ph] += 1
+ * if not stats.phrases_al[f_ph][e_ph]: # <<<<<<<<<<<<<<
+ * stats.phrases_al[f_ph][e_ph] = al
*
*/
- __pyx_t_12 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->phrases_al, __pyx_v_f_ph); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__phrases_al); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_12 = PyObject_GetItem(__pyx_t_7, __pyx_v_f_ph); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_7 = PyObject_GetItem(__pyx_t_12, __pyx_v_e_ph); if (!__pyx_t_7) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyObject_GetItem(__pyx_t_12, __pyx_v_e_ph); if (!__pyx_t_7) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_9 = ((!__pyx_t_11) != 0);
if (__pyx_t_9) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2044
- * self.phrases_fe[f_ph][e_ph] += 1
- * if not self.phrases_al[f_ph][e_ph]:
- * self.phrases_al[f_ph][e_ph] = al # <<<<<<<<<<<<<<
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2052
+ * stats.phrases_fe[f_ph][e_ph] += 1
+ * if not stats.phrases_al[f_ph][e_ph]:
+ * stats.phrases_al[f_ph][e_ph] = al # <<<<<<<<<<<<<<
*
* # Update Bilexical counts
*/
- __pyx_t_7 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->phrases_al, __pyx_v_f_ph); if (!__pyx_t_7) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__phrases_al); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- if (PyObject_SetItem(__pyx_t_7, __pyx_v_e_ph, __pyx_cur_scope->__pyx_v_al) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_GetItem(__pyx_t_7, __pyx_v_f_ph); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (PyObject_SetItem(__pyx_t_12, __pyx_v_e_ph, __pyx_cur_scope->__pyx_v_al) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
goto __pyx_L24;
}
__pyx_L24:;
}
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2047
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2055
*
* # Update Bilexical counts
* for e_w in e_words: # <<<<<<<<<<<<<<
- * self.bilex_e[e_w] += 1
+ * stats.bilex_e[e_w] += 1
* for f_w in f_words:
*/
if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_e_words) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_e_words)) {
__pyx_t_13 = __pyx_cur_scope->__pyx_v_e_words; __Pyx_INCREF(__pyx_t_13); __pyx_t_2 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_e_words); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_e_words); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__pyx_t_5 = Py_TYPE(__pyx_t_13)->tp_iternext;
}
@@ -62104,67 +62947,67 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_13)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_13)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_12); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_13)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_12); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_7 = __pyx_t_5(__pyx_t_13);
- if (unlikely(!__pyx_t_7)) {
+ __pyx_t_12 = __pyx_t_5(__pyx_t_13);
+ if (unlikely(!__pyx_t_12)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GOTREF(__pyx_t_12);
}
__Pyx_XDECREF(__pyx_v_e_w);
- __pyx_v_e_w = __pyx_t_7;
- __pyx_t_7 = 0;
+ __pyx_v_e_w = __pyx_t_12;
+ __pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2048
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2056
* # Update Bilexical counts
* for e_w in e_words:
- * self.bilex_e[e_w] += 1 # <<<<<<<<<<<<<<
+ * stats.bilex_e[e_w] += 1 # <<<<<<<<<<<<<<
* for f_w in f_words:
- * self.bilex_f[f_w] += 1
+ * stats.bilex_f[f_w] += 1
*/
- __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->bilex_e);
- __pyx_t_7 = __pyx_cur_scope->__pyx_v_self->bilex_e;
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__bilex_e); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
__Pyx_INCREF(__pyx_v_e_w);
- __pyx_t_12 = __pyx_v_e_w;
- __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_t_12); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __pyx_v_e_w;
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_12, __pyx_t_7); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (PyObject_SetItem(__pyx_t_7, __pyx_t_12, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_12, __pyx_t_7, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2049
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2057
* for e_w in e_words:
- * self.bilex_e[e_w] += 1
+ * stats.bilex_e[e_w] += 1
* for f_w in f_words: # <<<<<<<<<<<<<<
- * self.bilex_f[f_w] += 1
+ * stats.bilex_f[f_w] += 1
* for e_w in e_words:
*/
if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_f_words) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_f_words)) {
__pyx_t_13 = __pyx_cur_scope->__pyx_v_f_words; __Pyx_INCREF(__pyx_t_13); __pyx_t_2 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_f_words); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_f_words); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__pyx_t_5 = Py_TYPE(__pyx_t_13)->tp_iternext;
}
@@ -62172,120 +63015,123 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_13)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_13)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_12); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_13)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_12); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_7 = __pyx_t_5(__pyx_t_13);
- if (unlikely(!__pyx_t_7)) {
+ __pyx_t_12 = __pyx_t_5(__pyx_t_13);
+ if (unlikely(!__pyx_t_12)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GOTREF(__pyx_t_12);
}
__Pyx_XDECREF(__pyx_v_f_w);
- __pyx_v_f_w = __pyx_t_7;
- __pyx_t_7 = 0;
+ __pyx_v_f_w = __pyx_t_12;
+ __pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2050
- * self.bilex_e[e_w] += 1
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2058
+ * stats.bilex_e[e_w] += 1
* for f_w in f_words:
- * self.bilex_f[f_w] += 1 # <<<<<<<<<<<<<<
+ * stats.bilex_f[f_w] += 1 # <<<<<<<<<<<<<<
* for e_w in e_words:
- * self.bilex_fe[f_w][e_w] += 1
+ * stats.bilex_fe[f_w][e_w] += 1
*/
- __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->bilex_f);
- __pyx_t_7 = __pyx_cur_scope->__pyx_v_self->bilex_f;
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__bilex_f); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
__Pyx_INCREF(__pyx_v_f_w);
- __pyx_t_12 = __pyx_v_f_w;
- __pyx_t_14 = PyObject_GetItem(__pyx_t_7, __pyx_t_12); if (!__pyx_t_14) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __pyx_v_f_w;
+ __pyx_t_14 = PyObject_GetItem(__pyx_t_12, __pyx_t_7); if (!__pyx_t_14) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- if (PyObject_SetItem(__pyx_t_7, __pyx_t_12, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_12, __pyx_t_7, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2051
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2059
* for f_w in f_words:
- * self.bilex_f[f_w] += 1
+ * stats.bilex_f[f_w] += 1
* for e_w in e_words: # <<<<<<<<<<<<<<
- * self.bilex_fe[f_w][e_w] += 1
+ * stats.bilex_fe[f_w][e_w] += 1
*
*/
if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_e_words) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_e_words)) {
- __pyx_t_7 = __pyx_cur_scope->__pyx_v_e_words; __Pyx_INCREF(__pyx_t_7); __pyx_t_15 = 0;
+ __pyx_t_12 = __pyx_cur_scope->__pyx_v_e_words; __Pyx_INCREF(__pyx_t_12); __pyx_t_15 = 0;
__pyx_t_16 = NULL;
} else {
- __pyx_t_15 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_e_words); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_16 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ __pyx_t_15 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_e_words); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_16 = Py_TYPE(__pyx_t_12)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_7)) {
- if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_7)) break;
+ if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_12)) {
+ if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_12)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_12 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_12 = PySequence_ITEM(__pyx_t_7, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_12, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_7)) {
- if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+ } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_12)) {
+ if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_12 = PySequence_ITEM(__pyx_t_7, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_12, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_12 = __pyx_t_16(__pyx_t_7);
- if (unlikely(!__pyx_t_12)) {
+ __pyx_t_7 = __pyx_t_16(__pyx_t_12);
+ if (unlikely(!__pyx_t_7)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GOTREF(__pyx_t_7);
}
__Pyx_XDECREF(__pyx_v_e_w);
- __pyx_v_e_w = __pyx_t_12;
- __pyx_t_12 = 0;
+ __pyx_v_e_w = __pyx_t_7;
+ __pyx_t_7 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2052
- * self.bilex_f[f_w] += 1
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2060
+ * stats.bilex_f[f_w] += 1
* for e_w in e_words:
- * self.bilex_fe[f_w][e_w] += 1 # <<<<<<<<<<<<<<
+ * stats.bilex_fe[f_w][e_w] += 1 # <<<<<<<<<<<<<<
*
* # Create a rule from source, target, non-terminals, and alignments
*/
- __pyx_t_12 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->bilex_fe, __pyx_v_f_w); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__bilex_fe); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_v_f_w); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_INCREF(__pyx_v_e_w);
- __pyx_t_4 = __pyx_v_e_w;
- __pyx_t_14 = PyObject_GetItem(__pyx_t_12, __pyx_t_4); if (!__pyx_t_14) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __pyx_v_e_w;
+ __pyx_t_14 = PyObject_GetItem(__pyx_t_4, __pyx_t_7); if (!__pyx_t_14) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- if (PyObject_SetItem(__pyx_t_12, __pyx_t_4, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
@@ -62300,13 +63146,14 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
__Pyx_XDECREF(__pyx_t_14);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.add_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.add_instance", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_e_len);
__Pyx_XDECREF(__pyx_v_f);
__Pyx_XDECREF(__pyx_v_e);
__Pyx_XDECREF(__pyx_v_f_nt_cover);
+ __Pyx_XDECREF(__pyx_v_stats);
__Pyx_XDECREF(__pyx_v_lex_i);
__Pyx_XDECREF(__pyx_v_lex_j);
__Pyx_XDECREF(__pyx_v_rule);
@@ -62322,8 +63169,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_25add_instance(struct _
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_28form_rule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_28form_rule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_28form_rule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_28form_rule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_f_i = 0;
PyObject *__pyx_v_e_i = 0;
PyObject *__pyx_v_f_span = 0;
@@ -62360,31 +63207,31 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_28form_rule(PyObject *_
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e_i)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f_span)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e_span)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nt)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 5:
if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__al)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "form_rule") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "form_rule") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
goto __pyx_L5_argtuple_error;
@@ -62405,21 +63252,21 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_28form_rule(PyObject *_
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.form_rule", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.form_rule", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_f_i, __pyx_v_e_i, __pyx_v_f_span, __pyx_v_e_span, __pyx_v_nt, __pyx_v_al);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_f_i, __pyx_v_e_i, __pyx_v_f_span, __pyx_v_e_span, __pyx_v_nt, __pyx_v_al);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7 = {__Pyx_NAMESTR("lambda7"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7 = {__Pyx_NAMESTR("lambda7"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_x = 0;
PyObject *__pyx_v_y = 0;
int __pyx_lineno = 0;
@@ -62448,11 +63295,11 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7(PyOb
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("lambda7", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("lambda7", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda7") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda7") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -62465,9 +63312,9 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7(PyOb
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("lambda7", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("lambda7", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.form_rule.lambda7", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.form_rule.lambda7", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
@@ -62476,7 +63323,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7(PyOb
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2058
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2066
*
* # Substitute in non-terminals
* nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) # <<<<<<<<<<<<<<
@@ -62495,11 +63342,11 @@ static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("lambda7", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_y, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_y, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
@@ -62507,7 +63354,7 @@ static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_1 = 0;
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_cmp, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_cmp, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__pyx_r = __pyx_t_2;
@@ -62520,7 +63367,7 @@ static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.form_rule.lambda7", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.form_rule.lambda7", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -62529,9 +63376,9 @@ static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8 = {__Pyx_NAMESTR("lambda8"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8 = {__Pyx_NAMESTR("lambda8"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_x = 0;
PyObject *__pyx_v_y = 0;
int __pyx_lineno = 0;
@@ -62560,11 +63407,11 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8(PyO
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("lambda8", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("lambda8", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda8") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda8") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -62577,9 +63424,9 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8(PyO
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("lambda8", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("lambda8", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.form_rule.lambda8", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.form_rule.lambda8", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
@@ -62588,7 +63435,7 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8(PyO
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2082
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2090
* # Adjusting alignment links takes some doing
* links = [list(link) for sub in al for link in sub]
* links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) # <<<<<<<<<<<<<<
@@ -62607,11 +63454,11 @@ static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("lambda8", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_y, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_y, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
@@ -62619,7 +63466,7 @@ static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_1 = 0;
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_cmp, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_cmp, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__pyx_r = __pyx_t_2;
@@ -62632,16 +63479,16 @@ static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.form_rule.lambda8", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.form_rule.lambda8", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2116
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2124
* f = Phrase(f_sym)
* e = Phrase(e_sym)
* a = tuple(self.alignment.link(i, j) for i, j in links) # <<<<<<<<<<<<<<
@@ -62649,25 +63496,25 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15
*
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_9form_rule_2genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_2genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_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_23_genexpr *)__pyx_tp_new_3_sa___pyx_scope_struct_23_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_23_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_23_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_22_form_rule *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *) __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_23HieroCachingRuleFactory_9form_rule_4generator15, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -62676,7 +63523,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_9form_rule_2genexpr(PyO
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.form_rule.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.form_rule.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -62685,9 +63532,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_9form_rule_2genexpr(PyO
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -62711,19 +63558,19 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15
return NULL;
}
__pyx_L3_first_run:;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_links)) { __Pyx_RaiseClosureNameError("links"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_links)) { __Pyx_RaiseClosureNameError("links"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_links) == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_links); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
for (;;) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
PyObject* sequence = __pyx_t_3;
@@ -62735,7 +63582,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
@@ -62748,16 +63595,16 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(__pyx_t_5);
#else
- __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
#endif
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
{
Py_ssize_t index = -1;
- __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
@@ -62765,7 +63612,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15
__Pyx_GOTREF(__pyx_t_4);
index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
__Pyx_GOTREF(__pyx_t_5);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_7 = NULL;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L7_unpacking_done;
@@ -62773,7 +63620,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_7 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L7_unpacking_done:;
}
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
@@ -62786,10 +63633,10 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15
__Pyx_GIVEREF(__pyx_t_5);
__pyx_cur_scope->__pyx_v_j = __pyx_t_5;
__pyx_t_5 = 0;
- if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_i); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_j); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PyInt_FromLong(((struct __pyx_vtabstruct_3_sa_Alignment *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment->__pyx_vtab)->link(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment, __pyx_t_8, __pyx_t_9)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_i); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_cur_scope->__pyx_v_j); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment->__pyx_vtab)->link(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment, __pyx_t_8, __pyx_t_9)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
@@ -62806,7 +63653,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15
__pyx_cur_scope->__pyx_t_0 = 0;
__Pyx_XGOTREF(__pyx_t_1);
__pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyErr_SetNone(PyExc_StopIteration);
@@ -62826,7 +63673,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2055
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2063
*
* # Create a rule from source, target, non-terminals, and alignments
* def form_rule(self, f_i, e_i, f_span, e_span, nt, al): # <<<<<<<<<<<<<<
@@ -62834,8 +63681,8 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15
* # Substitute in non-terminals
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_e_i, PyObject *__pyx_v_f_span, PyObject *__pyx_v_e_span, PyObject *__pyx_v_nt, PyObject *__pyx_v_al) {
- struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_e_i, PyObject *__pyx_v_f_span, PyObject *__pyx_v_e_span, PyObject *__pyx_v_nt, PyObject *__pyx_v_al) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *__pyx_cur_scope;
PyObject *__pyx_v_nt_inv = NULL;
PyObject *__pyx_v_f_sym = NULL;
PyObject *__pyx_v_off = NULL;
@@ -62848,8 +63695,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
PyObject *__pyx_v_nt_i = NULL;
PyObject *__pyx_v_lex_f_i = NULL;
PyObject *__pyx_v_lex_f_j = NULL;
- struct __pyx_obj_3_sa_Phrase *__pyx_v_f = NULL;
- struct __pyx_obj_3_sa_Phrase *__pyx_v_e = NULL;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_f = NULL;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_e = NULL;
PyObject *__pyx_v_a = NULL;
PyObject *__pyx_v_sub = NULL;
PyObject *__pyx_v_link = NULL;
@@ -62873,7 +63720,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("form_rule", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *)__pyx_tp_new_3_sa___pyx_scope_struct_22_form_rule(__pyx_ptype_3_sa___pyx_scope_struct_22_form_rule, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -62883,52 +63730,52 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__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/rulefactory.pxi":2058
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2066
*
* # Substitute in non-terminals
* nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) # <<<<<<<<<<<<<<
* f_sym = list(f_span[:])
* off = f_i
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_nt);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_nt);
__Pyx_GIVEREF(__pyx_v_nt);
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
- __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7, 0, __pyx_n_s_146, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_lambda7, 0, __pyx_n_s_147, NULL, __pyx_n_s_102, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__cmp), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__cmp), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__pyx_v_nt_inv = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2059
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2067
* # Substitute in non-terminals
* nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3]))
* f_sym = list(f_span[:]) # <<<<<<<<<<<<<<
* off = f_i
* for next_nt in nt:
*/
- __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_f_span, 0, 0, NULL, NULL, &__pyx_k_slice_147, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_f_span, 0, 0, NULL, NULL, &__pyx_k_slice_148, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__pyx_v_f_sym = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2060
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2068
* nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3]))
* f_sym = list(f_span[:])
* off = f_i # <<<<<<<<<<<<<<
@@ -62938,7 +63785,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_INCREF(__pyx_v_f_i);
__pyx_v_off = __pyx_v_f_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2061
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2069
* f_sym = list(f_span[:])
* off = f_i
* for next_nt in nt: # <<<<<<<<<<<<<<
@@ -62949,7 +63796,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__pyx_t_3 = __pyx_v_nt; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
@@ -62957,23 +63804,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_5(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -62983,29 +63830,29 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__pyx_v_next_nt = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2062
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2070
* off = f_i
* for next_nt in nt:
* nt_len = (next_nt[2] - next_nt[1]) + 1 # <<<<<<<<<<<<<<
* i = 0
* while i < nt_len:
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_v_nt_len);
__pyx_v_nt_len = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2063
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2071
* for next_nt in nt:
* nt_len = (next_nt[2] - next_nt[1]) + 1
* i = 0 # <<<<<<<<<<<<<<
@@ -63016,7 +63863,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2064
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2072
* nt_len = (next_nt[2] - next_nt[1]) + 1
* i = 0
* while i < nt_len: # <<<<<<<<<<<<<<
@@ -63024,83 +63871,83 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
* i += 1
*/
while (1) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_7) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2065
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2073
* i = 0
* while i < nt_len:
* f_sym.pop(next_nt[1] - off) # <<<<<<<<<<<<<<
* i += 1
* f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0]))
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_f_sym), __pyx_n_s__pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_f_sym), __pyx_n_s__pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_v_off); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_v_off); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2066
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2074
* while i < nt_len:
* f_sym.pop(next_nt[1] - off)
* i += 1 # <<<<<<<<<<<<<<
* f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0]))
* off += (nt_len - 1)
*/
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_2;
__pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2067
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2075
* f_sym.pop(next_nt[1] - off)
* i += 1
* f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) # <<<<<<<<<<<<<<
* off += (nt_len - 1)
* e_sym = list(e_span[:])
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyNumber_Subtract(__pyx_t_2, __pyx_v_off); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Subtract(__pyx_t_2, __pyx_v_off); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_next_nt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_next_nt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_10 = PyList_Insert(__pyx_v_f_sym, __pyx_t_8, __pyx_t_6); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyList_Insert(__pyx_v_f_sym, __pyx_t_8, __pyx_t_6); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2068
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2076
* i += 1
* f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0]))
* off += (nt_len - 1) # <<<<<<<<<<<<<<
* e_sym = list(e_span[:])
* off = e_i
*/
- __pyx_t_6 = PyNumber_Subtract(__pyx_v_nt_len, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Subtract(__pyx_v_nt_len, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_v_off);
@@ -63109,27 +63956,27 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2069
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2077
* f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0]))
* off += (nt_len - 1)
* e_sym = list(e_span[:]) # <<<<<<<<<<<<<<
* off = e_i
* for next_nt in nt_inv:
*/
- __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_e_span, 0, 0, NULL, NULL, &__pyx_k_slice_148, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_e_span, 0, 0, NULL, NULL, &__pyx_k_slice_149, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__pyx_v_e_sym = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2070
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2078
* off += (nt_len - 1)
* e_sym = list(e_span[:])
* off = e_i # <<<<<<<<<<<<<<
@@ -63140,7 +63987,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_DECREF(__pyx_v_off);
__pyx_v_off = __pyx_v_e_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2071
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2079
* e_sym = list(e_span[:])
* off = e_i
* for next_nt in nt_inv: # <<<<<<<<<<<<<<
@@ -63151,7 +63998,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__pyx_t_3 = __pyx_v_nt_inv; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nt_inv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nt_inv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
@@ -63159,23 +64006,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_5(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -63185,29 +64032,29 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__pyx_v_next_nt = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2072
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2080
* off = e_i
* for next_nt in nt_inv:
* nt_len = (next_nt[4] - next_nt[3]) + 1 # <<<<<<<<<<<<<<
* i = 0
* while i < nt_len:
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2080; __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_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_v_nt_len);
__pyx_v_nt_len = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2073
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2081
* for next_nt in nt_inv:
* nt_len = (next_nt[4] - next_nt[3]) + 1
* i = 0 # <<<<<<<<<<<<<<
@@ -63218,7 +64065,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2074
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2082
* nt_len = (next_nt[4] - next_nt[3]) + 1
* i = 0
* while i < nt_len: # <<<<<<<<<<<<<<
@@ -63226,83 +64073,83 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
* i += 1
*/
while (1) {
- __pyx_t_6 = PyObject_RichCompare(__pyx_v_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (!__pyx_t_7) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2075
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2083
* i = 0
* while i < nt_len:
* e_sym.pop(next_nt[3] - off) # <<<<<<<<<<<<<<
* i += 1
* e_sym.insert(next_nt[3] - off, sym_setindex(self.category, next_nt[0]))
*/
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_e_sym), __pyx_n_s__pop); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_e_sym), __pyx_n_s__pop); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_v_off); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_v_off); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __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 = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__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/rulefactory.pxi":2076
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2084
* while i < nt_len:
* e_sym.pop(next_nt[3] - off)
* i += 1 # <<<<<<<<<<<<<<
* e_sym.insert(next_nt[3] - off, sym_setindex(self.category, next_nt[0]))
* off += (nt_len - 1)
*/
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_2;
__pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2077
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2085
* e_sym.pop(next_nt[3] - off)
* i += 1
* e_sym.insert(next_nt[3] - off, sym_setindex(self.category, next_nt[0])) # <<<<<<<<<<<<<<
* off += (nt_len - 1)
*
*/
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_v_off); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_v_off); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = PyList_Insert(__pyx_v_e_sym, __pyx_t_8, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyList_Insert(__pyx_v_e_sym, __pyx_t_8, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __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":2078
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2086
* i += 1
* e_sym.insert(next_nt[3] - off, sym_setindex(self.category, next_nt[0]))
* off += (nt_len - 1) # <<<<<<<<<<<<<<
*
* # Adjusting alignment links takes some doing
*/
- __pyx_t_1 = PyNumber_Subtract(__pyx_v_nt_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Subtract(__pyx_v_nt_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_v_off);
@@ -63311,20 +64158,20 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2081
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2089
*
* # Adjusting alignment links takes some doing
* links = [list(link) for sub in al for link in sub] # <<<<<<<<<<<<<<
* links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1]))
* links_len = len(links)
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyList_CheckExact(__pyx_v_al) || PyTuple_CheckExact(__pyx_v_al)) {
__pyx_t_2 = __pyx_v_al; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_al); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_al); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
@@ -63332,23 +64179,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_1 = __pyx_t_5(__pyx_t_2);
if (unlikely(!__pyx_t_1)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -63361,7 +64208,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__pyx_t_1 = __pyx_v_sub; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
__pyx_t_11 = NULL;
} else {
- __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_sub); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_sub); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -63369,23 +64216,23 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_6 = __pyx_t_11(__pyx_t_1);
if (unlikely(!__pyx_t_6)) {
if (PyErr_Occurred()) {
if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -63394,15 +64241,15 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_XDECREF(__pyx_v_link);
__pyx_v_link = __pyx_t_6;
__pyx_t_6 = 0;
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_link);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_link);
__Pyx_GIVEREF(__pyx_v_link);
- __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_12))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_12))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -63412,32 +64259,32 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__pyx_cur_scope->__pyx_v_links = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2082
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2090
* # Adjusting alignment links takes some doing
* links = [list(link) for sub in al for link in sub]
* links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) # <<<<<<<<<<<<<<
* links_len = len(links)
* nt_len = len(nt)
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_links));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_links));
__Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_links));
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
- __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8, 0, __pyx_n_s_146, NULL, __pyx_n_s___sa, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda8, 0, __pyx_n_s_147, NULL, __pyx_n_s_102, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__cmp), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__cmp), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__pyx_v_links_inv = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2083
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2091
* links = [list(link) for sub in al for link in sub]
* links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1]))
* links_len = len(links) # <<<<<<<<<<<<<<
@@ -63448,30 +64295,30 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_INCREF(__pyx_t_1);
if (unlikely(__pyx_t_1 == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_4 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_links_len = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2084
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2092
* links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1]))
* links_len = len(links)
* nt_len = len(nt) # <<<<<<<<<<<<<<
* nt_i = 0
* off = f_i
*/
- __pyx_t_4 = PyObject_Length(__pyx_v_nt); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Length(__pyx_v_nt); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_v_nt_len);
__pyx_v_nt_len = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2085
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2093
* links_len = len(links)
* nt_len = len(nt)
* nt_i = 0 # <<<<<<<<<<<<<<
@@ -63481,7 +64328,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_INCREF(__pyx_int_0);
__pyx_v_nt_i = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2086
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2094
* nt_len = len(nt)
* nt_i = 0
* off = f_i # <<<<<<<<<<<<<<
@@ -63492,7 +64339,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_DECREF(__pyx_v_off);
__pyx_v_off = __pyx_v_f_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2087
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2095
* nt_i = 0
* off = f_i
* i = 0 # <<<<<<<<<<<<<<
@@ -63503,7 +64350,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_XDECREF(__pyx_v_i);
__pyx_v_i = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2088
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2096
* off = f_i
* i = 0
* while i < links_len: # <<<<<<<<<<<<<<
@@ -63511,12 +64358,12 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
* off += (nt[nt_i][2] - nt[nt_i][1])
*/
while (1) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_links_len, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_links_len, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_7) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2089
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2097
* i = 0
* while i < links_len:
* while nt_i < nt_len and links[i][0] > nt[nt_i][1]: # <<<<<<<<<<<<<<
@@ -63524,24 +64371,24 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
* nt_i += 1
*/
while (1) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_nt_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_nt_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_7) {
- __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_links), __pyx_v_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_links), __pyx_v_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __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_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_14 = __pyx_t_13;
} else {
@@ -63549,82 +64396,82 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
}
if (!__pyx_t_14) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2090
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2098
* while i < links_len:
* while nt_i < nt_len and links[i][0] > nt[nt_i][1]:
* off += (nt[nt_i][2] - nt[nt_i][1]) # <<<<<<<<<<<<<<
* nt_i += 1
* links[i][0] -= off
*/
- __pyx_t_1 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_v_off);
__pyx_v_off = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2091
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2099
* while nt_i < nt_len and links[i][0] > nt[nt_i][1]:
* off += (nt[nt_i][2] - nt[nt_i][1])
* nt_i += 1 # <<<<<<<<<<<<<<
* links[i][0] -= off
* i += 1
*/
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_nt_i, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_nt_i, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_nt_i);
__pyx_v_nt_i = __pyx_t_2;
__pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2092
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2100
* off += (nt[nt_i][2] - nt[nt_i][1])
* nt_i += 1
* links[i][0] -= off # <<<<<<<<<<<<<<
* i += 1
* nt_i = 0
*/
- __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_links), __pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_links), __pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = 0;
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_4, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_4, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_1, __pyx_v_off); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_1, __pyx_v_off); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_SetItemInt(__pyx_t_2, __pyx_t_4, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_2, __pyx_t_4, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2093
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2101
* nt_i += 1
* links[i][0] -= off
* i += 1 # <<<<<<<<<<<<<<
* nt_i = 0
* off = e_i
*/
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_2;
__pyx_t_2 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2094
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2102
* links[i][0] -= off
* i += 1
* nt_i = 0 # <<<<<<<<<<<<<<
@@ -63635,7 +64482,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_DECREF(__pyx_v_nt_i);
__pyx_v_nt_i = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2095
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2103
* i += 1
* nt_i = 0
* off = e_i # <<<<<<<<<<<<<<
@@ -63646,7 +64493,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_DECREF(__pyx_v_off);
__pyx_v_off = __pyx_v_e_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2096
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2104
* nt_i = 0
* off = e_i
* i = 0 # <<<<<<<<<<<<<<
@@ -63657,7 +64504,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_DECREF(__pyx_v_i);
__pyx_v_i = __pyx_int_0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2097
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2105
* off = e_i
* i = 0
* while i < links_len: # <<<<<<<<<<<<<<
@@ -63665,12 +64512,12 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
* off += (nt_inv[nt_i][4] - nt_inv[nt_i][3])
*/
while (1) {
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_v_links_len, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_v_links_len, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (!__pyx_t_14) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2098
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2106
* i = 0
* while i < links_len:
* while nt_i < nt_len and links_inv[i][1] > nt_inv[nt_i][3]: # <<<<<<<<<<<<<<
@@ -63678,24 +64525,24 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
* nt_i += 1
*/
while (1) {
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_nt_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_nt_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_14) {
- __pyx_t_2 = PyObject_GetItem(__pyx_v_links_inv, __pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_links_inv, __pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_13 = __pyx_t_7;
} else {
@@ -63703,82 +64550,82 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
}
if (!__pyx_t_13) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2099
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2107
* while i < links_len:
* while nt_i < nt_len and links_inv[i][1] > nt_inv[nt_i][3]:
* off += (nt_inv[nt_i][4] - nt_inv[nt_i][3]) # <<<<<<<<<<<<<<
* nt_i += 1
* links_inv[i][1] -= off
*/
- __pyx_t_2 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 4, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 3, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_off);
__pyx_v_off = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2100
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2108
* while nt_i < nt_len and links_inv[i][1] > nt_inv[nt_i][3]:
* off += (nt_inv[nt_i][4] - nt_inv[nt_i][3])
* nt_i += 1 # <<<<<<<<<<<<<<
* links_inv[i][1] -= off
* i += 1
*/
- __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_nt_i, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_nt_i, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_v_nt_i);
__pyx_v_nt_i = __pyx_t_3;
__pyx_t_3 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2101
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2109
* off += (nt_inv[nt_i][4] - nt_inv[nt_i][3])
* nt_i += 1
* links_inv[i][1] -= off # <<<<<<<<<<<<<<
* i += 1
*
*/
- __pyx_t_3 = PyObject_GetItem(__pyx_v_links_inv, __pyx_v_i); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_links_inv, __pyx_v_i); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = 1;
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_t_4, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_t_4, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_v_off); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_v_off); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__Pyx_SetItemInt(__pyx_t_3, __pyx_t_4, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetItemInt(__pyx_t_3, __pyx_t_4, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2102
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2110
* nt_i += 1
* links_inv[i][1] -= off
* i += 1 # <<<<<<<<<<<<<<
*
* # Find lexical span
*/
- __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_v_i);
__pyx_v_i = __pyx_t_3;
__pyx_t_3 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2105
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2113
*
* # Find lexical span
* lex_f_i = f_i # <<<<<<<<<<<<<<
@@ -63788,75 +64635,75 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_INCREF(__pyx_v_f_i);
__pyx_v_lex_f_i = __pyx_v_f_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2106
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2114
* # Find lexical span
* lex_f_i = f_i
* lex_f_j = f_i + (len(f_span) - 1) # <<<<<<<<<<<<<<
* if nt:
* if nt[0][1] == lex_f_i:
*/
- __pyx_t_4 = PyObject_Length(__pyx_v_f_span); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_4 - 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Length(__pyx_v_f_span); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_4 - 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyNumber_Add(__pyx_v_f_i, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_v_f_i, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_lex_f_j = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2107
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2115
* lex_f_i = f_i
* lex_f_j = f_i + (len(f_span) - 1)
* if nt: # <<<<<<<<<<<<<<
* if nt[0][1] == lex_f_i:
* lex_f_i += (nt[0][2] - nt[0][1]) + 1
*/
- __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_13) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2108
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2116
* lex_f_j = f_i + (len(f_span) - 1)
* if nt:
* if nt[0][1] == lex_f_i: # <<<<<<<<<<<<<<
* lex_f_i += (nt[0][2] - nt[0][1]) + 1
* if nt[-1][2] == lex_f_j:
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_lex_f_i, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_lex_f_i, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_13) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2109
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2117
* if nt:
* if nt[0][1] == lex_f_i:
* lex_f_i += (nt[0][2] - nt[0][1]) + 1 # <<<<<<<<<<<<<<
* if nt[-1][2] == lex_f_j:
* lex_f_j -= (nt[-1][2] - nt[-1][1]) + 1
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, 0, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_lex_f_i, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_lex_f_i, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_v_lex_f_i);
@@ -63866,49 +64713,49 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
}
__pyx_L24:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2110
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2118
* if nt[0][1] == lex_f_i:
* lex_f_i += (nt[0][2] - nt[0][1]) + 1
* if nt[-1][2] == lex_f_j: # <<<<<<<<<<<<<<
* lex_f_j -= (nt[-1][2] - nt[-1][1]) + 1
*
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_lex_f_j, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_lex_f_j, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_13) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2111
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2119
* lex_f_i += (nt[0][2] - nt[0][1]) + 1
* if nt[-1][2] == lex_f_j:
* lex_f_j -= (nt[-1][2] - nt[-1][1]) + 1 # <<<<<<<<<<<<<<
*
* # Create rule (f_phrase, e_phrase, links, f_link_min, f_link_max)
*/
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2119; __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_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_lex_f_j, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_lex_f_j, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_v_lex_f_j);
@@ -63921,63 +64768,63 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
}
__pyx_L23:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2114
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2122
*
* # Create rule (f_phrase, e_phrase, links, f_link_min, f_link_max)
* f = Phrase(f_sym) # <<<<<<<<<<<<<<
* e = Phrase(e_sym)
* a = tuple(self.alignment.link(i, j) for i, j in links)
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_f_sym));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_f_sym));
__Pyx_GIVEREF(((PyObject *)__pyx_v_f_sym));
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_v_f = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_3);
+ __pyx_v_f = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2115
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2123
* # Create rule (f_phrase, e_phrase, links, f_link_min, f_link_max)
* f = Phrase(f_sym)
* e = Phrase(e_sym) # <<<<<<<<<<<<<<
* a = tuple(self.alignment.link(i, j) for i, j in links)
* return (f, e, a, lex_f_i, lex_f_j)
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_e_sym));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_e_sym));
__Pyx_GIVEREF(((PyObject *)__pyx_v_e_sym));
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_v_e = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_1);
+ __pyx_v_e = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2116
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2124
* f = Phrase(f_sym)
* e = Phrase(e_sym)
* a = tuple(self.alignment.link(i, j) for i, j in links) # <<<<<<<<<<<<<<
* return (f, e, a, lex_f_i, lex_f_j)
*
*/
- __pyx_t_1 = __pyx_pf_3_sa_23HieroCachingRuleFactory_9form_rule_2genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_2genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __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 = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__pyx_v_a = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2117
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2125
* e = Phrase(e_sym)
* a = tuple(self.alignment.link(i, j) for i, j in links)
* return (f, e, a, lex_f_i, lex_f_j) # <<<<<<<<<<<<<<
@@ -63985,7 +64832,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
* # Rule string from rule
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_f));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_f));
@@ -64014,7 +64861,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_12);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.form_rule", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.form_rule", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_nt_inv);
@@ -64041,8 +64888,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_27form_rule(struct __py
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_30fmt_rule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_30fmt_rule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_30fmt_rule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_30fmt_rule(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_f = 0;
PyObject *__pyx_v_e = 0;
PyObject *__pyx_v_a = 0;
@@ -64073,16 +64920,16 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_30fmt_rule(PyObject *__
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fmt_rule") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fmt_rule") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -64097,19 +64944,19 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_30fmt_rule(PyObject *__
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.fmt_rule", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.fmt_rule", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_29fmt_rule(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_f, __pyx_v_e, __pyx_v_a);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_f, __pyx_v_e, __pyx_v_a);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2121
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2129
* # Rule string from rule
* def fmt_rule(self, f, e, a):
* a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a) # <<<<<<<<<<<<<<
@@ -64117,25 +64964,25 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(
*
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8fmt_rule_genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_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_25_genexpr *)__pyx_tp_new_3_sa___pyx_scope_struct_25_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_25_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_25_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_24_fmt_rule *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *) __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_23HieroCachingRuleFactory_8fmt_rule_2generator16, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -64144,7 +64991,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8fmt_rule_genexpr(PyObj
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.fmt_rule.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.fmt_rule.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -64153,9 +65000,9 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_8fmt_rule_genexpr(PyObj
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -64177,13 +65024,13 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(
return NULL;
}
__pyx_L3_first_run:;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a)) { __Pyx_RaiseClosureNameError("a"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a)) { __Pyx_RaiseClosureNameError("a"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a)) {
__pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_a; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
@@ -64191,23 +65038,23 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __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[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -64218,24 +65065,24 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(
__Pyx_GIVEREF(__pyx_t_4);
__pyx_cur_scope->__pyx_v_packed = __pyx_t_4;
__pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_149), __pyx_n_s__format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_150), __pyx_n_s__format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment), __pyx_n_s__unlink); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment), __pyx_n_s__unlink); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_packed);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_packed);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_packed);
- __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- __pyx_t_6 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
@@ -64256,7 +65103,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(
__Pyx_XGOTREF(__pyx_t_1);
__pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
__pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
- if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyErr_SetNone(PyExc_StopIteration);
@@ -64276,7 +65123,7 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2120
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2128
*
* # Rule string from rule
* def fmt_rule(self, f, e, a): # <<<<<<<<<<<<<<
@@ -64284,8 +65131,8 @@ static PyObject *__pyx_gb_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(
* return '[X] ||| {0} ||| {1} ||| {2}'.format(f, e, a_str)
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_29fmt_rule(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_a) {
- struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_a) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *__pyx_cur_scope;
PyObject *__pyx_v_a_str = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -64296,7 +65143,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_29fmt_rule(struct __pyx
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("fmt_rule", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *)__pyx_tp_new_3_sa___pyx_scope_struct_24_fmt_rule(__pyx_ptype_3_sa___pyx_scope_struct_24_fmt_rule, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -64309,40 +65156,40 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_29fmt_rule(struct __pyx
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_a);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_a);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2121
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2129
* # Rule string from rule
* def fmt_rule(self, f, e, a):
* a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a) # <<<<<<<<<<<<<<
* return '[X] ||| {0} ||| {1} ||| {2}'.format(f, e, a_str)
*
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_69), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_69), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __pyx_pf_3_sa_23HieroCachingRuleFactory_8fmt_rule_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__pyx_v_a_str = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2122
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2130
* def fmt_rule(self, f, e, a):
* a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a)
* return '[X] ||| {0} ||| {1} ||| {2}'.format(f, e, a_str) # <<<<<<<<<<<<<<
*
- * # Debugging
+ * # Lookup online stats for phrase pair (f, e). Return None if no match.
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_150), __pyx_n_s__format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_151), __pyx_n_s__format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f);
@@ -64353,7 +65200,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_29fmt_rule(struct __pyx
__Pyx_INCREF(__pyx_v_a_str);
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_a_str);
__Pyx_GIVEREF(__pyx_v_a_str);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
@@ -64367,7 +65214,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_29fmt_rule(struct __pyx
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.fmt_rule", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.fmt_rule", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_a_str);
@@ -64378,1001 +65225,11 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_29fmt_rule(struct __pyx
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_32dump_online_stats(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_32dump_online_stats(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("dump_online_stats (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_31dump_online_stats(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self));
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2125
- *
- * # Debugging
- * def dump_online_stats(self): # <<<<<<<<<<<<<<
- * logger.info('------------------------------')
- * logger.info(' Online Stats ')
- */
-
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_31dump_online_stats(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self) {
- PyObject *__pyx_v_w = NULL;
- PyObject *__pyx_v_w2 = NULL;
- PyObject *__pyx_v_ph = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- Py_ssize_t __pyx_t_3;
- PyObject *(*__pyx_t_4)(PyObject *);
- PyObject *__pyx_t_5 = NULL;
- int __pyx_t_6;
- PyObject *__pyx_t_7 = NULL;
- PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
- PyObject *(*__pyx_t_10)(PyObject *);
- PyObject *__pyx_t_11 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("dump_online_stats", 0);
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2126
- * # Debugging
- * def dump_online_stats(self):
- * logger.info('------------------------------') # <<<<<<<<<<<<<<
- * logger.info(' Online Stats ')
- * logger.info('------------------------------')
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2126; __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_152), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2126; __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;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2127
- * def dump_online_stats(self):
- * logger.info('------------------------------')
- * logger.info(' Online Stats ') # <<<<<<<<<<<<<<
- * logger.info('------------------------------')
- * logger.info('f')
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_154), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_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":2128
- * logger.info('------------------------------')
- * logger.info(' Online Stats ')
- * logger.info('------------------------------') # <<<<<<<<<<<<<<
- * logger.info('f')
- * for w in self.bilex_f:
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_155), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_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":2129
- * logger.info(' Online Stats ')
- * logger.info('------------------------------')
- * logger.info('f') # <<<<<<<<<<<<<<
- * for w in self.bilex_f:
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_f[w]))
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __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_156), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __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;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2130
- * logger.info('------------------------------')
- * logger.info('f')
- * for w in self.bilex_f: # <<<<<<<<<<<<<<
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_f[w]))
- * logger.info('e')
- */
- if (PyList_CheckExact(__pyx_v_self->bilex_f) || PyTuple_CheckExact(__pyx_v_self->bilex_f)) {
- __pyx_t_1 = __pyx_v_self->bilex_f; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
- __pyx_t_4 = NULL;
- } else {
- __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->bilex_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
- }
- for (;;) {
- if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else {
- __pyx_t_2 = __pyx_t_4(__pyx_t_1);
- if (unlikely(!__pyx_t_2)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_XDECREF(__pyx_v_w);
- __pyx_v_w = __pyx_t_2;
- __pyx_t_2 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2131
- * logger.info('f')
- * for w in self.bilex_f:
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_f[w])) # <<<<<<<<<<<<<<
- * logger.info('e')
- * for w in self.bilex_e:
- */
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_2));
- __pyx_t_7 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_kp_s_157)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_GetItem(__pyx_v_self->bilex_f, __pyx_v_w); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__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 = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_8);
- __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2132
- * for w in self.bilex_f:
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_f[w]))
- * logger.info('e') # <<<<<<<<<<<<<<
- * for w in self.bilex_e:
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_e[w]))
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_158), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2133
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_f[w]))
- * logger.info('e')
- * for w in self.bilex_e: # <<<<<<<<<<<<<<
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_e[w]))
- * logger.info('fe')
- */
- if (PyList_CheckExact(__pyx_v_self->bilex_e) || PyTuple_CheckExact(__pyx_v_self->bilex_e)) {
- __pyx_t_1 = __pyx_v_self->bilex_e; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
- __pyx_t_4 = NULL;
- } else {
- __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->bilex_e); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
- }
- for (;;) {
- if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else {
- __pyx_t_8 = __pyx_t_4(__pyx_t_1);
- if (unlikely(!__pyx_t_8)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_8);
- }
- __Pyx_XDECREF(__pyx_v_w);
- __pyx_v_w = __pyx_t_8;
- __pyx_t_8 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2134
- * logger.info('e')
- * for w in self.bilex_e:
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_e[w])) # <<<<<<<<<<<<<<
- * logger.info('fe')
- * for w in self.bilex_fe:
- */
- __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_8 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_8));
- __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_8), ((PyObject *)__pyx_kp_s_157)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_GetItem(__pyx_v_self->bilex_e, __pyx_v_w); if (!__pyx_t_8) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_8);
- __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_7);
- __pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2135
- * for w in self.bilex_e:
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_e[w]))
- * logger.info('fe') # <<<<<<<<<<<<<<
- * for w in self.bilex_fe:
- * for w2 in self.bilex_fe[w]:
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_159), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2136
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_e[w]))
- * logger.info('fe')
- * for w in self.bilex_fe: # <<<<<<<<<<<<<<
- * for w2 in self.bilex_fe[w]:
- * logger.info(sym_tostring(w) + ' : ' + sym_tostring(w2) + ' : ' + str(self.bilex_fe[w][w2]))
- */
- if (PyList_CheckExact(__pyx_v_self->bilex_fe) || PyTuple_CheckExact(__pyx_v_self->bilex_fe)) {
- __pyx_t_1 = __pyx_v_self->bilex_fe; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
- __pyx_t_4 = NULL;
- } else {
- __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->bilex_fe); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
- }
- for (;;) {
- if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else {
- __pyx_t_7 = __pyx_t_4(__pyx_t_1);
- if (unlikely(!__pyx_t_7)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_7);
- }
- __Pyx_XDECREF(__pyx_v_w);
- __pyx_v_w = __pyx_t_7;
- __pyx_t_7 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2137
- * logger.info('fe')
- * for w in self.bilex_fe:
- * for w2 in self.bilex_fe[w]: # <<<<<<<<<<<<<<
- * logger.info(sym_tostring(w) + ' : ' + sym_tostring(w2) + ' : ' + str(self.bilex_fe[w][w2]))
- * logger.info('F')
- */
- __pyx_t_7 = PyObject_GetItem(__pyx_v_self->bilex_fe, __pyx_v_w); if (!__pyx_t_7) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
- __pyx_t_8 = __pyx_t_7; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
- __pyx_t_10 = NULL;
- } else {
- __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext;
- }
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- for (;;) {
- if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_8)) {
- if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_8)) {
- if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else {
- __pyx_t_7 = __pyx_t_10(__pyx_t_8);
- if (unlikely(!__pyx_t_7)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_7);
- }
- __Pyx_XDECREF(__pyx_v_w2);
- __pyx_v_w2 = __pyx_t_7;
- __pyx_t_7 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2138
- * for w in self.bilex_fe:
- * for w2 in self.bilex_fe[w]:
- * logger.info(sym_tostring(w) + ' : ' + sym_tostring(w2) + ' : ' + str(self.bilex_fe[w][w2])) # <<<<<<<<<<<<<<
- * logger.info('F')
- * for ph in self.phrases_f:
- */
- __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_7));
- __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_7), ((PyObject *)__pyx_kp_s_157)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_w2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_f_3_sa_sym_tostring(__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_7));
- __pyx_t_11 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- __pyx_t_7 = PyNumber_Add(__pyx_t_11, ((PyObject *)__pyx_kp_s_157)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = PyObject_GetItem(__pyx_v_self->bilex_fe, __pyx_v_w); if (!__pyx_t_11) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- __pyx_t_5 = PyObject_GetItem(__pyx_t_11, __pyx_v_w2); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_5);
- __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
- __pyx_t_11 = PyNumber_Add(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11);
- __Pyx_GIVEREF(__pyx_t_11);
- __pyx_t_11 = 0;
- __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- }
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2139
- * for w2 in self.bilex_fe[w]:
- * logger.info(sym_tostring(w) + ' : ' + sym_tostring(w2) + ' : ' + str(self.bilex_fe[w][w2]))
- * logger.info('F') # <<<<<<<<<<<<<<
- * for ph in self.phrases_f:
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_f[ph]))
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_160), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2140
- * logger.info(sym_tostring(w) + ' : ' + sym_tostring(w2) + ' : ' + str(self.bilex_fe[w][w2]))
- * logger.info('F')
- * for ph in self.phrases_f: # <<<<<<<<<<<<<<
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_f[ph]))
- * logger.info('E')
- */
- if (PyList_CheckExact(__pyx_v_self->phrases_f) || PyTuple_CheckExact(__pyx_v_self->phrases_f)) {
- __pyx_t_1 = __pyx_v_self->phrases_f; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
- __pyx_t_4 = NULL;
- } else {
- __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->phrases_f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
- }
- for (;;) {
- if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else {
- __pyx_t_8 = __pyx_t_4(__pyx_t_1);
- if (unlikely(!__pyx_t_8)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_8);
- }
- __Pyx_XDECREF(__pyx_v_ph);
- __pyx_v_ph = __pyx_t_8;
- __pyx_t_8 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2141
- * logger.info('F')
- * for ph in self.phrases_f:
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_f[ph])) # <<<<<<<<<<<<<<
- * logger.info('E')
- * for ph in self.phrases_e:
- */
- __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s__info); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_INCREF(__pyx_v_ph);
- PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ph);
- __Pyx_GIVEREF(__pyx_v_ph);
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_8 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_19)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_GetItem(__pyx_v_self->phrases_f, __pyx_v_ph); if (!__pyx_t_5) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_5);
- __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Add(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- __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":2142
- * for ph in self.phrases_f:
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_f[ph]))
- * logger.info('E') # <<<<<<<<<<<<<<
- * for ph in self.phrases_e:
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_e[ph]))
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2142; __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_161), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2142; __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;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2143
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_f[ph]))
- * logger.info('E')
- * for ph in self.phrases_e: # <<<<<<<<<<<<<<
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_e[ph]))
- * logger.info('FE')
- */
- if (PyList_CheckExact(__pyx_v_self->phrases_e) || PyTuple_CheckExact(__pyx_v_self->phrases_e)) {
- __pyx_t_1 = __pyx_v_self->phrases_e; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
- __pyx_t_4 = NULL;
- } else {
- __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->phrases_e); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
- }
- for (;;) {
- if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else {
- __pyx_t_2 = __pyx_t_4(__pyx_t_1);
- if (unlikely(!__pyx_t_2)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_XDECREF(__pyx_v_ph);
- __pyx_v_ph = __pyx_t_2;
- __pyx_t_2 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2144
- * logger.info('E')
- * for ph in self.phrases_e:
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_e[ph])) # <<<<<<<<<<<<<<
- * logger.info('FE')
- * self.dump_online_rules()
- */
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__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 = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(__pyx_v_ph);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ph);
- __Pyx_GIVEREF(__pyx_v_ph);
- __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Add(__pyx_t_11, ((PyObject *)__pyx_kp_s_19)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = PyObject_GetItem(__pyx_v_self->phrases_e, __pyx_v_ph); if (!__pyx_t_11) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
- __Pyx_GIVEREF(__pyx_t_11);
- __pyx_t_11 = 0;
- __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_8);
- __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2145
- * for ph in self.phrases_e:
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_e[ph]))
- * logger.info('FE') # <<<<<<<<<<<<<<
- * self.dump_online_rules()
- *
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_k_tuple_162), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2146
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_e[ph]))
- * logger.info('FE')
- * self.dump_online_rules() # <<<<<<<<<<<<<<
- *
- * def dump_online_rules(self):
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__dump_online_rules); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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_5);
- __Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_11);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.dump_online_stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_w);
- __Pyx_XDECREF(__pyx_v_w2);
- __Pyx_XDECREF(__pyx_v_ph);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_34dump_online_rules(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_34dump_online_rules(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("dump_online_rules (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_33dump_online_rules(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self));
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2148
- * self.dump_online_rules()
- *
- * def dump_online_rules(self): # <<<<<<<<<<<<<<
- * for ph in self.phrases_fe:
- * for ph2 in self.phrases_fe[ph]:
- */
-
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_33dump_online_rules(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self) {
- PyObject *__pyx_v_ph = NULL;
- PyObject *__pyx_v_ph2 = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- Py_ssize_t __pyx_t_2;
- PyObject *(*__pyx_t_3)(PyObject *);
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- Py_ssize_t __pyx_t_6;
- PyObject *(*__pyx_t_7)(PyObject *);
- PyObject *__pyx_t_8 = NULL;
- PyObject *__pyx_t_9 = NULL;
- PyObject *__pyx_t_10 = NULL;
- PyObject *__pyx_t_11 = NULL;
- PyObject *__pyx_t_12 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("dump_online_rules", 0);
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2149
- *
- * def dump_online_rules(self):
- * for ph in self.phrases_fe: # <<<<<<<<<<<<<<
- * for ph2 in self.phrases_fe[ph]:
- * logger.info(self.fmt_rule(str(ph), str(ph2), self.phrases_al[ph][ph2]) + ' ||| ' + str(self.phrases_fe[ph][ph2]))
- */
- if (PyList_CheckExact(__pyx_v_self->phrases_fe) || PyTuple_CheckExact(__pyx_v_self->phrases_fe)) {
- __pyx_t_1 = __pyx_v_self->phrases_fe; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
- __pyx_t_3 = NULL;
- } else {
- __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->phrases_fe); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2149; __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[8]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2149; __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[8]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_4);
- }
- __Pyx_XDECREF(__pyx_v_ph);
- __pyx_v_ph = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2150
- * def dump_online_rules(self):
- * for ph in self.phrases_fe:
- * for ph2 in self.phrases_fe[ph]: # <<<<<<<<<<<<<<
- * logger.info(self.fmt_rule(str(ph), str(ph2), self.phrases_al[ph][ph2]) + ' ||| ' + str(self.phrases_fe[ph][ph2]))
- *
- */
- __pyx_t_4 = PyObject_GetItem(__pyx_v_self->phrases_fe, __pyx_v_ph); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
- __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
- __pyx_t_7 = NULL;
- } else {
- __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- for (;;) {
- if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_5)) {
- if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
- if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- } else {
- __pyx_t_4 = __pyx_t_7(__pyx_t_5);
- if (unlikely(!__pyx_t_4)) {
- if (PyErr_Occurred()) {
- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_4);
- }
- __Pyx_XDECREF(__pyx_v_ph2);
- __pyx_v_ph2 = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2151
- * for ph in self.phrases_fe:
- * for ph2 in self.phrases_fe[ph]:
- * logger.info(self.fmt_rule(str(ph), str(ph2), self.phrases_al[ph][ph2]) + ' ||| ' + str(self.phrases_fe[ph][ph2])) # <<<<<<<<<<<<<<
- *
- * # Lookup online stats for phrase pair (f, e). Return None if no match.
- */
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s__logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__fmt_rule); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_INCREF(__pyx_v_ph);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_ph);
- __Pyx_GIVEREF(__pyx_v_ph);
- __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_INCREF(__pyx_v_ph2);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_ph2);
- __Pyx_GIVEREF(__pyx_v_ph2);
- __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __pyx_t_9 = PyObject_GetItem(__pyx_v_self->phrases_al, __pyx_v_ph); if (!__pyx_t_9) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_12 = PyObject_GetItem(__pyx_t_9, __pyx_v_ph2); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_10);
- PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_11);
- __Pyx_GIVEREF(__pyx_t_11);
- PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_12);
- __Pyx_GIVEREF(__pyx_t_12);
- __pyx_t_10 = 0;
- __pyx_t_11 = 0;
- __pyx_t_12 = 0;
- __pyx_t_12 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
- __pyx_t_9 = PyNumber_Add(__pyx_t_12, ((PyObject *)__pyx_kp_s_19)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = PyObject_GetItem(__pyx_v_self->phrases_fe, __pyx_v_ph); if (!__pyx_t_12) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_12);
- __pyx_t_4 = PyObject_GetItem(__pyx_t_12, __pyx_v_ph2); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_12);
- PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
- __pyx_t_12 = PyNumber_Add(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_12);
- __Pyx_GIVEREF(__pyx_t_12);
- __pyx_t_12 = 0;
- __pyx_t_12 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- }
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_10);
- __Pyx_XDECREF(__pyx_t_11);
- __Pyx_XDECREF(__pyx_t_12);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.dump_online_rules", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_ph);
- __Pyx_XDECREF(__pyx_v_ph2);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_36online_ctx_lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_36online_ctx_lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_32online_ctx_lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_32online_ctx_lookup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_f = 0;
PyObject *__pyx_v_e = 0;
+ PyObject *__pyx_v_ctx_name = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -65380,12 +65237,22 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_36online_ctx_lookup(PyO
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("online_ctx_lookup (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__f,&__pyx_n_s__e,0};
- PyObject* values[2] = {0,0};
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__f,&__pyx_n_s__e,&__pyx_n_s__ctx_name,0};
+ PyObject* values[3] = {0,0,0};
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2134
+ * # Lookup online stats for phrase pair (f, e). Return None if no match.
+ * # IMPORTANT: use get() to avoid adding items to defaultdict
+ * def online_ctx_lookup(self, f, e, ctx_name=None): # <<<<<<<<<<<<<<
+ * if self.online:
+ * stats = self.online_stats[ctx_name]
+ */
+ values[2] = ((PyObject *)Py_None);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
+ case 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;
@@ -65399,43 +65266,45 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_36online_ctx_lookup(PyO
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("online_ctx_lookup", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("online_ctx_lookup", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ctx_name);
+ if (value) { values[2] = value; kw_args--; }
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "online_ctx_lookup") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "online_ctx_lookup") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
- goto __pyx_L5_argtuple_error;
} else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
}
__pyx_v_f = values[0];
__pyx_v_e = values[1];
+ __pyx_v_ctx_name = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("online_ctx_lookup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("online_ctx_lookup", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.online_ctx_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.online_ctx_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_35online_ctx_lookup(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_f, __pyx_v_e);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_lookup(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_f, __pyx_v_e, __pyx_v_ctx_name);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2155
- * # Lookup online stats for phrase pair (f, e). Return None if no match.
- * # IMPORTANT: use get() to avoid adding items to defaultdict
- * def online_ctx_lookup(self, f, e): # <<<<<<<<<<<<<<
- * if self.online:
- * fcount = self.phrases_f.get(f, 0)
- */
-
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_35online_ctx_lookup(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f, PyObject *__pyx_v_e) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_lookup(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_ctx_name) {
+ PyObject *__pyx_v_stats = NULL;
PyObject *__pyx_v_fcount = NULL;
PyObject *__pyx_v_fsample_count = NULL;
PyObject *__pyx_v_d = NULL;
@@ -65447,79 +65316,101 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_35online_ctx_lookup(str
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("online_ctx_lookup", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2156
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2135
* # IMPORTANT: use get() to avoid adding items to defaultdict
- * def online_ctx_lookup(self, f, e):
+ * def online_ctx_lookup(self, f, e, ctx_name=None):
* if self.online: # <<<<<<<<<<<<<<
- * fcount = self.phrases_f.get(f, 0)
- * fsample_count = self.samples_f.get(f, 0)
+ * stats = self.online_stats[ctx_name]
+ * fcount = stats.phrases_f.get(f, 0)
*/
__pyx_t_1 = (__pyx_v_self->online != 0);
if (__pyx_t_1) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2157
- * def online_ctx_lookup(self, f, e):
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2136
+ * def online_ctx_lookup(self, f, e, ctx_name=None):
* if self.online:
- * fcount = self.phrases_f.get(f, 0) # <<<<<<<<<<<<<<
- * fsample_count = self.samples_f.get(f, 0)
- * d = self.phrases_fe.get(f, None)
+ * stats = self.online_stats[ctx_name] # <<<<<<<<<<<<<<
+ * fcount = stats.phrases_f.get(f, 0)
+ * fsample_count = stats.samples_f.get(f, 0)
*/
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->phrases_f, __pyx_n_s__get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_self->online_stats, __pyx_v_ctx_name); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_stats = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2137
+ * if self.online:
+ * stats = self.online_stats[ctx_name]
+ * fcount = stats.phrases_f.get(f, 0) # <<<<<<<<<<<<<<
+ * fsample_count = stats.samples_f.get(f, 0)
+ * d = stats.phrases_fe.get(f, None)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__phrases_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__get); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_f);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_f);
__Pyx_GIVEREF(__pyx_v_f);
__Pyx_INCREF(__pyx_int_0);
- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_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 = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
__pyx_v_fcount = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2158
- * if self.online:
- * fcount = self.phrases_f.get(f, 0)
- * fsample_count = self.samples_f.get(f, 0) # <<<<<<<<<<<<<<
- * d = self.phrases_fe.get(f, None)
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2138
+ * stats = self.online_stats[ctx_name]
+ * fcount = stats.phrases_f.get(f, 0)
+ * fsample_count = stats.samples_f.get(f, 0) # <<<<<<<<<<<<<<
+ * d = stats.phrases_fe.get(f, None)
* paircount = d.get(e, 0) if d else 0
*/
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->samples_f, __pyx_n_s__get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__samples_f); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s__get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_f);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_f);
__Pyx_GIVEREF(__pyx_v_f);
__Pyx_INCREF(__pyx_int_0);
- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
- __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_v_fsample_count = __pyx_t_2;
- __pyx_t_2 = 0;
+ __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+ __pyx_v_fsample_count = __pyx_t_3;
+ __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2159
- * fcount = self.phrases_f.get(f, 0)
- * fsample_count = self.samples_f.get(f, 0)
- * d = self.phrases_fe.get(f, None) # <<<<<<<<<<<<<<
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2139
+ * fcount = stats.phrases_f.get(f, 0)
+ * fsample_count = stats.samples_f.get(f, 0)
+ * d = stats.phrases_fe.get(f, None) # <<<<<<<<<<<<<<
* paircount = d.get(e, 0) if d else 0
- * return OnlineFeatureContext(fcount, fsample_count, paircount, self.bilex_f, self.bilex_e, self.bilex_fe)
+ * return OnlineFeatureContext(fcount, fsample_count, paircount, stats.bilex_f, stats.bilex_e, stats.bilex_fe)
*/
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->phrases_fe, __pyx_n_s__get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__phrases_fe); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f);
@@ -65527,89 +65418,95 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_35online_ctx_lookup(str
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
__Pyx_GIVEREF(Py_None);
- __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 = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
- __pyx_v_d = __pyx_t_4;
- __pyx_t_4 = 0;
+ __pyx_v_d = __pyx_t_2;
+ __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2160
- * fsample_count = self.samples_f.get(f, 0)
- * d = self.phrases_fe.get(f, None)
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2140
+ * fsample_count = stats.samples_f.get(f, 0)
+ * d = stats.phrases_fe.get(f, None)
* paircount = d.get(e, 0) if d else 0 # <<<<<<<<<<<<<<
- * return OnlineFeatureContext(fcount, fsample_count, paircount, self.bilex_f, self.bilex_e, self.bilex_fe)
+ * return OnlineFeatureContext(fcount, fsample_count, paircount, stats.bilex_f, stats.bilex_e, stats.bilex_fe)
* return None
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_d); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_d); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s__get); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s__get); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_e);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_e);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_e);
__Pyx_GIVEREF(__pyx_v_e);
__Pyx_INCREF(__pyx_int_0);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_t_4 = __pyx_t_5;
+ __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+ __pyx_t_2 = __pyx_t_5;
__pyx_t_5 = 0;
} else {
__Pyx_INCREF(__pyx_int_0);
- __pyx_t_4 = __pyx_int_0;
+ __pyx_t_2 = __pyx_int_0;
}
- __pyx_v_paircount = __pyx_t_4;
- __pyx_t_4 = 0;
+ __pyx_v_paircount = __pyx_t_2;
+ __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2161
- * d = self.phrases_fe.get(f, None)
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2141
+ * d = stats.phrases_fe.get(f, None)
* paircount = d.get(e, 0) if d else 0
- * return OnlineFeatureContext(fcount, fsample_count, paircount, self.bilex_f, self.bilex_e, self.bilex_fe) # <<<<<<<<<<<<<<
+ * return OnlineFeatureContext(fcount, fsample_count, paircount, stats.bilex_f, stats.bilex_e, stats.bilex_fe) # <<<<<<<<<<<<<<
* return None
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_163); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_152); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__bilex_f); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__bilex_e); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s__bilex_fe); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_fcount);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_fcount);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_fcount);
__Pyx_GIVEREF(__pyx_v_fcount);
__Pyx_INCREF(__pyx_v_fsample_count);
- PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_fsample_count);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_fsample_count);
__Pyx_GIVEREF(__pyx_v_fsample_count);
__Pyx_INCREF(__pyx_v_paircount);
- PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_paircount);
+ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_paircount);
__Pyx_GIVEREF(__pyx_v_paircount);
- __Pyx_INCREF(__pyx_v_self->bilex_f);
- PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_self->bilex_f);
- __Pyx_GIVEREF(__pyx_v_self->bilex_f);
- __Pyx_INCREF(__pyx_v_self->bilex_e);
- PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_v_self->bilex_e);
- __Pyx_GIVEREF(__pyx_v_self->bilex_e);
- __Pyx_INCREF(__pyx_v_self->bilex_fe);
- PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_v_self->bilex_fe);
- __Pyx_GIVEREF(__pyx_v_self->bilex_fe);
- __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
+ PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_5 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2141; __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_6)); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
goto __pyx_L0;
goto __pyx_L3;
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2162
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2142
* paircount = d.get(e, 0) if d else 0
- * return OnlineFeatureContext(fcount, fsample_count, paircount, self.bilex_f, self.bilex_e, self.bilex_fe)
+ * return OnlineFeatureContext(fcount, fsample_count, paircount, stats.bilex_f, stats.bilex_e, stats.bilex_fe)
* return None # <<<<<<<<<<<<<<
*
* # Find all phrases that we might try to extract
@@ -65626,9 +65523,11 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_35online_ctx_lookup(str
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.online_ctx_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.online_ctx_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_stats);
__Pyx_XDECREF(__pyx_v_fcount);
__Pyx_XDECREF(__pyx_v_fsample_count);
__Pyx_XDECREF(__pyx_v_d);
@@ -65639,20 +65538,20 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_35online_ctx_lookup(str
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_38get_f_phrases(PyObject *__pyx_v_self, PyObject *__pyx_v_f_words); /*proto*/
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_38get_f_phrases(PyObject *__pyx_v_self, PyObject *__pyx_v_f_words) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_34get_f_phrases(PyObject *__pyx_v_self, PyObject *__pyx_v_f_words); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_34get_f_phrases(PyObject *__pyx_v_self, PyObject *__pyx_v_f_words) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_f_phrases (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_37get_f_phrases(((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)__pyx_v_self), ((PyObject *)__pyx_v_f_words));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phrases(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), ((PyObject *)__pyx_v_f_words));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract = {__Pyx_NAMESTR("extract"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract = {__Pyx_NAMESTR("extract"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_f_i = 0;
PyObject *__pyx_v_f_j = 0;
PyObject *__pyx_v_lex_i = 0;
@@ -65691,36 +65590,36 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extrac
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f_j)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lex_i)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lex_j)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__wc)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 5:
if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ntc)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 6:
if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__syms)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
goto __pyx_L5_argtuple_error;
@@ -65743,18 +65642,18 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extrac
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.get_f_phrases.extract", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_f_phrases.extract", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_self, __pyx_v_f_i, __pyx_v_f_j, __pyx_v_lex_i, __pyx_v_lex_j, __pyx_v_wc, __pyx_v_ntc, __pyx_v_syms);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_self, __pyx_v_f_i, __pyx_v_f_j, __pyx_v_lex_i, __pyx_v_lex_j, __pyx_v_wc, __pyx_v_ntc, __pyx_v_syms);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2172
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2152
* phrases = set() # (fphrase, lex_i, lex_j)
*
* def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<<
@@ -65762,10 +65661,10 @@ static PyObject *__pyx_pw_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extrac
* if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size:
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(PyObject *__pyx_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_f_j, PyObject *__pyx_v_lex_i, PyObject *__pyx_v_lex_j, PyObject *__pyx_v_wc, PyObject *__pyx_v_ntc, PyObject *__pyx_v_syms) {
- struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *__pyx_cur_scope;
- struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *__pyx_outer_scope;
- struct __pyx_obj_3_sa_Phrase *__pyx_v_f = NULL;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(PyObject *__pyx_self, PyObject *__pyx_v_f_i, PyObject *__pyx_v_f_j, PyObject *__pyx_v_lex_i, PyObject *__pyx_v_lex_j, PyObject *__pyx_v_wc, PyObject *__pyx_v_ntc, PyObject *__pyx_v_syms) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *__pyx_cur_scope;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *__pyx_outer_scope;
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *__pyx_v_f = NULL;
PyObject *__pyx_v_new_lex_i = NULL;
PyObject *__pyx_v_new_lex_j = NULL;
PyObject *__pyx_r = NULL;
@@ -65784,36 +65683,36 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("extract", 0);
- __pyx_outer_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *) __Pyx_CyFunction_GetClosure(__pyx_self);
+ __pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *) __Pyx_CyFunction_GetClosure(__pyx_self);
__pyx_cur_scope = __pyx_outer_scope;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2174
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2154
* def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms):
* # Phrase extraction limits
* if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: # <<<<<<<<<<<<<<
* return
* # Extend with word
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_f_len)) { __Pyx_RaiseClosureNameError("f_len"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_1 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_f_len)) { __Pyx_RaiseClosureNameError("f_len"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_1 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (!__pyx_t_3) {
- __pyx_t_2 = PyNumber_Subtract(__pyx_v_f_j, __pyx_v_f_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Subtract(__pyx_v_f_j, __pyx_v_f_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_2 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_2 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_6 = __pyx_t_5;
} else {
@@ -65821,7 +65720,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
}
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2175
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2155
* # Phrase extraction limits
* if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size:
* return # <<<<<<<<<<<<<<
@@ -65835,58 +65734,58 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
}
__pyx_L3:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2177
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2157
* return
* # Extend with word
* if wc + ntc < self.max_length: # <<<<<<<<<<<<<<
* syms.append(f_words[f_j])
* f = Phrase(syms)
*/
- __pyx_t_4 = PyNumber_Add(__pyx_v_wc, __pyx_v_ntc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_wc, __pyx_v_ntc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_6) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2178
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2158
* # Extend with word
* if wc + ntc < self.max_length:
* syms.append(f_words[f_j]) # <<<<<<<<<<<<<<
* f = Phrase(syms)
* new_lex_i = min(lex_i, f_j)
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_f_words, __pyx_v_f_j); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_f_words, __pyx_v_f_j); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_syms, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_syms, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2179
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2159
* if wc + ntc < self.max_length:
* syms.append(f_words[f_j])
* f = Phrase(syms) # <<<<<<<<<<<<<<
* new_lex_i = min(lex_i, f_j)
* new_lex_j = max(lex_j, f_j)
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_syms);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_syms);
__Pyx_GIVEREF(__pyx_v_syms);
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- __pyx_v_f = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_1);
+ __pyx_v_f = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2180
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2160
* syms.append(f_words[f_j])
* f = Phrase(syms)
* new_lex_i = min(lex_i, f_j) # <<<<<<<<<<<<<<
@@ -65897,8 +65796,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
__pyx_t_1 = __pyx_v_f_j;
__Pyx_INCREF(__pyx_v_lex_i);
__pyx_t_2 = __pyx_v_lex_i;
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_6) {
__Pyx_INCREF(__pyx_t_1);
@@ -65915,7 +65814,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
__pyx_v_new_lex_i = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2181
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2161
* f = Phrase(syms)
* new_lex_i = min(lex_i, f_j)
* new_lex_j = max(lex_j, f_j) # <<<<<<<<<<<<<<
@@ -65926,8 +65825,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
__pyx_t_1 = __pyx_v_f_j;
__Pyx_INCREF(__pyx_v_lex_j);
__pyx_t_4 = __pyx_v_lex_j;
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_6) {
__Pyx_INCREF(__pyx_t_1);
@@ -65944,19 +65843,19 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
__pyx_v_new_lex_j = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2182
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2162
* new_lex_i = min(lex_i, f_j)
* new_lex_j = max(lex_j, f_j)
* phrases.add((f, new_lex_i, new_lex_j)) # <<<<<<<<<<<<<<
* extract(f_i, f_j + 1, new_lex_i, new_lex_j, wc + 1, ntc, syms)
* syms.pop()
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_phrases)) { __Pyx_RaiseClosureNameError("phrases"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_phrases)) { __Pyx_RaiseClosureNameError("phrases"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_phrases) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_f));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_f));
@@ -65967,71 +65866,71 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
__Pyx_INCREF(__pyx_v_new_lex_j);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_new_lex_j);
__Pyx_GIVEREF(__pyx_v_new_lex_j);
- __pyx_t_8 = PySet_Add(__pyx_cur_scope->__pyx_v_phrases, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySet_Add(__pyx_cur_scope->__pyx_v_phrases, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2183
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2163
* new_lex_j = max(lex_j, f_j)
* phrases.add((f, new_lex_i, new_lex_j))
* extract(f_i, f_j + 1, new_lex_i, new_lex_j, wc + 1, ntc, syms) # <<<<<<<<<<<<<<
* syms.pop()
* # Extend with existing non-terminal
*/
- __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_4 = __pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_1, __pyx_v_new_lex_i, __pyx_v_new_lex_j, __pyx_t_2, __pyx_v_ntc, __pyx_v_syms); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_4 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_1, __pyx_v_new_lex_i, __pyx_v_new_lex_j, __pyx_t_2, __pyx_v_ntc, __pyx_v_syms); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2184
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2164
* phrases.add((f, new_lex_i, new_lex_j))
* extract(f_i, f_j + 1, new_lex_i, new_lex_j, wc + 1, ntc, syms)
* syms.pop() # <<<<<<<<<<<<<<
* # Extend with existing non-terminal
* if syms and sym_isvar(syms[-1]):
*/
- __pyx_t_4 = __Pyx_PyObject_Pop(__pyx_v_syms); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Pop(__pyx_v_syms); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L4;
}
__pyx_L4:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2186
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2166
* syms.pop()
* # Extend with existing non-terminal
* if syms and sym_isvar(syms[-1]): # <<<<<<<<<<<<<<
* # Don't re-extract the same phrase
* extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc, syms)
*/
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_syms); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_syms); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_6) {
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_syms, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_syms, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_3 = (__pyx_f_3_sa_sym_isvar(__pyx_t_9) != 0);
+ __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_9) != 0);
} else {
__pyx_t_3 = __pyx_t_6;
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2188
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2168
* if syms and sym_isvar(syms[-1]):
* # Don't re-extract the same phrase
* extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc, syms) # <<<<<<<<<<<<<<
* # Extend with new non-terminal
* if wc + ntc < self.max_length:
*/
- __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_2 = __pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_lex_i, __pyx_v_lex_j, __pyx_v_wc, __pyx_v_ntc, __pyx_v_syms); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_lex_i, __pyx_v_lex_j, __pyx_v_wc, __pyx_v_ntc, __pyx_v_syms); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -66039,46 +65938,46 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2190
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2170
* extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc, syms)
* # Extend with new non-terminal
* if wc + ntc < self.max_length: # <<<<<<<<<<<<<<
* if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])):
* syms.append(sym_setindex(self.category, ntc + 1))
*/
- __pyx_t_2 = PyNumber_Add(__pyx_v_wc, __pyx_v_ntc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Add(__pyx_v_wc, __pyx_v_ntc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2191
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2171
* # Extend with new non-terminal
* if wc + ntc < self.max_length:
* if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])): # <<<<<<<<<<<<<<
* syms.append(sym_setindex(self.category, ntc + 1))
* f = Phrase(syms)
*/
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_syms); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_syms); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_6 = (!__pyx_t_3);
if (!__pyx_t_6) {
- __pyx_t_1 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_nonterminals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_cur_scope->__pyx_v_self->max_nonterminals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_ntc, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_ntc, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_3) {
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_syms, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_syms, -1, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = (!(__pyx_f_3_sa_sym_isvar(__pyx_t_9) != 0));
+ __pyx_t_5 = (!(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_9) != 0));
__pyx_t_10 = __pyx_t_5;
} else {
__pyx_t_10 = __pyx_t_3;
@@ -66089,68 +65988,68 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
}
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2192
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2172
* if wc + ntc < self.max_length:
* if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])):
* syms.append(sym_setindex(self.category, ntc + 1)) # <<<<<<<<<<<<<<
* f = Phrase(syms)
* if wc > 0:
*/
- __pyx_t_4 = PyNumber_Add(__pyx_v_ntc, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_ntc, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromLong(__pyx_f_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_syms, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_syms, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2193
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2173
* if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])):
* syms.append(sym_setindex(self.category, ntc + 1))
* f = Phrase(syms) # <<<<<<<<<<<<<<
* if wc > 0:
* phrases.add((f, lex_i, lex_j))
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_syms);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_syms);
__Pyx_GIVEREF(__pyx_v_syms);
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_XDECREF(((PyObject *)__pyx_v_f));
- __pyx_v_f = ((struct __pyx_obj_3_sa_Phrase *)__pyx_t_4);
+ __pyx_v_f = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2194
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2174
* syms.append(sym_setindex(self.category, ntc + 1))
* f = Phrase(syms)
* if wc > 0: # <<<<<<<<<<<<<<
* phrases.add((f, lex_i, lex_j))
* extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc + 1, syms)
*/
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_wc, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_wc, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_3) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2195
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2175
* f = Phrase(syms)
* if wc > 0:
* phrases.add((f, lex_i, lex_j)) # <<<<<<<<<<<<<<
* extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc + 1, syms)
* syms.pop()
*/
- if (unlikely(!__pyx_cur_scope->__pyx_v_phrases)) { __Pyx_RaiseClosureNameError("phrases"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ if (unlikely(!__pyx_cur_scope->__pyx_v_phrases)) { __Pyx_RaiseClosureNameError("phrases"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_phrases) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add");
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_v_f));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_f));
@@ -66161,38 +66060,38 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
__Pyx_INCREF(__pyx_v_lex_j);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_lex_j);
__Pyx_GIVEREF(__pyx_v_lex_j);
- __pyx_t_8 = PySet_Add(__pyx_cur_scope->__pyx_v_phrases, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PySet_Add(__pyx_cur_scope->__pyx_v_phrases, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
goto __pyx_L8;
}
__pyx_L8:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2196
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2176
* if wc > 0:
* phrases.add((f, lex_i, lex_j))
* extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc + 1, syms) # <<<<<<<<<<<<<<
* syms.pop()
*
*/
- __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyNumber_Add(__pyx_v_ntc, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_Add(__pyx_v_ntc, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
- __pyx_t_2 = __pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_lex_i, __pyx_v_lex_j, __pyx_v_wc, __pyx_t_1, __pyx_v_syms); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+ __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_lex_i, __pyx_v_lex_j, __pyx_v_wc, __pyx_t_1, __pyx_v_syms); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2197
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2177
* phrases.add((f, lex_i, lex_j))
* extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc + 1, syms)
* syms.pop() # <<<<<<<<<<<<<<
*
* # Try to extract phrases from every f index
*/
- __pyx_t_2 = __Pyx_PyObject_Pop(__pyx_v_syms); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Pop(__pyx_v_syms); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L7;
@@ -66209,7 +66108,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.get_f_phrases.extract", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_f_phrases.extract", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_f);
@@ -66220,7 +66119,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2167
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2147
* # (Used for EGivenFCoherent)
* # Return set of (fphrase, lex_i, lex_j)
* def get_f_phrases(self, f_words): # <<<<<<<<<<<<<<
@@ -66228,8 +66127,8 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract
* f_len = len(f_words)
*/
-static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_37get_f_phrases(struct __pyx_obj_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_words) {
- struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phrases(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_f_words) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *__pyx_cur_scope;
long __pyx_v_f_i;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -66244,7 +66143,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_37get_f_phrases(struct
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_f_phrases", 0);
- __pyx_cur_scope = (struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *)__pyx_tp_new_3_sa___pyx_scope_struct_26_get_f_phrases(__pyx_ptype_3_sa___pyx_scope_struct_26_get_f_phrases, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -66257,7 +66156,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_37get_f_phrases(struct
__Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_words);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_words);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2169
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2149
* def get_f_phrases(self, f_words):
*
* f_len = len(f_words) # <<<<<<<<<<<<<<
@@ -66266,66 +66165,66 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_37get_f_phrases(struct
*/
__pyx_t_1 = __pyx_cur_scope->__pyx_v_f_words;
__Pyx_INCREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_cur_scope->__pyx_v_f_len = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2170
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2150
*
* f_len = len(f_words)
* phrases = set() # (fphrase, lex_i, lex_j) # <<<<<<<<<<<<<<
*
* def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms):
*/
- __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__Pyx_GIVEREF(((PyObject *)__pyx_t_1));
__pyx_cur_scope->__pyx_v_phrases = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2172
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2152
* phrases = set() # (fphrase, lex_i, lex_j)
*
* def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<<
* # Phrase extraction limits
* if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size:
*/
- __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract, 0, __pyx_n_s_166, ((PyObject*)__pyx_cur_scope), __pyx_n_s___sa, ((PyObject *)__pyx_k_codeobj_165)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract, 0, __pyx_n_s_155, ((PyObject*)__pyx_cur_scope), __pyx_n_s_102, ((PyObject *)__pyx_k_codeobj_154)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_cur_scope->__pyx_v_extract = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2200
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2180
*
* # Try to extract phrases from every f index
* for f_i from 0 <= f_i < f_len: # <<<<<<<<<<<<<<
* extract(f_i, f_i, f_len, -1, 0, 0, [])
*
*/
- __pyx_t_3 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_f_len); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_f_len); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
for (__pyx_v_f_i = 0; __pyx_v_f_i < __pyx_t_3; __pyx_v_f_i++) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2201
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2181
* # Try to extract phrases from every f index
* for f_i from 0 <= f_i < f_len:
* extract(f_i, f_i, f_len, -1, 0, 0, []) # <<<<<<<<<<<<<<
*
* return phrases
*/
- __pyx_t_1 = PyInt_FromLong(__pyx_v_f_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_f_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyInt_FromLong(__pyx_v_f_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(__pyx_v_f_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = __pyx_cur_scope->__pyx_v_f_len;
__Pyx_INCREF(__pyx_t_5);
- __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __pyx_pf_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_t_1, __pyx_t_4, __pyx_t_5, __pyx_int_neg_1, __pyx_int_0, __pyx_int_0, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_t_1, __pyx_t_4, __pyx_t_5, __pyx_int_neg_1, __pyx_int_0, __pyx_int_0, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -66334,12 +66233,12 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_37get_f_phrases(struct
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2203
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2183
* extract(f_i, f_i, f_len, -1, 0, 0, [])
*
* return phrases # <<<<<<<<<<<<<<
*
- * # Spans are _inclusive_ on both ends [i, j]
+ * # Drop online stats for a context
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrases));
@@ -66354,7 +66253,7 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_37get_f_phrases(struct
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_AddTraceback("_sa.HieroCachingRuleFactory.get_f_phrases", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_f_phrases", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -66364,9 +66263,120 @@ static PyObject *__pyx_pf_3_sa_23HieroCachingRuleFactory_37get_f_phrases(struct
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_17span_check(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_17span_check = {__Pyx_NAMESTR("span_check"), (PyCFunction)__pyx_pw_3_sa_17span_check, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_17span_check(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_36drop_ctx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_36drop_ctx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_ctx_name = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("drop_ctx (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ctx_name,0};
+ PyObject* values[1] = {0};
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2186
+ *
+ * # Drop online stats for a context
+ * def drop_ctx(self, ctx_name=None): # <<<<<<<<<<<<<<
+ * self.online_stats.pop(ctx_name, None)
+ *
+ */
+ values[0] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ctx_name);
+ if (value) { values[0] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "drop_ctx") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_ctx_name = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("drop_ctx", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.drop_ctx", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_35drop_ctx(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_ctx_name);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_35drop_ctx(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *__pyx_v_self, PyObject *__pyx_v_ctx_name) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("drop_ctx", 0);
+
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2187
+ * # Drop online stats for a context
+ * def drop_ctx(self, ctx_name=None):
+ * self.online_stats.pop(ctx_name, None) # <<<<<<<<<<<<<<
+ *
+ * # Spans are _inclusive_ on both ends [i, j]
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->online_stats, __pyx_n_s__pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_ctx_name);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ctx_name);
+ __Pyx_GIVEREF(__pyx_v_ctx_name);
+ __Pyx_INCREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_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_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.drop_ctx", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_17span_check(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_17span_check = {__Pyx_NAMESTR("span_check"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_17span_check, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_17span_check(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_vec = 0;
PyObject *__pyx_v_i = 0;
PyObject *__pyx_v_j = 0;
@@ -66397,16 +66407,16 @@ static PyObject *__pyx_pw_3_sa_17span_check(PyObject *__pyx_self, PyObject *__py
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__j)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_check") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_check") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -66421,18 +66431,18 @@ static PyObject *__pyx_pw_3_sa_17span_check(PyObject *__pyx_self, PyObject *__py
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.span_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.span_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_16span_check(__pyx_self, __pyx_v_vec, __pyx_v_i, __pyx_v_j);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_16span_check(__pyx_self, __pyx_v_vec, __pyx_v_i, __pyx_v_j);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2206
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2190
*
* # Spans are _inclusive_ on both ends [i, j]
* def span_check(vec, i, j): # <<<<<<<<<<<<<<
@@ -66440,7 +66450,7 @@ static PyObject *__pyx_pw_3_sa_17span_check(PyObject *__pyx_self, PyObject *__py
* while k <= j:
*/
-static PyObject *__pyx_pf_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
PyObject *__pyx_v_k = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -66451,7 +66461,7 @@ static PyObject *__pyx_pf_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self,
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("span_check", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2207
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2191
* # Spans are _inclusive_ on both ends [i, j]
* def span_check(vec, i, j):
* k = i # <<<<<<<<<<<<<<
@@ -66461,7 +66471,7 @@ static PyObject *__pyx_pf_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self,
__Pyx_INCREF(__pyx_v_i);
__pyx_v_k = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2208
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2192
* def span_check(vec, i, j):
* k = i
* while k <= j: # <<<<<<<<<<<<<<
@@ -66469,25 +66479,25 @@ static PyObject *__pyx_pf_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self,
* return False
*/
while (1) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2209
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2193
* k = i
* while k <= j:
* if vec[k]: # <<<<<<<<<<<<<<
* return False
* k += 1
*/
- __pyx_t_1 = PyObject_GetItem(__pyx_v_vec, __pyx_v_k); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_vec, __pyx_v_k); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2210
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2194
* while k <= j:
* if vec[k]:
* return False # <<<<<<<<<<<<<<
@@ -66495,7 +66505,7 @@ static PyObject *__pyx_pf_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self,
* return True
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -66504,21 +66514,21 @@ static PyObject *__pyx_pf_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self,
}
__pyx_L5:;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2211
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2195
* if vec[k]:
* return False
* k += 1 # <<<<<<<<<<<<<<
* return True
*
*/
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_v_k);
__pyx_v_k = __pyx_t_1;
__pyx_t_1 = 0;
}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2212
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2196
* return False
* k += 1
* return True # <<<<<<<<<<<<<<
@@ -66526,7 +66536,7 @@ static PyObject *__pyx_pf_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self,
* def span_inc(vec, i, j):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -66536,7 +66546,7 @@ static PyObject *__pyx_pf_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self,
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("_sa.span_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.span_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_k);
@@ -66546,9 +66556,9 @@ static PyObject *__pyx_pf_3_sa_16span_check(CYTHON_UNUSED PyObject *__pyx_self,
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_19span_inc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_19span_inc = {__Pyx_NAMESTR("span_inc"), (PyCFunction)__pyx_pw_3_sa_19span_inc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_19span_inc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_19span_inc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_19span_inc = {__Pyx_NAMESTR("span_inc"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_19span_inc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_19span_inc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_vec = 0;
PyObject *__pyx_v_i = 0;
PyObject *__pyx_v_j = 0;
@@ -66579,16 +66589,16 @@ static PyObject *__pyx_pw_3_sa_19span_inc(PyObject *__pyx_self, PyObject *__pyx_
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__j)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_inc") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_inc") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -66603,18 +66613,18 @@ static PyObject *__pyx_pw_3_sa_19span_inc(PyObject *__pyx_self, PyObject *__pyx_
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.span_inc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.span_inc", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_18span_inc(__pyx_self, __pyx_v_vec, __pyx_v_i, __pyx_v_j);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_18span_inc(__pyx_self, __pyx_v_vec, __pyx_v_i, __pyx_v_j);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2214
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2198
* return True
*
* def span_inc(vec, i, j): # <<<<<<<<<<<<<<
@@ -66622,7 +66632,7 @@ static PyObject *__pyx_pw_3_sa_19span_inc(PyObject *__pyx_self, PyObject *__pyx_
* while k <= j:
*/
-static PyObject *__pyx_pf_3_sa_18span_inc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
PyObject *__pyx_v_k = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -66635,7 +66645,7 @@ static PyObject *__pyx_pf_3_sa_18span_inc(CYTHON_UNUSED PyObject *__pyx_self, Py
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("span_inc", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2215
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2199
*
* def span_inc(vec, i, j):
* k = i # <<<<<<<<<<<<<<
@@ -66645,7 +66655,7 @@ static PyObject *__pyx_pf_3_sa_18span_inc(CYTHON_UNUSED PyObject *__pyx_self, Py
__Pyx_INCREF(__pyx_v_i);
__pyx_v_k = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2216
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2200
* def span_inc(vec, i, j):
* k = i
* while k <= j: # <<<<<<<<<<<<<<
@@ -66653,12 +66663,12 @@ static PyObject *__pyx_pf_3_sa_18span_inc(CYTHON_UNUSED PyObject *__pyx_self, Py
* k += 1
*/
while (1) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2217
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2201
* k = i
* while k <= j:
* vec[k] += 1 # <<<<<<<<<<<<<<
@@ -66667,23 +66677,23 @@ static PyObject *__pyx_pf_3_sa_18span_inc(CYTHON_UNUSED PyObject *__pyx_self, Py
*/
__Pyx_INCREF(__pyx_v_k);
__pyx_t_1 = __pyx_v_k;
- __pyx_t_3 = PyObject_GetItem(__pyx_v_vec, __pyx_t_1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_vec, __pyx_t_1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (PyObject_SetItem(__pyx_v_vec, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_v_vec, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2218
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2202
* while k <= j:
* vec[k] += 1
* k += 1 # <<<<<<<<<<<<<<
*
* def span_dec(vec, i, j):
*/
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_v_k);
__pyx_v_k = __pyx_t_1;
@@ -66696,7 +66706,7 @@ static PyObject *__pyx_pf_3_sa_18span_inc(CYTHON_UNUSED PyObject *__pyx_self, Py
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.span_inc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.span_inc", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_k);
@@ -66706,9 +66716,9 @@ static PyObject *__pyx_pf_3_sa_18span_inc(CYTHON_UNUSED PyObject *__pyx_self, Py
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_21span_dec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_3_sa_21span_dec = {__Pyx_NAMESTR("span_dec"), (PyCFunction)__pyx_pw_3_sa_21span_dec, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_3_sa_21span_dec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_21span_dec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_4cdec_2sa_3_sa_21span_dec = {__Pyx_NAMESTR("span_dec"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_21span_dec, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_21span_dec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_vec = 0;
PyObject *__pyx_v_i = 0;
PyObject *__pyx_v_j = 0;
@@ -66739,16 +66749,16 @@ static PyObject *__pyx_pw_3_sa_21span_dec(PyObject *__pyx_self, PyObject *__pyx_
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__j)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_dec") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_dec") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -66763,18 +66773,18 @@ static PyObject *__pyx_pw_3_sa_21span_dec(PyObject *__pyx_self, PyObject *__pyx_
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.span_dec", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.span_dec", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_20span_dec(__pyx_self, __pyx_v_vec, __pyx_v_i, __pyx_v_j);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_20span_dec(__pyx_self, __pyx_v_vec, __pyx_v_i, __pyx_v_j);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2220
+/* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2204
* k += 1
*
* def span_dec(vec, i, j): # <<<<<<<<<<<<<<
@@ -66782,7 +66792,7 @@ static PyObject *__pyx_pw_3_sa_21span_dec(PyObject *__pyx_self, PyObject *__pyx_
* while k <= j:
*/
-static PyObject *__pyx_pf_3_sa_20span_dec(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
PyObject *__pyx_v_k = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -66795,7 +66805,7 @@ static PyObject *__pyx_pf_3_sa_20span_dec(CYTHON_UNUSED PyObject *__pyx_self, Py
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("span_dec", 0);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2221
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2205
*
* def span_dec(vec, i, j):
* k = i # <<<<<<<<<<<<<<
@@ -66805,7 +66815,7 @@ static PyObject *__pyx_pf_3_sa_20span_dec(CYTHON_UNUSED PyObject *__pyx_self, Py
__Pyx_INCREF(__pyx_v_i);
__pyx_v_k = __pyx_v_i;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2222
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2206
* def span_dec(vec, i, j):
* k = i
* while k <= j: # <<<<<<<<<<<<<<
@@ -66813,12 +66823,12 @@ static PyObject *__pyx_pf_3_sa_20span_dec(CYTHON_UNUSED PyObject *__pyx_self, Py
* k += 1
*/
while (1) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_2) break;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2223
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2207
* k = i
* while k <= j:
* vec[k] -= 1 # <<<<<<<<<<<<<<
@@ -66826,21 +66836,21 @@ static PyObject *__pyx_pf_3_sa_20span_dec(CYTHON_UNUSED PyObject *__pyx_self, Py
*/
__Pyx_INCREF(__pyx_v_k);
__pyx_t_1 = __pyx_v_k;
- __pyx_t_3 = PyObject_GetItem(__pyx_v_vec, __pyx_t_1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_vec, __pyx_t_1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (PyObject_SetItem(__pyx_v_vec, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(__pyx_v_vec, __pyx_t_1, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2224
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2208
* while k <= j:
* vec[k] -= 1
* k += 1 # <<<<<<<<<<<<<<
*/
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_v_k);
__pyx_v_k = __pyx_t_1;
@@ -66853,7 +66863,7 @@ static PyObject *__pyx_pf_3_sa_20span_dec(CYTHON_UNUSED PyObject *__pyx_self, Py
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.span_dec", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.span_dec", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_k);
@@ -66863,20 +66873,20 @@ static PyObject *__pyx_pf_3_sa_20span_dec(CYTHON_UNUSED PyObject *__pyx_self, Py
}
/* 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) {
+static int __pyx_pw_4cdec_2sa_3_sa_13FeatureVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_13FeatureVector_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
- __pyx_r = __pyx_pf_3_sa_13FeatureVector___cinit__(((struct __pyx_obj_3_sa_FeatureVector *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":7
+/* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":7
*
* cdef class FeatureVector:
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -66884,7 +66894,7 @@ static int __pyx_pw_3_sa_13FeatureVector_1__cinit__(PyObject *__pyx_v_self, PyOb
* self.values = FloatList(INITIAL_CAPACITY, INCREMENT)
*/
-static int __pyx_pf_3_sa_13FeatureVector___cinit__(struct __pyx_obj_3_sa_FeatureVector *__pyx_v_self) {
+static int __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_self) {
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -66895,7 +66905,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/mdenkows/cdec/python/cdec/sa/features.pxi":8
* cdef class FeatureVector:
* def __cinit__(self):
* self.names = IntList(INITIAL_CAPACITY, INCREMENT) # <<<<<<<<<<<<<<
@@ -66914,16 +66924,16 @@ static int __pyx_pf_3_sa_13FeatureVector___cinit__(struct __pyx_obj_3_sa_Feature
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_1 = 0;
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_IntList)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->names);
__Pyx_DECREF(((PyObject *)__pyx_v_self->names));
- __pyx_v_self->names = ((struct __pyx_obj_3_sa_IntList *)__pyx_t_2);
+ __pyx_v_self->names = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":9
+ /* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":9
* def __cinit__(self):
* self.names = IntList(INITIAL_CAPACITY, INCREMENT)
* self.values = FloatList(INITIAL_CAPACITY, INCREMENT) # <<<<<<<<<<<<<<
@@ -66942,13 +66952,13 @@ static int __pyx_pf_3_sa_13FeatureVector___cinit__(struct __pyx_obj_3_sa_Feature
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_2 = 0;
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_FloatList)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_FloatList)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_v_self->values);
__Pyx_DECREF(((PyObject *)__pyx_v_self->values));
- __pyx_v_self->values = ((struct __pyx_obj_3_sa_FloatList *)__pyx_t_3);
+ __pyx_v_self->values = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_3);
__pyx_t_3 = 0;
__pyx_r = 0;
@@ -66957,7 +66967,7 @@ static int __pyx_pf_3_sa_13FeatureVector___cinit__(struct __pyx_obj_3_sa_Feature
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.FeatureVector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FeatureVector.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
@@ -66965,8 +66975,8 @@ static int __pyx_pf_3_sa_13FeatureVector___cinit__(struct __pyx_obj_3_sa_Feature
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_13FeatureVector_3set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_3_sa_13FeatureVector_3set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_13FeatureVector_3set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_13FeatureVector_3set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
unsigned int __pyx_v_name;
float __pyx_v_value;
int __pyx_lineno = 0;
@@ -67014,16 +67024,16 @@ static PyObject *__pyx_pw_3_sa_13FeatureVector_3set(PyObject *__pyx_v_self, PyOb
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[13]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("_sa.FeatureVector.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FeatureVector.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_3_sa_13FeatureVector_2set(((struct __pyx_obj_3_sa_FeatureVector *)__pyx_v_self), __pyx_v_name, __pyx_v_value);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_v_self), __pyx_v_name, __pyx_v_value);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":11
+/* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":11
* self.values = FloatList(INITIAL_CAPACITY, INCREMENT)
*
* def set(self, unsigned name, float value): # <<<<<<<<<<<<<<
@@ -67031,7 +67041,7 @@ static PyObject *__pyx_pw_3_sa_13FeatureVector_3set(PyObject *__pyx_v_self, PyOb
* self.values.append(value)
*/
-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) {
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_self, unsigned int __pyx_v_name, float __pyx_v_value) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -67041,7 +67051,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/mdenkows/cdec/python/cdec/sa/features.pxi":12
*
* def set(self, unsigned name, float value):
* self.names.append(name) # <<<<<<<<<<<<<<
@@ -67055,7 +67065,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/mdenkows/cdec/python/cdec/sa/features.pxi":13
* def set(self, unsigned name, float value):
* self.names.append(name)
* self.values.append(value) # <<<<<<<<<<<<<<
@@ -67074,27 +67084,27 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_2set(struct __pyx_obj_3_sa_Featur
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("_sa.FeatureVector.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FeatureVector.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_13FeatureVector_6generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_13FeatureVector_5__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_13FeatureVector_5__iter__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_13FeatureVector_5__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_13FeatureVector_5__iter__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_13FeatureVector_4__iter__(((struct __pyx_obj_3_sa_FeatureVector *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_13FeatureVector_4__iter__(((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":15
+/* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":15
* self.values.append(value)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -67102,15 +67112,15 @@ static PyObject *__pyx_pw_3_sa_13FeatureVector_5__iter__(PyObject *__pyx_v_self)
* for i in range(self.names.len):
*/
-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_27___iter__ *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_4__iter__(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___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_27___iter__ *)__pyx_tp_new_3_sa___pyx_scope_struct_27___iter__(__pyx_ptype_3_sa___pyx_scope_struct_27___iter__, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -67120,7 +67130,7 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_4__iter__(struct __pyx_obj_3_sa_F
__Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
__Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
{
- __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_3_sa_13FeatureVector_6generator5, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
@@ -67129,7 +67139,7 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_4__iter__(struct __pyx_obj_3_sa_F
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.FeatureVector.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FeatureVector.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -67138,9 +67148,9 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_4__iter__(struct __pyx_obj_3_sa_F
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_13FeatureVector_6generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
int __pyx_t_1;
unsigned int __pyx_t_2;
@@ -67163,7 +67173,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/mdenkows/cdec/python/cdec/sa/features.pxi":17
* def __iter__(self):
* cdef unsigned i
* for i in range(self.names.len): # <<<<<<<<<<<<<<
@@ -67174,7 +67184,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/mdenkows/cdec/python/cdec/sa/features.pxi":18
* cdef unsigned i
* for i in range(self.names.len):
* yield (FD.word(self.names[i]), self.values[i]) # <<<<<<<<<<<<<<
@@ -67185,7 +67195,7 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_6generator5(__pyx_GeneratorObject
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyBytes_FromString(((struct __pyx_vtabstruct_3_sa_StringMap *)__pyx_v_3_sa_FD->__pyx_vtab)->word(__pyx_v_3_sa_FD, __pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyBytes_FromString(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_4cdec_2sa_3_sa_FD->__pyx_vtab)->word(__pyx_v_4cdec_2sa_3_sa_FD, __pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
__pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self->values), __pyx_cur_scope->__pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
@@ -67227,18 +67237,18 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_6generator5(__pyx_GeneratorObject
}
/* Python wrapper */
-static PyObject *__pyx_pw_3_sa_13FeatureVector_8__str__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_3_sa_13FeatureVector_8__str__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_13FeatureVector_8__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_4cdec_2sa_3_sa_13FeatureVector_8__str__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
- __pyx_r = __pyx_pf_3_sa_13FeatureVector_7__str__(((struct __pyx_obj_3_sa_FeatureVector *)__pyx_v_self));
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str__(((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_v_self));
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_7__str___2generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":21
+/* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":21
*
* def __str__(self):
* return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<<
@@ -67246,25 +67256,25 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator17(__pyx_Gener
* cdef class Scorer:
*/
-static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str___genexpr(PyObject *__pyx_self) {
- struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str___genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_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_29_genexpr *)__pyx_tp_new_3_sa___pyx_scope_struct_29_genexpr(__pyx_ptype_3_sa___pyx_scope_struct_29_genexpr, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_29_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_28___str__ *) __pyx_self;
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___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___2generator17, (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_4cdec_2sa_3_sa_13FeatureVector_7__str___2generator17, (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;
@@ -67273,7 +67283,7 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str___genexpr(PyObject *__pyx_
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("_sa.FeatureVector.__str__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FeatureVector.__str__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -67282,9 +67292,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___2generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_7__str___2generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
- struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *)__pyx_generator->closure);
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -67344,7 +67354,7 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator17(__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_167), __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_156), __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;
@@ -67380,7 +67390,7 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator17(__pyx_Gener
return NULL;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":20
+/* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":20
* yield (FD.word(self.names[i]), self.values[i])
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -67388,8 +67398,8 @@ static PyObject *__pyx_gb_3_sa_13FeatureVector_7__str___2generator17(__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_28___str__ *__pyx_cur_scope;
+static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str__(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_self) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -67399,7 +67409,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_28___str__ *)__pyx_tp_new_3_sa___pyx_scope_struct_28___str__(__pyx_ptype_3_sa___pyx_scope_struct_28___str__, __pyx_empty_tuple, NULL);
+ __pyx_cur_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *)__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_28___str__(__pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_28___str__, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__Pyx_RefNannyFinishContext();
return NULL;
@@ -67409,7 +67419,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/mdenkows/cdec/python/cdec/sa/features.pxi":21
*
* def __str__(self):
* return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<<
@@ -67419,7 +67429,7 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str__(struct __pyx_obj_3_sa_Fe
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_69), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __pyx_pf_3_sa_13FeatureVector_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -67440,7 +67450,7 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str__(struct __pyx_obj_3_sa_Fe
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("_sa.FeatureVector.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.FeatureVector.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
@@ -67450,8 +67460,8 @@ static PyObject *__pyx_pf_3_sa_13FeatureVector_7__str__(struct __pyx_obj_3_sa_Fe
}
/* Python wrapper */
-static int __pyx_pw_3_sa_6Scorer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_3_sa_6Scorer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4cdec_2sa_3_sa_6Scorer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_4cdec_2sa_3_sa_6Scorer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_models = 0;
int __pyx_r;
__Pyx_RefNannyDeclarations
@@ -67459,13 +67469,13 @@ static int __pyx_pw_3_sa_6Scorer_1__init__(PyObject *__pyx_v_self, PyObject *__p
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
__Pyx_INCREF(__pyx_args);
__pyx_v_models = __pyx_args;
- __pyx_r = __pyx_pf_3_sa_6Scorer___init__(((struct __pyx_obj_3_sa_Scorer *)__pyx_v_self), __pyx_v_models);
+ __pyx_r = __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(((struct __pyx_obj_4cdec_2sa_3_sa_Scorer *)__pyx_v_self), __pyx_v_models);
__Pyx_XDECREF(__pyx_v_models);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":25
+/* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":25
* cdef class Scorer:
* cdef models
* def __init__(self, *models): # <<<<<<<<<<<<<<
@@ -67473,7 +67483,7 @@ static int __pyx_pw_3_sa_6Scorer_1__init__(PyObject *__pyx_v_self, PyObject *__p
* self.models = zip(names, models)
*/
-static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_self, PyObject *__pyx_v_models) {
+static int __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(struct __pyx_obj_4cdec_2sa_3_sa_Scorer *__pyx_v_self, PyObject *__pyx_v_models) {
PyObject *__pyx_v_names = NULL;
PyObject *__pyx_v_model = NULL;
int __pyx_r;
@@ -67488,7 +67498,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/mdenkows/cdec/python/cdec/sa/features.pxi":26
* cdef models
* def __init__(self, *models):
* names = [FD.index(<char *>model.__name__) for model in models] # <<<<<<<<<<<<<<
@@ -67512,7 +67522,7 @@ static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyInt_FromLong(((struct __pyx_vtabstruct_3_sa_StringMap *)__pyx_v_3_sa_FD->__pyx_vtab)->index(__pyx_v_3_sa_FD, ((char *)__pyx_t_5))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_4cdec_2sa_3_sa_FD->__pyx_vtab)->index(__pyx_v_4cdec_2sa_3_sa_FD, ((char *)__pyx_t_5))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -67521,7 +67531,7 @@ static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_
__pyx_v_names = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":27
+ /* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":27
* def __init__(self, *models):
* names = [FD.index(<char *>model.__name__) for model in models]
* self.models = zip(names, models) # <<<<<<<<<<<<<<
@@ -67551,7 +67561,7 @@ static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("_sa.Scorer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Scorer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_names);
@@ -67560,7 +67570,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/mdenkows/cdec/python/cdec/sa/features.pxi":29
* self.models = zip(names, models)
*
* cdef FeatureVector score(self, ctx): # <<<<<<<<<<<<<<
@@ -67568,11 +67578,11 @@ static int __pyx_pf_3_sa_6Scorer___init__(struct __pyx_obj_3_sa_Scorer *__pyx_v_
* for name, model in self.models:
*/
-static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __pyx_obj_3_sa_Scorer *__pyx_v_self, PyObject *__pyx_v_ctx) {
- struct __pyx_obj_3_sa_FeatureVector *__pyx_v_scores = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Scorer_score(struct __pyx_obj_4cdec_2sa_3_sa_Scorer *__pyx_v_self, PyObject *__pyx_v_ctx) {
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_v_scores = 0;
PyObject *__pyx_v_name = NULL;
PyObject *__pyx_v_model = NULL;
- struct __pyx_obj_3_sa_FeatureVector *__pyx_r = NULL;
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
@@ -67587,19 +67597,19 @@ 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/mdenkows/cdec/python/cdec/sa/features.pxi":30
*
* cdef FeatureVector score(self, ctx):
* cdef FeatureVector scores = FeatureVector() # <<<<<<<<<<<<<<
* for name, model in self.models:
* scores.set(name, model(ctx))
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_FeatureVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_FeatureVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_v_scores = ((struct __pyx_obj_3_sa_FeatureVector *)__pyx_t_1);
+ __pyx_v_scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":31
+ /* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":31
* cdef FeatureVector score(self, ctx):
* cdef FeatureVector scores = FeatureVector()
* for name, model in self.models: # <<<<<<<<<<<<<<
@@ -67698,7 +67708,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/mdenkows/cdec/python/cdec/sa/features.pxi":32
* cdef FeatureVector scores = FeatureVector()
* for name, model in self.models:
* scores.set(name, model(ctx)) # <<<<<<<<<<<<<<
@@ -67730,7 +67740,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/mdenkows/cdec/python/cdec/sa/features.pxi":33
* for name, model in self.models:
* scores.set(name, model(ctx))
* return scores # <<<<<<<<<<<<<<
@@ -67740,7 +67750,7 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
__pyx_r = __pyx_v_scores;
goto __pyx_L0;
- __pyx_r = ((struct __pyx_obj_3_sa_FeatureVector *)Py_None); __Pyx_INCREF(Py_None);
+ __pyx_r = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)Py_None); __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
@@ -67748,7 +67758,7 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_AddTraceback("_sa.Scorer.score", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("cdec.sa._sa.Scorer.score", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_scores);
@@ -67758,259 +67768,64 @@ static struct __pyx_obj_3_sa_FeatureVector *__pyx_f_3_sa_6Scorer_score(struct __
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static struct __pyx_vtabstruct_3_sa_HieroCachingRuleFactory __pyx_vtable_3_sa_HieroCachingRuleFactory;
-static PyObject *__pyx_tp_new_3_sa_HieroCachingRuleFactory(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_HieroCachingRuleFactory *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_FeatureVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_HieroCachingRuleFactory;
- p->rules = ((struct __pyx_obj_3_sa_TrieTable *)Py_None); Py_INCREF(Py_None);
- p->sampler = ((struct __pyx_obj_3_sa_Sampler *)Py_None); Py_INCREF(Py_None);
- p->scorer = ((struct __pyx_obj_3_sa_Scorer *)Py_None); Py_INCREF(Py_None);
- p->precomputed_index = Py_None; Py_INCREF(Py_None);
- p->precomputed_collocations = Py_None; Py_INCREF(Py_None);
- p->precompute_file = Py_None; Py_INCREF(Py_None);
- p->max_rank = Py_None; Py_INCREF(Py_None);
- p->prev_norm_prefix = Py_None; Py_INCREF(Py_None);
- p->fsa = ((struct __pyx_obj_3_sa_SuffixArray *)Py_None); Py_INCREF(Py_None);
- p->fda = ((struct __pyx_obj_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
- p->eda = ((struct __pyx_obj_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
- p->alignment = ((struct __pyx_obj_3_sa_Alignment *)Py_None); Py_INCREF(Py_None);
- p->eid2symid = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->fid2symid = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->findexes = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->findexes1 = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->samples_f = Py_None; Py_INCREF(Py_None);
- p->phrases_f = Py_None; Py_INCREF(Py_None);
- p->phrases_e = Py_None; Py_INCREF(Py_None);
- p->phrases_fe = Py_None; Py_INCREF(Py_None);
- p->phrases_al = Py_None; Py_INCREF(Py_None);
- p->bilex_f = Py_None; Py_INCREF(Py_None);
- p->bilex_e = Py_None; Py_INCREF(Py_None);
- p->bilex_fe = Py_None; Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_23HieroCachingRuleFactory_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)o);
+ p->names = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->values = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_13FeatureVector_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_HieroCachingRuleFactory(PyObject *o) {
- struct __pyx_obj_3_sa_HieroCachingRuleFactory *p = (struct __pyx_obj_3_sa_HieroCachingRuleFactory *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_FeatureVector(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *p = (struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->rules);
- Py_CLEAR(p->sampler);
- Py_CLEAR(p->scorer);
- Py_CLEAR(p->precomputed_index);
- Py_CLEAR(p->precomputed_collocations);
- Py_CLEAR(p->precompute_file);
- Py_CLEAR(p->max_rank);
- Py_CLEAR(p->prev_norm_prefix);
- Py_CLEAR(p->fsa);
- Py_CLEAR(p->fda);
- Py_CLEAR(p->eda);
- Py_CLEAR(p->alignment);
- Py_CLEAR(p->eid2symid);
- Py_CLEAR(p->fid2symid);
- Py_CLEAR(p->findexes);
- Py_CLEAR(p->findexes1);
- Py_CLEAR(p->samples_f);
- Py_CLEAR(p->phrases_f);
- Py_CLEAR(p->phrases_e);
- Py_CLEAR(p->phrases_fe);
- Py_CLEAR(p->phrases_al);
- Py_CLEAR(p->bilex_f);
- Py_CLEAR(p->bilex_e);
- Py_CLEAR(p->bilex_fe);
+ Py_CLEAR(p->names);
+ Py_CLEAR(p->values);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa_HieroCachingRuleFactory(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_FeatureVector(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_HieroCachingRuleFactory *p = (struct __pyx_obj_3_sa_HieroCachingRuleFactory *)o;
- if (p->rules) {
- e = (*v)(((PyObject*)p->rules), a); if (e) return e;
- }
- if (p->sampler) {
- e = (*v)(((PyObject*)p->sampler), a); if (e) return e;
- }
- if (p->scorer) {
- e = (*v)(((PyObject*)p->scorer), a); if (e) return e;
- }
- if (p->precomputed_index) {
- e = (*v)(p->precomputed_index, a); if (e) return e;
- }
- if (p->precomputed_collocations) {
- e = (*v)(p->precomputed_collocations, a); if (e) return e;
- }
- if (p->precompute_file) {
- e = (*v)(p->precompute_file, a); if (e) return e;
- }
- if (p->max_rank) {
- e = (*v)(p->max_rank, a); if (e) return e;
- }
- if (p->prev_norm_prefix) {
- e = (*v)(p->prev_norm_prefix, a); if (e) return e;
- }
- if (p->fsa) {
- e = (*v)(((PyObject*)p->fsa), a); if (e) return e;
- }
- if (p->fda) {
- e = (*v)(((PyObject*)p->fda), a); if (e) return e;
- }
- if (p->eda) {
- e = (*v)(((PyObject*)p->eda), a); if (e) return e;
- }
- if (p->alignment) {
- e = (*v)(((PyObject*)p->alignment), a); if (e) return e;
- }
- if (p->eid2symid) {
- e = (*v)(((PyObject*)p->eid2symid), a); if (e) return e;
- }
- if (p->fid2symid) {
- e = (*v)(((PyObject*)p->fid2symid), a); if (e) return e;
- }
- if (p->findexes) {
- e = (*v)(((PyObject*)p->findexes), a); if (e) return e;
- }
- if (p->findexes1) {
- e = (*v)(((PyObject*)p->findexes1), a); if (e) return e;
- }
- if (p->samples_f) {
- e = (*v)(p->samples_f, a); if (e) return e;
- }
- if (p->phrases_f) {
- e = (*v)(p->phrases_f, a); if (e) return e;
- }
- if (p->phrases_e) {
- e = (*v)(p->phrases_e, a); if (e) return e;
- }
- if (p->phrases_fe) {
- e = (*v)(p->phrases_fe, a); if (e) return e;
- }
- if (p->phrases_al) {
- e = (*v)(p->phrases_al, a); if (e) return e;
- }
- if (p->bilex_f) {
- e = (*v)(p->bilex_f, a); if (e) return e;
- }
- if (p->bilex_e) {
- e = (*v)(p->bilex_e, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *p = (struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)o;
+ if (p->names) {
+ e = (*v)(((PyObject*)p->names), a); if (e) return e;
}
- if (p->bilex_fe) {
- e = (*v)(p->bilex_fe, a); if (e) return e;
+ if (p->values) {
+ e = (*v)(((PyObject*)p->values), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa_HieroCachingRuleFactory(PyObject *o) {
- struct __pyx_obj_3_sa_HieroCachingRuleFactory *p = (struct __pyx_obj_3_sa_HieroCachingRuleFactory *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_FeatureVector(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *p = (struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->rules);
- p->rules = ((struct __pyx_obj_3_sa_TrieTable *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->sampler);
- p->sampler = ((struct __pyx_obj_3_sa_Sampler *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->scorer);
- p->scorer = ((struct __pyx_obj_3_sa_Scorer *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->precomputed_index);
- p->precomputed_index = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->precomputed_collocations);
- p->precomputed_collocations = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->precompute_file);
- p->precompute_file = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->max_rank);
- p->max_rank = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->prev_norm_prefix);
- p->prev_norm_prefix = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->fsa);
- p->fsa = ((struct __pyx_obj_3_sa_SuffixArray *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->fda);
- p->fda = ((struct __pyx_obj_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->eda);
- p->eda = ((struct __pyx_obj_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->alignment);
- p->alignment = ((struct __pyx_obj_3_sa_Alignment *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->eid2symid);
- p->eid2symid = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->fid2symid);
- p->fid2symid = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->findexes);
- p->findexes = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->findexes1);
- p->findexes1 = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->samples_f);
- p->samples_f = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->phrases_f);
- p->phrases_f = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->phrases_e);
- p->phrases_e = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->phrases_fe);
- p->phrases_fe = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->phrases_al);
- p->phrases_al = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->bilex_f);
- p->bilex_f = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->bilex_e);
- p->bilex_e = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->names);
+ p->names = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->bilex_fe);
- p->bilex_fe = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->values);
+ p->values = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa_HieroCachingRuleFactory[] = {
- {__Pyx_NAMESTR("configure"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_3configure, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_3_sa_23HieroCachingRuleFactory_2configure)},
- {__Pyx_NAMESTR("pattern2phrase"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_5pattern2phrase, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("pattern2phrase_plus"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_7pattern2phrase_plus, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("precompute"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_9precompute, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get_precomputed_collocation"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_11get_precomputed_collocation, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("advance"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_13advance, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get_all_nodes_isteps_away"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_away, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("reachable"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_17reachable, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__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)},
- {__Pyx_NAMESTR("form_rule"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_28form_rule, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("fmt_rule"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_30fmt_rule, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("dump_online_stats"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_32dump_online_stats, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("dump_online_rules"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_34dump_online_rules, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("online_ctx_lookup"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_36online_ctx_lookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get_f_phrases"), (PyCFunction)__pyx_pw_3_sa_23HieroCachingRuleFactory_38get_f_phrases, METH_O, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_FeatureVector[] = {
+ {__Pyx_NAMESTR("set"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_13FeatureVector_3set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_HieroCachingRuleFactory = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_FeatureVector = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.HieroCachingRuleFactory"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_HieroCachingRuleFactory), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.FeatureVector"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_HieroCachingRuleFactory, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_FeatureVector, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -68025,19 +67840,19 @@ static PyTypeObject __pyx_type_3_sa_HieroCachingRuleFactory = {
0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
- 0, /*tp_str*/
+ __pyx_pw_4cdec_2sa_3_sa_13FeatureVector_8__str__, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("This RuleFactory implements a caching \n method using TrieTable, which makes phrase\n generation somewhat speedier -- phrases only\n need to be extracted once (however, it is\n quite possible they need to be scored \n for each input sentence, for contextual models)"), /*tp_doc*/
- __pyx_tp_traverse_3_sa_HieroCachingRuleFactory, /*tp_traverse*/
- __pyx_tp_clear_3_sa_HieroCachingRuleFactory, /*tp_clear*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_FeatureVector, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_FeatureVector, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
+ __pyx_pw_4cdec_2sa_3_sa_13FeatureVector_5__iter__, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_HieroCachingRuleFactory, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_FeatureVector, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -68047,7 +67862,7 @@ static PyTypeObject __pyx_type_3_sa_HieroCachingRuleFactory = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_HieroCachingRuleFactory, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_FeatureVector, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -68060,66 +67875,106 @@ static PyTypeObject __pyx_type_3_sa_HieroCachingRuleFactory = {
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray __pyx_vtable_4cdec_2sa_3_sa_SuffixArray;
-static struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *__pyx_freelist_3_sa___pyx_scope_struct_9_decode_sentence[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_9_decode_sentence = 0;
-
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_9_decode_sentence(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_SuffixArray(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_9_decode_sentence > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_9_decode_sentence[--__pyx_freecount_3_sa___pyx_scope_struct_9_decode_sentence];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence));
- PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_SuffixArray;
+ p->darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
+ p->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->ha = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *)o);
- p->__pyx_v_lattice = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_9_decode_sentence(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *p = (struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_SuffixArray(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *p = (struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_lattice);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_9_decode_sentence < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence))) {
- __pyx_freelist_3_sa___pyx_scope_struct_9_decode_sentence[__pyx_freecount_3_sa___pyx_scope_struct_9_decode_sentence++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->darray);
+ Py_CLEAR(p->sa);
+ Py_CLEAR(p->ha);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_9_decode_sentence(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_SuffixArray(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *p = (struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *)o;
- if (p->__pyx_v_lattice) {
- e = (*v)(p->__pyx_v_lattice, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *p = (struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)o;
+ if (p->darray) {
+ e = (*v)(((PyObject*)p->darray), a); if (e) return e;
+ }
+ if (p->sa) {
+ e = (*v)(((PyObject*)p->sa), a); if (e) return e;
+ }
+ if (p->ha) {
+ e = (*v)(((PyObject*)p->ha), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_9_decode_sentence(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *p = (struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_SuffixArray(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *p = (struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_lattice);
- p->__pyx_v_lattice = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->darray);
+ p->darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->sa);
+ p->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->ha);
+ p->ha = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
+static PyObject *__pyx_sq_item_4cdec_2sa_3_sa_SuffixArray(PyObject *o, Py_ssize_t i) {
+ PyObject *r;
+ PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
+ r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
+ Py_DECREF(x);
+ return r;
+}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_9_decode_sentence[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_SuffixArray[] = {
+ {__Pyx_NAMESTR("read_text"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_5read_text, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_2sa_3_sa_11SuffixArray_4read_text)},
+ {__Pyx_NAMESTR("q3sort"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_7q3sort, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_2sa_3_sa_11SuffixArray_6q3sort)},
+ {__Pyx_NAMESTR("write_text"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_9write_text, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read_binary"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_11read_binary, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_binary"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_13write_binary, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_enhanced"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_15write_enhanced, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11SuffixArray_17lookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_9_decode_sentence = {
+static PySequenceMethods __pyx_tp_as_sequence_SuffixArray = {
+ 0, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ __pyx_sq_item_4cdec_2sa_3_sa_SuffixArray, /*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_SuffixArray = {
+ 0, /*mp_length*/
+ __pyx_pw_4cdec_2sa_3_sa_11SuffixArray_3__getitem__, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_SuffixArray = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_9_decode_sentence"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.SuffixArray"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_9_decode_sentence, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_SuffixArray, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -68130,23 +67985,23 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_9_decode_sentence = {
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
+ &__pyx_tp_as_sequence_SuffixArray, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_SuffixArray, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_9_decode_sentence, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_9_decode_sentence, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_SuffixArray, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_SuffixArray, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_9_decode_sentence, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_SuffixArray, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -68156,7 +68011,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_9_decode_sentence = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_9_decode_sentence, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_SuffixArray, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -68170,81 +68025,73 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_9_decode_sentence = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_17_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_17_genexpr = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice = 0;
-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;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_17_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_17_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_17_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- 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;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *)o);
+ p->__pyx_v_word_ids = 0;
+ p->__pyx_v_words = 0;
return 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;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_a);
- Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_17_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_17_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_17_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr *)o);
+ Py_CLEAR(p->__pyx_v_word_ids);
+ Py_CLEAR(p->__pyx_v_words);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_17_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice(PyObject *o, visitproc v, void *a) {
int e;
- 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;
- }
- if (p->__pyx_v_a) {
- e = (*v)(p->__pyx_v_a, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *)o;
+ if (p->__pyx_v_word_ids) {
+ e = (*v)(p->__pyx_v_word_ids, a); if (e) return e;
}
- if (p->__pyx_t_0) {
- e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ if (p->__pyx_v_words) {
+ e = (*v)(p->__pyx_v_words, a); if (e) return e;
}
return 0;
}
-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;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_outer_scope);
- 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);
+ tmp = ((PyObject*)p->__pyx_v_word_ids);
+ p->__pyx_v_word_ids = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_0);
- p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_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_17_genexpr[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_17_genexpr = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_17_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_17_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_4_make_lattice"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_17_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -68265,13 +68112,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_17_genexpr = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_17_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_17_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_17_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -68281,7 +68128,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_17_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_17_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -68295,81 +68142,73 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_17_genexpr = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_20_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_20_genexpr = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule = 0;
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_20_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_20_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_20_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_20_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *)o);
- p->__pyx_outer_scope = 0;
- p->__pyx_v_word = 0;
- p->__pyx_t_0 = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *)o);
+ p->__pyx_v_a = 0;
+ p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_20_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_word);
- Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_20_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_20_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_20_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *)o);
+ Py_CLEAR(p->__pyx_v_a);
+ Py_CLEAR(p->__pyx_v_self);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_20_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_20_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;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *)o;
+ if (p->__pyx_v_a) {
+ e = (*v)(p->__pyx_v_a, a); if (e) return e;
}
- if (p->__pyx_t_0) {
- e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ if (p->__pyx_v_self) {
+ e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_20_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_19_input *)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);
+ tmp = ((PyObject*)p->__pyx_v_a);
+ p->__pyx_v_a = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_0);
- p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_self);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_20_genexpr[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_20_genexpr = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_20_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_20_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_24_fmt_rule"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_20_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -68390,13 +68229,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_20_genexpr = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_20_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_20_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_20_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -68406,7 +68245,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_20_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_20_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -68420,105 +68259,63 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_20_genexpr = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *__pyx_freelist_3_sa___pyx_scope_struct_3_compute_stats[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_3_compute_stats = 0;
-
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_3_compute_stats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_LCP(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_LCP *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_3_compute_stats > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_3_compute_stats[--__pyx_freecount_3_sa___pyx_scope_struct_3_compute_stats];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats));
- PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_LCP *)o);
+ p->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)Py_None); Py_INCREF(Py_None);
+ p->lcp = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_3LCP_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *)o);
- p->__pyx_v_ngram = 0;
- p->__pyx_v_ngram_start = 0;
- p->__pyx_v_ngram_starts = 0;
- p->__pyx_v_run_start = 0;
- p->__pyx_v_self = 0;
- p->__pyx_v_veb = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_3_compute_stats(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *p = (struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_LCP(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_LCP *p = (struct __pyx_obj_4cdec_2sa_3_sa_LCP *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_ngram);
- Py_CLEAR(p->__pyx_v_ngram_start);
- Py_CLEAR(p->__pyx_v_ngram_starts);
- Py_CLEAR(p->__pyx_v_run_start);
- Py_CLEAR(p->__pyx_v_self);
- Py_CLEAR(p->__pyx_v_veb);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_3_compute_stats < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats))) {
- __pyx_freelist_3_sa___pyx_scope_struct_3_compute_stats[__pyx_freecount_3_sa___pyx_scope_struct_3_compute_stats++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->sa);
+ Py_CLEAR(p->lcp);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_3_compute_stats(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_LCP(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *p = (struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *)o;
- if (p->__pyx_v_ngram) {
- e = (*v)(p->__pyx_v_ngram, a); if (e) return e;
- }
- if (p->__pyx_v_ngram_start) {
- e = (*v)(((PyObject*)p->__pyx_v_ngram_start), a); if (e) return e;
- }
- if (p->__pyx_v_ngram_starts) {
- e = (*v)(p->__pyx_v_ngram_starts, a); if (e) return e;
- }
- if (p->__pyx_v_run_start) {
- e = (*v)(((PyObject*)p->__pyx_v_run_start), a); if (e) return e;
- }
- if (p->__pyx_v_self) {
- e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_LCP *p = (struct __pyx_obj_4cdec_2sa_3_sa_LCP *)o;
+ if (p->sa) {
+ e = (*v)(((PyObject*)p->sa), a); if (e) return e;
}
- if (p->__pyx_v_veb) {
- e = (*v)(((PyObject*)p->__pyx_v_veb), a); if (e) return e;
+ if (p->lcp) {
+ e = (*v)(((PyObject*)p->lcp), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_3_compute_stats(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *p = (struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_LCP(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_LCP *p = (struct __pyx_obj_4cdec_2sa_3_sa_LCP *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_ngram);
- p->__pyx_v_ngram = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_ngram_start);
- p->__pyx_v_ngram_start = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_ngram_starts);
- p->__pyx_v_ngram_starts = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_run_start);
- p->__pyx_v_run_start = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_self);
- p->__pyx_v_self = ((struct __pyx_obj_3_sa_LCP *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->sa);
+ p->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_veb);
- p->__pyx_v_veb = ((struct __pyx_obj_3_sa_VEB *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->lcp);
+ p->lcp = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_3_compute_stats[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_LCP[] = {
+ {__Pyx_NAMESTR("compute_stats"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_3LCP_3compute_stats, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_2sa_3_sa_3LCP_2compute_stats)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_3_compute_stats = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_LCP = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_3_compute_stats"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_3_compute_stats), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.LCP"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_LCP), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_3_compute_stats, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_LCP, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -68537,15 +68334,15 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_3_compute_stats = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_3_compute_stats, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_3_compute_stats, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_LCP, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_LCP, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_3_compute_stats, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_LCP, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -68555,7 +68352,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_3_compute_stats = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_3_compute_stats, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_LCP, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -68569,49 +68366,49 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_3_compute_stats = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_12_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_12_genexpr = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr = 0;
-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;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_12_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_12_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_12_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *)o);
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *)o);
p->__pyx_outer_scope = 0;
- p->__pyx_v_word = 0;
+ p->__pyx_v_a = 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;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *)o;
PyObject_GC_UnTrack(o);
Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_word);
+ Py_CLEAR(p->__pyx_v_a);
Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_12_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_12_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_12_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_12_genexpr *)o);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_12_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_17_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;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_4cdec_2sa_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;
}
- if (p->__pyx_v_word) {
- e = (*v)(p->__pyx_v_word, a); if (e) return e;
+ if (p->__pyx_v_a) {
+ e = (*v)(p->__pyx_v_a, a); if (e) return e;
}
if (p->__pyx_t_0) {
e = (*v)(p->__pyx_t_0, a); if (e) return e;
@@ -68619,14 +68416,14 @@ static int __pyx_tp_traverse_3_sa___pyx_scope_struct_12_genexpr(PyObject *o, vis
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;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_4cdec_2sa_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_11_encode_words *)Py_None); Py_INCREF(Py_None);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ *)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);
+ tmp = ((PyObject*)p->__pyx_v_a);
+ p->__pyx_v_a = 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);
@@ -68634,16 +68431,16 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_12_genexpr(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_12_genexpr[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_12_genexpr = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_17_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*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_17_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_12_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -68664,13 +68461,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_12_genexpr = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_12_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_12_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_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_12_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -68680,7 +68477,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_12_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_12_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -68694,81 +68491,226 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_12_genexpr = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_29_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_29_genexpr = 0;
-
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_29_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_OnlineStats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_29_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_29_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_29_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr));
- PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)o);
+ p->samples_f = Py_None; Py_INCREF(Py_None);
+ p->phrases_f = Py_None; Py_INCREF(Py_None);
+ p->phrases_e = Py_None; Py_INCREF(Py_None);
+ p->phrases_fe = Py_None; Py_INCREF(Py_None);
+ p->phrases_al = Py_None; Py_INCREF(Py_None);
+ p->bilex_f = Py_None; Py_INCREF(Py_None);
+ p->bilex_e = Py_None; Py_INCREF(Py_None);
+ p->bilex_fe = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_29_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_29_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_OnlineStats(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *p = (struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_feat);
- Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_29_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_29_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_29_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->samples_f);
+ Py_CLEAR(p->phrases_f);
+ Py_CLEAR(p->phrases_e);
+ Py_CLEAR(p->phrases_fe);
+ Py_CLEAR(p->phrases_al);
+ Py_CLEAR(p->bilex_f);
+ Py_CLEAR(p->bilex_e);
+ Py_CLEAR(p->bilex_fe);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_29_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_OnlineStats(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *)o;
- if (p->__pyx_outer_scope) {
- e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *p = (struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)o;
+ if (p->samples_f) {
+ e = (*v)(p->samples_f, a); if (e) return e;
}
- if (p->__pyx_v_feat) {
- e = (*v)(p->__pyx_v_feat, a); if (e) return e;
+ if (p->phrases_f) {
+ e = (*v)(p->phrases_f, a); if (e) return e;
}
- if (p->__pyx_t_0) {
- e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ if (p->phrases_e) {
+ e = (*v)(p->phrases_e, a); if (e) return e;
+ }
+ if (p->phrases_fe) {
+ e = (*v)(p->phrases_fe, a); if (e) return e;
+ }
+ if (p->phrases_al) {
+ e = (*v)(p->phrases_al, a); if (e) return e;
+ }
+ if (p->bilex_f) {
+ e = (*v)(p->bilex_f, a); if (e) return e;
+ }
+ if (p->bilex_e) {
+ e = (*v)(p->bilex_e, a); if (e) return e;
+ }
+ if (p->bilex_fe) {
+ e = (*v)(p->bilex_fe, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_29_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_OnlineStats(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *p = (struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->samples_f);
+ p->samples_f = 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);
+ tmp = ((PyObject*)p->phrases_f);
+ p->phrases_f = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_0);
- p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->phrases_e);
+ p->phrases_e = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->phrases_fe);
+ p->phrases_fe = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->phrases_al);
+ p->phrases_al = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->bilex_f);
+ p->bilex_f = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->bilex_e);
+ p->bilex_e = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->bilex_fe);
+ p->bilex_fe = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_29_genexpr[] = {
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_samples_f(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9samples_f_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_samples_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9samples_f_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9samples_f_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_f(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_e(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_e(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_fe(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_fe(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_al(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_al(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_bilex_f(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_bilex_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_f_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_bilex_e(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_bilex_e(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_7bilex_e_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_bilex_fe(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_bilex_fe(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_8bilex_fe_5__del__(o);
+ }
+}
+
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_OnlineStats[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_29_genexpr = {
+static struct PyGetSetDef __pyx_getsets_4cdec_2sa_3_sa_OnlineStats[] = {
+ {(char *)"samples_f", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_samples_f, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_samples_f, 0, 0},
+ {(char *)"phrases_f", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_f, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_f, 0, 0},
+ {(char *)"phrases_e", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_e, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_e, 0, 0},
+ {(char *)"phrases_fe", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_fe, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_fe, 0, 0},
+ {(char *)"phrases_al", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_al, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_al, 0, 0},
+ {(char *)"bilex_f", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_bilex_f, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_bilex_f, 0, 0},
+ {(char *)"bilex_e", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_bilex_e, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_bilex_e, 0, 0},
+ {(char *)"bilex_fe", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_bilex_fe, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_bilex_fe, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_OnlineStats = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_29_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_29_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.OnlineStats"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_29_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_OnlineStats, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -68787,17 +68729,17 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_29_genexpr = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_29_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_29_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_OnlineStats, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_OnlineStats, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_29_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_OnlineStats, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4cdec_2sa_3_sa_OnlineStats, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -68805,7 +68747,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_29_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_29_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_OnlineStats, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -68818,34 +68760,34 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_29_genexpr = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_IntList __pyx_vtable_3_sa_IntList;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList __pyx_vtable_4cdec_2sa_3_sa_IntList;
-static PyObject *__pyx_tp_new_3_sa_IntList(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_IntList *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_IntList(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_IntList *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_IntList *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_IntList;
- if (unlikely(__pyx_pw_3_sa_7IntList_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_IntList;
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_7IntList_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_IntList(PyObject *o) {
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_IntList(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
++Py_REFCNT(o);
- __pyx_pw_3_sa_7IntList_15__dealloc__(o);
+ __pyx_pw_4cdec_2sa_3_sa_7IntList_15__dealloc__(o);
if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
--Py_REFCNT(o);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
}
-static PyObject *__pyx_sq_item_3_sa_IntList(PyObject *o, Py_ssize_t i) {
+static PyObject *__pyx_sq_item_4cdec_2sa_3_sa_IntList(PyObject *o, Py_ssize_t i) {
PyObject *r;
PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
@@ -68853,9 +68795,9 @@ static PyObject *__pyx_sq_item_3_sa_IntList(PyObject *o, Py_ssize_t i) {
return r;
}
-static int __pyx_mp_ass_subscript_3_sa_IntList(PyObject *o, PyObject *i, PyObject *v) {
+static int __pyx_mp_ass_subscript_4cdec_2sa_3_sa_IntList(PyObject *o, PyObject *i, PyObject *v) {
if (v) {
- return __pyx_pw_3_sa_7IntList_22__setitem__(o, i, v);
+ return __pyx_pw_4cdec_2sa_3_sa_7IntList_22__setitem__(o, i, v);
}
else {
PyErr_Format(PyExc_NotImplementedError,
@@ -68864,25 +68806,25 @@ static int __pyx_mp_ass_subscript_3_sa_IntList(PyObject *o, PyObject *i, PyObjec
}
}
-static PyMethodDef __pyx_methods_3_sa_IntList[] = {
- {__Pyx_NAMESTR("index"), (PyCFunction)__pyx_pw_3_sa_7IntList_5index, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("partition"), (PyCFunction)__pyx_pw_3_sa_7IntList_7partition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("_doquicksort"), (PyCFunction)__pyx_pw_3_sa_7IntList_9_doquicksort, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("sort"), (PyCFunction)__pyx_pw_3_sa_7IntList_11sort, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("reset"), (PyCFunction)__pyx_pw_3_sa_7IntList_13reset, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get_size"), (PyCFunction)__pyx_pw_3_sa_7IntList_26get_size, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_3_sa_7IntList_28append, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("extend"), (PyCFunction)__pyx_pw_3_sa_7IntList_30extend, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_3_sa_7IntList_32write, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read"), (PyCFunction)__pyx_pw_3_sa_7IntList_34read, METH_O, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_IntList[] = {
+ {__Pyx_NAMESTR("index"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7IntList_5index, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("partition"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7IntList_7partition, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("_doquicksort"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7IntList_9_doquicksort, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("sort"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7IntList_11sort, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("reset"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7IntList_13reset, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_size"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7IntList_26get_size, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7IntList_28append, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("extend"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7IntList_30extend, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7IntList_32write, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7IntList_34read, METH_O, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
static PySequenceMethods __pyx_tp_as_sequence_IntList = {
- __pyx_pw_3_sa_7IntList_24__len__, /*sq_length*/
+ __pyx_pw_4cdec_2sa_3_sa_7IntList_24__len__, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
- __pyx_sq_item_3_sa_IntList, /*sq_item*/
+ __pyx_sq_item_4cdec_2sa_3_sa_IntList, /*sq_item*/
0, /*sq_slice*/
0, /*sq_ass_item*/
0, /*sq_ass_slice*/
@@ -68892,17 +68834,17 @@ static PySequenceMethods __pyx_tp_as_sequence_IntList = {
};
static PyMappingMethods __pyx_tp_as_mapping_IntList = {
- __pyx_pw_3_sa_7IntList_24__len__, /*mp_length*/
- __pyx_pw_3_sa_7IntList_20__getitem__, /*mp_subscript*/
- __pyx_mp_ass_subscript_3_sa_IntList, /*mp_ass_subscript*/
+ __pyx_pw_4cdec_2sa_3_sa_7IntList_24__len__, /*mp_length*/
+ __pyx_pw_4cdec_2sa_3_sa_7IntList_20__getitem__, /*mp_subscript*/
+ __pyx_mp_ass_subscript_4cdec_2sa_3_sa_IntList, /*mp_ass_subscript*/
};
-static PyTypeObject __pyx_type_3_sa_IntList = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_IntList = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.IntList"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_IntList), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.IntList"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_IntList), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_IntList, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_IntList, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -68917,7 +68859,7 @@ static PyTypeObject __pyx_type_3_sa_IntList = {
&__pyx_tp_as_mapping_IntList, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
- __pyx_pw_3_sa_7IntList_3__str__, /*tp_str*/
+ __pyx_pw_4cdec_2sa_3_sa_7IntList_3__str__, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
@@ -68927,9 +68869,9 @@ static PyTypeObject __pyx_type_3_sa_IntList = {
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_3_sa_7IntList_17__iter__, /*tp_iter*/
+ __pyx_pw_4cdec_2sa_3_sa_7IntList_17__iter__, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_IntList, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_IntList, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -68939,7 +68881,7 @@ static PyTypeObject __pyx_type_3_sa_IntList = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_IntList, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_IntList, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -68952,44 +68894,102 @@ static PyTypeObject __pyx_type_3_sa_IntList = {
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase __pyx_vtable_4cdec_2sa_3_sa_Phrase;
-static PyObject *__pyx_tp_new_3_sa_VEBIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Phrase(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Phrase *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_Phrase;
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_6Phrase_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_3_sa_VEBIterator(PyObject *o) {
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_Phrase(PyObject *o) {
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4cdec_2sa_3_sa_6Phrase_3__dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
(*Py_TYPE(o)->tp_free)(o);
}
+static PyObject *__pyx_sq_item_4cdec_2sa_3_sa_Phrase(PyObject *o, Py_ssize_t i) {
+ PyObject *r;
+ PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
+ r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
+ Py_DECREF(x);
+ return r;
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_6Phrase_words(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_6Phrase_5words_1__get__(o);
+}
-static PyMethodDef __pyx_methods_3_sa_VEBIterator[] = {
- {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_3_sa_11VEBIterator_1__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_Phrase[] = {
+ {__Pyx_NAMESTR("handle"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6Phrase_7handle, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_2sa_3_sa_6Phrase_6handle)},
+ {__Pyx_NAMESTR("strhandle"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6Phrase_9strhandle, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("arity"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6Phrase_11arity, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("getvarpos"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6Phrase_13getvarpos, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("getvar"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6Phrase_15getvar, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("clen"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6Phrase_17clen, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("getchunk"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6Phrase_19getchunk, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("subst"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6Phrase_32subst, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_VEBIterator = {
+static struct PyGetSetDef __pyx_getsets_4cdec_2sa_3_sa_Phrase[] = {
+ {(char *)"words", __pyx_getprop_4cdec_2sa_3_sa_6Phrase_words, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_Phrase = {
+ __pyx_pw_4cdec_2sa_3_sa_6Phrase_25__len__, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ __pyx_sq_item_4cdec_2sa_3_sa_Phrase, /*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_Phrase = {
+ __pyx_pw_4cdec_2sa_3_sa_6Phrase_25__len__, /*mp_length*/
+ __pyx_pw_4cdec_2sa_3_sa_6Phrase_27__getitem__, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_Phrase = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.VEBIterator"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_VEBIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.Phrase"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Phrase), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_VEBIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_Phrase, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
- 0, /*tp_compare*/
+ __pyx_pw_4cdec_2sa_3_sa_6Phrase_21__cmp__, /*tp_compare*/
#else
0, /*reserved*/
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash*/
+ &__pyx_tp_as_sequence_Phrase, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_Phrase, /*tp_as_mapping*/
+ __pyx_pw_4cdec_2sa_3_sa_6Phrase_23__hash__, /*tp_hash*/
0, /*tp_call*/
- 0, /*tp_str*/
+ __pyx_pw_4cdec_2sa_3_sa_6Phrase_5__str__, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
@@ -68999,11 +68999,11 @@ static PyTypeObject __pyx_type_3_sa_VEBIterator = {
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- __pyx_pw_3_sa_11VEBIterator_1__next__, /*tp_iternext*/
- __pyx_methods_3_sa_VEBIterator, /*tp_methods*/
+ __pyx_pw_4cdec_2sa_3_sa_6Phrase_29__iter__, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4cdec_2sa_3_sa_Phrase, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4cdec_2sa_3_sa_Phrase, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -69011,7 +69011,7 @@ static PyTypeObject __pyx_type_3_sa_VEBIterator = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_VEBIterator, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_Phrase, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -69024,121 +69024,73 @@ static PyTypeObject __pyx_type_3_sa_VEBIterator = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_BiLex __pyx_vtable_3_sa_BiLex;
-static PyObject *__pyx_tp_new_3_sa_BiLex(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_BiLex *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_TrieNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_BiLex *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_BiLex;
- p->col1 = ((struct __pyx_obj_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
- p->col2 = ((struct __pyx_obj_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
- p->f_index = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->e_index = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->id2eword = Py_None; Py_INCREF(Py_None);
- p->id2fword = Py_None; Py_INCREF(Py_None);
- p->eword2id = Py_None; Py_INCREF(Py_None);
- p->fword2id = Py_None; Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_5BiLex_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *)o);
+ p->children = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_8TrieNode_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_BiLex(PyObject *o) {
- struct __pyx_obj_3_sa_BiLex *p = (struct __pyx_obj_3_sa_BiLex *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_TrieNode(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *p = (struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->col1);
- Py_CLEAR(p->col2);
- Py_CLEAR(p->f_index);
- Py_CLEAR(p->e_index);
- Py_CLEAR(p->id2eword);
- Py_CLEAR(p->id2fword);
- Py_CLEAR(p->eword2id);
- Py_CLEAR(p->fword2id);
+ Py_CLEAR(p->children);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa_BiLex(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_TrieNode(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_BiLex *p = (struct __pyx_obj_3_sa_BiLex *)o;
- if (p->col1) {
- e = (*v)(((PyObject*)p->col1), a); if (e) return e;
- }
- if (p->col2) {
- e = (*v)(((PyObject*)p->col2), a); if (e) return e;
- }
- if (p->f_index) {
- e = (*v)(((PyObject*)p->f_index), a); if (e) return e;
- }
- if (p->e_index) {
- e = (*v)(((PyObject*)p->e_index), a); if (e) return e;
- }
- if (p->id2eword) {
- e = (*v)(p->id2eword, a); if (e) return e;
- }
- if (p->id2fword) {
- e = (*v)(p->id2fword, a); if (e) return e;
- }
- if (p->eword2id) {
- e = (*v)(p->eword2id, a); if (e) return e;
- }
- if (p->fword2id) {
- e = (*v)(p->fword2id, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *p = (struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *)o;
+ if (p->children) {
+ e = (*v)(p->children, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa_BiLex(PyObject *o) {
- struct __pyx_obj_3_sa_BiLex *p = (struct __pyx_obj_3_sa_BiLex *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_TrieNode(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *p = (struct __pyx_obj_4cdec_2sa_3_sa_TrieNode *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->col1);
- p->col1 = ((struct __pyx_obj_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->col2);
- p->col2 = ((struct __pyx_obj_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->f_index);
- p->f_index = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->e_index);
- p->e_index = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->id2eword);
- p->id2eword = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->id2fword);
- p->id2fword = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->eword2id);
- p->eword2id = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->fword2id);
- p->fword2id = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->children);
+ p->children = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa_BiLex[] = {
- {__Pyx_NAMESTR("write_binary"), (PyCFunction)__pyx_pw_3_sa_5BiLex_3write_binary, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read_binary"), (PyCFunction)__pyx_pw_3_sa_5BiLex_5read_binary, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get_e_id"), (PyCFunction)__pyx_pw_3_sa_5BiLex_7get_e_id, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get_f_id"), (PyCFunction)__pyx_pw_3_sa_5BiLex_9get_f_id, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read_text"), (PyCFunction)__pyx_pw_3_sa_5BiLex_11read_text, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_enhanced"), (PyCFunction)__pyx_pw_3_sa_5BiLex_13write_enhanced, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get_score"), (PyCFunction)__pyx_pw_3_sa_5BiLex_15get_score, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_text"), (PyCFunction)__pyx_pw_3_sa_5BiLex_17write_text, METH_O, __Pyx_DOCSTR(__pyx_doc_3_sa_5BiLex_16write_text)},
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_8TrieNode_children(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_8TrieNode_8children_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_8TrieNode_children(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_8TrieNode_8children_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_8TrieNode_8children_5__del__(o);
+ }
+}
+
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_TrieNode[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_BiLex = {
+static struct PyGetSetDef __pyx_getsets_4cdec_2sa_3_sa_TrieNode[] = {
+ {(char *)"children", __pyx_getprop_4cdec_2sa_3_sa_8TrieNode_children, __pyx_setprop_4cdec_2sa_3_sa_8TrieNode_children, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_TrieNode = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.BiLex"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_BiLex), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.TrieNode"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_TrieNode), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_BiLex, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_TrieNode, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -69159,15 +69111,15 @@ static PyTypeObject __pyx_type_3_sa_BiLex = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_BiLex, /*tp_traverse*/
- __pyx_tp_clear_3_sa_BiLex, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_TrieNode, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_TrieNode, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_BiLex, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_TrieNode, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4cdec_2sa_3_sa_TrieNode, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -69175,7 +69127,7 @@ static PyTypeObject __pyx_type_3_sa_BiLex = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_BiLex, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_TrieNode, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -69188,65 +69140,82 @@ static PyTypeObject __pyx_type_3_sa_BiLex = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_VEB __pyx_vtable_3_sa_VEB;
-static PyObject *__pyx_tp_new_3_sa_VEB(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_VEB *p;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_VEB *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_VEB;
- if (unlikely(__pyx_pw_3_sa_3VEB_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr));
+ PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *)o);
+ p->__pyx_outer_scope = 0;
+ p->__pyx_v_line = 0;
+ p->__pyx_t_0 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa_VEB(PyObject *o) {
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_3_sa_3VEB_3__dealloc__(o);
- if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_line);
+ Py_CLEAR(p->__pyx_t_0);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
}
- (*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_3_sa_VEB[] = {
- {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_3_sa_3VEB_7insert, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("findsucc"), (PyCFunction)__pyx_pw_3_sa_3VEB_9findsucc, METH_O, __Pyx_DOCSTR(0)},
- {0, 0, 0, 0}
-};
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_line) {
+ e = (*v)(p->__pyx_v_line, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
-static PySequenceMethods __pyx_tp_as_sequence_VEB = {
- __pyx_pw_3_sa_3VEB_11__len__, /*sq_length*/
- 0, /*sq_concat*/
- 0, /*sq_repeat*/
- 0, /*sq_item*/
- 0, /*sq_slice*/
- 0, /*sq_ass_item*/
- 0, /*sq_ass_slice*/
- __pyx_pw_3_sa_3VEB_13__contains__, /*sq_contains*/
- 0, /*sq_inplace_concat*/
- 0, /*sq_inplace_repeat*/
-};
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_line);
+ p->__pyx_v_line = 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 PyMappingMethods __pyx_tp_as_mapping_VEB = {
- __pyx_pw_3_sa_3VEB_11__len__, /*mp_length*/
- 0, /*mp_subscript*/
- 0, /*mp_ass_subscript*/
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr[] = {
+ {0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_VEB = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.VEB"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_VEB), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_2_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_VEB, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -69257,23 +69226,23 @@ static PyTypeObject __pyx_type_3_sa_VEB = {
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
- &__pyx_tp_as_sequence_VEB, /*tp_as_sequence*/
- &__pyx_tp_as_mapping_VEB, /*tp_as_mapping*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_3_sa_3VEB_5__iter__, /*tp_iter*/
+ 0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_VEB, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -69283,7 +69252,7 @@ static PyTypeObject __pyx_type_3_sa_VEB = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_VEB, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -69297,65 +69266,65 @@ static PyTypeObject __pyx_type_3_sa_VEB = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *__pyx_freelist_3_sa___pyx_scope_struct_11_encode_words[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_11_encode_words = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext = 0;
-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;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_11_encode_words > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_11_encode_words[--__pyx_freecount_3_sa___pyx_scope_struct_11_encode_words];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *)o);
- p->__pyx_v_words = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *)o);
+ p->__pyx_v_fp = 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;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_words);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_11_encode_words < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words))) {
- __pyx_freelist_3_sa___pyx_scope_struct_11_encode_words[__pyx_freecount_3_sa___pyx_scope_struct_11_encode_words++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_11_encode_words *)o);
+ Py_CLEAR(p->__pyx_v_fp);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *)o);
} else {
(*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) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext(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;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *)o;
+ if (p->__pyx_v_fp) {
+ e = (*v)(p->__pyx_v_fp, 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;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_words);
- p->__pyx_v_words = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_fp);
+ p->__pyx_v_fp = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_11_encode_words[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_11_encode_words = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext = {
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*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_1_read_bitext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_11_encode_words, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -69376,13 +69345,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_11_encode_words = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_11_encode_words, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_11_encode_words, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext, /*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*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -69392,7 +69361,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_11_encode_words = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_11_encode_words, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -69406,63 +69375,81 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_11_encode_words = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa_LCP(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_LCP *p;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_LCP *)o);
- p->sa = ((struct __pyx_obj_3_sa_SuffixArray *)Py_None); Py_INCREF(Py_None);
- p->lcp = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_3LCP_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr));
+ PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_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_LCP(PyObject *o) {
- struct __pyx_obj_3_sa_LCP *p = (struct __pyx_obj_3_sa_LCP *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->sa);
- Py_CLEAR(p->lcp);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_feat);
+ Py_CLEAR(p->__pyx_t_0);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_3_sa_LCP(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_LCP *p = (struct __pyx_obj_3_sa_LCP *)o;
- if (p->sa) {
- e = (*v)(((PyObject*)p->sa), a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
}
- if (p->lcp) {
- e = (*v)(((PyObject*)p->lcp), a); if (e) return e;
+ if (p->__pyx_v_feat) {
+ e = (*v)(p->__pyx_v_feat, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa_LCP(PyObject *o) {
- struct __pyx_obj_3_sa_LCP *p = (struct __pyx_obj_3_sa_LCP *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->sa);
- p->sa = ((struct __pyx_obj_3_sa_SuffixArray *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->lcp);
- p->lcp = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_feat);
+ p->__pyx_v_feat = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_t_0);
+ p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa_LCP[] = {
- {__Pyx_NAMESTR("compute_stats"), (PyCFunction)__pyx_pw_3_sa_3LCP_3compute_stats, METH_O, __Pyx_DOCSTR(__pyx_doc_3_sa_3LCP_2compute_stats)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_LCP = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.LCP"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_LCP), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_29_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_LCP, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -69481,15 +69468,15 @@ static PyTypeObject __pyx_type_3_sa_LCP = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_LCP, /*tp_traverse*/
- __pyx_tp_clear_3_sa_LCP, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_LCP, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -69499,7 +69486,7 @@ static PyTypeObject __pyx_type_3_sa_LCP = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_LCP, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -69512,201 +69499,98 @@ static PyTypeObject __pyx_type_3_sa_LCP = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_DataArray __pyx_vtable_3_sa_DataArray;
-static PyObject *__pyx_tp_new_3_sa_DataArray(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_DataArray *p;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_DataArray *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_DataArray;
- p->word2id = Py_None; Py_INCREF(Py_None);
- p->id2word = Py_None; Py_INCREF(Py_None);
- p->data = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->sent_id = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->sent_index = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_9DataArray_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases));
+ PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *)o);
+ p->__pyx_v_extract = 0;
+ p->__pyx_v_f_len = 0;
+ p->__pyx_v_f_words = 0;
+ p->__pyx_v_phrases = 0;
+ p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa_DataArray(PyObject *o) {
- struct __pyx_obj_3_sa_DataArray *p = (struct __pyx_obj_3_sa_DataArray *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->word2id);
- Py_CLEAR(p->id2word);
- Py_CLEAR(p->data);
- Py_CLEAR(p->sent_id);
- Py_CLEAR(p->sent_index);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->__pyx_v_extract);
+ Py_CLEAR(p->__pyx_v_f_len);
+ Py_CLEAR(p->__pyx_v_f_words);
+ Py_CLEAR(p->__pyx_v_phrases);
+ Py_CLEAR(p->__pyx_v_self);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_3_sa_DataArray(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_DataArray *p = (struct __pyx_obj_3_sa_DataArray *)o;
- if (p->word2id) {
- e = (*v)(p->word2id, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *)o;
+ if (p->__pyx_v_extract) {
+ e = (*v)(p->__pyx_v_extract, a); if (e) return e;
}
- if (p->id2word) {
- e = (*v)(p->id2word, a); if (e) return e;
+ if (p->__pyx_v_f_len) {
+ e = (*v)(p->__pyx_v_f_len, a); if (e) return e;
}
- if (p->data) {
- e = (*v)(((PyObject*)p->data), a); if (e) return e;
+ if (p->__pyx_v_f_words) {
+ e = (*v)(p->__pyx_v_f_words, a); if (e) return e;
}
- if (p->sent_id) {
- e = (*v)(((PyObject*)p->sent_id), a); if (e) return e;
+ if (p->__pyx_v_phrases) {
+ e = (*v)(p->__pyx_v_phrases, a); if (e) return e;
}
- if (p->sent_index) {
- e = (*v)(((PyObject*)p->sent_index), a); if (e) return e;
+ 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_DataArray(PyObject *o) {
- struct __pyx_obj_3_sa_DataArray *p = (struct __pyx_obj_3_sa_DataArray *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->word2id);
- p->word2id = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_extract);
+ p->__pyx_v_extract = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->id2word);
- p->id2word = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_f_len);
+ p->__pyx_v_f_len = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->data);
- p->data = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_f_words);
+ p->__pyx_v_f_words = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->sent_id);
- p->sent_id = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_phrases);
+ p->__pyx_v_phrases = ((PyObject*)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->sent_index);
- p->sent_index = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_self);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyObject *__pyx_sq_item_3_sa_DataArray(PyObject *o, Py_ssize_t i) {
- PyObject *r;
- PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
- r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
- Py_DECREF(x);
- return r;
-}
-
-static PyObject *__pyx_getprop_3_sa_9DataArray_word2id(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_9DataArray_7word2id_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_9DataArray_word2id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_9DataArray_7word2id_3__set__(o, v);
- }
- else {
- return __pyx_pw_3_sa_9DataArray_7word2id_5__del__(o);
- }
-}
-
-static PyObject *__pyx_getprop_3_sa_9DataArray_id2word(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_9DataArray_7id2word_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_9DataArray_id2word(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_9DataArray_7id2word_3__set__(o, v);
- }
- else {
- return __pyx_pw_3_sa_9DataArray_7id2word_5__del__(o);
- }
-}
-
-static PyObject *__pyx_getprop_3_sa_9DataArray_data(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_9DataArray_4data_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_9DataArray_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_9DataArray_4data_3__set__(o, v);
- }
- else {
- return __pyx_pw_3_sa_9DataArray_4data_5__del__(o);
- }
-}
-static PyObject *__pyx_getprop_3_sa_9DataArray_sent_id(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_9DataArray_7sent_id_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_9DataArray_sent_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_9DataArray_7sent_id_3__set__(o, v);
- }
- else {
- return __pyx_pw_3_sa_9DataArray_7sent_id_5__del__(o);
- }
-}
-
-static PyObject *__pyx_getprop_3_sa_9DataArray_sent_index(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_9DataArray_10sent_index_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_9DataArray_sent_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_9DataArray_10sent_index_3__set__(o, v);
- }
- else {
- return __pyx_pw_3_sa_9DataArray_10sent_index_5__del__(o);
- }
-}
-
-static PyMethodDef __pyx_methods_3_sa_DataArray[] = {
- {__Pyx_NAMESTR("get_sentence_id"), (PyCFunction)__pyx_pw_3_sa_9DataArray_5get_sentence_id, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get_sentence"), (PyCFunction)__pyx_pw_3_sa_9DataArray_7get_sentence, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get_id"), (PyCFunction)__pyx_pw_3_sa_9DataArray_9get_id, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get_sentence_bounds"), (PyCFunction)__pyx_pw_3_sa_9DataArray_13get_sentence_bounds, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_text"), (PyCFunction)__pyx_pw_3_sa_9DataArray_15write_text, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read_text"), (PyCFunction)__pyx_pw_3_sa_9DataArray_17read_text, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read_bitext"), (PyCFunction)__pyx_pw_3_sa_9DataArray_19read_bitext, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read_text_data"), (PyCFunction)__pyx_pw_3_sa_9DataArray_21read_text_data, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read_binary"), (PyCFunction)__pyx_pw_3_sa_9DataArray_23read_binary, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_binary"), (PyCFunction)__pyx_pw_3_sa_9DataArray_25write_binary, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_enhanced_handle"), (PyCFunction)__pyx_pw_3_sa_9DataArray_27write_enhanced_handle, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_enhanced"), (PyCFunction)__pyx_pw_3_sa_9DataArray_29write_enhanced, METH_O, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_3_sa_DataArray[] = {
- {(char *)"word2id", __pyx_getprop_3_sa_9DataArray_word2id, __pyx_setprop_3_sa_9DataArray_word2id, 0, 0},
- {(char *)"id2word", __pyx_getprop_3_sa_9DataArray_id2word, __pyx_setprop_3_sa_9DataArray_id2word, 0, 0},
- {(char *)"data", __pyx_getprop_3_sa_9DataArray_data, __pyx_setprop_3_sa_9DataArray_data, 0, 0},
- {(char *)"sent_id", __pyx_getprop_3_sa_9DataArray_sent_id, __pyx_setprop_3_sa_9DataArray_sent_id, 0, 0},
- {(char *)"sent_index", __pyx_getprop_3_sa_9DataArray_sent_index, __pyx_setprop_3_sa_9DataArray_sent_index, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_DataArray = {
- __pyx_pw_3_sa_9DataArray_3__len__, /*sq_length*/
- 0, /*sq_concat*/
- 0, /*sq_repeat*/
- __pyx_sq_item_3_sa_DataArray, /*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_DataArray = {
- __pyx_pw_3_sa_9DataArray_3__len__, /*mp_length*/
- __pyx_pw_3_sa_9DataArray_11__getitem__, /*mp_subscript*/
- 0, /*mp_ass_subscript*/
-};
-
-static PyTypeObject __pyx_type_3_sa_DataArray = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.DataArray"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_DataArray), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_26_get_f_phrases"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_DataArray, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -69717,25 +69601,25 @@ static PyTypeObject __pyx_type_3_sa_DataArray = {
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
- &__pyx_tp_as_sequence_DataArray, /*tp_as_sequence*/
- &__pyx_tp_as_mapping_DataArray, /*tp_as_mapping*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_DataArray, /*tp_traverse*/
- __pyx_tp_clear_3_sa_DataArray, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_DataArray, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_3_sa_DataArray, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -69743,7 +69627,7 @@ static PyTypeObject __pyx_type_3_sa_DataArray = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_DataArray, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -69757,28 +69641,118 @@ static PyTypeObject __pyx_type_3_sa_DataArray = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa_BitSetIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- PyObject *o;
- o = (*t->tp_alloc)(t, 0);
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_ExtendedTrieNode(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *p;
+ PyObject *o = __pyx_tp_new_4cdec_2sa_3_sa_TrieNode(t, a, k);
if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)o);
+ p->phrase = Py_None; Py_INCREF(Py_None);
+ p->phrase_location = Py_None; Py_INCREF(Py_None);
+ p->suffix_link = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_3_sa_BitSetIterator(PyObject *o) {
- (*Py_TYPE(o)->tp_free)(o);
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_ExtendedTrieNode(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *p = (struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->phrase);
+ Py_CLEAR(p->phrase_location);
+ Py_CLEAR(p->suffix_link);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_TrieNode(o);
+}
+
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_ExtendedTrieNode(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *p = (struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)o;
+ e = __pyx_tp_traverse_4cdec_2sa_3_sa_TrieNode(o, v, a); if (e) return e;
+ if (p->phrase) {
+ e = (*v)(p->phrase, a); if (e) return e;
+ }
+ if (p->phrase_location) {
+ e = (*v)(p->phrase_location, a); if (e) return e;
+ }
+ if (p->suffix_link) {
+ e = (*v)(p->suffix_link, a); if (e) return e;
+ }
+ return 0;
}
-static PyMethodDef __pyx_methods_3_sa_BitSetIterator[] = {
- {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_3_sa_14BitSetIterator_1__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
+static int __pyx_tp_clear_4cdec_2sa_3_sa_ExtendedTrieNode(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *p = (struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode *)o;
+ PyObject* tmp;
+ __pyx_tp_clear_4cdec_2sa_3_sa_TrieNode(o);
+ tmp = ((PyObject*)p->phrase);
+ p->phrase = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->phrase_location);
+ p->phrase_location = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->suffix_link);
+ p->suffix_link = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_16ExtendedTrieNode_phrase(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_16ExtendedTrieNode_phrase(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_16ExtendedTrieNode_phrase_location(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_16ExtendedTrieNode_phrase_location(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_16ExtendedTrieNode_suffix_link(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_16ExtendedTrieNode_suffix_link(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_5__del__(o);
+ }
+}
+
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_ExtendedTrieNode[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_BitSetIterator = {
+static struct PyGetSetDef __pyx_getsets_4cdec_2sa_3_sa_ExtendedTrieNode[] = {
+ {(char *)"phrase", __pyx_getprop_4cdec_2sa_3_sa_16ExtendedTrieNode_phrase, __pyx_setprop_4cdec_2sa_3_sa_16ExtendedTrieNode_phrase, 0, 0},
+ {(char *)"phrase_location", __pyx_getprop_4cdec_2sa_3_sa_16ExtendedTrieNode_phrase_location, __pyx_setprop_4cdec_2sa_3_sa_16ExtendedTrieNode_phrase_location, 0, 0},
+ {(char *)"suffix_link", __pyx_getprop_4cdec_2sa_3_sa_16ExtendedTrieNode_suffix_link, __pyx_setprop_4cdec_2sa_3_sa_16ExtendedTrieNode_suffix_link, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.BitSetIterator"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_BitSetIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.ExtendedTrieNode"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_ExtendedTrieNode), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_BitSetIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_ExtendedTrieNode, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -69797,17 +69771,17 @@ static PyTypeObject __pyx_type_3_sa_BitSetIterator = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_ExtendedTrieNode, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_ExtendedTrieNode, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
- __pyx_pw_3_sa_14BitSetIterator_1__next__, /*tp_iternext*/
- __pyx_methods_3_sa_BitSetIterator, /*tp_methods*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4cdec_2sa_3_sa_ExtendedTrieNode, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4cdec_2sa_3_sa_ExtendedTrieNode, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -69815,7 +69789,7 @@ static PyTypeObject __pyx_type_3_sa_BitSetIterator = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_BitSetIterator, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_ExtendedTrieNode, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -69828,90 +69802,73 @@ static PyTypeObject __pyx_type_3_sa_BitSetIterator = {
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment __pyx_vtable_4cdec_2sa_3_sa_Alignment;
-static struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_23_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_23_genexpr = 0;
-
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_23_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Alignment(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Alignment *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_23_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_23_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_23_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr));
- PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_Alignment;
+ p->links = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_9Alignment_5__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *)o);
- p->__pyx_outer_scope = 0;
- p->__pyx_v_i = 0;
- p->__pyx_v_j = 0;
- p->__pyx_t_0 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_23_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_Alignment(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Alignment *p = (struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_i);
- Py_CLEAR(p->__pyx_v_j);
- Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_23_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_23_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_23_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->links);
+ Py_CLEAR(p->sent_index);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_23_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_Alignment(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *)o;
- if (p->__pyx_outer_scope) {
- e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
- }
- if (p->__pyx_v_i) {
- e = (*v)(p->__pyx_v_i, a); if (e) return e;
- }
- if (p->__pyx_v_j) {
- e = (*v)(p->__pyx_v_j, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_Alignment *p = (struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)o;
+ if (p->links) {
+ e = (*v)(((PyObject*)p->links), a); if (e) return e;
}
- if (p->__pyx_t_0) {
- e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ if (p->sent_index) {
+ e = (*v)(((PyObject*)p->sent_index), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_23_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_Alignment(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Alignment *p = (struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_i);
- p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_j);
- p->__pyx_v_j = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->links);
+ p->links = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_0);
- p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->sent_index);
+ p->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_23_genexpr[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_Alignment[] = {
+ {__Pyx_NAMESTR("unlink"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9Alignment_1unlink, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_2sa_3_sa_9Alignment_unlink)},
+ {__Pyx_NAMESTR("get_sent_links"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9Alignment_3get_sent_links, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read_text"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9Alignment_7read_text, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read_binary"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9Alignment_9read_binary, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_text"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9Alignment_11write_text, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_binary"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9Alignment_13write_binary, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_enhanced"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9Alignment_15write_enhanced, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("alignment"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9Alignment_17alignment, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_2sa_3_sa_9Alignment_16alignment)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_23_genexpr = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_Alignment = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_23_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_23_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.Alignment"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Alignment), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_23_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_Alignment, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -69930,15 +69887,15 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_23_genexpr = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_23_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_23_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_Alignment, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_Alignment, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_23_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_Alignment, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -69948,7 +69905,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_23_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_23_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_Alignment, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -69961,68 +69918,530 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_23_genexpr = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_Precomputation __pyx_vtable_3_sa_Precomputation;
-static PyObject *__pyx_tp_new_3_sa_Precomputation(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_Precomputation *p;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_19_input[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_19_input = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_19_input(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_Precomputation *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_Precomputation;
- p->precomputed_index = Py_None; Py_INCREF(Py_None);
- p->precomputed_collocations = Py_None; Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_14Precomputation_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_19_input > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_19_input[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_19_input];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input));
+ PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *)o);
+ p->__pyx_v_alignment = 0;
+ p->__pyx_v_als = 0;
+ p->__pyx_v_alslist = 0;
+ p->__pyx_v_chunklen = 0;
+ p->__pyx_v_count = 0;
+ p->__pyx_v_ctx_name = 0;
+ p->__pyx_v_e = 0;
+ p->__pyx_v_elist = 0;
+ p->__pyx_v_extract = 0;
+ p->__pyx_v_extract_start = 0;
+ p->__pyx_v_extract_stop = 0;
+ p->__pyx_v_extracts = 0;
+ p->__pyx_v_f = 0;
+ p->__pyx_v_f_syms = 0;
+ p->__pyx_v_fcount = 0;
+ p->__pyx_v_fphrases = 0;
+ p->__pyx_v_frontier = 0;
+ p->__pyx_v_frontier_nodes = 0;
+ p->__pyx_v_fwords = 0;
+ p->__pyx_v_genexpr = 0;
+ p->__pyx_v_hiero_phrase = 0;
+ p->__pyx_v_input_match = 0;
+ p->__pyx_v_intersect_start_time = 0;
+ p->__pyx_v_intersect_stop_time = 0;
+ p->__pyx_v_is_shadow_path = 0;
+ p->__pyx_v_key = 0;
+ p->__pyx_v_lex_i = 0;
+ p->__pyx_v_lex_j = 0;
+ p->__pyx_v_loc = 0;
+ p->__pyx_v_locs = 0;
+ p->__pyx_v_max_locs = 0;
+ p->__pyx_v_meta = 0;
+ p->__pyx_v_new_frontier = 0;
+ p->__pyx_v_new_node = 0;
+ p->__pyx_v_next_states = 0;
+ p->__pyx_v_node = 0;
+ p->__pyx_v_nodes_isteps_away_buffer = 0;
+ p->__pyx_v_pathlen = 0;
+ p->__pyx_v_phrase = 0;
+ p->__pyx_v_phrase_location = 0;
+ p->__pyx_v_prefix = 0;
+ p->__pyx_v_reachable_buffer = 0;
+ p->__pyx_v_sa_range = 0;
+ p->__pyx_v_sample = 0;
+ p->__pyx_v_scores = 0;
+ p->__pyx_v_seen_phrases = 0;
+ p->__pyx_v_self = 0;
+ p->__pyx_v_spanlen = 0;
+ p->__pyx_v_stats = 0;
+ p->__pyx_v_stop_time = 0;
+ p->__pyx_v_suffix_link = 0;
+ p->__pyx_v_suffix_link_xcat_index = 0;
+ p->__pyx_v_word_id = 0;
+ p->__pyx_v_xcat_index = 0;
+ p->__pyx_v_xnode = 0;
+ p->__pyx_v_xroot = 0;
+ p->__pyx_t_3 = 0;
+ p->__pyx_t_4 = 0;
+ p->__pyx_t_5 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa_Precomputation(PyObject *o) {
- struct __pyx_obj_3_sa_Precomputation *p = (struct __pyx_obj_3_sa_Precomputation *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_19_input(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->precomputed_index);
- Py_CLEAR(p->precomputed_collocations);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->__pyx_v_alignment);
+ Py_CLEAR(p->__pyx_v_als);
+ Py_CLEAR(p->__pyx_v_alslist);
+ Py_CLEAR(p->__pyx_v_chunklen);
+ Py_CLEAR(p->__pyx_v_count);
+ Py_CLEAR(p->__pyx_v_ctx_name);
+ Py_CLEAR(p->__pyx_v_e);
+ Py_CLEAR(p->__pyx_v_elist);
+ Py_CLEAR(p->__pyx_v_extract);
+ Py_CLEAR(p->__pyx_v_extract_start);
+ Py_CLEAR(p->__pyx_v_extract_stop);
+ Py_CLEAR(p->__pyx_v_extracts);
+ Py_CLEAR(p->__pyx_v_f);
+ Py_CLEAR(p->__pyx_v_f_syms);
+ Py_CLEAR(p->__pyx_v_fcount);
+ Py_CLEAR(p->__pyx_v_fphrases);
+ Py_CLEAR(p->__pyx_v_frontier);
+ Py_CLEAR(p->__pyx_v_frontier_nodes);
+ Py_CLEAR(p->__pyx_v_fwords);
+ Py_CLEAR(p->__pyx_v_genexpr);
+ Py_CLEAR(p->__pyx_v_hiero_phrase);
+ Py_CLEAR(p->__pyx_v_input_match);
+ Py_CLEAR(p->__pyx_v_intersect_start_time);
+ Py_CLEAR(p->__pyx_v_intersect_stop_time);
+ Py_CLEAR(p->__pyx_v_is_shadow_path);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_v_lex_i);
+ Py_CLEAR(p->__pyx_v_lex_j);
+ Py_CLEAR(p->__pyx_v_loc);
+ Py_CLEAR(p->__pyx_v_locs);
+ Py_CLEAR(p->__pyx_v_max_locs);
+ Py_CLEAR(p->__pyx_v_meta);
+ Py_CLEAR(p->__pyx_v_new_frontier);
+ Py_CLEAR(p->__pyx_v_new_node);
+ Py_CLEAR(p->__pyx_v_next_states);
+ Py_CLEAR(p->__pyx_v_node);
+ Py_CLEAR(p->__pyx_v_nodes_isteps_away_buffer);
+ Py_CLEAR(p->__pyx_v_pathlen);
+ Py_CLEAR(p->__pyx_v_phrase);
+ Py_CLEAR(p->__pyx_v_phrase_location);
+ Py_CLEAR(p->__pyx_v_prefix);
+ Py_CLEAR(p->__pyx_v_reachable_buffer);
+ Py_CLEAR(p->__pyx_v_sa_range);
+ Py_CLEAR(p->__pyx_v_sample);
+ Py_CLEAR(p->__pyx_v_scores);
+ Py_CLEAR(p->__pyx_v_seen_phrases);
+ Py_CLEAR(p->__pyx_v_self);
+ Py_CLEAR(p->__pyx_v_spanlen);
+ Py_CLEAR(p->__pyx_v_stats);
+ Py_CLEAR(p->__pyx_v_stop_time);
+ Py_CLEAR(p->__pyx_v_suffix_link);
+ Py_CLEAR(p->__pyx_v_suffix_link_xcat_index);
+ Py_CLEAR(p->__pyx_v_word_id);
+ Py_CLEAR(p->__pyx_v_xcat_index);
+ Py_CLEAR(p->__pyx_v_xnode);
+ Py_CLEAR(p->__pyx_v_xroot);
+ Py_CLEAR(p->__pyx_t_3);
+ Py_CLEAR(p->__pyx_t_4);
+ Py_CLEAR(p->__pyx_t_5);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_19_input < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_19_input[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_19_input++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_3_sa_Precomputation(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_19_input(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_Precomputation *p = (struct __pyx_obj_3_sa_Precomputation *)o;
- if (p->precomputed_index) {
- e = (*v)(p->precomputed_index, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *)o;
+ if (p->__pyx_v_alignment) {
+ e = (*v)(p->__pyx_v_alignment, a); if (e) return e;
}
- if (p->precomputed_collocations) {
- e = (*v)(p->precomputed_collocations, a); if (e) return e;
+ if (p->__pyx_v_als) {
+ e = (*v)(p->__pyx_v_als, a); if (e) return e;
+ }
+ if (p->__pyx_v_alslist) {
+ e = (*v)(p->__pyx_v_alslist, a); if (e) return e;
+ }
+ if (p->__pyx_v_chunklen) {
+ e = (*v)(((PyObject*)p->__pyx_v_chunklen), a); if (e) return e;
+ }
+ if (p->__pyx_v_count) {
+ e = (*v)(p->__pyx_v_count, a); if (e) return e;
+ }
+ if (p->__pyx_v_ctx_name) {
+ e = (*v)(p->__pyx_v_ctx_name, a); if (e) return e;
+ }
+ if (p->__pyx_v_e) {
+ e = (*v)(p->__pyx_v_e, a); if (e) return e;
+ }
+ if (p->__pyx_v_elist) {
+ e = (*v)(p->__pyx_v_elist, a); if (e) return e;
+ }
+ if (p->__pyx_v_extract) {
+ e = (*v)(p->__pyx_v_extract, a); if (e) return e;
+ }
+ if (p->__pyx_v_extract_start) {
+ e = (*v)(p->__pyx_v_extract_start, a); if (e) return e;
+ }
+ if (p->__pyx_v_extract_stop) {
+ e = (*v)(p->__pyx_v_extract_stop, a); if (e) return e;
+ }
+ if (p->__pyx_v_extracts) {
+ e = (*v)(p->__pyx_v_extracts, a); if (e) return e;
+ }
+ if (p->__pyx_v_f) {
+ e = (*v)(p->__pyx_v_f, a); if (e) return e;
+ }
+ if (p->__pyx_v_f_syms) {
+ e = (*v)(p->__pyx_v_f_syms, a); if (e) return e;
+ }
+ if (p->__pyx_v_fcount) {
+ e = (*v)(p->__pyx_v_fcount, a); if (e) return e;
+ }
+ if (p->__pyx_v_fphrases) {
+ e = (*v)(p->__pyx_v_fphrases, a); if (e) return e;
+ }
+ if (p->__pyx_v_frontier) {
+ e = (*v)(p->__pyx_v_frontier, a); if (e) return e;
+ }
+ if (p->__pyx_v_frontier_nodes) {
+ e = (*v)(p->__pyx_v_frontier_nodes, a); if (e) return e;
+ }
+ if (p->__pyx_v_fwords) {
+ e = (*v)(p->__pyx_v_fwords, a); if (e) return e;
+ }
+ if (p->__pyx_v_genexpr) {
+ e = (*v)(p->__pyx_v_genexpr, a); if (e) return e;
+ }
+ if (p->__pyx_v_hiero_phrase) {
+ e = (*v)(((PyObject*)p->__pyx_v_hiero_phrase), a); if (e) return e;
+ }
+ if (p->__pyx_v_input_match) {
+ e = (*v)(p->__pyx_v_input_match, a); if (e) return e;
+ }
+ if (p->__pyx_v_intersect_start_time) {
+ e = (*v)(p->__pyx_v_intersect_start_time, a); if (e) return e;
+ }
+ if (p->__pyx_v_intersect_stop_time) {
+ e = (*v)(p->__pyx_v_intersect_stop_time, a); if (e) return e;
+ }
+ if (p->__pyx_v_is_shadow_path) {
+ e = (*v)(p->__pyx_v_is_shadow_path, a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_v_lex_i) {
+ e = (*v)(p->__pyx_v_lex_i, a); if (e) return e;
+ }
+ if (p->__pyx_v_lex_j) {
+ e = (*v)(p->__pyx_v_lex_j, a); if (e) return e;
+ }
+ if (p->__pyx_v_loc) {
+ e = (*v)(p->__pyx_v_loc, a); if (e) return e;
+ }
+ if (p->__pyx_v_locs) {
+ e = (*v)(p->__pyx_v_locs, a); if (e) return e;
+ }
+ if (p->__pyx_v_max_locs) {
+ e = (*v)(p->__pyx_v_max_locs, a); if (e) return e;
+ }
+ if (p->__pyx_v_meta) {
+ e = (*v)(p->__pyx_v_meta, a); if (e) return e;
+ }
+ if (p->__pyx_v_new_frontier) {
+ e = (*v)(p->__pyx_v_new_frontier, a); if (e) return e;
+ }
+ if (p->__pyx_v_new_node) {
+ e = (*v)(p->__pyx_v_new_node, a); if (e) return e;
+ }
+ if (p->__pyx_v_next_states) {
+ e = (*v)(p->__pyx_v_next_states, a); if (e) return e;
+ }
+ if (p->__pyx_v_node) {
+ e = (*v)(p->__pyx_v_node, a); if (e) return e;
+ }
+ if (p->__pyx_v_nodes_isteps_away_buffer) {
+ e = (*v)(p->__pyx_v_nodes_isteps_away_buffer, a); if (e) return e;
+ }
+ if (p->__pyx_v_pathlen) {
+ e = (*v)(p->__pyx_v_pathlen, a); if (e) return e;
+ }
+ if (p->__pyx_v_phrase) {
+ e = (*v)(p->__pyx_v_phrase, a); if (e) return e;
+ }
+ if (p->__pyx_v_phrase_location) {
+ e = (*v)(((PyObject*)p->__pyx_v_phrase_location), a); if (e) return e;
+ }
+ if (p->__pyx_v_prefix) {
+ e = (*v)(p->__pyx_v_prefix, a); if (e) return e;
+ }
+ if (p->__pyx_v_reachable_buffer) {
+ e = (*v)(p->__pyx_v_reachable_buffer, a); if (e) return e;
+ }
+ if (p->__pyx_v_sa_range) {
+ e = (*v)(p->__pyx_v_sa_range, a); if (e) return e;
+ }
+ if (p->__pyx_v_sample) {
+ e = (*v)(((PyObject*)p->__pyx_v_sample), a); if (e) return e;
+ }
+ if (p->__pyx_v_scores) {
+ e = (*v)(((PyObject*)p->__pyx_v_scores), a); if (e) return e;
+ }
+ if (p->__pyx_v_seen_phrases) {
+ e = (*v)(p->__pyx_v_seen_phrases, a); if (e) return e;
+ }
+ if (p->__pyx_v_self) {
+ e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
+ }
+ if (p->__pyx_v_spanlen) {
+ e = (*v)(p->__pyx_v_spanlen, a); if (e) return e;
+ }
+ if (p->__pyx_v_stats) {
+ e = (*v)(p->__pyx_v_stats, a); if (e) return e;
+ }
+ if (p->__pyx_v_stop_time) {
+ e = (*v)(p->__pyx_v_stop_time, a); if (e) return e;
+ }
+ if (p->__pyx_v_suffix_link) {
+ e = (*v)(p->__pyx_v_suffix_link, a); if (e) return e;
+ }
+ if (p->__pyx_v_suffix_link_xcat_index) {
+ e = (*v)(p->__pyx_v_suffix_link_xcat_index, a); if (e) return e;
+ }
+ if (p->__pyx_v_word_id) {
+ e = (*v)(p->__pyx_v_word_id, a); if (e) return e;
+ }
+ if (p->__pyx_v_xcat_index) {
+ e = (*v)(p->__pyx_v_xcat_index, a); if (e) return e;
+ }
+ if (p->__pyx_v_xnode) {
+ e = (*v)(p->__pyx_v_xnode, a); if (e) return e;
+ }
+ if (p->__pyx_v_xroot) {
+ e = (*v)(p->__pyx_v_xroot, a); if (e) return e;
+ }
+ if (p->__pyx_t_3) {
+ e = (*v)(p->__pyx_t_3, a); if (e) return e;
+ }
+ if (p->__pyx_t_4) {
+ e = (*v)(p->__pyx_t_4, a); if (e) return e;
+ }
+ if (p->__pyx_t_5) {
+ e = (*v)(p->__pyx_t_5, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa_Precomputation(PyObject *o) {
- struct __pyx_obj_3_sa_Precomputation *p = (struct __pyx_obj_3_sa_Precomputation *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_19_input(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->precomputed_index);
- p->precomputed_index = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_alignment);
+ p->__pyx_v_alignment = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->precomputed_collocations);
- p->precomputed_collocations = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_als);
+ p->__pyx_v_als = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_alslist);
+ p->__pyx_v_alslist = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_chunklen);
+ p->__pyx_v_chunklen = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_count);
+ p->__pyx_v_count = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_ctx_name);
+ p->__pyx_v_ctx_name = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_e);
+ p->__pyx_v_e = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_elist);
+ p->__pyx_v_elist = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_extract);
+ p->__pyx_v_extract = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_extract_start);
+ p->__pyx_v_extract_start = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_extract_stop);
+ p->__pyx_v_extract_stop = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_extracts);
+ p->__pyx_v_extracts = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_f);
+ p->__pyx_v_f = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_f_syms);
+ p->__pyx_v_f_syms = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_fcount);
+ p->__pyx_v_fcount = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_fphrases);
+ p->__pyx_v_fphrases = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_frontier);
+ p->__pyx_v_frontier = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_frontier_nodes);
+ p->__pyx_v_frontier_nodes = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_fwords);
+ p->__pyx_v_fwords = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_genexpr);
+ p->__pyx_v_genexpr = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_hiero_phrase);
+ p->__pyx_v_hiero_phrase = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_input_match);
+ p->__pyx_v_input_match = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_intersect_start_time);
+ p->__pyx_v_intersect_start_time = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_intersect_stop_time);
+ p->__pyx_v_intersect_stop_time = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_is_shadow_path);
+ p->__pyx_v_is_shadow_path = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_key);
+ p->__pyx_v_key = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_lex_i);
+ p->__pyx_v_lex_i = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_lex_j);
+ p->__pyx_v_lex_j = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_loc);
+ p->__pyx_v_loc = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_locs);
+ p->__pyx_v_locs = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_max_locs);
+ p->__pyx_v_max_locs = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_meta);
+ p->__pyx_v_meta = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_new_frontier);
+ p->__pyx_v_new_frontier = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_new_node);
+ p->__pyx_v_new_node = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_next_states);
+ p->__pyx_v_next_states = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_node);
+ p->__pyx_v_node = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_nodes_isteps_away_buffer);
+ p->__pyx_v_nodes_isteps_away_buffer = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_pathlen);
+ p->__pyx_v_pathlen = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_phrase);
+ p->__pyx_v_phrase = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_phrase_location);
+ p->__pyx_v_phrase_location = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_prefix);
+ p->__pyx_v_prefix = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_reachable_buffer);
+ p->__pyx_v_reachable_buffer = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_sa_range);
+ p->__pyx_v_sa_range = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_sample);
+ p->__pyx_v_sample = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_scores);
+ p->__pyx_v_scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_seen_phrases);
+ p->__pyx_v_seen_phrases = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_self);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_spanlen);
+ p->__pyx_v_spanlen = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_stats);
+ p->__pyx_v_stats = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_stop_time);
+ p->__pyx_v_stop_time = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_suffix_link);
+ p->__pyx_v_suffix_link = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_suffix_link_xcat_index);
+ p->__pyx_v_suffix_link_xcat_index = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_word_id);
+ p->__pyx_v_word_id = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_xcat_index);
+ p->__pyx_v_xcat_index = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_xnode);
+ p->__pyx_v_xnode = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_xroot);
+ p->__pyx_v_xroot = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_t_3);
+ p->__pyx_t_3 = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_t_4);
+ p->__pyx_t_4 = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_t_5);
+ p->__pyx_t_5 = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa_Precomputation[] = {
- {__Pyx_NAMESTR("read_binary"), (PyCFunction)__pyx_pw_3_sa_14Precomputation_3read_binary, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_binary"), (PyCFunction)__pyx_pw_3_sa_14Precomputation_5write_binary, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("precompute"), (PyCFunction)__pyx_pw_3_sa_14Precomputation_7precompute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_19_input[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_Precomputation = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_19_input = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.Precomputation"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_Precomputation), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_19_input"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_Precomputation, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_19_input, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -70041,15 +70460,15 @@ static PyTypeObject __pyx_type_3_sa_Precomputation = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_Precomputation, /*tp_traverse*/
- __pyx_tp_clear_3_sa_Precomputation, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_19_input, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_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_Precomputation, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_19_input, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -70059,7 +70478,7 @@ static PyTypeObject __pyx_type_3_sa_Precomputation = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_Precomputation, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_19_input, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -70073,81 +70492,65 @@ static PyTypeObject __pyx_type_3_sa_Precomputation = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *__pyx_freelist_3_sa___pyx_scope_struct_18_alignments[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_18_alignments = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words = 0;
-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;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_18_alignments > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_18_alignments[--__pyx_freecount_3_sa___pyx_scope_struct_18_alignments];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- 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;
+ p = ((struct __pyx_obj_4cdec_2sa_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_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;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_point);
- Py_CLEAR(p->__pyx_v_self);
- Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_18_alignments < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments))) {
- __pyx_freelist_3_sa___pyx_scope_struct_18_alignments[__pyx_freecount_3_sa___pyx_scope_struct_18_alignments++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments *)o);
+ Py_CLEAR(p->__pyx_v_syms);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_18_alignments(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words(PyObject *o, visitproc v, void *a) {
int e;
- 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;
- }
- if (p->__pyx_v_self) {
- e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
- }
- if (p->__pyx_t_0) {
- e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words *p = (struct __pyx_obj_4cdec_2sa_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_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;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_point);
- p->__pyx_v_point = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_self);
- p->__pyx_v_self = ((struct __pyx_obj_3_sa_Rule *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_0);
- p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_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_18_alignments[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_18_alignments = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_18_alignments"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_18_alignments), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_13_decode_words"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_18_alignments, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -70168,13 +70571,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_18_alignments = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_18_alignments, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_18_alignments, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_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_18_alignments, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -70184,7 +70587,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_18_alignments = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_18_alignments, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -70198,49 +70601,54 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_18_alignments = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_14_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_14_genexpr = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr = 0;
-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;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_14_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_14_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_14_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *)o);
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *)o);
p->__pyx_outer_scope = 0;
- p->__pyx_v_sym = 0;
+ p->__pyx_v_i = 0;
+ p->__pyx_v_j = 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;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *)o;
PyObject_GC_UnTrack(o);
Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_sym);
+ Py_CLEAR(p->__pyx_v_i);
+ Py_CLEAR(p->__pyx_v_j);
Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_14_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_14_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_14_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_14_genexpr *)o);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_14_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_23_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;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_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_v_i) {
+ e = (*v)(p->__pyx_v_i, a); if (e) return e;
+ }
+ if (p->__pyx_v_j) {
+ e = (*v)(p->__pyx_v_j, a); if (e) return e;
}
if (p->__pyx_t_0) {
e = (*v)(p->__pyx_t_0, a); if (e) return e;
@@ -70248,14 +70656,17 @@ static int __pyx_tp_traverse_3_sa___pyx_scope_struct_14_genexpr(PyObject *o, vis
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;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_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);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *)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);
+ tmp = ((PyObject*)p->__pyx_v_i);
+ p->__pyx_v_i = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_j);
+ p->__pyx_v_j = 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);
@@ -70263,16 +70674,16 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_14_genexpr(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_14_genexpr[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_14_genexpr = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_23_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*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_23_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_14_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -70293,13 +70704,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_14_genexpr = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_14_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_14_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_23_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*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -70309,7 +70720,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_14_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_14_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -70322,135 +70733,125 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_14_genexpr = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_SuffixArray __pyx_vtable_3_sa_SuffixArray;
-static PyObject *__pyx_tp_new_3_sa_SuffixArray(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_SuffixArray *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Rule(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Rule *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_SuffixArray *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_SuffixArray;
- p->darray = ((struct __pyx_obj_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
- p->sa = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->ha = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_11SuffixArray_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)o);
+ p->f = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
+ p->e = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
+ p->scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)Py_None); Py_INCREF(Py_None);
+ p->word_alignments = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_4Rule_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_SuffixArray(PyObject *o) {
- struct __pyx_obj_3_sa_SuffixArray *p = (struct __pyx_obj_3_sa_SuffixArray *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_Rule(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Rule *p = (struct __pyx_obj_4cdec_2sa_3_sa_Rule *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->darray);
- Py_CLEAR(p->sa);
- Py_CLEAR(p->ha);
+ Py_CLEAR(p->f);
+ Py_CLEAR(p->e);
+ Py_CLEAR(p->scores);
+ Py_CLEAR(p->word_alignments);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa_SuffixArray(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_Rule(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_SuffixArray *p = (struct __pyx_obj_3_sa_SuffixArray *)o;
- if (p->darray) {
- e = (*v)(((PyObject*)p->darray), a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_Rule *p = (struct __pyx_obj_4cdec_2sa_3_sa_Rule *)o;
+ if (p->f) {
+ e = (*v)(((PyObject*)p->f), a); if (e) return e;
}
- if (p->sa) {
- e = (*v)(((PyObject*)p->sa), a); if (e) return e;
+ if (p->e) {
+ e = (*v)(((PyObject*)p->e), a); if (e) return e;
}
- if (p->ha) {
- e = (*v)(((PyObject*)p->ha), a); if (e) return e;
+ if (p->scores) {
+ e = (*v)(((PyObject*)p->scores), a); if (e) return e;
+ }
+ if (p->word_alignments) {
+ e = (*v)(p->word_alignments, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa_SuffixArray(PyObject *o) {
- struct __pyx_obj_3_sa_SuffixArray *p = (struct __pyx_obj_3_sa_SuffixArray *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_Rule(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Rule *p = (struct __pyx_obj_4cdec_2sa_3_sa_Rule *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->darray);
- p->darray = ((struct __pyx_obj_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->f);
+ p->f = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->sa);
- p->sa = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->e);
+ p->e = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->ha);
- p->ha = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->scores);
+ p->scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->word_alignments);
+ p->word_alignments = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyObject *__pyx_sq_item_3_sa_SuffixArray(PyObject *o, Py_ssize_t i) {
- PyObject *r;
- PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
- r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
- Py_DECREF(x);
- return r;
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_4Rule_f(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_4Rule_1f_1__get__(o);
}
-static PyMethodDef __pyx_methods_3_sa_SuffixArray[] = {
- {__Pyx_NAMESTR("read_text"), (PyCFunction)__pyx_pw_3_sa_11SuffixArray_5read_text, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_3_sa_11SuffixArray_4read_text)},
- {__Pyx_NAMESTR("q3sort"), (PyCFunction)__pyx_pw_3_sa_11SuffixArray_7q3sort, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_3_sa_11SuffixArray_6q3sort)},
- {__Pyx_NAMESTR("write_text"), (PyCFunction)__pyx_pw_3_sa_11SuffixArray_9write_text, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read_binary"), (PyCFunction)__pyx_pw_3_sa_11SuffixArray_11read_binary, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_binary"), (PyCFunction)__pyx_pw_3_sa_11SuffixArray_13write_binary, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_enhanced"), (PyCFunction)__pyx_pw_3_sa_11SuffixArray_15write_enhanced, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_3_sa_11SuffixArray_17lookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {0, 0, 0, 0}
-};
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_4Rule_e(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_4Rule_1e_1__get__(o);
+}
-static PySequenceMethods __pyx_tp_as_sequence_SuffixArray = {
- 0, /*sq_length*/
- 0, /*sq_concat*/
- 0, /*sq_repeat*/
- __pyx_sq_item_3_sa_SuffixArray, /*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 PyMethodDef __pyx_methods_4cdec_2sa_3_sa_Rule[] = {
+ {__Pyx_NAMESTR("fmerge"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_4Rule_7fmerge, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("arity"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_4Rule_9arity, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("alignments"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_4Rule_13alignments, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
};
-static PyMappingMethods __pyx_tp_as_mapping_SuffixArray = {
- 0, /*mp_length*/
- __pyx_pw_3_sa_11SuffixArray_3__getitem__, /*mp_subscript*/
- 0, /*mp_ass_subscript*/
+static struct PyGetSetDef __pyx_getsets_4cdec_2sa_3_sa_Rule[] = {
+ {(char *)"f", __pyx_getprop_4cdec_2sa_3_sa_4Rule_f, 0, 0, 0},
+ {(char *)"e", __pyx_getprop_4cdec_2sa_3_sa_4Rule_e, 0, 0, 0},
+ {0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_SuffixArray = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_Rule = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.SuffixArray"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_SuffixArray), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.Rule"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Rule), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_SuffixArray, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_Rule, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
- 0, /*tp_compare*/
+ __pyx_pw_4cdec_2sa_3_sa_4Rule_5__cmp__, /*tp_compare*/
#else
0, /*reserved*/
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
- &__pyx_tp_as_sequence_SuffixArray, /*tp_as_sequence*/
- &__pyx_tp_as_mapping_SuffixArray, /*tp_as_mapping*/
- 0, /*tp_hash*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ __pyx_pw_4cdec_2sa_3_sa_4Rule_3__hash__, /*tp_hash*/
0, /*tp_call*/
- 0, /*tp_str*/
+ __pyx_pw_4cdec_2sa_3_sa_4Rule_11__str__, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_SuffixArray, /*tp_traverse*/
- __pyx_tp_clear_3_sa_SuffixArray, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_Rule, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_Rule, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_SuffixArray, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_Rule, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4cdec_2sa_3_sa_Rule, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -70458,7 +70859,7 @@ static PyTypeObject __pyx_type_3_sa_SuffixArray = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_SuffixArray, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_Rule, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -70472,65 +70873,81 @@ static PyTypeObject __pyx_type_3_sa_SuffixArray = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *__pyx_freelist_3_sa___pyx_scope_struct_16___str__[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_16___str__ = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr = 0;
-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;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_16___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_16___str__)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_16___str__[--__pyx_freecount_3_sa___pyx_scope_struct_16___str__];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_16___str__));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *)o);
- p->__pyx_v_self = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_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_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;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_16___str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_16___str__))) {
- __pyx_freelist_3_sa___pyx_scope_struct_16___str__[__pyx_freecount_3_sa___pyx_scope_struct_16___str__++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_16___str__ *)o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_word);
+ Py_CLEAR(p->__pyx_t_0);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_16___str__(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- 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;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_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_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;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr *)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);
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_19_input *)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_16___str__[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_16___str__ = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_16___str__"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_16___str__), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_20_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_16___str__, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -70551,13 +70968,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_16___str__ = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_16___str__, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_16___str__, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_16___str__, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -70567,7 +70984,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_16___str__ = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_16___str__, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -70580,96 +70997,68 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_16___str__ = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_Alphabet __pyx_vtable_3_sa_Alphabet;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Precomputation __pyx_vtable_4cdec_2sa_3_sa_Precomputation;
-static PyObject *__pyx_tp_new_3_sa_Alphabet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa_Alphabet *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Precomputation(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_Alphabet *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_Alphabet;
- p->terminals = ((struct __pyx_obj_3_sa_StringMap *)Py_None); Py_INCREF(Py_None);
- p->nonterminals = ((struct __pyx_obj_3_sa_StringMap *)Py_None); Py_INCREF(Py_None);
- p->id2sym = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_8Alphabet_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_Precomputation;
+ p->precomputed_index = Py_None; Py_INCREF(Py_None);
+ p->precomputed_collocations = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_14Precomputation_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_Alphabet(PyObject *o) {
- struct __pyx_obj_3_sa_Alphabet *p = (struct __pyx_obj_3_sa_Alphabet *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_Precomputation(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *p = (struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)o;
PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_3_sa_8Alphabet_3__dealloc__(o);
- if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
- Py_CLEAR(p->terminals);
- Py_CLEAR(p->nonterminals);
- Py_CLEAR(p->id2sym);
+ Py_CLEAR(p->precomputed_index);
+ Py_CLEAR(p->precomputed_collocations);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa_Alphabet(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_Precomputation(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_Alphabet *p = (struct __pyx_obj_3_sa_Alphabet *)o;
- if (p->terminals) {
- e = (*v)(((PyObject*)p->terminals), a); if (e) return e;
- }
- if (p->nonterminals) {
- e = (*v)(((PyObject*)p->nonterminals), a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *p = (struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)o;
+ if (p->precomputed_index) {
+ e = (*v)(p->precomputed_index, a); if (e) return e;
}
- if (p->id2sym) {
- e = (*v)(p->id2sym, a); if (e) return e;
+ if (p->precomputed_collocations) {
+ e = (*v)(p->precomputed_collocations, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa_Alphabet(PyObject *o) {
- struct __pyx_obj_3_sa_Alphabet *p = (struct __pyx_obj_3_sa_Alphabet *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_Precomputation(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *p = (struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->terminals);
- p->terminals = ((struct __pyx_obj_3_sa_StringMap *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->nonterminals);
- p->nonterminals = ((struct __pyx_obj_3_sa_StringMap *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->precomputed_index);
+ p->precomputed_index = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->id2sym);
- p->id2sym = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->precomputed_collocations);
+ p->precomputed_collocations = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyObject *__pyx_getprop_3_sa_8Alphabet_terminals(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_8Alphabet_9terminals_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_3_sa_8Alphabet_nonterminals(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_8Alphabet_12nonterminals_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_3_sa_Alphabet[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_Precomputation[] = {
+ {__Pyx_NAMESTR("read_binary"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_14Precomputation_3read_binary, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_binary"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_14Precomputation_5write_binary, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("precompute"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_14Precomputation_7precompute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_3_sa_Alphabet[] = {
- {(char *)"terminals", __pyx_getprop_3_sa_8Alphabet_terminals, 0, 0, 0},
- {(char *)"nonterminals", __pyx_getprop_3_sa_8Alphabet_nonterminals, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_3_sa_Alphabet = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_Precomputation = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.Alphabet"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_Alphabet), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.Precomputation"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_Alphabet, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_Precomputation, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -70690,154 +71079,15 @@ static PyTypeObject __pyx_type_3_sa_Alphabet = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_Alphabet, /*tp_traverse*/
- __pyx_tp_clear_3_sa_Alphabet, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_3_sa_Alphabet, /*tp_methods*/
- 0, /*tp_members*/
- __pyx_getsets_3_sa_Alphabet, /*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_Alphabet, /*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_Rule(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_Rule *p;
- PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_Rule *)o);
- p->f = ((struct __pyx_obj_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
- p->e = ((struct __pyx_obj_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
- p->scores = ((struct __pyx_obj_3_sa_FeatureVector *)Py_None); Py_INCREF(Py_None);
- p->word_alignments = Py_None; Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_4Rule_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
- }
- return o;
-}
-
-static void __pyx_tp_dealloc_3_sa_Rule(PyObject *o) {
- struct __pyx_obj_3_sa_Rule *p = (struct __pyx_obj_3_sa_Rule *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->f);
- Py_CLEAR(p->e);
- Py_CLEAR(p->scores);
- Py_CLEAR(p->word_alignments);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_3_sa_Rule(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_3_sa_Rule *p = (struct __pyx_obj_3_sa_Rule *)o;
- if (p->f) {
- e = (*v)(((PyObject*)p->f), a); if (e) return e;
- }
- if (p->e) {
- e = (*v)(((PyObject*)p->e), a); if (e) return e;
- }
- if (p->scores) {
- e = (*v)(((PyObject*)p->scores), a); if (e) return e;
- }
- if (p->word_alignments) {
- e = (*v)(p->word_alignments, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_3_sa_Rule(PyObject *o) {
- struct __pyx_obj_3_sa_Rule *p = (struct __pyx_obj_3_sa_Rule *)o;
- PyObject* tmp;
- tmp = ((PyObject*)p->f);
- p->f = ((struct __pyx_obj_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->e);
- p->e = ((struct __pyx_obj_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->scores);
- p->scores = ((struct __pyx_obj_3_sa_FeatureVector *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->word_alignments);
- p->word_alignments = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- return 0;
-}
-
-static PyObject *__pyx_getprop_3_sa_4Rule_f(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_4Rule_1f_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_3_sa_4Rule_e(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_4Rule_1e_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_3_sa_Rule[] = {
- {__Pyx_NAMESTR("fmerge"), (PyCFunction)__pyx_pw_3_sa_4Rule_7fmerge, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("arity"), (PyCFunction)__pyx_pw_3_sa_4Rule_9arity, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("alignments"), (PyCFunction)__pyx_pw_3_sa_4Rule_13alignments, METH_NOARGS, __Pyx_DOCSTR(0)},
- {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_3_sa_Rule[] = {
- {(char *)"f", __pyx_getprop_3_sa_4Rule_f, 0, 0, 0},
- {(char *)"e", __pyx_getprop_3_sa_4Rule_e, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_3_sa_Rule = {
- PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.Rule"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_Rule), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_Rule, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- #if PY_MAJOR_VERSION < 3
- __pyx_pw_3_sa_4Rule_5__cmp__, /*tp_compare*/
- #else
- 0, /*reserved*/
- #endif
- 0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- __pyx_pw_3_sa_4Rule_3__hash__, /*tp_hash*/
- 0, /*tp_call*/
- __pyx_pw_3_sa_4Rule_11__str__, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_Rule, /*tp_traverse*/
- __pyx_tp_clear_3_sa_Rule, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_Precomputation, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_Precomputation, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_Rule, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_Precomputation, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_3_sa_Rule, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -70845,7 +71095,7 @@ static PyTypeObject __pyx_type_3_sa_Rule = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_Rule, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_Precomputation, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -70859,81 +71109,65 @@ static PyTypeObject __pyx_type_3_sa_Rule = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_6_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_6_genexpr = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ = 0;
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_6_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_6_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *)o);
- p->__pyx_outer_scope = 0;
- p->__pyx_v_word = 0;
- p->__pyx_t_0 = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *)o);
+ p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_6_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_word);
- Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_6_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *)o);
+ Py_CLEAR(p->__pyx_v_self);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *)o;
- if (p->__pyx_outer_scope) {
- e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
- }
- if (p->__pyx_v_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;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___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_6_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *)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);
+ tmp = ((PyObject*)p->__pyx_v_self);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_6_genexpr[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_6_genexpr = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_6_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_6_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_27___iter__"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_6_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -70954,13 +71188,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_6_genexpr = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_6_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_6_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_6_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -70970,7 +71204,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_6_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_6_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -70984,22 +71218,22 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_6_genexpr = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *__pyx_freelist_3_sa___pyx_scope_struct_21_add_instance[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_21_add_instance = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance = 0;
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_21_add_instance(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_21_add_instance > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_21_add_instance[--__pyx_freecount_3_sa___pyx_scope_struct_21_add_instance];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *)o);
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *)o);
p->__pyx_v_al = 0;
p->__pyx_v_cover = 0;
p->__pyx_v_e_nt_cover = 0;
@@ -71014,8 +71248,8 @@ static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_21_add_instance(PyTypeObje
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_21_add_instance(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *p = (struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *)o;
PyObject_GC_UnTrack(o);
Py_CLEAR(p->__pyx_v_al);
Py_CLEAR(p->__pyx_v_cover);
@@ -71028,16 +71262,16 @@ static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_21_add_instance(PyObject *o
Py_CLEAR(p->__pyx_v_fe_span);
Py_CLEAR(p->__pyx_v_rules);
Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_21_add_instance < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance))) {
- __pyx_freelist_3_sa___pyx_scope_struct_21_add_instance[__pyx_freecount_3_sa___pyx_scope_struct_21_add_instance++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *)o);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_21_add_instance(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *p = (struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *)o;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *)o;
if (p->__pyx_v_al) {
e = (*v)(p->__pyx_v_al, a); if (e) return e;
}
@@ -71074,8 +71308,8 @@ static int __pyx_tp_traverse_3_sa___pyx_scope_struct_21_add_instance(PyObject *o
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_21_add_instance(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *p = (struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *)o;
PyObject* tmp;
tmp = ((PyObject*)p->__pyx_v_al);
p->__pyx_v_al = Py_None; Py_INCREF(Py_None);
@@ -71108,21 +71342,21 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_21_add_instance(PyObject *o) {
p->__pyx_v_rules = ((PyObject*)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
tmp = ((PyObject*)p->__pyx_v_self);
- p->__pyx_v_self = ((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)Py_None); Py_INCREF(Py_None);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_21_add_instance[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_21_add_instance = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_21_add_instance"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_21_add_instance), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_21_add_instance"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_21_add_instance, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -71143,13 +71377,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_21_add_instance = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_21_add_instance, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_21_add_instance, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_21_add_instance, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -71159,7 +71393,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_21_add_instance = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_21_add_instance, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -71172,50 +71406,140 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_21_add_instance = {
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap __pyx_vtable_4cdec_2sa_3_sa_TrieMap;
-static struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_2_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_2_genexpr = 0;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_TrieMap(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *p;
+ PyObject *o;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_TrieMap;
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_7TrieMap_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *p;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_TrieMap(PyObject *o) {
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4cdec_2sa_3_sa_7TrieMap_3__dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_TrieMap[] = {
+ {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7TrieMap_5insert, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("contains"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7TrieMap_7contains, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("toMap"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7TrieMap_9toMap, METH_O, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_TrieMap = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("cdec.sa._sa.TrieMap"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_TrieMap, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4cdec_2sa_3_sa_TrieMap, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_4cdec_2sa_3_sa_TrieMap, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
+ #endif
+};
+
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_2_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_2_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *)o);
- p->__pyx_outer_scope = 0;
- p->__pyx_v_line = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_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_2_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_line);
+ Py_CLEAR(p->__pyx_v_point);
+ Py_CLEAR(p->__pyx_v_self);
Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_2_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *)o);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *)o;
- if (p->__pyx_outer_scope) {
- e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *)o;
+ if (p->__pyx_v_point) {
+ e = (*v)(p->__pyx_v_point, a); if (e) return e;
}
- if (p->__pyx_v_line) {
- e = (*v)(p->__pyx_v_line, a); if (e) return e;
+ if (p->__pyx_v_self) {
+ e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
}
if (p->__pyx_t_0) {
e = (*v)(p->__pyx_t_0, a); if (e) return e;
@@ -71223,14 +71547,14 @@ static int __pyx_tp_traverse_3_sa___pyx_scope_struct_2_genexpr(PyObject *o, visi
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_2_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_point);
+ p->__pyx_v_point = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_line);
- p->__pyx_v_line = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_self);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)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);
@@ -71238,16 +71562,16 @@ static int __pyx_tp_clear_3_sa___pyx_scope_struct_2_genexpr(PyObject *o) {
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_2_genexpr[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_2_genexpr = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_2_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_18_alignments"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_2_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -71268,13 +71592,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_2_genexpr = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_2_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_2_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_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_2_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -71284,7 +71608,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_2_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_2_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -71297,57 +71621,29 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_2_genexpr = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_PhraseLocation __pyx_vtable_3_sa_PhraseLocation;
-static PyObject *__pyx_tp_new_3_sa_PhraseLocation(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_PhraseLocation *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_VEBIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_PhraseLocation *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_PhraseLocation;
- p->arr = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_14PhraseLocation_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
- }
return o;
}
-static void __pyx_tp_dealloc_3_sa_PhraseLocation(PyObject *o) {
- struct __pyx_obj_3_sa_PhraseLocation *p = (struct __pyx_obj_3_sa_PhraseLocation *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->arr);
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_VEBIterator(PyObject *o) {
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa_PhraseLocation(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_3_sa_PhraseLocation *p = (struct __pyx_obj_3_sa_PhraseLocation *)o;
- if (p->arr) {
- e = (*v)(((PyObject*)p->arr), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_3_sa_PhraseLocation(PyObject *o) {
- struct __pyx_obj_3_sa_PhraseLocation *p = (struct __pyx_obj_3_sa_PhraseLocation *)o;
- PyObject* tmp;
- tmp = ((PyObject*)p->arr);
- p->arr = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- return 0;
-}
-
-static PyMethodDef __pyx_methods_3_sa_PhraseLocation[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_VEBIterator[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_11VEBIterator_1__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_PhraseLocation = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_VEBIterator = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.PhraseLocation"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_PhraseLocation), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.VEBIterator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_PhraseLocation, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_VEBIterator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -71366,15 +71662,15 @@ static PyTypeObject __pyx_type_3_sa_PhraseLocation = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_PhraseLocation, /*tp_traverse*/
- __pyx_tp_clear_3_sa_PhraseLocation, /*tp_clear*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_3_sa_PhraseLocation, /*tp_methods*/
+ __pyx_pw_4cdec_2sa_3_sa_11VEBIterator_1__next__, /*tp_iternext*/
+ __pyx_methods_4cdec_2sa_3_sa_VEBIterator, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -71384,7 +71680,7 @@ static PyTypeObject __pyx_type_3_sa_PhraseLocation = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_PhraseLocation, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_VEBIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -71398,65 +71694,81 @@ static PyTypeObject __pyx_type_3_sa_PhraseLocation = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *__pyx_freelist_3_sa___pyx_scope_struct_15___iter__[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_15___iter__ = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr = 0;
-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;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_15___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_15___iter__[--__pyx_freecount_3_sa___pyx_scope_struct_15___iter__];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *)o);
- p->__pyx_v_self = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_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_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;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_15___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__))) {
- __pyx_freelist_3_sa___pyx_scope_struct_15___iter__[__pyx_freecount_3_sa___pyx_scope_struct_15___iter__++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__ *)o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_word);
+ Py_CLEAR(p->__pyx_t_0);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_15___iter__(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- 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;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_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_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;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr *)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);
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *)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_15___iter__[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_15___iter__ = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_15___iter__"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_15___iter__), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_5_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_15___iter__, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -71477,13 +71789,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_15___iter__ = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_15___iter__, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_15___iter__, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_15___iter__, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -71493,7 +71805,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_15___iter__ = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_15___iter__, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -71506,74 +71818,84 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_15___iter__ = {
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList __pyx_vtable_4cdec_2sa_3_sa_FloatList;
-static struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *__pyx_freelist_3_sa___pyx_scope_struct_22_form_rule[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_22_form_rule = 0;
-
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_22_form_rule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_FloatList(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_FloatList *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_22_form_rule > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_22_form_rule[--__pyx_freecount_3_sa___pyx_scope_struct_22_form_rule];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule));
- PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_FloatList;
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_9FloatList_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *)o);
- p->__pyx_v_links = 0;
- p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_22_form_rule(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *p = (struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_links);
- Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_22_form_rule < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule))) {
- __pyx_freelist_3_sa___pyx_scope_struct_22_form_rule[__pyx_freecount_3_sa___pyx_scope_struct_22_form_rule++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_FloatList(PyObject *o) {
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4cdec_2sa_3_sa_9FloatList_3__dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
}
+ (*Py_TYPE(o)->tp_free)(o);
+}
+static PyObject *__pyx_sq_item_4cdec_2sa_3_sa_FloatList(PyObject *o, Py_ssize_t i) {
+ PyObject *r;
+ PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
+ r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
+ Py_DECREF(x);
+ return r;
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_22_form_rule(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *p = (struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *)o;
- if (p->__pyx_v_links) {
- e = (*v)(p->__pyx_v_links, a); if (e) return e;
+static int __pyx_mp_ass_subscript_4cdec_2sa_3_sa_FloatList(PyObject *o, PyObject *i, PyObject *v) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_9FloatList_7__setitem__(o, i, v);
}
- if (p->__pyx_v_self) {
- e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
+ else {
+ PyErr_Format(PyExc_NotImplementedError,
+ "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name);
+ return -1;
}
- return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_22_form_rule(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *p = (struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule *)o;
- PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_links);
- p->__pyx_v_links = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_self);
- p->__pyx_v_self = ((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- return 0;
-}
-
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_22_form_rule[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_FloatList[] = {
+ {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9FloatList_11append, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9FloatList_13write, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9FloatList_15read, METH_O, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_22_form_rule = {
+static PySequenceMethods __pyx_tp_as_sequence_FloatList = {
+ __pyx_pw_4cdec_2sa_3_sa_9FloatList_9__len__, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ __pyx_sq_item_4cdec_2sa_3_sa_FloatList, /*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_FloatList = {
+ __pyx_pw_4cdec_2sa_3_sa_9FloatList_9__len__, /*mp_length*/
+ __pyx_pw_4cdec_2sa_3_sa_9FloatList_5__getitem__, /*mp_subscript*/
+ __pyx_mp_ass_subscript_4cdec_2sa_3_sa_FloatList, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_FloatList = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_22_form_rule"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_22_form_rule), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.FloatList"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FloatList), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_22_form_rule, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_FloatList, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -71584,23 +71906,23 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_22_form_rule = {
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
+ &__pyx_tp_as_sequence_FloatList, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_FloatList, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_22_form_rule, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_22_form_rule, /*tp_clear*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_22_form_rule, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_FloatList, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -71610,7 +71932,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_22_form_rule = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_22_form_rule, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_FloatList, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -71623,82 +71945,44 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_22_form_rule = {
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap __pyx_vtable_4cdec_2sa_3_sa_StringMap;
-static struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_25_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_25_genexpr = 0;
-
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_25_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_StringMap(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_StringMap *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_25_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_25_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_25_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr));
- PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_StringMap;
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_9StringMap_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *)o);
- p->__pyx_outer_scope = 0;
- p->__pyx_v_packed = 0;
- p->__pyx_t_0 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_25_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_packed);
- Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_25_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_25_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_25_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
-}
-
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_25_genexpr(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *)o;
- if (p->__pyx_outer_scope) {
- e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
- }
- if (p->__pyx_v_packed) {
- e = (*v)(p->__pyx_v_packed, a); if (e) return e;
- }
- if (p->__pyx_t_0) {
- e = (*v)(p->__pyx_t_0, a); if (e) return e;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_StringMap(PyObject *o) {
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4cdec_2sa_3_sa_9StringMap_3__dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
}
- return 0;
-}
-
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_25_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr *)o;
- PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_packed);
- p->__pyx_v_packed = 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;
+ (*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_25_genexpr[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_StringMap[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_25_genexpr = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_StringMap = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_25_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_25_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.StringMap"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_StringMap), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_25_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_StringMap, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -71717,15 +72001,15 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_25_genexpr = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_25_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_25_genexpr, /*tp_clear*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_25_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_StringMap, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -71735,7 +72019,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_25_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_25_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_StringMap, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -71749,73 +72033,65 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_25_genexpr = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *__pyx_freelist_3_sa___pyx_scope_struct_24_fmt_rule[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_24_fmt_rule = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ = 0;
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_24_fmt_rule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_24_fmt_rule > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_24_fmt_rule[--__pyx_freecount_3_sa___pyx_scope_struct_24_fmt_rule];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *)o);
- p->__pyx_v_a = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_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_24_fmt_rule(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *p = (struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_a);
Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_24_fmt_rule < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule))) {
- __pyx_freelist_3_sa___pyx_scope_struct_24_fmt_rule[__pyx_freecount_3_sa___pyx_scope_struct_24_fmt_rule++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *)o);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_24_fmt_rule(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *p = (struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *)o;
- if (p->__pyx_v_a) {
- e = (*v)(p->__pyx_v_a, a); if (e) return e;
- }
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *p = (struct __pyx_obj_4cdec_2sa_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_24_fmt_rule(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *p = (struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_a);
- p->__pyx_v_a = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
tmp = ((PyObject*)p->__pyx_v_self);
- p->__pyx_v_self = ((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)Py_None); Py_INCREF(Py_None);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_24_fmt_rule[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_24_fmt_rule = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_24_fmt_rule"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_24_fmt_rule), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_15___iter__"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_24_fmt_rule, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -71836,13 +72112,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_24_fmt_rule = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_24_fmt_rule, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_24_fmt_rule, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_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_24_fmt_rule, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -71852,7 +72128,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_24_fmt_rule = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_24_fmt_rule, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -71866,65 +72142,65 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_24_fmt_rule = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *__pyx_freelist_3_sa___pyx_scope_struct_28___str__[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_28___str__ = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_16___str__[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ = 0;
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_28___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_16___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_28___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_28___str__)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_28___str__[--__pyx_freecount_3_sa___pyx_scope_struct_28___str__];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_28___str__));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_16___str__[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_16___str__];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *)o);
+ p = ((struct __pyx_obj_4cdec_2sa_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_28___str__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_16___str__(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ *)o;
PyObject_GC_UnTrack(o);
Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_28___str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_28___str__))) {
- __pyx_freelist_3_sa___pyx_scope_struct_28___str__[__pyx_freecount_3_sa___pyx_scope_struct_28___str__++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *)o);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_16___str__[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_16___str__++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_28___str__(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_16___str__(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *)o;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ *p = (struct __pyx_obj_4cdec_2sa_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_28___str__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_28___str__ *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_16___str__(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ *p = (struct __pyx_obj_4cdec_2sa_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_FeatureVector *)Py_None); Py_INCREF(Py_None);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_28___str__[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_16___str__[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_28___str__ = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_28___str__"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_28___str__), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_16___str__"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_16___str__), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_28___str__, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_16___str__, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -71945,13 +72221,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_28___str__ = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_28___str__, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_28___str__, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_16___str__, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_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_28___str__, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_16___str__, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -71961,7 +72237,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_28___str__ = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_28___str__, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_16___str__, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -71975,65 +72251,102 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_28___str__ = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *__pyx_freelist_3_sa___pyx_scope_struct_1_read_bitext[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_1_read_bitext = 0;
-
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_1_read_bitext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_TrieTable(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_1_read_bitext > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_1_read_bitext[--__pyx_freecount_3_sa___pyx_scope_struct_1_read_bitext];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext));
- PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)o);
+ p->root = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_9TrieTable_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *)o);
- p->__pyx_v_fp = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_1_read_bitext(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *p = (struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_TrieTable(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *p = (struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_fp);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_1_read_bitext < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext))) {
- __pyx_freelist_3_sa___pyx_scope_struct_1_read_bitext[__pyx_freecount_3_sa___pyx_scope_struct_1_read_bitext++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->root);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_1_read_bitext(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_TrieTable(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *p = (struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *)o;
- if (p->__pyx_v_fp) {
- e = (*v)(p->__pyx_v_fp, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *p = (struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)o;
+ if (p->root) {
+ e = (*v)(p->root, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_1_read_bitext(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *p = (struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_TrieTable(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *p = (struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_fp);
- p->__pyx_v_fp = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->root);
+ p->root = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_1_read_bitext[] = {
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_9TrieTable_extended(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_9TrieTable_8extended_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_9TrieTable_extended(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_9TrieTable_8extended_3__set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_9TrieTable_count(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_9TrieTable_5count_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_9TrieTable_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_9TrieTable_5count_3__set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_9TrieTable_root(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_9TrieTable_4root_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_9TrieTable_root(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_9TrieTable_4root_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_9TrieTable_4root_5__del__(o);
+ }
+}
+
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_TrieTable[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_1_read_bitext = {
+static struct PyGetSetDef __pyx_getsets_4cdec_2sa_3_sa_TrieTable[] = {
+ {(char *)"extended", __pyx_getprop_4cdec_2sa_3_sa_9TrieTable_extended, __pyx_setprop_4cdec_2sa_3_sa_9TrieTable_extended, 0, 0},
+ {(char *)"count", __pyx_getprop_4cdec_2sa_3_sa_9TrieTable_count, __pyx_setprop_4cdec_2sa_3_sa_9TrieTable_count, 0, 0},
+ {(char *)"root", __pyx_getprop_4cdec_2sa_3_sa_9TrieTable_root, __pyx_setprop_4cdec_2sa_3_sa_9TrieTable_root, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_TrieTable = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_1_read_bitext"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_1_read_bitext), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.TrieTable"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_TrieTable), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_1_read_bitext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_TrieTable, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -72052,17 +72365,17 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_1_read_bitext = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_1_read_bitext, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_1_read_bitext, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_TrieTable, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_TrieTable, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_1_read_bitext, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_TrieTable, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4cdec_2sa_3_sa_TrieTable, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -72070,7 +72383,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_1_read_bitext = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_1_read_bitext, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_TrieTable, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -72084,65 +72397,65 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_1_read_bitext = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *__pyx_freelist_3_sa___pyx_scope_struct_13_decode_words[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_13_decode_words = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words = 0;
-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;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_13_decode_words > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_13_decode_words[--__pyx_freecount_3_sa___pyx_scope_struct_13_decode_words];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *)o);
- p->__pyx_v_syms = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_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_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;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_syms);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_13_decode_words < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words))) {
- __pyx_freelist_3_sa___pyx_scope_struct_13_decode_words[__pyx_freecount_3_sa___pyx_scope_struct_13_decode_words++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_13_decode_words *)o);
+ Py_CLEAR(p->__pyx_v_words);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words *)o);
} else {
(*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) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_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;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words *p = (struct __pyx_obj_4cdec_2sa_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_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;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_syms);
- p->__pyx_v_syms = Py_None; Py_INCREF(Py_None);
+ 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_13_decode_words[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_13_decode_words = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_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*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_11_encode_words"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_13_decode_words, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -72163,13 +72476,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_13_decode_words = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_13_decode_words, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_13_decode_words, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_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_13_decode_words, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -72179,7 +72492,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_13_decode_words = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_13_decode_words, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -72193,63 +72506,81 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_13_decode_words = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa_FeatureVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa_FeatureVector *p;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_FeatureVector *)o);
- p->names = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->values = ((struct __pyx_obj_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_13FeatureVector_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr));
+ PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *)o);
+ p->__pyx_outer_scope = 0;
+ p->__pyx_v_packed = 0;
+ p->__pyx_t_0 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa_FeatureVector(PyObject *o) {
- struct __pyx_obj_3_sa_FeatureVector *p = (struct __pyx_obj_3_sa_FeatureVector *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->names);
- Py_CLEAR(p->values);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_packed);
+ Py_CLEAR(p->__pyx_t_0);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_3_sa_FeatureVector(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_FeatureVector *p = (struct __pyx_obj_3_sa_FeatureVector *)o;
- if (p->names) {
- e = (*v)(((PyObject*)p->names), a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
}
- if (p->values) {
- e = (*v)(((PyObject*)p->values), a); if (e) return e;
+ if (p->__pyx_v_packed) {
+ e = (*v)(p->__pyx_v_packed, 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_FeatureVector(PyObject *o) {
- struct __pyx_obj_3_sa_FeatureVector *p = (struct __pyx_obj_3_sa_FeatureVector *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->names);
- p->names = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->values);
- p->values = ((struct __pyx_obj_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_packed);
+ p->__pyx_v_packed = 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_FeatureVector[] = {
- {__Pyx_NAMESTR("set"), (PyCFunction)__pyx_pw_3_sa_13FeatureVector_3set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_FeatureVector = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.FeatureVector"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_FeatureVector), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_25_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_FeatureVector, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -72264,19 +72595,19 @@ static PyTypeObject __pyx_type_3_sa_FeatureVector = {
0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
- __pyx_pw_3_sa_13FeatureVector_8__str__, /*tp_str*/
+ 0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_FeatureVector, /*tp_traverse*/
- __pyx_tp_clear_3_sa_FeatureVector, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_3_sa_13FeatureVector_5__iter__, /*tp_iter*/
+ 0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_FeatureVector, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -72286,7 +72617,7 @@ static PyTypeObject __pyx_type_3_sa_FeatureVector = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_FeatureVector, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -72300,65 +72631,81 @@ static PyTypeObject __pyx_type_3_sa_FeatureVector = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *__pyx_freelist_3_sa___pyx_scope_struct_7_decode_lattice[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_7_decode_lattice = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr = 0;
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_7_decode_lattice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_7_decode_lattice > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_7_decode_lattice[--__pyx_freecount_3_sa___pyx_scope_struct_7_decode_lattice];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *)o);
- p->__pyx_v_lattice = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_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_7_decode_lattice(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *p = (struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_lattice);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_7_decode_lattice < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice))) {
- __pyx_freelist_3_sa___pyx_scope_struct_7_decode_lattice[__pyx_freecount_3_sa___pyx_scope_struct_7_decode_lattice++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *)o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_word);
+ Py_CLEAR(p->__pyx_t_0);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_7_decode_lattice(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *p = (struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *)o;
- if (p->__pyx_v_lattice) {
- e = (*v)(p->__pyx_v_lattice, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_4cdec_2sa_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_7_decode_lattice(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *p = (struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_lattice);
- p->__pyx_v_lattice = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_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_7_decode_lattice[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_7_decode_lattice = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_7_decode_lattice"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_12_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_7_decode_lattice, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -72379,13 +72726,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_7_decode_lattice = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_7_decode_lattice, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_7_decode_lattice, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_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_7_decode_lattice, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -72395,7 +72742,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_7_decode_lattice = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_7_decode_lattice, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -72409,513 +72756,81 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_7_decode_lattice = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_19_input *__pyx_freelist_3_sa___pyx_scope_struct_19_input[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_19_input = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr = 0;
-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;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_19_input > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_19_input)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_19_input[--__pyx_freecount_3_sa___pyx_scope_struct_19_input];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_19_input));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_19_input *)o);
- p->__pyx_v_alignment = 0;
- p->__pyx_v_als = 0;
- p->__pyx_v_alslist = 0;
- p->__pyx_v_chunklen = 0;
- p->__pyx_v_count = 0;
- p->__pyx_v_e = 0;
- p->__pyx_v_elist = 0;
- p->__pyx_v_extract = 0;
- p->__pyx_v_extract_start = 0;
- p->__pyx_v_extract_stop = 0;
- p->__pyx_v_extracts = 0;
- p->__pyx_v_f = 0;
- p->__pyx_v_f_syms = 0;
- p->__pyx_v_fcount = 0;
- p->__pyx_v_fphrases = 0;
- p->__pyx_v_frontier = 0;
- p->__pyx_v_frontier_nodes = 0;
- p->__pyx_v_fwords = 0;
- p->__pyx_v_genexpr = 0;
- p->__pyx_v_hiero_phrase = 0;
- p->__pyx_v_input_match = 0;
- p->__pyx_v_intersect_start_time = 0;
- p->__pyx_v_intersect_stop_time = 0;
- p->__pyx_v_is_shadow_path = 0;
- p->__pyx_v_key = 0;
- p->__pyx_v_lex_i = 0;
- p->__pyx_v_lex_j = 0;
- p->__pyx_v_loc = 0;
- p->__pyx_v_locs = 0;
- p->__pyx_v_max_locs = 0;
- p->__pyx_v_meta = 0;
- p->__pyx_v_new_frontier = 0;
- p->__pyx_v_new_node = 0;
- p->__pyx_v_next_states = 0;
- p->__pyx_v_node = 0;
- p->__pyx_v_nodes_isteps_away_buffer = 0;
- p->__pyx_v_pathlen = 0;
- p->__pyx_v_phrase = 0;
- p->__pyx_v_phrase_location = 0;
- p->__pyx_v_prefix = 0;
- p->__pyx_v_reachable_buffer = 0;
- p->__pyx_v_sa_range = 0;
- p->__pyx_v_sample = 0;
- p->__pyx_v_scores = 0;
- p->__pyx_v_seen_phrases = 0;
- p->__pyx_v_self = 0;
- p->__pyx_v_spanlen = 0;
- p->__pyx_v_stop_time = 0;
- p->__pyx_v_suffix_link = 0;
- p->__pyx_v_suffix_link_xcat_index = 0;
- p->__pyx_v_word_id = 0;
- p->__pyx_v_xcat_index = 0;
- p->__pyx_v_xnode = 0;
- p->__pyx_v_xroot = 0;
- p->__pyx_t_3 = 0;
- p->__pyx_t_4 = 0;
- p->__pyx_t_5 = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_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_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;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_alignment);
- Py_CLEAR(p->__pyx_v_als);
- Py_CLEAR(p->__pyx_v_alslist);
- Py_CLEAR(p->__pyx_v_chunklen);
- Py_CLEAR(p->__pyx_v_count);
- Py_CLEAR(p->__pyx_v_e);
- Py_CLEAR(p->__pyx_v_elist);
- Py_CLEAR(p->__pyx_v_extract);
- Py_CLEAR(p->__pyx_v_extract_start);
- Py_CLEAR(p->__pyx_v_extract_stop);
- Py_CLEAR(p->__pyx_v_extracts);
- Py_CLEAR(p->__pyx_v_f);
- Py_CLEAR(p->__pyx_v_f_syms);
- Py_CLEAR(p->__pyx_v_fcount);
- Py_CLEAR(p->__pyx_v_fphrases);
- Py_CLEAR(p->__pyx_v_frontier);
- Py_CLEAR(p->__pyx_v_frontier_nodes);
- Py_CLEAR(p->__pyx_v_fwords);
- Py_CLEAR(p->__pyx_v_genexpr);
- Py_CLEAR(p->__pyx_v_hiero_phrase);
- Py_CLEAR(p->__pyx_v_input_match);
- Py_CLEAR(p->__pyx_v_intersect_start_time);
- Py_CLEAR(p->__pyx_v_intersect_stop_time);
- Py_CLEAR(p->__pyx_v_is_shadow_path);
- Py_CLEAR(p->__pyx_v_key);
- Py_CLEAR(p->__pyx_v_lex_i);
- Py_CLEAR(p->__pyx_v_lex_j);
- Py_CLEAR(p->__pyx_v_loc);
- Py_CLEAR(p->__pyx_v_locs);
- Py_CLEAR(p->__pyx_v_max_locs);
- Py_CLEAR(p->__pyx_v_meta);
- Py_CLEAR(p->__pyx_v_new_frontier);
- Py_CLEAR(p->__pyx_v_new_node);
- Py_CLEAR(p->__pyx_v_next_states);
- Py_CLEAR(p->__pyx_v_node);
- Py_CLEAR(p->__pyx_v_nodes_isteps_away_buffer);
- Py_CLEAR(p->__pyx_v_pathlen);
- Py_CLEAR(p->__pyx_v_phrase);
- Py_CLEAR(p->__pyx_v_phrase_location);
- Py_CLEAR(p->__pyx_v_prefix);
- Py_CLEAR(p->__pyx_v_reachable_buffer);
- Py_CLEAR(p->__pyx_v_sa_range);
- Py_CLEAR(p->__pyx_v_sample);
- Py_CLEAR(p->__pyx_v_scores);
- Py_CLEAR(p->__pyx_v_seen_phrases);
- Py_CLEAR(p->__pyx_v_self);
- Py_CLEAR(p->__pyx_v_spanlen);
- Py_CLEAR(p->__pyx_v_stop_time);
- Py_CLEAR(p->__pyx_v_suffix_link);
- Py_CLEAR(p->__pyx_v_suffix_link_xcat_index);
- Py_CLEAR(p->__pyx_v_word_id);
- Py_CLEAR(p->__pyx_v_xcat_index);
- Py_CLEAR(p->__pyx_v_xnode);
- Py_CLEAR(p->__pyx_v_xroot);
- Py_CLEAR(p->__pyx_t_3);
- Py_CLEAR(p->__pyx_t_4);
- Py_CLEAR(p->__pyx_t_5);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_19_input < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_19_input))) {
- __pyx_freelist_3_sa___pyx_scope_struct_19_input[__pyx_freecount_3_sa___pyx_scope_struct_19_input++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_19_input *)o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_word);
+ Py_CLEAR(p->__pyx_t_0);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_19_input(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- 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;
- }
- if (p->__pyx_v_als) {
- e = (*v)(p->__pyx_v_als, a); if (e) return e;
- }
- if (p->__pyx_v_alslist) {
- e = (*v)(p->__pyx_v_alslist, a); if (e) return e;
- }
- if (p->__pyx_v_chunklen) {
- e = (*v)(((PyObject*)p->__pyx_v_chunklen), a); if (e) return e;
- }
- if (p->__pyx_v_count) {
- e = (*v)(p->__pyx_v_count, a); if (e) return e;
- }
- if (p->__pyx_v_e) {
- e = (*v)(p->__pyx_v_e, a); if (e) return e;
- }
- if (p->__pyx_v_elist) {
- e = (*v)(p->__pyx_v_elist, a); if (e) return e;
- }
- if (p->__pyx_v_extract) {
- e = (*v)(p->__pyx_v_extract, a); if (e) return e;
- }
- if (p->__pyx_v_extract_start) {
- e = (*v)(p->__pyx_v_extract_start, a); if (e) return e;
- }
- if (p->__pyx_v_extract_stop) {
- e = (*v)(p->__pyx_v_extract_stop, a); if (e) return e;
- }
- if (p->__pyx_v_extracts) {
- e = (*v)(p->__pyx_v_extracts, a); if (e) return e;
- }
- if (p->__pyx_v_f) {
- e = (*v)(p->__pyx_v_f, a); if (e) return e;
- }
- if (p->__pyx_v_f_syms) {
- e = (*v)(p->__pyx_v_f_syms, a); if (e) return e;
- }
- if (p->__pyx_v_fcount) {
- e = (*v)(p->__pyx_v_fcount, a); if (e) return e;
- }
- if (p->__pyx_v_fphrases) {
- e = (*v)(p->__pyx_v_fphrases, a); if (e) return e;
- }
- if (p->__pyx_v_frontier) {
- e = (*v)(p->__pyx_v_frontier, a); if (e) return e;
- }
- if (p->__pyx_v_frontier_nodes) {
- e = (*v)(p->__pyx_v_frontier_nodes, a); if (e) return e;
- }
- if (p->__pyx_v_fwords) {
- e = (*v)(p->__pyx_v_fwords, a); if (e) return e;
- }
- if (p->__pyx_v_genexpr) {
- e = (*v)(p->__pyx_v_genexpr, a); if (e) return e;
- }
- if (p->__pyx_v_hiero_phrase) {
- e = (*v)(((PyObject*)p->__pyx_v_hiero_phrase), a); if (e) return e;
- }
- if (p->__pyx_v_input_match) {
- e = (*v)(p->__pyx_v_input_match, a); if (e) return e;
- }
- if (p->__pyx_v_intersect_start_time) {
- e = (*v)(p->__pyx_v_intersect_start_time, a); if (e) return e;
- }
- if (p->__pyx_v_intersect_stop_time) {
- e = (*v)(p->__pyx_v_intersect_stop_time, a); if (e) return e;
- }
- if (p->__pyx_v_is_shadow_path) {
- e = (*v)(p->__pyx_v_is_shadow_path, a); if (e) return e;
- }
- if (p->__pyx_v_key) {
- e = (*v)(p->__pyx_v_key, a); if (e) return e;
- }
- if (p->__pyx_v_lex_i) {
- e = (*v)(p->__pyx_v_lex_i, a); if (e) return e;
- }
- if (p->__pyx_v_lex_j) {
- e = (*v)(p->__pyx_v_lex_j, a); if (e) return e;
- }
- if (p->__pyx_v_loc) {
- e = (*v)(p->__pyx_v_loc, a); if (e) return e;
- }
- if (p->__pyx_v_locs) {
- e = (*v)(p->__pyx_v_locs, a); if (e) return e;
- }
- if (p->__pyx_v_max_locs) {
- e = (*v)(p->__pyx_v_max_locs, a); if (e) return e;
- }
- if (p->__pyx_v_meta) {
- e = (*v)(p->__pyx_v_meta, a); if (e) return e;
- }
- if (p->__pyx_v_new_frontier) {
- e = (*v)(p->__pyx_v_new_frontier, a); if (e) return e;
- }
- if (p->__pyx_v_new_node) {
- e = (*v)(p->__pyx_v_new_node, a); if (e) return e;
- }
- if (p->__pyx_v_next_states) {
- e = (*v)(p->__pyx_v_next_states, a); if (e) return e;
- }
- if (p->__pyx_v_node) {
- e = (*v)(p->__pyx_v_node, a); if (e) return e;
- }
- if (p->__pyx_v_nodes_isteps_away_buffer) {
- e = (*v)(p->__pyx_v_nodes_isteps_away_buffer, a); if (e) return e;
- }
- if (p->__pyx_v_pathlen) {
- e = (*v)(p->__pyx_v_pathlen, a); if (e) return e;
- }
- if (p->__pyx_v_phrase) {
- e = (*v)(p->__pyx_v_phrase, a); if (e) return e;
- }
- if (p->__pyx_v_phrase_location) {
- e = (*v)(((PyObject*)p->__pyx_v_phrase_location), a); if (e) return e;
- }
- if (p->__pyx_v_prefix) {
- e = (*v)(p->__pyx_v_prefix, a); if (e) return e;
- }
- if (p->__pyx_v_reachable_buffer) {
- e = (*v)(p->__pyx_v_reachable_buffer, a); if (e) return e;
- }
- if (p->__pyx_v_sa_range) {
- e = (*v)(p->__pyx_v_sa_range, a); if (e) return e;
- }
- if (p->__pyx_v_sample) {
- e = (*v)(((PyObject*)p->__pyx_v_sample), a); if (e) return e;
- }
- if (p->__pyx_v_scores) {
- e = (*v)(((PyObject*)p->__pyx_v_scores), a); if (e) return e;
- }
- if (p->__pyx_v_seen_phrases) {
- e = (*v)(p->__pyx_v_seen_phrases, a); if (e) return e;
- }
- if (p->__pyx_v_self) {
- e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
- }
- if (p->__pyx_v_spanlen) {
- e = (*v)(p->__pyx_v_spanlen, a); if (e) return e;
- }
- if (p->__pyx_v_stop_time) {
- e = (*v)(p->__pyx_v_stop_time, a); if (e) return e;
- }
- if (p->__pyx_v_suffix_link) {
- e = (*v)(p->__pyx_v_suffix_link, a); if (e) return e;
- }
- if (p->__pyx_v_suffix_link_xcat_index) {
- e = (*v)(p->__pyx_v_suffix_link_xcat_index, a); if (e) return e;
- }
- if (p->__pyx_v_word_id) {
- e = (*v)(p->__pyx_v_word_id, a); if (e) return e;
- }
- if (p->__pyx_v_xcat_index) {
- e = (*v)(p->__pyx_v_xcat_index, a); if (e) return e;
- }
- if (p->__pyx_v_xnode) {
- e = (*v)(p->__pyx_v_xnode, a); if (e) return e;
- }
- if (p->__pyx_v_xroot) {
- e = (*v)(p->__pyx_v_xroot, a); if (e) return e;
- }
- if (p->__pyx_t_3) {
- e = (*v)(p->__pyx_t_3, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
}
- if (p->__pyx_t_4) {
- e = (*v)(p->__pyx_t_4, 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_5) {
- e = (*v)(p->__pyx_t_5, 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_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;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_alignment);
- p->__pyx_v_alignment = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_als);
- p->__pyx_v_als = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_alslist);
- p->__pyx_v_alslist = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_chunklen);
- p->__pyx_v_chunklen = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_count);
- p->__pyx_v_count = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_e);
- p->__pyx_v_e = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_elist);
- p->__pyx_v_elist = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_extract);
- p->__pyx_v_extract = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_extract_start);
- p->__pyx_v_extract_start = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_extract_stop);
- p->__pyx_v_extract_stop = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_extracts);
- p->__pyx_v_extracts = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_f);
- p->__pyx_v_f = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_f_syms);
- p->__pyx_v_f_syms = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_fcount);
- p->__pyx_v_fcount = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_fphrases);
- p->__pyx_v_fphrases = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_frontier);
- p->__pyx_v_frontier = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_frontier_nodes);
- p->__pyx_v_frontier_nodes = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_fwords);
- p->__pyx_v_fwords = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_genexpr);
- p->__pyx_v_genexpr = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_hiero_phrase);
- p->__pyx_v_hiero_phrase = ((struct __pyx_obj_3_sa_Phrase *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_input_match);
- p->__pyx_v_input_match = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_intersect_start_time);
- p->__pyx_v_intersect_start_time = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_intersect_stop_time);
- p->__pyx_v_intersect_stop_time = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_is_shadow_path);
- p->__pyx_v_is_shadow_path = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_key);
- p->__pyx_v_key = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_lex_i);
- p->__pyx_v_lex_i = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_lex_j);
- p->__pyx_v_lex_j = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_loc);
- p->__pyx_v_loc = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_locs);
- p->__pyx_v_locs = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_max_locs);
- p->__pyx_v_max_locs = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_meta);
- p->__pyx_v_meta = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_new_frontier);
- p->__pyx_v_new_frontier = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_new_node);
- p->__pyx_v_new_node = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_next_states);
- p->__pyx_v_next_states = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_node);
- p->__pyx_v_node = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_nodes_isteps_away_buffer);
- p->__pyx_v_nodes_isteps_away_buffer = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_pathlen);
- p->__pyx_v_pathlen = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_phrase);
- p->__pyx_v_phrase = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_phrase_location);
- p->__pyx_v_phrase_location = ((struct __pyx_obj_3_sa_PhraseLocation *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_prefix);
- p->__pyx_v_prefix = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_reachable_buffer);
- p->__pyx_v_reachable_buffer = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_sa_range);
- p->__pyx_v_sa_range = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_sample);
- p->__pyx_v_sample = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_scores);
- p->__pyx_v_scores = ((struct __pyx_obj_3_sa_FeatureVector *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_seen_phrases);
- p->__pyx_v_seen_phrases = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_self);
- p->__pyx_v_self = ((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_spanlen);
- p->__pyx_v_spanlen = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_stop_time);
- p->__pyx_v_stop_time = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_suffix_link);
- p->__pyx_v_suffix_link = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_suffix_link_xcat_index);
- p->__pyx_v_suffix_link_xcat_index = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_word_id);
- p->__pyx_v_word_id = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_xcat_index);
- p->__pyx_v_xcat_index = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_xnode);
- p->__pyx_v_xnode = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_xroot);
- p->__pyx_v_xroot = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_3);
- p->__pyx_t_3 = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_4);
- p->__pyx_t_4 = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_word);
+ p->__pyx_v_word = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_5);
- p->__pyx_t_5 = Py_None; Py_INCREF(Py_None);
+ 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_19_input[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_19_input = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_19_input"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_19_input), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_6_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_19_input, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -72936,13 +72851,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_19_input = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_19_input, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_19_input, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_19_input, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -72952,7 +72867,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_19_input = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_19_input, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -72965,54 +72880,74 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_19_input = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_Scorer __pyx_vtable_3_sa_Scorer;
-static PyObject *__pyx_tp_new_3_sa_Scorer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa_Scorer *p;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_Scorer *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_Scorer;
- p->models = Py_None; Py_INCREF(Py_None);
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule));
+ PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *)o);
+ p->__pyx_v_links = 0;
+ p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa_Scorer(PyObject *o) {
- struct __pyx_obj_3_sa_Scorer *p = (struct __pyx_obj_3_sa_Scorer *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->models);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->__pyx_v_links);
+ Py_CLEAR(p->__pyx_v_self);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_3_sa_Scorer(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_Scorer *p = (struct __pyx_obj_3_sa_Scorer *)o;
- if (p->models) {
- e = (*v)(p->models, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *)o;
+ if (p->__pyx_v_links) {
+ e = (*v)(p->__pyx_v_links, a); if (e) return e;
+ }
+ 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_Scorer(PyObject *o) {
- struct __pyx_obj_3_sa_Scorer *p = (struct __pyx_obj_3_sa_Scorer *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->models);
- p->models = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_links);
+ p->__pyx_v_links = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_self);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa_Scorer[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_Scorer = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.Scorer"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_Scorer), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_22_form_rule"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_Scorer, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -73031,15 +72966,15 @@ static PyTypeObject __pyx_type_3_sa_Scorer = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_Scorer, /*tp_traverse*/
- __pyx_tp_clear_3_sa_Scorer, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_Scorer, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -73047,9 +72982,9 @@ static PyTypeObject __pyx_type_3_sa_Scorer = {
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_3_sa_6Scorer_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_Scorer, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -73062,73 +72997,90 @@ static PyTypeObject __pyx_type_3_sa_Scorer = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_Alignment __pyx_vtable_3_sa_Alignment;
-static PyObject *__pyx_tp_new_3_sa_Alignment(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_Alignment *p;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_Alignment *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_Alignment;
- p->links = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- p->sent_index = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_9Alignment_5__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr));
+ PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *)o);
+ p->__pyx_outer_scope = 0;
+ p->__pyx_v__ = 0;
+ p->__pyx_v_sym = 0;
+ p->__pyx_t_0 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa_Alignment(PyObject *o) {
- struct __pyx_obj_3_sa_Alignment *p = (struct __pyx_obj_3_sa_Alignment *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->links);
- Py_CLEAR(p->sent_index);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v__);
+ Py_CLEAR(p->__pyx_v_sym);
+ Py_CLEAR(p->__pyx_t_0);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_3_sa_Alignment(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_Alignment *p = (struct __pyx_obj_3_sa_Alignment *)o;
- if (p->links) {
- e = (*v)(((PyObject*)p->links), a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
}
- if (p->sent_index) {
- e = (*v)(((PyObject*)p->sent_index), a); if (e) return e;
+ if (p->__pyx_v__) {
+ e = (*v)(p->__pyx_v__, 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_Alignment(PyObject *o) {
- struct __pyx_obj_3_sa_Alignment *p = (struct __pyx_obj_3_sa_Alignment *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->links);
- p->links = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->sent_index);
- p->sent_index = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v__);
+ p->__pyx_v__ = 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_Alignment[] = {
- {__Pyx_NAMESTR("unlink"), (PyCFunction)__pyx_pw_3_sa_9Alignment_1unlink, METH_O, __Pyx_DOCSTR(__pyx_doc_3_sa_9Alignment_unlink)},
- {__Pyx_NAMESTR("get_sent_links"), (PyCFunction)__pyx_pw_3_sa_9Alignment_3get_sent_links, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read_text"), (PyCFunction)__pyx_pw_3_sa_9Alignment_7read_text, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read_binary"), (PyCFunction)__pyx_pw_3_sa_9Alignment_9read_binary, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_text"), (PyCFunction)__pyx_pw_3_sa_9Alignment_11write_text, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_binary"), (PyCFunction)__pyx_pw_3_sa_9Alignment_13write_binary, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write_enhanced"), (PyCFunction)__pyx_pw_3_sa_9Alignment_15write_enhanced, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("alignment"), (PyCFunction)__pyx_pw_3_sa_9Alignment_17alignment, METH_O, __Pyx_DOCSTR(__pyx_doc_3_sa_9Alignment_16alignment)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_Alignment = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.Alignment"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_Alignment), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_10_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_Alignment, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -73147,15 +73099,15 @@ static PyTypeObject __pyx_type_3_sa_Alignment = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_Alignment, /*tp_traverse*/
- __pyx_tp_clear_3_sa_Alignment, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_Alignment, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -73165,7 +73117,7 @@ static PyTypeObject __pyx_type_3_sa_Alignment = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_Alignment, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -73178,23 +73130,27 @@ static PyTypeObject __pyx_type_3_sa_Alignment = {
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB __pyx_vtable_4cdec_2sa_3_sa_VEB;
-static PyObject *__pyx_tp_new_3_sa_BitSet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_VEB(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_VEB *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- if (unlikely(__pyx_pw_3_sa_6BitSet_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_VEB;
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_3VEB_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_BitSet(PyObject *o) {
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_VEB(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
++Py_REFCNT(o);
- __pyx_pw_3_sa_6BitSet_3__dealloc__(o);
+ __pyx_pw_4cdec_2sa_3_sa_3VEB_3__dealloc__(o);
if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
--Py_REFCNT(o);
PyErr_Restore(etype, eval, etb);
@@ -73202,39 +73158,37 @@ static void __pyx_tp_dealloc_3_sa_BitSet(PyObject *o) {
(*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_3_sa_BitSet[] = {
- {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_3_sa_6BitSet_7insert, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("findsucc"), (PyCFunction)__pyx_pw_3_sa_6BitSet_9findsucc, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("min"), (PyCFunction)__pyx_pw_3_sa_6BitSet_13min, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("max"), (PyCFunction)__pyx_pw_3_sa_6BitSet_15max, METH_NOARGS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_VEB[] = {
+ {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_3VEB_7insert, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("findsucc"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_3VEB_9findsucc, METH_O, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PySequenceMethods __pyx_tp_as_sequence_BitSet = {
- __pyx_pw_3_sa_6BitSet_17__len__, /*sq_length*/
+static PySequenceMethods __pyx_tp_as_sequence_VEB = {
+ __pyx_pw_4cdec_2sa_3_sa_3VEB_11__len__, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
0, /*sq_item*/
0, /*sq_slice*/
0, /*sq_ass_item*/
0, /*sq_ass_slice*/
- __pyx_pw_3_sa_6BitSet_19__contains__, /*sq_contains*/
+ __pyx_pw_4cdec_2sa_3_sa_3VEB_13__contains__, /*sq_contains*/
0, /*sq_inplace_concat*/
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping_BitSet = {
- __pyx_pw_3_sa_6BitSet_17__len__, /*mp_length*/
+static PyMappingMethods __pyx_tp_as_mapping_VEB = {
+ __pyx_pw_4cdec_2sa_3_sa_3VEB_11__len__, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};
-static PyTypeObject __pyx_type_3_sa_BitSet = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_VEB = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.BitSet"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_BitSet), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.VEB"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_VEB), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_BitSet, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_VEB, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -73245,11 +73199,11 @@ static PyTypeObject __pyx_type_3_sa_BitSet = {
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
- &__pyx_tp_as_sequence_BitSet, /*tp_as_sequence*/
- &__pyx_tp_as_mapping_BitSet, /*tp_as_mapping*/
+ &__pyx_tp_as_sequence_VEB, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_VEB, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
- __pyx_pw_3_sa_6BitSet_11__str__, /*tp_str*/
+ 0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
@@ -73259,9 +73213,9 @@ static PyTypeObject __pyx_type_3_sa_BitSet = {
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_3_sa_6BitSet_5__iter__, /*tp_iter*/
+ __pyx_pw_4cdec_2sa_3_sa_3VEB_5__iter__, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_BitSet, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_VEB, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -73271,7 +73225,7 @@ static PyTypeObject __pyx_type_3_sa_BitSet = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_BitSet, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_VEB, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -73285,55 +73239,65 @@ static PyTypeObject __pyx_type_3_sa_BitSet = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa_Sampler(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_Sampler *p;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_Sampler *)o);
- p->sa = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_7Sampler_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice));
+ PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *)o);
+ p->__pyx_v_lattice = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa_Sampler(PyObject *o) {
- struct __pyx_obj_3_sa_Sampler *p = (struct __pyx_obj_3_sa_Sampler *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->sa);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->__pyx_v_lattice);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_3_sa_Sampler(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_Sampler *p = (struct __pyx_obj_3_sa_Sampler *)o;
- if (p->sa) {
- e = (*v)(((PyObject*)p->sa), a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *)o;
+ if (p->__pyx_v_lattice) {
+ e = (*v)(p->__pyx_v_lattice, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa_Sampler(PyObject *o) {
- struct __pyx_obj_3_sa_Sampler *p = (struct __pyx_obj_3_sa_Sampler *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->sa);
- p->sa = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_lattice);
+ p->__pyx_v_lattice = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa_Sampler[] = {
- {__Pyx_NAMESTR("sample"), (PyCFunction)__pyx_pw_3_sa_7Sampler_3sample, METH_O, __Pyx_DOCSTR(__pyx_doc_3_sa_7Sampler_2sample)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_Sampler = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.Sampler"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_Sampler), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_7_decode_lattice"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_Sampler, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -73352,15 +73316,15 @@ static PyTypeObject __pyx_type_3_sa_Sampler = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("A Sampler implements a logic for choosing\n samples from a population range"), /*tp_doc*/
- __pyx_tp_traverse_3_sa_Sampler, /*tp_traverse*/
- __pyx_tp_clear_3_sa_Sampler, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_Sampler, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -73370,7 +73334,7 @@ static PyTypeObject __pyx_type_3_sa_Sampler = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_Sampler, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -73383,44 +73347,57 @@ static PyTypeObject __pyx_type_3_sa_Sampler = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_StringMap __pyx_vtable_3_sa_StringMap;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_PhraseLocation __pyx_vtable_4cdec_2sa_3_sa_PhraseLocation;
-static PyObject *__pyx_tp_new_3_sa_StringMap(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa_StringMap *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_PhraseLocation(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_StringMap *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_StringMap;
- if (unlikely(__pyx_pw_3_sa_9StringMap_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_PhraseLocation;
+ p->arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_14PhraseLocation_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_StringMap(PyObject *o) {
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_3_sa_9StringMap_3__dealloc__(o);
- if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_PhraseLocation(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *p = (struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->arr);
(*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_3_sa_StringMap[] = {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_PhraseLocation(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *p = (struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)o;
+ if (p->arr) {
+ e = (*v)(((PyObject*)p->arr), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4cdec_2sa_3_sa_PhraseLocation(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *p = (struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->arr);
+ p->arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_PhraseLocation[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_StringMap = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_PhraseLocation = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.StringMap"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_StringMap), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.PhraseLocation"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_StringMap, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_PhraseLocation, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -73439,15 +73416,15 @@ static PyTypeObject __pyx_type_3_sa_StringMap = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_PhraseLocation, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_PhraseLocation, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_StringMap, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_PhraseLocation, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -73457,7 +73434,7 @@ static PyTypeObject __pyx_type_3_sa_StringMap = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_StringMap, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_PhraseLocation, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -73470,98 +73447,54 @@ static PyTypeObject __pyx_type_3_sa_StringMap = {
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Scorer __pyx_vtable_4cdec_2sa_3_sa_Scorer;
-static struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *__pyx_freelist_3_sa___pyx_scope_struct_26_get_f_phrases[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_26_get_f_phrases = 0;
-
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_26_get_f_phrases(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Scorer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Scorer *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_26_get_f_phrases > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_26_get_f_phrases[--__pyx_freecount_3_sa___pyx_scope_struct_26_get_f_phrases];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases));
- PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *)o);
- p->__pyx_v_extract = 0;
- p->__pyx_v_f_len = 0;
- p->__pyx_v_f_words = 0;
- p->__pyx_v_phrases = 0;
- p->__pyx_v_self = 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_Scorer *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_Scorer;
+ p->models = Py_None; Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_26_get_f_phrases(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *p = (struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_Scorer(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Scorer *p = (struct __pyx_obj_4cdec_2sa_3_sa_Scorer *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_extract);
- Py_CLEAR(p->__pyx_v_f_len);
- Py_CLEAR(p->__pyx_v_f_words);
- Py_CLEAR(p->__pyx_v_phrases);
- Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_26_get_f_phrases < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases))) {
- __pyx_freelist_3_sa___pyx_scope_struct_26_get_f_phrases[__pyx_freecount_3_sa___pyx_scope_struct_26_get_f_phrases++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->models);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_26_get_f_phrases(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_Scorer(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *p = (struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *)o;
- if (p->__pyx_v_extract) {
- e = (*v)(p->__pyx_v_extract, a); if (e) return e;
- }
- if (p->__pyx_v_f_len) {
- e = (*v)(p->__pyx_v_f_len, a); if (e) return e;
- }
- if (p->__pyx_v_f_words) {
- e = (*v)(p->__pyx_v_f_words, a); if (e) return e;
- }
- if (p->__pyx_v_phrases) {
- e = (*v)(p->__pyx_v_phrases, a); if (e) return e;
- }
- if (p->__pyx_v_self) {
- e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_Scorer *p = (struct __pyx_obj_4cdec_2sa_3_sa_Scorer *)o;
+ if (p->models) {
+ e = (*v)(p->models, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_26_get_f_phrases(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *p = (struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_Scorer(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Scorer *p = (struct __pyx_obj_4cdec_2sa_3_sa_Scorer *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_extract);
- p->__pyx_v_extract = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_f_len);
- p->__pyx_v_f_len = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_f_words);
- p->__pyx_v_f_words = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_phrases);
- p->__pyx_v_phrases = ((PyObject*)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_self);
- p->__pyx_v_self = ((struct __pyx_obj_3_sa_HieroCachingRuleFactory *)Py_None); Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->models);
+ p->models = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_26_get_f_phrases[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_Scorer[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_26_get_f_phrases = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_Scorer = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_26_get_f_phrases"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_26_get_f_phrases), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.Scorer"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Scorer), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_26_get_f_phrases, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_Scorer, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -73580,15 +73513,15 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_26_get_f_phrases = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_26_get_f_phrases, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_26_get_f_phrases, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_Scorer, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_Scorer, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_26_get_f_phrases, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_Scorer, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -73596,9 +73529,9 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_26_get_f_phrases = {
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4cdec_2sa_3_sa_6Scorer_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_26_get_f_phrases, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_Scorer, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -73612,72 +73545,55 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_26_get_f_phrases = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa_TrieNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa_TrieNode *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Sampler(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Sampler *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_TrieNode *)o);
- p->children = Py_None; Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_8TrieNode_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)o);
+ p->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_7Sampler_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_TrieNode(PyObject *o) {
- struct __pyx_obj_3_sa_TrieNode *p = (struct __pyx_obj_3_sa_TrieNode *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_Sampler(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Sampler *p = (struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->children);
+ Py_CLEAR(p->sa);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa_TrieNode(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_Sampler(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_TrieNode *p = (struct __pyx_obj_3_sa_TrieNode *)o;
- if (p->children) {
- e = (*v)(p->children, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_Sampler *p = (struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)o;
+ if (p->sa) {
+ e = (*v)(((PyObject*)p->sa), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa_TrieNode(PyObject *o) {
- struct __pyx_obj_3_sa_TrieNode *p = (struct __pyx_obj_3_sa_TrieNode *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_Sampler(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Sampler *p = (struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->children);
- p->children = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->sa);
+ p->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyObject *__pyx_getprop_3_sa_8TrieNode_children(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_8TrieNode_8children_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_8TrieNode_children(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_8TrieNode_8children_3__set__(o, v);
- }
- else {
- return __pyx_pw_3_sa_8TrieNode_8children_5__del__(o);
- }
-}
-
-static PyMethodDef __pyx_methods_3_sa_TrieNode[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_Sampler[] = {
+ {__Pyx_NAMESTR("sample"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_7Sampler_3sample, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_2sa_3_sa_7Sampler_2sample)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_3_sa_TrieNode[] = {
- {(char *)"children", __pyx_getprop_3_sa_8TrieNode_children, __pyx_setprop_3_sa_8TrieNode_children, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_3_sa_TrieNode = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_Sampler = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.TrieNode"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_TrieNode), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.Sampler"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Sampler), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_TrieNode, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_Sampler, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -73697,16 +73613,16 @@ static PyTypeObject __pyx_type_3_sa_TrieNode = {
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_TrieNode, /*tp_traverse*/
- __pyx_tp_clear_3_sa_TrieNode, /*tp_clear*/
+ __Pyx_DOCSTR("A Sampler implements a logic for choosing\n samples from a population range"), /*tp_doc*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_Sampler, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_Sampler, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_TrieNode, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_Sampler, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_3_sa_TrieNode, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -73714,7 +73630,7 @@ static PyTypeObject __pyx_type_3_sa_TrieNode = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_TrieNode, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_Sampler, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -73727,119 +73643,96 @@ static PyTypeObject __pyx_type_3_sa_TrieNode = {
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet __pyx_vtable_4cdec_2sa_3_sa_Alphabet;
-static PyObject *__pyx_tp_new_3_sa_ExtendedTrieNode(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_ExtendedTrieNode *p;
- PyObject *o = __pyx_tp_new_3_sa_TrieNode(t, a, k);
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_Alphabet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *p;
+ PyObject *o;
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_ExtendedTrieNode *)o);
- p->phrase = Py_None; Py_INCREF(Py_None);
- p->phrase_location = Py_None; Py_INCREF(Py_None);
- p->suffix_link = Py_None; Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_16ExtendedTrieNode_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_Alphabet;
+ p->terminals = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)Py_None); Py_INCREF(Py_None);
+ p->nonterminals = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)Py_None); Py_INCREF(Py_None);
+ p->id2sym = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_8Alphabet_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_ExtendedTrieNode(PyObject *o) {
- struct __pyx_obj_3_sa_ExtendedTrieNode *p = (struct __pyx_obj_3_sa_ExtendedTrieNode *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_Alphabet(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *p = (struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->phrase);
- Py_CLEAR(p->phrase_location);
- Py_CLEAR(p->suffix_link);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_3_sa_TrieNode(o);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4cdec_2sa_3_sa_8Alphabet_3__dealloc__(o);
+ if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_CLEAR(p->terminals);
+ Py_CLEAR(p->nonterminals);
+ Py_CLEAR(p->id2sym);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa_ExtendedTrieNode(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_Alphabet(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_ExtendedTrieNode *p = (struct __pyx_obj_3_sa_ExtendedTrieNode *)o;
- e = __pyx_tp_traverse_3_sa_TrieNode(o, v, a); if (e) return e;
- if (p->phrase) {
- e = (*v)(p->phrase, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *p = (struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *)o;
+ if (p->terminals) {
+ e = (*v)(((PyObject*)p->terminals), a); if (e) return e;
}
- if (p->phrase_location) {
- e = (*v)(p->phrase_location, a); if (e) return e;
+ if (p->nonterminals) {
+ e = (*v)(((PyObject*)p->nonterminals), a); if (e) return e;
}
- if (p->suffix_link) {
- e = (*v)(p->suffix_link, a); if (e) return e;
+ if (p->id2sym) {
+ e = (*v)(p->id2sym, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa_ExtendedTrieNode(PyObject *o) {
- struct __pyx_obj_3_sa_ExtendedTrieNode *p = (struct __pyx_obj_3_sa_ExtendedTrieNode *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_Alphabet(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *p = (struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *)o;
PyObject* tmp;
- __pyx_tp_clear_3_sa_TrieNode(o);
- tmp = ((PyObject*)p->phrase);
- p->phrase = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->terminals);
+ p->terminals = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->phrase_location);
- p->phrase_location = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->nonterminals);
+ p->nonterminals = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->suffix_link);
- p->suffix_link = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->id2sym);
+ p->id2sym = ((PyObject*)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyObject *__pyx_getprop_3_sa_16ExtendedTrieNode_phrase(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_16ExtendedTrieNode_6phrase_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_16ExtendedTrieNode_phrase(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_16ExtendedTrieNode_6phrase_3__set__(o, v);
- }
- else {
- return __pyx_pw_3_sa_16ExtendedTrieNode_6phrase_5__del__(o);
- }
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_8Alphabet_terminals(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_8Alphabet_9terminals_1__get__(o);
}
-static PyObject *__pyx_getprop_3_sa_16ExtendedTrieNode_phrase_location(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_1__get__(o);
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_8Alphabet_nonterminals(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_8Alphabet_12nonterminals_1__get__(o);
}
-static int __pyx_setprop_3_sa_16ExtendedTrieNode_phrase_location(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_3__set__(o, v);
- }
- else {
- return __pyx_pw_3_sa_16ExtendedTrieNode_15phrase_location_5__del__(o);
- }
-}
-
-static PyObject *__pyx_getprop_3_sa_16ExtendedTrieNode_suffix_link(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_16ExtendedTrieNode_suffix_link(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_3__set__(o, v);
- }
- else {
- return __pyx_pw_3_sa_16ExtendedTrieNode_11suffix_link_5__del__(o);
- }
-}
-
-static PyMethodDef __pyx_methods_3_sa_ExtendedTrieNode[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_Alphabet[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_3_sa_ExtendedTrieNode[] = {
- {(char *)"phrase", __pyx_getprop_3_sa_16ExtendedTrieNode_phrase, __pyx_setprop_3_sa_16ExtendedTrieNode_phrase, 0, 0},
- {(char *)"phrase_location", __pyx_getprop_3_sa_16ExtendedTrieNode_phrase_location, __pyx_setprop_3_sa_16ExtendedTrieNode_phrase_location, 0, 0},
- {(char *)"suffix_link", __pyx_getprop_3_sa_16ExtendedTrieNode_suffix_link, __pyx_setprop_3_sa_16ExtendedTrieNode_suffix_link, 0, 0},
+static struct PyGetSetDef __pyx_getsets_4cdec_2sa_3_sa_Alphabet[] = {
+ {(char *)"terminals", __pyx_getprop_4cdec_2sa_3_sa_8Alphabet_terminals, 0, 0, 0},
+ {(char *)"nonterminals", __pyx_getprop_4cdec_2sa_3_sa_8Alphabet_nonterminals, 0, 0, 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_ExtendedTrieNode = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_Alphabet = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.ExtendedTrieNode"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_ExtendedTrieNode), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.Alphabet"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_ExtendedTrieNode, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_Alphabet, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -73860,15 +73753,15 @@ static PyTypeObject __pyx_type_3_sa_ExtendedTrieNode = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_ExtendedTrieNode, /*tp_traverse*/
- __pyx_tp_clear_3_sa_ExtendedTrieNode, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_Alphabet, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_Alphabet, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_ExtendedTrieNode, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_Alphabet, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_3_sa_ExtendedTrieNode, /*tp_getset*/
+ __pyx_getsets_4cdec_2sa_3_sa_Alphabet, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -73876,7 +73769,7 @@ static PyTypeObject __pyx_type_3_sa_ExtendedTrieNode = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_ExtendedTrieNode, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_Alphabet, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -73889,47 +73782,121 @@ static PyTypeObject __pyx_type_3_sa_ExtendedTrieNode = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_TrieMap __pyx_vtable_3_sa_TrieMap;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_BiLex __pyx_vtable_4cdec_2sa_3_sa_BiLex;
-static PyObject *__pyx_tp_new_3_sa_TrieMap(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_TrieMap *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_BiLex(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_BiLex *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_TrieMap *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_TrieMap;
- if (unlikely(__pyx_pw_3_sa_7TrieMap_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_BiLex;
+ p->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
+ p->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
+ p->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->id2eword = Py_None; Py_INCREF(Py_None);
+ p->id2fword = Py_None; Py_INCREF(Py_None);
+ p->eword2id = Py_None; Py_INCREF(Py_None);
+ p->fword2id = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_5BiLex_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_TrieMap(PyObject *o) {
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_3_sa_7TrieMap_3__dealloc__(o);
- if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_BiLex(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_BiLex *p = (struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->col1);
+ Py_CLEAR(p->col2);
+ Py_CLEAR(p->f_index);
+ Py_CLEAR(p->e_index);
+ Py_CLEAR(p->id2eword);
+ Py_CLEAR(p->id2fword);
+ Py_CLEAR(p->eword2id);
+ Py_CLEAR(p->fword2id);
(*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_3_sa_TrieMap[] = {
- {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_3_sa_7TrieMap_5insert, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("contains"), (PyCFunction)__pyx_pw_3_sa_7TrieMap_7contains, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("toMap"), (PyCFunction)__pyx_pw_3_sa_7TrieMap_9toMap, METH_O, __Pyx_DOCSTR(0)},
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_BiLex(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4cdec_2sa_3_sa_BiLex *p = (struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)o;
+ if (p->col1) {
+ e = (*v)(((PyObject*)p->col1), a); if (e) return e;
+ }
+ if (p->col2) {
+ e = (*v)(((PyObject*)p->col2), a); if (e) return e;
+ }
+ if (p->f_index) {
+ e = (*v)(((PyObject*)p->f_index), a); if (e) return e;
+ }
+ if (p->e_index) {
+ e = (*v)(((PyObject*)p->e_index), a); if (e) return e;
+ }
+ if (p->id2eword) {
+ e = (*v)(p->id2eword, a); if (e) return e;
+ }
+ if (p->id2fword) {
+ e = (*v)(p->id2fword, a); if (e) return e;
+ }
+ if (p->eword2id) {
+ e = (*v)(p->eword2id, a); if (e) return e;
+ }
+ if (p->fword2id) {
+ e = (*v)(p->fword2id, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4cdec_2sa_3_sa_BiLex(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_BiLex *p = (struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->col1);
+ p->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->col2);
+ p->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->f_index);
+ p->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->e_index);
+ p->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->id2eword);
+ p->id2eword = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->id2fword);
+ p->id2fword = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->eword2id);
+ p->eword2id = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->fword2id);
+ p->fword2id = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_BiLex[] = {
+ {__Pyx_NAMESTR("write_binary"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_5BiLex_3write_binary, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read_binary"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_5BiLex_5read_binary, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_e_id"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_5BiLex_7get_e_id, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_f_id"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_5BiLex_9get_f_id, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read_text"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_5BiLex_11read_text, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_enhanced"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_5BiLex_13write_enhanced, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_score"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_5BiLex_15get_score, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_text"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_5BiLex_17write_text, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_2sa_3_sa_5BiLex_16write_text)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa_TrieMap = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_BiLex = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.TrieMap"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_TrieMap), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.BiLex"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_BiLex), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_TrieMap, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_BiLex, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -73948,15 +73915,15 @@ static PyTypeObject __pyx_type_3_sa_TrieMap = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_BiLex, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_BiLex, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_TrieMap, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_BiLex, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -73966,7 +73933,7 @@ static PyTypeObject __pyx_type_3_sa_TrieMap = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_TrieMap, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_BiLex, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -73979,130 +73946,201 @@ static PyTypeObject __pyx_type_3_sa_TrieMap = {
0, /*tp_version_tag*/
#endif
};
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray __pyx_vtable_4cdec_2sa_3_sa_DataArray;
-static struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_8_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_8_genexpr = 0;
-
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_8_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_DataArray(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_DataArray *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_8_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_8_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_8_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr));
- PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_DataArray;
+ p->word2id = Py_None; Py_INCREF(Py_None);
+ p->id2word = Py_None; Py_INCREF(Py_None);
+ p->data = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->sent_id = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_9DataArray_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *)o);
- p->__pyx_outer_scope = 0;
- p->__pyx_v_arc = 0;
- p->__pyx_v_dist = 0;
- p->__pyx_v_node = 0;
- p->__pyx_v_sym = 0;
- p->__pyx_v_weight = 0;
- p->__pyx_t_0 = 0;
- p->__pyx_t_3 = 0;
- p->__pyx_t_4 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_8_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_DataArray(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_DataArray *p = (struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_arc);
- Py_CLEAR(p->__pyx_v_dist);
- Py_CLEAR(p->__pyx_v_node);
- Py_CLEAR(p->__pyx_v_sym);
- Py_CLEAR(p->__pyx_v_weight);
- Py_CLEAR(p->__pyx_t_0);
- Py_CLEAR(p->__pyx_t_3);
- Py_CLEAR(p->__pyx_t_4);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_8_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_8_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->word2id);
+ Py_CLEAR(p->id2word);
+ Py_CLEAR(p->data);
+ Py_CLEAR(p->sent_id);
+ Py_CLEAR(p->sent_index);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_DataArray(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *)o;
- if (p->__pyx_outer_scope) {
- e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
- }
- if (p->__pyx_v_arc) {
- e = (*v)(p->__pyx_v_arc, a); if (e) return e;
- }
- if (p->__pyx_v_dist) {
- e = (*v)(p->__pyx_v_dist, a); if (e) return e;
- }
- if (p->__pyx_v_node) {
- e = (*v)(p->__pyx_v_node, a); if (e) return e;
- }
- if (p->__pyx_v_sym) {
- e = (*v)(p->__pyx_v_sym, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa_DataArray *p = (struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)o;
+ if (p->word2id) {
+ e = (*v)(p->word2id, a); if (e) return e;
}
- if (p->__pyx_v_weight) {
- e = (*v)(p->__pyx_v_weight, a); if (e) return e;
+ if (p->id2word) {
+ e = (*v)(p->id2word, a); if (e) return e;
}
- if (p->__pyx_t_0) {
- e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ if (p->data) {
+ e = (*v)(((PyObject*)p->data), a); if (e) return e;
}
- if (p->__pyx_t_3) {
- e = (*v)(p->__pyx_t_3, a); if (e) return e;
+ if (p->sent_id) {
+ e = (*v)(((PyObject*)p->sent_id), a); if (e) return e;
}
- if (p->__pyx_t_4) {
- e = (*v)(p->__pyx_t_4, a); if (e) return e;
+ if (p->sent_index) {
+ e = (*v)(((PyObject*)p->sent_index), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_8_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa_DataArray(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_DataArray *p = (struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_7_decode_lattice *)Py_None); Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_arc);
- p->__pyx_v_arc = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_dist);
- p->__pyx_v_dist = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_node);
- p->__pyx_v_node = 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);
+ tmp = ((PyObject*)p->word2id);
+ p->word2id = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_weight);
- p->__pyx_v_weight = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->id2word);
+ p->id2word = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_0);
- p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->data);
+ p->data = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_3);
- p->__pyx_t_3 = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->sent_id);
+ p->sent_id = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_t_4);
- p->__pyx_t_4 = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->sent_index);
+ p->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
+static PyObject *__pyx_sq_item_4cdec_2sa_3_sa_DataArray(PyObject *o, Py_ssize_t i) {
+ PyObject *r;
+ PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
+ r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
+ Py_DECREF(x);
+ return r;
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_9DataArray_word2id(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_7word2id_1__get__(o);
+}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_8_genexpr[] = {
+static int __pyx_setprop_4cdec_2sa_3_sa_9DataArray_word2id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_7word2id_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_7word2id_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_9DataArray_id2word(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_7id2word_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_9DataArray_id2word(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_7id2word_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_7id2word_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_9DataArray_data(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_4data_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_9DataArray_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_4data_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_4data_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_9DataArray_sent_id(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_7sent_id_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_9DataArray_sent_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_7sent_id_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_7sent_id_5__del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_4cdec_2sa_3_sa_9DataArray_sent_index(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_10sent_index_1__get__(o);
+}
+
+static int __pyx_setprop_4cdec_2sa_3_sa_9DataArray_sent_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_10sent_index_3__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4cdec_2sa_3_sa_9DataArray_10sent_index_5__del__(o);
+ }
+}
+
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_DataArray[] = {
+ {__Pyx_NAMESTR("get_sentence_id"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_5get_sentence_id, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_sentence"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_7get_sentence, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_id"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_9get_id, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_sentence_bounds"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_13get_sentence_bounds, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_text"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_15write_text, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read_text"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_17read_text, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read_bitext"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_19read_bitext, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read_text_data"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_21read_text_data, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("read_binary"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_23read_binary, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_binary"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_25write_binary, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_enhanced_handle"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_27write_enhanced_handle, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write_enhanced"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_9DataArray_29write_enhanced, METH_O, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_8_genexpr = {
+static struct PyGetSetDef __pyx_getsets_4cdec_2sa_3_sa_DataArray[] = {
+ {(char *)"word2id", __pyx_getprop_4cdec_2sa_3_sa_9DataArray_word2id, __pyx_setprop_4cdec_2sa_3_sa_9DataArray_word2id, 0, 0},
+ {(char *)"id2word", __pyx_getprop_4cdec_2sa_3_sa_9DataArray_id2word, __pyx_setprop_4cdec_2sa_3_sa_9DataArray_id2word, 0, 0},
+ {(char *)"data", __pyx_getprop_4cdec_2sa_3_sa_9DataArray_data, __pyx_setprop_4cdec_2sa_3_sa_9DataArray_data, 0, 0},
+ {(char *)"sent_id", __pyx_getprop_4cdec_2sa_3_sa_9DataArray_sent_id, __pyx_setprop_4cdec_2sa_3_sa_9DataArray_sent_id, 0, 0},
+ {(char *)"sent_index", __pyx_getprop_4cdec_2sa_3_sa_9DataArray_sent_index, __pyx_setprop_4cdec_2sa_3_sa_9DataArray_sent_index, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_DataArray = {
+ __pyx_pw_4cdec_2sa_3_sa_9DataArray_3__len__, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ __pyx_sq_item_4cdec_2sa_3_sa_DataArray, /*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_DataArray = {
+ __pyx_pw_4cdec_2sa_3_sa_9DataArray_3__len__, /*mp_length*/
+ __pyx_pw_4cdec_2sa_3_sa_9DataArray_11__getitem__, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_DataArray = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_8_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_8_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.DataArray"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_DataArray), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_8_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_DataArray, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -74113,25 +74151,25 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_8_genexpr = {
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
+ &__pyx_tp_as_sequence_DataArray, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_DataArray, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_8_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_8_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_DataArray, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_DataArray, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_8_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_DataArray, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4cdec_2sa_3_sa_DataArray, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -74139,7 +74177,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_8_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_8_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_DataArray, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -74153,73 +74191,28 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_8_genexpr = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *__pyx_freelist_3_sa___pyx_scope_struct_4_make_lattice[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_4_make_lattice = 0;
-
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_4_make_lattice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_BitSetIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_4_make_lattice > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_4_make_lattice[--__pyx_freecount_3_sa___pyx_scope_struct_4_make_lattice];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice));
- PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *)o);
- p->__pyx_v_word_ids = 0;
- p->__pyx_v_words = 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_4_make_lattice(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *p = (struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_word_ids);
- Py_CLEAR(p->__pyx_v_words);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_4_make_lattice < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice))) {
- __pyx_freelist_3_sa___pyx_scope_struct_4_make_lattice[__pyx_freecount_3_sa___pyx_scope_struct_4_make_lattice++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
-}
-
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_4_make_lattice(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *p = (struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *)o;
- if (p->__pyx_v_word_ids) {
- e = (*v)(p->__pyx_v_word_ids, a); if (e) return e;
- }
- 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_4_make_lattice(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *p = (struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *)o;
- PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_v_word_ids);
- p->__pyx_v_word_ids = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v_words);
- p->__pyx_v_words = Py_None; Py_INCREF(Py_None);
- Py_XDECREF(tmp);
- return 0;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_BitSetIterator(PyObject *o) {
+ (*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_4_make_lattice[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_BitSetIterator[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_14BitSetIterator_1__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_4_make_lattice = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_BitSetIterator = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_4_make_lattice"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.BitSetIterator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_4_make_lattice, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_BitSetIterator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -74238,15 +74231,15 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_4_make_lattice = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_4_make_lattice, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_4_make_lattice, /*tp_clear*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_4_make_lattice, /*tp_methods*/
+ __pyx_pw_4cdec_2sa_3_sa_14BitSetIterator_1__next__, /*tp_iternext*/
+ __pyx_methods_4cdec_2sa_3_sa_BitSetIterator, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -74256,7 +74249,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_4_make_lattice = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_4_make_lattice, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_BitSetIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -74269,116 +74262,231 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_4_make_lattice = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_Phrase __pyx_vtable_3_sa_Phrase;
+static struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory;
-static PyObject *__pyx_tp_new_3_sa_Phrase(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_Phrase *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_HieroCachingRuleFactory(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *p;
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_Phrase *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_Phrase;
- if (unlikely(__pyx_pw_3_sa_6Phrase_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4cdec_2sa_3_sa_HieroCachingRuleFactory;
+ p->rules = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)Py_None); Py_INCREF(Py_None);
+ p->sampler = ((struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)Py_None); Py_INCREF(Py_None);
+ p->scorer = ((struct __pyx_obj_4cdec_2sa_3_sa_Scorer *)Py_None); Py_INCREF(Py_None);
+ p->precomputed_index = Py_None; Py_INCREF(Py_None);
+ p->precomputed_collocations = Py_None; Py_INCREF(Py_None);
+ p->precompute_file = Py_None; Py_INCREF(Py_None);
+ p->max_rank = Py_None; Py_INCREF(Py_None);
+ p->prev_norm_prefix = Py_None; Py_INCREF(Py_None);
+ p->fsa = ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)Py_None); Py_INCREF(Py_None);
+ p->fda = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
+ p->eda = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
+ p->alignment = ((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)Py_None); Py_INCREF(Py_None);
+ p->eid2symid = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->fid2symid = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->findexes = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->findexes1 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->online_stats = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_Phrase(PyObject *o) {
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_3_sa_6Phrase_3__dealloc__(o);
- if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_HieroCachingRuleFactory(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *p = (struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->rules);
+ Py_CLEAR(p->sampler);
+ Py_CLEAR(p->scorer);
+ Py_CLEAR(p->precomputed_index);
+ Py_CLEAR(p->precomputed_collocations);
+ Py_CLEAR(p->precompute_file);
+ Py_CLEAR(p->max_rank);
+ Py_CLEAR(p->prev_norm_prefix);
+ Py_CLEAR(p->fsa);
+ Py_CLEAR(p->fda);
+ Py_CLEAR(p->eda);
+ Py_CLEAR(p->alignment);
+ Py_CLEAR(p->eid2symid);
+ Py_CLEAR(p->fid2symid);
+ Py_CLEAR(p->findexes);
+ Py_CLEAR(p->findexes1);
+ Py_CLEAR(p->online_stats);
(*Py_TYPE(o)->tp_free)(o);
}
-static PyObject *__pyx_sq_item_3_sa_Phrase(PyObject *o, Py_ssize_t i) {
- PyObject *r;
- PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
- r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
- Py_DECREF(x);
- return r;
+
+static int __pyx_tp_traverse_4cdec_2sa_3_sa_HieroCachingRuleFactory(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *p = (struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)o;
+ if (p->rules) {
+ e = (*v)(((PyObject*)p->rules), a); if (e) return e;
+ }
+ if (p->sampler) {
+ e = (*v)(((PyObject*)p->sampler), a); if (e) return e;
+ }
+ if (p->scorer) {
+ e = (*v)(((PyObject*)p->scorer), a); if (e) return e;
+ }
+ if (p->precomputed_index) {
+ e = (*v)(p->precomputed_index, a); if (e) return e;
+ }
+ if (p->precomputed_collocations) {
+ e = (*v)(p->precomputed_collocations, a); if (e) return e;
+ }
+ if (p->precompute_file) {
+ e = (*v)(p->precompute_file, a); if (e) return e;
+ }
+ if (p->max_rank) {
+ e = (*v)(p->max_rank, a); if (e) return e;
+ }
+ if (p->prev_norm_prefix) {
+ e = (*v)(p->prev_norm_prefix, a); if (e) return e;
+ }
+ if (p->fsa) {
+ e = (*v)(((PyObject*)p->fsa), a); if (e) return e;
+ }
+ if (p->fda) {
+ e = (*v)(((PyObject*)p->fda), a); if (e) return e;
+ }
+ if (p->eda) {
+ e = (*v)(((PyObject*)p->eda), a); if (e) return e;
+ }
+ if (p->alignment) {
+ e = (*v)(((PyObject*)p->alignment), a); if (e) return e;
+ }
+ if (p->eid2symid) {
+ e = (*v)(((PyObject*)p->eid2symid), a); if (e) return e;
+ }
+ if (p->fid2symid) {
+ e = (*v)(((PyObject*)p->fid2symid), a); if (e) return e;
+ }
+ if (p->findexes) {
+ e = (*v)(((PyObject*)p->findexes), a); if (e) return e;
+ }
+ if (p->findexes1) {
+ e = (*v)(((PyObject*)p->findexes1), a); if (e) return e;
+ }
+ if (p->online_stats) {
+ e = (*v)(p->online_stats, a); if (e) return e;
+ }
+ return 0;
}
-static PyObject *__pyx_getprop_3_sa_6Phrase_words(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_6Phrase_5words_1__get__(o);
+static int __pyx_tp_clear_4cdec_2sa_3_sa_HieroCachingRuleFactory(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *p = (struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->rules);
+ p->rules = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->sampler);
+ p->sampler = ((struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->scorer);
+ p->scorer = ((struct __pyx_obj_4cdec_2sa_3_sa_Scorer *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->precomputed_index);
+ p->precomputed_index = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->precomputed_collocations);
+ p->precomputed_collocations = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->precompute_file);
+ p->precompute_file = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->max_rank);
+ p->max_rank = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->prev_norm_prefix);
+ p->prev_norm_prefix = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->fsa);
+ p->fsa = ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->fda);
+ p->fda = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->eda);
+ p->eda = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->alignment);
+ p->alignment = ((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->eid2symid);
+ p->eid2symid = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->fid2symid);
+ p->fid2symid = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->findexes);
+ p->findexes = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->findexes1);
+ p->findexes1 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->online_stats);
+ p->online_stats = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
}
-static PyMethodDef __pyx_methods_3_sa_Phrase[] = {
- {__Pyx_NAMESTR("handle"), (PyCFunction)__pyx_pw_3_sa_6Phrase_7handle, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_3_sa_6Phrase_6handle)},
- {__Pyx_NAMESTR("strhandle"), (PyCFunction)__pyx_pw_3_sa_6Phrase_9strhandle, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("arity"), (PyCFunction)__pyx_pw_3_sa_6Phrase_11arity, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("getvarpos"), (PyCFunction)__pyx_pw_3_sa_6Phrase_13getvarpos, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("getvar"), (PyCFunction)__pyx_pw_3_sa_6Phrase_15getvar, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("clen"), (PyCFunction)__pyx_pw_3_sa_6Phrase_17clen, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("getchunk"), (PyCFunction)__pyx_pw_3_sa_6Phrase_19getchunk, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("subst"), (PyCFunction)__pyx_pw_3_sa_6Phrase_32subst, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_HieroCachingRuleFactory[] = {
+ {__Pyx_NAMESTR("configure"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_3configure, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure)},
+ {__Pyx_NAMESTR("pattern2phrase"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5pattern2phrase, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("pattern2phrase_plus"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_7pattern2phrase_plus, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("precompute"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9precompute, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_precomputed_collocation"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_11get_precomputed_collocation, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("advance"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13advance, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_all_nodes_isteps_away"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_15get_all_nodes_isteps_away, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("reachable"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_17reachable, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("shortest"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_19shortest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_next_states"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_21get_next_states, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("input"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_23input, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_2sa_3_sa_23HieroCachingRuleFactory_22input)},
+ {__Pyx_NAMESTR("add_instance"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_26add_instance, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("form_rule"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_28form_rule, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("fmt_rule"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_30fmt_rule, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("online_ctx_lookup"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_32online_ctx_lookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get_f_phrases"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_34get_f_phrases, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("drop_ctx"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_36drop_ctx, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_3_sa_Phrase[] = {
- {(char *)"words", __pyx_getprop_3_sa_6Phrase_words, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_Phrase = {
- __pyx_pw_3_sa_6Phrase_25__len__, /*sq_length*/
- 0, /*sq_concat*/
- 0, /*sq_repeat*/
- __pyx_sq_item_3_sa_Phrase, /*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_Phrase = {
- __pyx_pw_3_sa_6Phrase_25__len__, /*mp_length*/
- __pyx_pw_3_sa_6Phrase_27__getitem__, /*mp_subscript*/
- 0, /*mp_ass_subscript*/
-};
-
-static PyTypeObject __pyx_type_3_sa_Phrase = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.Phrase"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_Phrase), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.HieroCachingRuleFactory"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_Phrase, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_HieroCachingRuleFactory, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
- __pyx_pw_3_sa_6Phrase_21__cmp__, /*tp_compare*/
+ 0, /*tp_compare*/
#else
0, /*reserved*/
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
- &__pyx_tp_as_sequence_Phrase, /*tp_as_sequence*/
- &__pyx_tp_as_mapping_Phrase, /*tp_as_mapping*/
- __pyx_pw_3_sa_6Phrase_23__hash__, /*tp_hash*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
0, /*tp_call*/
- __pyx_pw_3_sa_6Phrase_5__str__, /*tp_str*/
+ 0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("This RuleFactory implements a caching \n method using TrieTable, which makes phrase\n generation somewhat speedier -- phrases only\n need to be extracted once (however, it is\n quite possible they need to be scored \n for each input sentence, for contextual models)"), /*tp_doc*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa_HieroCachingRuleFactory, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa_HieroCachingRuleFactory, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_3_sa_6Phrase_29__iter__, /*tp_iter*/
+ 0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_Phrase, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa_HieroCachingRuleFactory, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_3_sa_Phrase, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -74386,7 +74494,7 @@ static PyTypeObject __pyx_type_3_sa_Phrase = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_Phrase, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa_HieroCachingRuleFactory, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -74400,65 +74508,65 @@ static PyTypeObject __pyx_type_3_sa_Phrase = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *__pyx_freelist_3_sa___pyx_scope_struct_27___iter__[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_27___iter__ = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_28___str__[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ = 0;
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_27___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_28___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_27___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_27___iter__[--__pyx_freecount_3_sa___pyx_scope_struct_27___iter__];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_28___str__[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_28___str__];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *)o);
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *)o);
p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_27___iter__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_28___str__(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *)o;
PyObject_GC_UnTrack(o);
Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_27___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__))) {
- __pyx_freelist_3_sa___pyx_scope_struct_27___iter__[__pyx_freecount_3_sa___pyx_scope_struct_27___iter__++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *)o);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_28___str__[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_28___str__++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_27___iter__(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_28___str__(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *)o;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___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_27___iter__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__ *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_28___str__(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___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);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_27___iter__[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_28___str__[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_27___iter__ = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_27___iter__"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_27___iter__), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_28___str__"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_28___str__), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_27___iter__, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_28___str__, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -74479,13 +74587,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_27___iter__ = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_27___iter__, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_27___iter__, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_28___str__, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_28___str__, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_27___iter__, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_28___str__, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -74495,7 +74603,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_27___iter__ = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_27___iter__, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_28___str__, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -74509,65 +74617,105 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_27___iter__ = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *__pyx_freelist_3_sa___pyx_scope_struct____iter__[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct____iter__ = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats = 0;
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct____iter__)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct____iter__[--__pyx_freecount_3_sa___pyx_scope_struct____iter__];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct____iter__));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *)o);
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *)o);
+ p->__pyx_v_ngram = 0;
+ p->__pyx_v_ngram_start = 0;
+ p->__pyx_v_ngram_starts = 0;
+ p->__pyx_v_run_start = 0;
p->__pyx_v_self = 0;
+ p->__pyx_v_veb = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct____iter__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *)o;
PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_ngram);
+ Py_CLEAR(p->__pyx_v_ngram_start);
+ Py_CLEAR(p->__pyx_v_ngram_starts);
+ Py_CLEAR(p->__pyx_v_run_start);
Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_3_sa___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct____iter__))) {
- __pyx_freelist_3_sa___pyx_scope_struct____iter__[__pyx_freecount_3_sa___pyx_scope_struct____iter__++] = ((struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *)o);
+ Py_CLEAR(p->__pyx_v_veb);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *)o;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *)o;
+ if (p->__pyx_v_ngram) {
+ e = (*v)(p->__pyx_v_ngram, a); if (e) return e;
+ }
+ if (p->__pyx_v_ngram_start) {
+ e = (*v)(((PyObject*)p->__pyx_v_ngram_start), a); if (e) return e;
+ }
+ if (p->__pyx_v_ngram_starts) {
+ e = (*v)(p->__pyx_v_ngram_starts, a); if (e) return e;
+ }
+ if (p->__pyx_v_run_start) {
+ e = (*v)(((PyObject*)p->__pyx_v_run_start), a); if (e) return e;
+ }
if (p->__pyx_v_self) {
e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
}
+ if (p->__pyx_v_veb) {
+ e = (*v)(((PyObject*)p->__pyx_v_veb), a); if (e) return e;
+ }
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct____iter__(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *p = (struct __pyx_obj_3_sa___pyx_scope_struct____iter__ *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats *)o;
PyObject* tmp;
+ tmp = ((PyObject*)p->__pyx_v_ngram);
+ p->__pyx_v_ngram = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_ngram_start);
+ p->__pyx_v_ngram_start = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_ngram_starts);
+ p->__pyx_v_ngram_starts = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_run_start);
+ p->__pyx_v_run_start = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
tmp = ((PyObject*)p->__pyx_v_self);
- p->__pyx_v_self = ((struct __pyx_obj_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_LCP *)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_veb);
+ p->__pyx_v_veb = ((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct____iter__[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct____iter__ = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct____iter__"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct____iter__), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_3_compute_stats"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct____iter__, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -74588,13 +74736,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct____iter__ = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct____iter__, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct____iter__, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct____iter__, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -74604,7 +74752,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct____iter__ = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct____iter__, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -74618,102 +74766,81 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct____iter__ = {
#endif
};
-static PyObject *__pyx_tp_new_3_sa_TrieTable(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_TrieTable *p;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_TrieTable *)o);
- p->root = Py_None; Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_3_sa_9TrieTable_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr));
+ PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
+ p = ((struct __pyx_obj_4cdec_2sa_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_TrieTable(PyObject *o) {
- struct __pyx_obj_3_sa_TrieTable *p = (struct __pyx_obj_3_sa_TrieTable *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->root);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_sym);
+ Py_CLEAR(p->__pyx_t_0);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_3_sa_TrieTable(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa_TrieTable *p = (struct __pyx_obj_3_sa_TrieTable *)o;
- if (p->root) {
- e = (*v)(p->root, a); if (e) return e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_4cdec_2sa_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_TrieTable(PyObject *o) {
- struct __pyx_obj_3_sa_TrieTable *p = (struct __pyx_obj_3_sa_TrieTable *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->root);
- p->root = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_outer_scope);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_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 PyObject *__pyx_getprop_3_sa_9TrieTable_extended(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_9TrieTable_8extended_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_9TrieTable_extended(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_9TrieTable_8extended_3__set__(o, v);
- }
- else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
- }
-}
-
-static PyObject *__pyx_getprop_3_sa_9TrieTable_count(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_9TrieTable_5count_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_9TrieTable_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_9TrieTable_5count_3__set__(o, v);
- }
- else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
- }
-}
-
-static PyObject *__pyx_getprop_3_sa_9TrieTable_root(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_3_sa_9TrieTable_4root_1__get__(o);
-}
-
-static int __pyx_setprop_3_sa_9TrieTable_root(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_3_sa_9TrieTable_4root_3__set__(o, v);
- }
- else {
- return __pyx_pw_3_sa_9TrieTable_4root_5__del__(o);
- }
-}
-
-static PyMethodDef __pyx_methods_3_sa_TrieTable[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_3_sa_TrieTable[] = {
- {(char *)"extended", __pyx_getprop_3_sa_9TrieTable_extended, __pyx_setprop_3_sa_9TrieTable_extended, 0, 0},
- {(char *)"count", __pyx_getprop_3_sa_9TrieTable_count, __pyx_setprop_3_sa_9TrieTable_count, 0, 0},
- {(char *)"root", __pyx_getprop_3_sa_9TrieTable_root, __pyx_setprop_3_sa_9TrieTable_root, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_3_sa_TrieTable = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.TrieTable"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_TrieTable), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_14_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_TrieTable, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -74732,17 +74859,17 @@ static PyTypeObject __pyx_type_3_sa_TrieTable = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa_TrieTable, /*tp_traverse*/
- __pyx_tp_clear_3_sa_TrieTable, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_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_TrieTable, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_3_sa_TrieTable, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -74750,7 +74877,7 @@ static PyTypeObject __pyx_type_3_sa_TrieTable = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_TrieTable, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -74764,81 +74891,65 @@ static PyTypeObject __pyx_type_3_sa_TrieTable = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_5_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_5_genexpr = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct____iter__[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct____iter__ = 0;
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_5_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_5_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct____iter__[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct____iter__];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *)o);
- p->__pyx_outer_scope = 0;
- p->__pyx_v_word = 0;
- p->__pyx_t_0 = 0;
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *)o);
+ p->__pyx_v_self = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_5_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct____iter__(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v_word);
- Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_5_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *)o);
+ Py_CLEAR(p->__pyx_v_self);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct____iter__[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct____iter__++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_5_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;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *)o;
+ if (p->__pyx_v_self) {
+ e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_5_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct____iter__(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__ *)o;
PyObject* tmp;
- tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_4_make_lattice *)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);
+ tmp = ((PyObject*)p->__pyx_v_self);
+ p->__pyx_v_self = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_5_genexpr[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct____iter__[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_5_genexpr = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct____iter__ = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_5_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct____iter__"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct____iter__), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_5_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct____iter__, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -74859,13 +74970,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_5_genexpr = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_5_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_5_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct____iter__, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct____iter__, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_5_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct____iter__, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -74875,7 +74986,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_5_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_5_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct____iter__, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -74889,89 +75000,129 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_5_genexpr = {
#endif
};
-static struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *__pyx_freelist_3_sa___pyx_scope_struct_10_genexpr[8];
-static int __pyx_freecount_3_sa___pyx_scope_struct_10_genexpr = 0;
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr = 0;
-static PyObject *__pyx_tp_new_3_sa___pyx_scope_struct_10_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *p;
PyObject *o;
- if (likely((__pyx_freecount_3_sa___pyx_scope_struct_10_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr)))) {
- o = (PyObject*)__pyx_freelist_3_sa___pyx_scope_struct_10_genexpr[--__pyx_freecount_3_sa___pyx_scope_struct_10_genexpr];
- memset(o, 0, sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr));
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr));
PyObject_INIT(o, t);
PyObject_GC_Track(o);
} else {
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
}
- p = ((struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *)o);
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *)o);
p->__pyx_outer_scope = 0;
- p->__pyx_v__ = 0;
+ p->__pyx_v_arc = 0;
+ p->__pyx_v_dist = 0;
+ p->__pyx_v_node = 0;
p->__pyx_v_sym = 0;
+ p->__pyx_v_weight = 0;
p->__pyx_t_0 = 0;
+ p->__pyx_t_3 = 0;
+ p->__pyx_t_4 = 0;
return o;
}
-static void __pyx_tp_dealloc_3_sa___pyx_scope_struct_10_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *)o;
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *)o;
PyObject_GC_UnTrack(o);
Py_CLEAR(p->__pyx_outer_scope);
- Py_CLEAR(p->__pyx_v__);
+ Py_CLEAR(p->__pyx_v_arc);
+ Py_CLEAR(p->__pyx_v_dist);
+ Py_CLEAR(p->__pyx_v_node);
Py_CLEAR(p->__pyx_v_sym);
+ Py_CLEAR(p->__pyx_v_weight);
Py_CLEAR(p->__pyx_t_0);
- if ((__pyx_freecount_3_sa___pyx_scope_struct_10_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr))) {
- __pyx_freelist_3_sa___pyx_scope_struct_10_genexpr[__pyx_freecount_3_sa___pyx_scope_struct_10_genexpr++] = ((struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *)o);
+ Py_CLEAR(p->__pyx_t_3);
+ Py_CLEAR(p->__pyx_t_4);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *)o);
} else {
(*Py_TYPE(o)->tp_free)(o);
}
}
-static int __pyx_tp_traverse_3_sa___pyx_scope_struct_10_genexpr(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *)o;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *)o;
if (p->__pyx_outer_scope) {
e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
}
- if (p->__pyx_v__) {
- e = (*v)(p->__pyx_v__, a); if (e) return e;
+ if (p->__pyx_v_arc) {
+ e = (*v)(p->__pyx_v_arc, a); if (e) return e;
+ }
+ if (p->__pyx_v_dist) {
+ e = (*v)(p->__pyx_v_dist, a); if (e) return e;
+ }
+ if (p->__pyx_v_node) {
+ e = (*v)(p->__pyx_v_node, a); if (e) return e;
}
if (p->__pyx_v_sym) {
e = (*v)(p->__pyx_v_sym, a); if (e) return e;
}
+ if (p->__pyx_v_weight) {
+ e = (*v)(p->__pyx_v_weight, a); if (e) return e;
+ }
if (p->__pyx_t_0) {
e = (*v)(p->__pyx_t_0, a); if (e) return e;
}
+ if (p->__pyx_t_3) {
+ e = (*v)(p->__pyx_t_3, a); if (e) return e;
+ }
+ if (p->__pyx_t_4) {
+ e = (*v)(p->__pyx_t_4, a); if (e) return e;
+ }
return 0;
}
-static int __pyx_tp_clear_3_sa___pyx_scope_struct_10_genexpr(PyObject *o) {
- struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr *)o;
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr *)o;
PyObject* tmp;
tmp = ((PyObject*)p->__pyx_outer_scope);
- p->__pyx_outer_scope = ((struct __pyx_obj_3_sa___pyx_scope_struct_9_decode_sentence *)Py_None); Py_INCREF(Py_None);
+ p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice *)Py_None); Py_INCREF(Py_None);
Py_XDECREF(tmp);
- tmp = ((PyObject*)p->__pyx_v__);
- p->__pyx_v__ = Py_None; Py_INCREF(Py_None);
+ tmp = ((PyObject*)p->__pyx_v_arc);
+ p->__pyx_v_arc = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_dist);
+ p->__pyx_v_dist = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_node);
+ p->__pyx_v_node = 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_v_weight);
+ p->__pyx_v_weight = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
tmp = ((PyObject*)p->__pyx_t_0);
p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_t_3);
+ p->__pyx_t_3 = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_t_4);
+ p->__pyx_t_4 = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
return 0;
}
-static PyMethodDef __pyx_methods_3_sa___pyx_scope_struct_10_genexpr[] = {
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_10_genexpr = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.__pyx_scope_struct_10_genexpr"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa___pyx_scope_struct_10_genexpr), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_8_genexpr"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa___pyx_scope_struct_10_genexpr, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -74992,13 +75143,13 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_10_genexpr = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_3_sa___pyx_scope_struct_10_genexpr, /*tp_traverse*/
- __pyx_tp_clear_3_sa___pyx_scope_struct_10_genexpr, /*tp_clear*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa___pyx_scope_struct_10_genexpr, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -75008,7 +75159,7 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_10_genexpr = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa___pyx_scope_struct_10_genexpr, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -75021,84 +75172,63 @@ static PyTypeObject __pyx_type_3_sa___pyx_scope_struct_10_genexpr = {
0, /*tp_version_tag*/
#endif
};
-static struct __pyx_vtabstruct_3_sa_FloatList __pyx_vtable_3_sa_FloatList;
-static PyObject *__pyx_tp_new_3_sa_FloatList(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_3_sa_FloatList *p;
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_BitSet(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
PyObject *o;
o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_3_sa_FloatList *)o);
- p->__pyx_vtab = __pyx_vtabptr_3_sa_FloatList;
- if (unlikely(__pyx_pw_3_sa_9FloatList_1__cinit__(o, a, k) < 0)) {
+ if (unlikely(__pyx_pw_4cdec_2sa_3_sa_6BitSet_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_3_sa_FloatList(PyObject *o) {
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa_BitSet(PyObject *o) {
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
++Py_REFCNT(o);
- __pyx_pw_3_sa_9FloatList_3__dealloc__(o);
+ __pyx_pw_4cdec_2sa_3_sa_6BitSet_3__dealloc__(o);
if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
--Py_REFCNT(o);
PyErr_Restore(etype, eval, etb);
}
(*Py_TYPE(o)->tp_free)(o);
}
-static PyObject *__pyx_sq_item_3_sa_FloatList(PyObject *o, Py_ssize_t i) {
- PyObject *r;
- PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
- r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
- Py_DECREF(x);
- return r;
-}
-static int __pyx_mp_ass_subscript_3_sa_FloatList(PyObject *o, PyObject *i, PyObject *v) {
- if (v) {
- return __pyx_pw_3_sa_9FloatList_7__setitem__(o, i, v);
- }
- else {
- PyErr_Format(PyExc_NotImplementedError,
- "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name);
- return -1;
- }
-}
-
-static PyMethodDef __pyx_methods_3_sa_FloatList[] = {
- {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_3_sa_9FloatList_11append, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_3_sa_9FloatList_13write, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("read"), (PyCFunction)__pyx_pw_3_sa_9FloatList_15read, METH_O, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_BitSet[] = {
+ {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6BitSet_7insert, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("findsucc"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6BitSet_9findsucc, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("min"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6BitSet_13min, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("max"), (PyCFunction)__pyx_pw_4cdec_2sa_3_sa_6BitSet_15max, METH_NOARGS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PySequenceMethods __pyx_tp_as_sequence_FloatList = {
- __pyx_pw_3_sa_9FloatList_9__len__, /*sq_length*/
+static PySequenceMethods __pyx_tp_as_sequence_BitSet = {
+ __pyx_pw_4cdec_2sa_3_sa_6BitSet_17__len__, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
- __pyx_sq_item_3_sa_FloatList, /*sq_item*/
+ 0, /*sq_item*/
0, /*sq_slice*/
0, /*sq_ass_item*/
0, /*sq_ass_slice*/
- 0, /*sq_contains*/
+ __pyx_pw_4cdec_2sa_3_sa_6BitSet_19__contains__, /*sq_contains*/
0, /*sq_inplace_concat*/
0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping_FloatList = {
- __pyx_pw_3_sa_9FloatList_9__len__, /*mp_length*/
- __pyx_pw_3_sa_9FloatList_5__getitem__, /*mp_subscript*/
- __pyx_mp_ass_subscript_3_sa_FloatList, /*mp_ass_subscript*/
+static PyMappingMethods __pyx_tp_as_mapping_BitSet = {
+ __pyx_pw_4cdec_2sa_3_sa_6BitSet_17__len__, /*mp_length*/
+ 0, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
};
-static PyTypeObject __pyx_type_3_sa_FloatList = {
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa_BitSet = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("_sa.FloatList"), /*tp_name*/
- sizeof(struct __pyx_obj_3_sa_FloatList), /*tp_basicsize*/
+ __Pyx_NAMESTR("cdec.sa._sa.BitSet"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa_BitSet), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_3_sa_FloatList, /*tp_dealloc*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa_BitSet, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -75109,11 +75239,11 @@ static PyTypeObject __pyx_type_3_sa_FloatList = {
#endif
0, /*tp_repr*/
0, /*tp_as_number*/
- &__pyx_tp_as_sequence_FloatList, /*tp_as_sequence*/
- &__pyx_tp_as_mapping_FloatList, /*tp_as_mapping*/
+ &__pyx_tp_as_sequence_BitSet, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping_BitSet, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
- 0, /*tp_str*/
+ __pyx_pw_4cdec_2sa_3_sa_6BitSet_11__str__, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
@@ -75123,9 +75253,118 @@ static PyTypeObject __pyx_type_3_sa_FloatList = {
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ __pyx_pw_4cdec_2sa_3_sa_6BitSet_5__iter__, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4cdec_2sa_3_sa_BitSet, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_4cdec_2sa_3_sa_BitSet, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
+ #endif
+};
+
+static struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence[8];
+static int __pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence = 0;
+
+static PyObject *__pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *p;
+ PyObject *o;
+ if (likely((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence)))) {
+ o = (PyObject*)__pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence[--__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence];
+ memset(o, 0, sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence));
+ PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *)o);
+ p->__pyx_v_lattice = 0;
+ return o;
+}
+
+static void __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_lattice);
+ if ((__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence))) {
+ __pyx_freelist_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence[__pyx_freecount_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence++] = ((struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *)o;
+ if (p->__pyx_v_lattice) {
+ e = (*v)(p->__pyx_v_lattice, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence(PyObject *o) {
+ struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *p = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence *)o;
+ PyObject* tmp;
+ tmp = ((PyObject*)p->__pyx_v_lattice);
+ p->__pyx_v_lattice = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence[] = {
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("cdec.sa._sa.__pyx_scope_struct_9_decode_sentence"), /*tp_name*/
+ sizeof(struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence, /*tp_traverse*/
+ __pyx_tp_clear_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_3_sa_FloatList, /*tp_methods*/
+ __pyx_methods_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
@@ -75135,7 +75374,7 @@ static PyTypeObject __pyx_type_3_sa_FloatList = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_3_sa_FloatList, /*tp_new*/
+ __pyx_tp_new_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
@@ -75174,13 +75413,13 @@ static struct PyModuleDef __pyx_moduledef = {
static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
{&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
- {&__pyx_kp_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 0},
- {&__pyx_kp_s_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 1, 0},
- {&__pyx_n_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 1},
- {&__pyx_n_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 1},
- {&__pyx_kp_s_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 0, 1, 0},
- {&__pyx_n_s_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 1, 1},
- {&__pyx_kp_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 0},
+ {&__pyx_n_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 1},
+ {&__pyx_n_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 1},
+ {&__pyx_kp_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 0},
+ {&__pyx_kp_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 0},
+ {&__pyx_n_s_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 1, 1},
+ {&__pyx_n_s_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 0, 1, 1},
+ {&__pyx_kp_s_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 1, 0},
{&__pyx_kp_s_112, __pyx_k_112, sizeof(__pyx_k_112), 0, 0, 1, 0},
{&__pyx_kp_s_113, __pyx_k_113, sizeof(__pyx_k_113), 0, 0, 1, 0},
{&__pyx_kp_s_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 0, 1, 0},
@@ -75191,13 +75430,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 0},
{&__pyx_kp_s_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 1, 0},
{&__pyx_kp_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 0},
- {&__pyx_n_s_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 0, 1, 1},
- {&__pyx_kp_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 0},
- {&__pyx_n_s_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 0, 1, 1},
- {&__pyx_kp_s_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 1, 0},
- {&__pyx_n_s_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 0, 1, 1},
+ {&__pyx_kp_s_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 0, 1, 0},
+ {&__pyx_n_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 1},
+ {&__pyx_kp_s_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 0, 1, 0},
+ {&__pyx_n_s_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 1, 1},
+ {&__pyx_kp_s_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 0, 1, 0},
{&__pyx_n_s_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 1, 1},
- {&__pyx_kp_s_129, __pyx_k_129, sizeof(__pyx_k_129), 0, 0, 1, 0},
+ {&__pyx_n_s_129, __pyx_k_129, sizeof(__pyx_k_129), 0, 0, 1, 1},
{&__pyx_kp_s_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 1, 0},
{&__pyx_kp_s_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 0, 1, 0},
{&__pyx_kp_s_132, __pyx_k_132, sizeof(__pyx_k_132), 0, 0, 1, 0},
@@ -75209,21 +75448,19 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_138, __pyx_k_138, sizeof(__pyx_k_138), 0, 0, 1, 0},
{&__pyx_kp_s_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 1, 0},
{&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
- {&__pyx_kp_s_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 0, 1, 0},
- {&__pyx_n_s_144, __pyx_k_144, sizeof(__pyx_k_144), 0, 0, 1, 1},
- {&__pyx_n_s_146, __pyx_k_146, sizeof(__pyx_k_146), 0, 0, 1, 1},
- {&__pyx_kp_s_149, __pyx_k_149, sizeof(__pyx_k_149), 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_n_s_145, __pyx_k_145, sizeof(__pyx_k_145), 0, 0, 1, 1},
+ {&__pyx_n_s_147, __pyx_k_147, sizeof(__pyx_k_147), 0, 0, 1, 1},
{&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
{&__pyx_kp_s_150, __pyx_k_150, sizeof(__pyx_k_150), 0, 0, 1, 0},
{&__pyx_kp_s_151, __pyx_k_151, sizeof(__pyx_k_151), 0, 0, 1, 0},
- {&__pyx_kp_s_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 1, 0},
- {&__pyx_kp_s_157, __pyx_k_157, sizeof(__pyx_k_157), 0, 0, 1, 0},
- {&__pyx_n_s_163, __pyx_k_163, sizeof(__pyx_k_163), 0, 0, 1, 1},
- {&__pyx_n_s_166, __pyx_k_166, sizeof(__pyx_k_166), 0, 0, 1, 1},
- {&__pyx_kp_s_167, __pyx_k_167, sizeof(__pyx_k_167), 0, 0, 1, 0},
- {&__pyx_kp_s_169, __pyx_k_169, sizeof(__pyx_k_169), 0, 0, 1, 0},
- {&__pyx_kp_s_172, __pyx_k_172, sizeof(__pyx_k_172), 0, 0, 1, 0},
- {&__pyx_kp_s_176, __pyx_k_176, sizeof(__pyx_k_176), 0, 0, 1, 0},
+ {&__pyx_n_s_152, __pyx_k_152, sizeof(__pyx_k_152), 0, 0, 1, 1},
+ {&__pyx_n_s_155, __pyx_k_155, sizeof(__pyx_k_155), 0, 0, 1, 1},
+ {&__pyx_kp_s_156, __pyx_k_156, sizeof(__pyx_k_156), 0, 0, 1, 0},
+ {&__pyx_kp_s_158, __pyx_k_158, sizeof(__pyx_k_158), 0, 0, 1, 0},
+ {&__pyx_kp_s_161, __pyx_k_161, sizeof(__pyx_k_161), 0, 0, 1, 0},
+ {&__pyx_kp_s_165, __pyx_k_165, sizeof(__pyx_k_165), 0, 0, 1, 0},
{&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
{&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
{&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0},
@@ -75276,12 +75513,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s__0, __pyx_k__0, sizeof(__pyx_k__0), 0, 0, 1, 0},
{&__pyx_kp_s__1, __pyx_k__1, sizeof(__pyx_k__1), 0, 0, 1, 0},
{&__pyx_n_s__Counter, __pyx_k__Counter, sizeof(__pyx_k__Counter), 0, 0, 1, 1},
- {&__pyx_n_s__E, __pyx_k__E, sizeof(__pyx_k__E), 0, 0, 1, 1},
{&__pyx_n_s__END_OF_FILE, __pyx_k__END_OF_FILE, sizeof(__pyx_k__END_OF_FILE), 0, 0, 1, 1},
{&__pyx_n_s__END_OF_LINE, __pyx_k__END_OF_LINE, sizeof(__pyx_k__END_OF_LINE), 0, 0, 1, 1},
{&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1},
- {&__pyx_n_s__F, __pyx_k__F, sizeof(__pyx_k__F), 0, 0, 1, 1},
- {&__pyx_n_s__FE, __pyx_k__FE, sizeof(__pyx_k__FE), 0, 0, 1, 1},
{&__pyx_n_s__FeatureContext, __pyx_k__FeatureContext, sizeof(__pyx_k__FeatureContext), 0, 0, 1, 1},
{&__pyx_n_s__GzipFile, __pyx_k__GzipFile, sizeof(__pyx_k__GzipFile), 0, 0, 1, 1},
{&__pyx_n_s__INCREMENT, __pyx_k__INCREMENT, sizeof(__pyx_k__INCREMENT), 0, 0, 1, 1},
@@ -75301,7 +75535,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
{&__pyx_n_s___columns, __pyx_k___columns, sizeof(__pyx_k___columns), 0, 0, 1, 1},
{&__pyx_n_s___doquicksort, __pyx_k___doquicksort, sizeof(__pyx_k___doquicksort), 0, 0, 1, 1},
- {&__pyx_n_s___sa, __pyx_k___sa, sizeof(__pyx_k___sa), 0, 0, 1, 1},
{&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1},
{&__pyx_n_s__advance, __pyx_k__advance, sizeof(__pyx_k__advance), 0, 0, 1, 1},
{&__pyx_n_s__al, __pyx_k__al, sizeof(__pyx_k__al), 0, 0, 1, 1},
@@ -75326,6 +75559,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s__col, __pyx_k__col, sizeof(__pyx_k__col), 0, 0, 1, 1},
{&__pyx_n_s__collect, __pyx_k__collect, sizeof(__pyx_k__collect), 0, 0, 1, 1},
{&__pyx_n_s__collections, __pyx_k__collections, sizeof(__pyx_k__collections), 0, 0, 1, 1},
+ {&__pyx_n_s__ctx_name, __pyx_k__ctx_name, sizeof(__pyx_k__ctx_name), 0, 0, 1, 1},
{&__pyx_n_s__curr_idx, __pyx_k__curr_idx, sizeof(__pyx_k__curr_idx), 0, 0, 1, 1},
{&__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},
@@ -75333,7 +75567,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__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__dump_online_rules, __pyx_k__dump_online_rules, sizeof(__pyx_k__dump_online_rules), 0, 0, 1, 1},
{&__pyx_n_s__e, __pyx_k__e, sizeof(__pyx_k__e), 0, 0, 1, 1},
{&__pyx_n_s__e_i, __pyx_k__e_i, sizeof(__pyx_k__e_i), 0, 0, 1, 1},
{&__pyx_n_s__e_j, __pyx_k__e_j, sizeof(__pyx_k__e_j), 0, 0, 1, 1},
@@ -75357,9 +75590,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__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__fe, __pyx_k__fe, sizeof(__pyx_k__fe), 0, 0, 1, 1},
{&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1},
- {&__pyx_n_s__fmt_rule, __pyx_k__fmt_rule, sizeof(__pyx_k__fmt_rule), 0, 0, 1, 1},
{&__pyx_n_s__form_rule, __pyx_k__form_rule, sizeof(__pyx_k__form_rule), 0, 0, 1, 1},
{&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
{&__pyx_n_s__fphrase, __pyx_k__fphrase, sizeof(__pyx_k__fphrase), 0, 0, 1, 1},
@@ -75462,6 +75693,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s__pattern2phrase_plus, __pyx_k__pattern2phrase_plus, sizeof(__pyx_k__pattern2phrase_plus), 0, 0, 1, 1},
{&__pyx_n_s__phrase, __pyx_k__phrase, sizeof(__pyx_k__phrase), 0, 0, 1, 1},
{&__pyx_n_s__phrase_location, __pyx_k__phrase_location, sizeof(__pyx_k__phrase_location), 0, 0, 1, 1},
+ {&__pyx_n_s__phrases_al, __pyx_k__phrases_al, sizeof(__pyx_k__phrases_al), 0, 0, 1, 1},
+ {&__pyx_n_s__phrases_e, __pyx_k__phrases_e, sizeof(__pyx_k__phrases_e), 0, 0, 1, 1},
+ {&__pyx_n_s__phrases_f, __pyx_k__phrases_f, sizeof(__pyx_k__phrases_f), 0, 0, 1, 1},
+ {&__pyx_n_s__phrases_fe, __pyx_k__phrases_fe, sizeof(__pyx_k__phrases_fe), 0, 0, 1, 1},
{&__pyx_n_s__plus_links, __pyx_k__plus_links, sizeof(__pyx_k__plus_links), 0, 0, 1, 1},
{&__pyx_n_s__pop, __pyx_k__pop, sizeof(__pyx_k__pop), 0, 0, 1, 1},
{&__pyx_n_s__precompute, __pyx_k__precompute, sizeof(__pyx_k__precompute), 0, 0, 1, 1},
@@ -75487,6 +75722,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s__sample, __pyx_k__sample, sizeof(__pyx_k__sample), 0, 0, 1, 1},
{&__pyx_n_s__sample_size, __pyx_k__sample_size, sizeof(__pyx_k__sample_size), 0, 0, 1, 1},
{&__pyx_n_s__sampler, __pyx_k__sampler, sizeof(__pyx_k__sampler), 0, 0, 1, 1},
+ {&__pyx_n_s__samples_f, __pyx_k__samples_f, sizeof(__pyx_k__samples_f), 0, 0, 1, 1},
{&__pyx_n_s__sarray, __pyx_k__sarray, sizeof(__pyx_k__sarray), 0, 0, 1, 1},
{&__pyx_n_s__scorer, __pyx_k__scorer, sizeof(__pyx_k__scorer), 0, 0, 1, 1},
{&__pyx_n_s__scores, __pyx_k__scores, sizeof(__pyx_k__scores), 0, 0, 1, 1},
@@ -75547,9 +75783,9 @@ static int __Pyx_InitCachedBuiltins(void) {
__pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s__zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_cmp = __Pyx_GetBuiltinName(__pyx_n_s__cmp); if (!__pyx_builtin_cmp) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s__sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s__max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_cmp = __Pyx_GetBuiltinName(__pyx_n_s__cmp); if (!__pyx_builtin_cmp) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s__sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s__max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
return 0;
__pyx_L1_error:;
return -1;
@@ -75559,7 +75795,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/mdenkows/cdec/python/cdec/sa/data_array.pxi":20
* self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1}
* self.id2word = ["END_OF_FILE", "END_OF_LINE"]
* self.data = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -75570,7 +75806,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_11);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":21
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":21
* self.id2word = ["END_OF_FILE", "END_OF_LINE"]
* self.data = IntList(1000,1000)
* self.sent_id = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -75581,7 +75817,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_12);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":22
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":22
* self.data = IntList(1000,1000)
* self.sent_id = IntList(1000,1000)
* self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -75592,7 +75828,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_13);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":66
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":66
* f.write("%s " % self.get_word(w_id))
* if w_id == 1:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -75603,7 +75839,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_16);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":61
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":61
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -75614,7 +75850,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_17);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":69
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":69
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -75625,7 +75861,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_18);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":74
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":74
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp:
* data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<<
@@ -75636,7 +75872,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_20);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":73
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":73
*
* def read_bitext(self, char* filename, int side):
* with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<<
@@ -75647,7 +75883,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_21);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":130
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":130
* num_words = len(self.id2word) - 2
* fwrite(&(num_words), sizeof(int), 1, f)
* for word in self.id2word[2:]: # <<<<<<<<<<<<<<
@@ -75658,7 +75894,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_slice_22);
__Pyx_GIVEREF(__pyx_k_slice_22);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":144
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":144
* for i in self.data:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -75669,7 +75905,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_24);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":147
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":147
* for i in self.sent_index:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -75680,7 +75916,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_25);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":150
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":150
* for i in self.sent_id:
* f.write("%d " %i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -75691,7 +75927,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_26);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":153
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":153
* for word in self.id2word:
* f.write("%s %d " % (word, self.word2id[word]))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -75702,7 +75938,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_28);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/data_array.pxi":156
+ /* "/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":156
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -75712,7 +75948,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_30);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":48
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":48
*
* def __cinit__(self, from_binary=None, from_text=None):
* self.links = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -75723,7 +75959,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_31);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":49
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":49
* def __cinit__(self, from_binary=None, from_text=None):
* self.links = IntList(1000,1000)
* self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<<
@@ -75734,7 +75970,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_32);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":61
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":61
* pairs = line.split()
* for pair in pairs:
* (i, j) = map(int, pair.split('-')) # <<<<<<<<<<<<<<
@@ -75745,7 +75981,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_34);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":56
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":56
*
* def read_text(self, char* filename):
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -75756,7 +75992,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_35);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":77
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":77
* for i, link in enumerate(self.links):
* while i >= self.sent_index[sent_num]:
* f.write("\n") # <<<<<<<<<<<<<<
@@ -75767,7 +76003,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_36);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":80
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":80
* sent_num = sent_num + 1
* f.write("%d-%d " % self.unlink(link))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -75778,7 +76014,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_38);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":73
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":73
*
* def write_text(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -75789,40 +76025,40 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_39);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":94
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":93
* for link in self.links:
* f.write("%d " % link)
* f.write("\n") # <<<<<<<<<<<<<<
* for i in self.sent_index:
* f.write("%d " % i)
*/
- __pyx_k_tuple_40 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_40 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_40);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_40));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":97
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":96
* for i in self.sent_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
*
* def alignment(self, i):
*/
- __pyx_k_tuple_41 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_41 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_41);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":90
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":90
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
- * sent_num = 1
* for link in self.links:
+ * f.write("%d " % link)
*/
__pyx_k_tuple_42 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_42);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":297
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":297
*
* # Re-read file, placing words into buckets
* f.seek(0) # <<<<<<<<<<<<<<
@@ -75833,7 +76069,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_45);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":273
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":273
*
* fcount = IntList()
* with gzip_or_text(filename) as f: # <<<<<<<<<<<<<<
@@ -75844,7 +76080,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_46);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":339
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":339
*
* if i > j:
* raise Exception("Sort error in CLex") # <<<<<<<<<<<<<<
@@ -75855,7 +76091,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_49);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":362
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":362
* for i in self.f_index:
* f.write("%d " % i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -75866,7 +76102,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_51);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":365
+ /* "/home/mdenkows/cdec/python/cdec/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") # <<<<<<<<<<<<<<
@@ -75877,7 +76113,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_53);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":368
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":368
* for i, w in enumerate(self.id2fword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -75888,7 +76124,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_55);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":371
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":371
* for i, w in enumerate(self.id2eword):
* f.write("%d %s " % (i, w))
* f.write("\n") # <<<<<<<<<<<<<<
@@ -75899,7 +76135,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_56);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":359
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":359
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -75910,7 +76146,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_57);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":404
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":404
* cdef i, N, e_id, f_id
*
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -75921,7 +76157,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_59);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":13
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":13
* cdef IntList rank
*
* logger.info("Constructing LCP array") # <<<<<<<<<<<<<<
@@ -75932,7 +76168,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_63);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/lcp.pxi":34
+ /* "/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":34
* if h > 0:
* h = h-1
* logger.info("LCP array completed") # <<<<<<<<<<<<<<
@@ -75943,7 +76179,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_65);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":297
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":297
* pattern_rank = {}
*
* logger.info("Precomputing frequent intersections") # <<<<<<<<<<<<<<
@@ -75954,7 +76190,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_75);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":314
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":314
* queue = IntList(increment=1000)
*
* logger.info(" Computing inverted indexes...") # <<<<<<<<<<<<<<
@@ -75965,7 +76201,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_77);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_77));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":329
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":329
* trie_node_data_append(node, i)
*
* logger.info(" Computing collocations...") # <<<<<<<<<<<<<<
@@ -75976,7 +76212,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_79);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":393
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":393
* for pattern2 in J_set:
* if len(pattern1) + len(pattern2) + 1 < self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -75987,7 +76223,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_81);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":400
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":400
* x = x+1
* if len(pattern1) + len(pattern2) + 1 <= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -75998,7 +76234,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_82);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":407
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":407
* x = x+2
* if len(pattern1) + len(pattern2) + 1<= self.max_length:
* combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<<
@@ -76009,7 +76245,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_83);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/precomputation.pxi":409
+ /* "/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":409
* combined_pattern = pattern1 + (-1,) + pattern2
* IJ_set.add(combined_pattern)
* combined_pattern = pattern2 + (-1,) + pattern1 # <<<<<<<<<<<<<<
@@ -76020,7 +76256,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_84);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_84));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":94
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":94
*
* '''Step 3: read off suffix array from inverse suffix array'''
* logger.info(" Finalizing sort...") # <<<<<<<<<<<<<<
@@ -76031,7 +76267,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_95);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":193
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":193
* for a_i in self.sa:
* f.write("%d " % a_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -76042,7 +76278,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_98);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":196
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":196
* for w_i in self.ha:
* f.write("%d " % w_i)
* f.write("\n") # <<<<<<<<<<<<<<
@@ -76053,7 +76289,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_99);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/suffix_array.pxi":189
+ /* "/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":189
*
* def write_enhanced(self, char* filename):
* with open(filename, "w") as f: # <<<<<<<<<<<<<<
@@ -76064,344 +76300,245 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GOTREF(__pyx_k_tuple_100);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":119
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":144
* logger.info("Sampling strategy: uniform, max sample size = %d", sample_size)
* else:
* logger.info("Sampling strategy: no sampling") # <<<<<<<<<<<<<<
*
* def sample(self, PhraseLocation phrase_location):
*/
- __pyx_k_tuple_104 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_103)); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_104);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_104));
+ __pyx_k_tuple_106 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_105)); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_106);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_106));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":339
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":357
* self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation())
* if alignment is None:
* raise Exception("Must specify an alignment object") # <<<<<<<<<<<<<<
* self.alignment = alignment
*
*/
- __pyx_k_tuple_109 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_108)); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_109);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
+ __pyx_k_tuple_111 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_110)); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_111);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_111));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1064
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1069
* else:
* #ERROR: We never get here
* raise Exception("Keyword trie error") # <<<<<<<<<<<<<<
* # checking whether lookup_required
* if lookup_required:
*/
- __pyx_k_tuple_126 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_125)); if (unlikely(!__pyx_k_tuple_126)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_126);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126));
+ __pyx_k_tuple_127 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_126)); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_127);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_127));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1982
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1988
* if nt and nt[-1][2] == f_j - 1:
* # Add to non-terminal, checking for collisions
* old_last_nt = nt[-1][:] # <<<<<<<<<<<<<<
* nt[-1][2] = f_j
* if link_i < nt[-1][3]:
*/
- __pyx_k_slice_140 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_140)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_slice_140);
- __Pyx_GIVEREF(__pyx_k_slice_140);
+ __pyx_k_slice_141 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_141)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_slice_141);
+ __Pyx_GIVEREF(__pyx_k_slice_141);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":1919
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1925
* # f_ i and j are current, e_ i and j are previous
* # We care _considering_ f_j, so it is not yet in counts
* def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<<
* # Phrase extraction limits
* if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size:
*/
- __pyx_k_tuple_141 = PyTuple_Pack(19, ((PyObject *)__pyx_n_s__f_i), ((PyObject *)__pyx_n_s__f_j), ((PyObject *)__pyx_n_s__e_i), ((PyObject *)__pyx_n_s__e_j), ((PyObject *)__pyx_n_s__min_bound), ((PyObject *)__pyx_n_s__wc), ((PyObject *)__pyx_n_s__links), ((PyObject *)__pyx_n_s__nt), ((PyObject *)__pyx_n_s__nt_open), ((PyObject *)__pyx_n_s__link_i), ((PyObject *)__pyx_n_s__link_j), ((PyObject *)__pyx_n_s__new_e_i), ((PyObject *)__pyx_n_s__new_e_j), ((PyObject *)__pyx_n_s__new_min_bound), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__nt_collision), ((PyObject *)__pyx_n_s__link), ((PyObject *)__pyx_n_s__plus_links), ((PyObject *)__pyx_n_s__old_last_nt)); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_141);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141));
- __pyx_k_codeobj_142 = (PyObject*)__Pyx_PyCode_New(9, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_143, __pyx_n_s__extract, 1919, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_142)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_142 = PyTuple_Pack(19, ((PyObject *)__pyx_n_s__f_i), ((PyObject *)__pyx_n_s__f_j), ((PyObject *)__pyx_n_s__e_i), ((PyObject *)__pyx_n_s__e_j), ((PyObject *)__pyx_n_s__min_bound), ((PyObject *)__pyx_n_s__wc), ((PyObject *)__pyx_n_s__links), ((PyObject *)__pyx_n_s__nt), ((PyObject *)__pyx_n_s__nt_open), ((PyObject *)__pyx_n_s__link_i), ((PyObject *)__pyx_n_s__link_j), ((PyObject *)__pyx_n_s__new_e_i), ((PyObject *)__pyx_n_s__new_e_j), ((PyObject *)__pyx_n_s__new_min_bound), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__nt_collision), ((PyObject *)__pyx_n_s__link), ((PyObject *)__pyx_n_s__plus_links), ((PyObject *)__pyx_n_s__old_last_nt)); if (unlikely(!__pyx_k_tuple_142)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_142);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_142));
+ __pyx_k_codeobj_143 = (PyObject*)__Pyx_PyCode_New(9, 0, 19, 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__extract, 1925, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_143)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2039
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2047
* # Update phrase counts
* for rule in rules:
* (f_ph, e_ph, al) = rule[:3] # <<<<<<<<<<<<<<
- * self.phrases_f[f_ph] += 1
- * self.phrases_e[e_ph] += 1
+ * stats.phrases_f[f_ph] += 1
+ * stats.phrases_e[e_ph] += 1
*/
- __pyx_k_slice_145 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_k_slice_145)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_slice_145);
- __Pyx_GIVEREF(__pyx_k_slice_145);
+ __pyx_k_slice_146 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_k_slice_146)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_slice_146);
+ __Pyx_GIVEREF(__pyx_k_slice_146);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2059
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2067
* # Substitute in non-terminals
* nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3]))
* f_sym = list(f_span[:]) # <<<<<<<<<<<<<<
* off = f_i
* for next_nt in nt:
*/
- __pyx_k_slice_147 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_147)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_slice_147);
- __Pyx_GIVEREF(__pyx_k_slice_147);
+ __pyx_k_slice_148 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_148)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_slice_148);
+ __Pyx_GIVEREF(__pyx_k_slice_148);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2069
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2077
* f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0]))
* off += (nt_len - 1)
* e_sym = list(e_span[:]) # <<<<<<<<<<<<<<
* off = e_i
* for next_nt in nt_inv:
*/
- __pyx_k_slice_148 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_148)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_slice_148);
- __Pyx_GIVEREF(__pyx_k_slice_148);
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2126
- * # Debugging
- * def dump_online_stats(self):
- * logger.info('------------------------------') # <<<<<<<<<<<<<<
- * logger.info(' Online Stats ')
- * logger.info('------------------------------')
- */
- __pyx_k_tuple_152 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_151)); if (unlikely(!__pyx_k_tuple_152)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_152);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_152));
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2127
- * def dump_online_stats(self):
- * logger.info('------------------------------')
- * logger.info(' Online Stats ') # <<<<<<<<<<<<<<
- * logger.info('------------------------------')
- * logger.info('f')
- */
- __pyx_k_tuple_154 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_153)); if (unlikely(!__pyx_k_tuple_154)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_154);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_154));
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2128
- * logger.info('------------------------------')
- * logger.info(' Online Stats ')
- * logger.info('------------------------------') # <<<<<<<<<<<<<<
- * logger.info('f')
- * for w in self.bilex_f:
- */
- __pyx_k_tuple_155 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_151)); if (unlikely(!__pyx_k_tuple_155)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_155);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_155));
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2129
- * logger.info(' Online Stats ')
- * logger.info('------------------------------')
- * logger.info('f') # <<<<<<<<<<<<<<
- * for w in self.bilex_f:
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_f[w]))
- */
- __pyx_k_tuple_156 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__f)); if (unlikely(!__pyx_k_tuple_156)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_156);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_156));
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2132
- * for w in self.bilex_f:
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_f[w]))
- * logger.info('e') # <<<<<<<<<<<<<<
- * for w in self.bilex_e:
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_e[w]))
- */
- __pyx_k_tuple_158 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__e)); if (unlikely(!__pyx_k_tuple_158)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_158);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_158));
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2135
- * for w in self.bilex_e:
- * logger.info(sym_tostring(w) + ' : ' + str(self.bilex_e[w]))
- * logger.info('fe') # <<<<<<<<<<<<<<
- * for w in self.bilex_fe:
- * for w2 in self.bilex_fe[w]:
- */
- __pyx_k_tuple_159 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__fe)); if (unlikely(!__pyx_k_tuple_159)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_159);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_159));
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2139
- * for w2 in self.bilex_fe[w]:
- * logger.info(sym_tostring(w) + ' : ' + sym_tostring(w2) + ' : ' + str(self.bilex_fe[w][w2]))
- * logger.info('F') # <<<<<<<<<<<<<<
- * for ph in self.phrases_f:
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_f[ph]))
- */
- __pyx_k_tuple_160 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__F)); if (unlikely(!__pyx_k_tuple_160)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_160);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_160));
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2142
- * for ph in self.phrases_f:
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_f[ph]))
- * logger.info('E') # <<<<<<<<<<<<<<
- * for ph in self.phrases_e:
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_e[ph]))
- */
- __pyx_k_tuple_161 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__E)); if (unlikely(!__pyx_k_tuple_161)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_161);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_161));
-
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2145
- * for ph in self.phrases_e:
- * logger.info(str(ph) + ' ||| ' + str(self.phrases_e[ph]))
- * logger.info('FE') # <<<<<<<<<<<<<<
- * self.dump_online_rules()
- *
- */
- __pyx_k_tuple_162 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__FE)); if (unlikely(!__pyx_k_tuple_162)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_162);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_162));
+ __pyx_k_slice_149 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_149)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_slice_149);
+ __Pyx_GIVEREF(__pyx_k_slice_149);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2172
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2152
* phrases = set() # (fphrase, lex_i, lex_j)
*
* def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<<
* # Phrase extraction limits
* if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size:
*/
- __pyx_k_tuple_164 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__f_i), ((PyObject *)__pyx_n_s__f_j), ((PyObject *)__pyx_n_s__lex_i), ((PyObject *)__pyx_n_s__lex_j), ((PyObject *)__pyx_n_s__wc), ((PyObject *)__pyx_n_s__ntc), ((PyObject *)__pyx_n_s__syms), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__new_lex_i), ((PyObject *)__pyx_n_s__new_lex_j)); if (unlikely(!__pyx_k_tuple_164)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_164);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_164));
- __pyx_k_codeobj_165 = (PyObject*)__Pyx_PyCode_New(7, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_143, __pyx_n_s__extract, 2172, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_165)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_153 = PyTuple_Pack(10, ((PyObject *)__pyx_n_s__f_i), ((PyObject *)__pyx_n_s__f_j), ((PyObject *)__pyx_n_s__lex_i), ((PyObject *)__pyx_n_s__lex_j), ((PyObject *)__pyx_n_s__wc), ((PyObject *)__pyx_n_s__ntc), ((PyObject *)__pyx_n_s__syms), ((PyObject *)__pyx_n_s__f), ((PyObject *)__pyx_n_s__new_lex_i), ((PyObject *)__pyx_n_s__new_lex_j)); if (unlikely(!__pyx_k_tuple_153)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_153);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_153));
+ __pyx_k_codeobj_154 = (PyObject*)__Pyx_PyCode_New(7, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_144, __pyx_n_s__extract, 2152, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_154)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "_sa.pyx":5
+ /* "cdec/sa/_sa.pyx":5
* import gzip
*
* def monitor_cpu(): # <<<<<<<<<<<<<<
* return (resource.getrusage(resource.RUSAGE_SELF).ru_utime+
* resource.getrusage(resource.RUSAGE_SELF).ru_stime)
*/
- __pyx_k_codeobj_168 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_169, __pyx_n_s__monitor_cpu, 5, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_168)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_codeobj_157 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_158, __pyx_n_s__monitor_cpu, 5, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "_sa.pyx":9
+ /* "cdec/sa/_sa.pyx":9
* resource.getrusage(resource.RUSAGE_SELF).ru_stime)
*
* def gzip_or_text(char* filename): # <<<<<<<<<<<<<<
* if filename.endswith('.gz'):
* return gzip.GzipFile(filename)
*/
- __pyx_k_tuple_170 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__filename)); if (unlikely(!__pyx_k_tuple_170)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_170);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_170));
- __pyx_k_codeobj_171 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_169, __pyx_n_s__gzip_or_text, 9, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_171)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_159 = PyTuple_Pack(2, ((PyObject *)__pyx_n_s__filename), ((PyObject *)__pyx_n_s__filename)); if (unlikely(!__pyx_k_tuple_159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_159);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_159));
+ __pyx_k_codeobj_160 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_158, __pyx_n_s__gzip_or_text, 9, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "_sa.pyx":15
+ /* "cdec/sa/_sa.pyx":15
* return open(filename)
*
* logger = logging.getLogger('cdec.sa') # <<<<<<<<<<<<<<
*
* include "float_list.pxi"
*/
- __pyx_k_tuple_173 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_172)); if (unlikely(!__pyx_k_tuple_173)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_173);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_173));
+ __pyx_k_tuple_162 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_161)); if (unlikely(!__pyx_k_tuple_162)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_162);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_162));
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":107
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":107
* return ALPHABET.fromstring(string, terminal)
*
* def isvar(sym): # <<<<<<<<<<<<<<
* return sym_isvar(sym)
*
*/
- __pyx_k_tuple_174 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__sym)); if (unlikely(!__pyx_k_tuple_174)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_174);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_174));
- __pyx_k_codeobj_175 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_176, __pyx_n_s__isvar, 107, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_175)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_163 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__sym)); if (unlikely(!__pyx_k_tuple_163)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_163);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_163));
+ __pyx_k_codeobj_164 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_165, __pyx_n_s__isvar, 107, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_164)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":110
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":110
* return sym_isvar(sym)
*
* def make_lattice(words): # <<<<<<<<<<<<<<
* word_ids = (sym_fromstring(word, True) for word in words)
* return tuple(((word, None, 1), ) for word in word_ids)
*/
- __pyx_k_tuple_177 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__words), ((PyObject *)__pyx_n_s__word_ids), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_177)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_177);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_177));
- __pyx_k_codeobj_178 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_176, __pyx_n_s__make_lattice, 110, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_178)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_166 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__words), ((PyObject *)__pyx_n_s__word_ids), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_166)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_166);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_166));
+ __pyx_k_codeobj_167 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_165, __pyx_n_s__make_lattice, 110, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_167)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":114
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":114
* return tuple(((word, None, 1), ) for word in word_ids)
*
* def decode_lattice(lattice): # <<<<<<<<<<<<<<
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc
* for arc in node for node in lattice)
*/
- __pyx_k_tuple_179 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__lattice), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_179)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_179);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_179));
- __pyx_k_codeobj_180 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_176, __pyx_n_s__decode_lattice, 114, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_180)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_168 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__lattice), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_168)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_168);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_168));
+ __pyx_k_codeobj_169 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_165, __pyx_n_s__decode_lattice, 114, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_169)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":118
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":118
* for arc in node for node in lattice)
*
* def decode_sentence(lattice): # <<<<<<<<<<<<<<
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
*
*/
- __pyx_k_tuple_181 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__lattice), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_181)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_181);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_181));
- __pyx_k_codeobj_182 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_176, __pyx_n_s__decode_sentence, 118, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_182)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_170 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__lattice), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_170)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_170);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_170));
+ __pyx_k_codeobj_171 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_165, __pyx_n_s__decode_sentence, 118, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_171)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":121
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":121
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
*
* def encode_words(words): # <<<<<<<<<<<<<<
* return tuple(sym_fromstring(word, True) for word in words)
*
*/
- __pyx_k_tuple_183 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__words), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_183)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_183);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_183));
- __pyx_k_codeobj_184 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_176, __pyx_n_s__encode_words, 121, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_184)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_172 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__words), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_172)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_172);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_172));
+ __pyx_k_codeobj_173 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_165, __pyx_n_s__encode_words, 121, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_173)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":124
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":124
* return tuple(sym_fromstring(word, True) for word in words)
*
* def decode_words(syms): # <<<<<<<<<<<<<<
* return tuple(sym_tostring(sym) for sym in syms)
*/
- __pyx_k_tuple_185 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__syms), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_185)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_185);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_185));
- __pyx_k_codeobj_186 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_176, __pyx_n_s__decode_words, 124, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_186)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_174 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__syms), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_174)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_174);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_174));
+ __pyx_k_codeobj_175 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_165, __pyx_n_s__decode_words, 124, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_175)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2206
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2190
*
* # Spans are _inclusive_ on both ends [i, j]
* def span_check(vec, i, j): # <<<<<<<<<<<<<<
* k = i
* while k <= j:
*/
- __pyx_k_tuple_188 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__vec), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k)); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_188);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188));
- __pyx_k_codeobj_189 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_143, __pyx_n_s__span_check, 2206, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_189)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_177 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__vec), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k)); if (unlikely(!__pyx_k_tuple_177)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_177);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_177));
+ __pyx_k_codeobj_178 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_144, __pyx_n_s__span_check, 2190, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_178)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2214
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2198
* return True
*
* def span_inc(vec, i, j): # <<<<<<<<<<<<<<
* k = i
* while k <= j:
*/
- __pyx_k_tuple_190 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__vec), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k)); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_190);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
- __pyx_k_codeobj_191 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_143, __pyx_n_s__span_inc, 2214, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_191)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_179 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__vec), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k)); if (unlikely(!__pyx_k_tuple_179)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_179);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_179));
+ __pyx_k_codeobj_180 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_144, __pyx_n_s__span_inc, 2198, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_180)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2220
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2204
* k += 1
*
* def span_dec(vec, i, j): # <<<<<<<<<<<<<<
* k = i
* while k <= j:
*/
- __pyx_k_tuple_192 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__vec), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k)); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_k_tuple_192);
- __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
- __pyx_k_codeobj_193 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_143, __pyx_n_s__span_dec, 2220, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_193)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_181 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__vec), ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__j), ((PyObject *)__pyx_n_s__k)); if (unlikely(!__pyx_k_tuple_181)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_k_tuple_181);
+ __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_181));
+ __pyx_k_codeobj_182 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_144, __pyx_n_s__span_dec, 2204, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_182)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
@@ -76482,8 +76619,8 @@ PyMODINIT_FUNC PyInit__sa(void)
#if PY_MAJOR_VERSION >= 3
{
PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (!PyDict_GetItemString(modules, "_sa")) {
- if (unlikely(PyDict_SetItemString(modules, "_sa", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!PyDict_GetItemString(modules, "cdec.sa._sa")) {
+ if (unlikely(PyDict_SetItemString(modules, "cdec.sa._sa", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
}
#endif
@@ -76497,7 +76634,7 @@ PyMODINIT_FUNC PyInit__sa(void)
#if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- if (__pyx_module_is_main__sa) {
+ if (__pyx_module_is_main_cdec__sa___sa) {
if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
}
/*--- Builtin init code ---*/
@@ -76505,250 +76642,253 @@ PyMODINIT_FUNC PyInit__sa(void)
/*--- Constants init code ---*/
if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/*--- Global init code ---*/
- __pyx_v_3_sa_ALPHABET = ((struct __pyx_obj_3_sa_Alphabet *)Py_None); Py_INCREF(Py_None);
- __pyx_v_3_sa_FD = ((struct __pyx_obj_3_sa_StringMap *)Py_None); Py_INCREF(Py_None);
+ __pyx_v_4cdec_2sa_3_sa_ALPHABET = ((struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *)Py_None); Py_INCREF(Py_None);
+ __pyx_v_4cdec_2sa_3_sa_FD = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)Py_None); Py_INCREF(Py_None);
/*--- Variable export code ---*/
/*--- Function export code ---*/
- if (__Pyx_ExportFunction("sym_tostring", (void (*)(void))__pyx_f_3_sa_sym_tostring, "char *(int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_ExportFunction("sym_tocat", (void (*)(void))__pyx_f_3_sa_sym_tocat, "char *(int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_ExportFunction("sym_isvar", (void (*)(void))__pyx_f_3_sa_sym_isvar, "int (int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_ExportFunction("sym_getindex", (void (*)(void))__pyx_f_3_sa_sym_getindex, "int (int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_ExportFunction("sym_tostring", (void (*)(void))__pyx_f_4cdec_2sa_3_sa_sym_tostring, "char *(int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_ExportFunction("sym_tocat", (void (*)(void))__pyx_f_4cdec_2sa_3_sa_sym_tocat, "char *(int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_ExportFunction("sym_isvar", (void (*)(void))__pyx_f_4cdec_2sa_3_sa_sym_isvar, "int (int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_ExportFunction("sym_getindex", (void (*)(void))__pyx_f_4cdec_2sa_3_sa_sym_getindex, "int (int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/*--- Type init code ---*/
- __pyx_vtabptr_3_sa_HieroCachingRuleFactory = &__pyx_vtable_3_sa_HieroCachingRuleFactory;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.set_idmap = (PyObject *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_3_sa_DataArray *))__pyx_f_3_sa_23HieroCachingRuleFactory_set_idmap;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.baeza_yates_helper = (int *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, int, int *, int, int, int, int *, int, int, int, int, int *))__pyx_f_3_sa_23HieroCachingRuleFactory_baeza_yates_helper;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.compare_matchings_set = (long (*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, int, int *, int, struct __pyx_t_3_sa_Matching *, int, int))__pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings_set;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.compare_matchings = (long (*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_t_3_sa_Matching *, struct __pyx_t_3_sa_Matching *, int, int))__pyx_f_3_sa_23HieroCachingRuleFactory_compare_matchings;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.merge_helper = (int *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, int, int *, int, int, int, int *, int, int, int, int, int *))__pyx_f_3_sa_23HieroCachingRuleFactory_merge_helper;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.sort_phrase_loc = (void (*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_3_sa_IntList *, struct __pyx_obj_3_sa_PhraseLocation *, struct __pyx_obj_3_sa_Phrase *))__pyx_f_3_sa_23HieroCachingRuleFactory_sort_phrase_loc;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.intersect_helper = (PyObject *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_3_sa_Phrase *, struct __pyx_obj_3_sa_Phrase *, struct __pyx_obj_3_sa_PhraseLocation *, struct __pyx_obj_3_sa_PhraseLocation *, int))__pyx_f_3_sa_23HieroCachingRuleFactory_intersect_helper;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.loc2str = (PyObject *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_3_sa_PhraseLocation *))__pyx_f_3_sa_23HieroCachingRuleFactory_loc2str;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.intersect = (struct __pyx_obj_3_sa_PhraseLocation *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, PyObject *, PyObject *, struct __pyx_obj_3_sa_Phrase *))__pyx_f_3_sa_23HieroCachingRuleFactory_intersect;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.find_fixpoint = (int (*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, PyObject *, int *, int *, int *, int *, int, int, int *, int *, int *, int *, int, int, int, int, int, int, int, int, int, int, int))__pyx_f_3_sa_23HieroCachingRuleFactory_find_fixpoint;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.find_projection = (PyObject *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, int, int *, int *, int *, int *))__pyx_f_3_sa_23HieroCachingRuleFactory_find_projection;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.int_arr_extend = (int *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int *, int *, int *, int))__pyx_f_3_sa_23HieroCachingRuleFactory_int_arr_extend;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.extract_phrases = (PyObject *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int, int, int *, int *, int *, int, int, int, int *, int *, int *, int, int, int))__pyx_f_3_sa_23HieroCachingRuleFactory_extract_phrases;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.create_alignments = (struct __pyx_obj_3_sa_IntList *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, int *, int, struct __pyx_obj_3_sa_IntList *, struct __pyx_obj_3_sa_IntList *))__pyx_f_3_sa_23HieroCachingRuleFactory_create_alignments;
- __pyx_vtable_3_sa_HieroCachingRuleFactory.extract = (PyObject *(*)(struct __pyx_obj_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_3_sa_Phrase *, struct __pyx_t_3_sa_Matching *, int *, int))__pyx_f_3_sa_23HieroCachingRuleFactory_extract;
- if (PyType_Ready(&__pyx_type_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_HieroCachingRuleFactory.tp_dict, __pyx_vtabptr_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "HieroCachingRuleFactory", (PyObject *)&__pyx_type_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_HieroCachingRuleFactory = &__pyx_type_3_sa_HieroCachingRuleFactory;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_9_decode_sentence) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __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_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_20_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_20_genexpr = &__pyx_type_3_sa___pyx_scope_struct_20_genexpr;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_3_compute_stats) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_3_compute_stats = &__pyx_type_3_sa___pyx_scope_struct_3_compute_stats;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_12_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __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_29_genexpr) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_29_genexpr = &__pyx_type_3_sa___pyx_scope_struct_29_genexpr;
- __pyx_vtabptr_3_sa_IntList = &__pyx_vtable_3_sa_IntList;
- __pyx_vtable_3_sa_IntList.set = (void (*)(struct __pyx_obj_3_sa_IntList *, int, int))__pyx_f_3_sa_7IntList_set;
- __pyx_vtable_3_sa_IntList._append = (void (*)(struct __pyx_obj_3_sa_IntList *, int))__pyx_f_3_sa_7IntList__append;
- __pyx_vtable_3_sa_IntList._extend = (void (*)(struct __pyx_obj_3_sa_IntList *, struct __pyx_obj_3_sa_IntList *))__pyx_f_3_sa_7IntList__extend;
- __pyx_vtable_3_sa_IntList._extend_arr = (void (*)(struct __pyx_obj_3_sa_IntList *, int *, int))__pyx_f_3_sa_7IntList__extend_arr;
- __pyx_vtable_3_sa_IntList._clear = (void (*)(struct __pyx_obj_3_sa_IntList *))__pyx_f_3_sa_7IntList__clear;
- __pyx_vtable_3_sa_IntList.write_handle = (void (*)(struct __pyx_obj_3_sa_IntList *, FILE *))__pyx_f_3_sa_7IntList_write_handle;
- __pyx_vtable_3_sa_IntList.read_handle = (void (*)(struct __pyx_obj_3_sa_IntList *, FILE *))__pyx_f_3_sa_7IntList_read_handle;
- if (PyType_Ready(&__pyx_type_3_sa_IntList) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_IntList.tp_dict, __pyx_vtabptr_3_sa_IntList) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "IntList", (PyObject *)&__pyx_type_3_sa_IntList) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_IntList = &__pyx_type_3_sa_IntList;
- if (PyType_Ready(&__pyx_type_3_sa_VEBIterator) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "VEBIterator", (PyObject *)&__pyx_type_3_sa_VEBIterator) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_VEBIterator = &__pyx_type_3_sa_VEBIterator;
- __pyx_vtabptr_3_sa_BiLex = &__pyx_vtable_3_sa_BiLex;
- __pyx_vtable_3_sa_BiLex.compute_from_data = (PyObject *(*)(struct __pyx_obj_3_sa_BiLex *, struct __pyx_obj_3_sa_SuffixArray *, struct __pyx_obj_3_sa_DataArray *, struct __pyx_obj_3_sa_Alignment *))__pyx_f_3_sa_5BiLex_compute_from_data;
- __pyx_vtable_3_sa_BiLex._add_node = (PyObject *(*)(struct __pyx_obj_3_sa_BiLex *, struct __pyx_t_3_sa__node *, int *, float, int *))__pyx_f_3_sa_5BiLex__add_node;
- __pyx_vtable_3_sa_BiLex.write_wordlist = (PyObject *(*)(struct __pyx_obj_3_sa_BiLex *, PyObject *, FILE *))__pyx_f_3_sa_5BiLex_write_wordlist;
- __pyx_vtable_3_sa_BiLex.read_wordlist = (PyObject *(*)(struct __pyx_obj_3_sa_BiLex *, PyObject *, PyObject *, FILE *))__pyx_f_3_sa_5BiLex_read_wordlist;
- __pyx_vtable_3_sa_BiLex.swap = (PyObject *(*)(struct __pyx_obj_3_sa_BiLex *, int, int))__pyx_f_3_sa_5BiLex_swap;
- __pyx_vtable_3_sa_BiLex.qsort = (PyObject *(*)(struct __pyx_obj_3_sa_BiLex *, int, int, PyObject *))__pyx_f_3_sa_5BiLex_qsort;
- if (PyType_Ready(&__pyx_type_3_sa_BiLex) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_BiLex.tp_dict, __pyx_vtabptr_3_sa_BiLex) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "BiLex", (PyObject *)&__pyx_type_3_sa_BiLex) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_BiLex = &__pyx_type_3_sa_BiLex;
- __pyx_vtabptr_3_sa_VEB = &__pyx_vtable_3_sa_VEB;
- __pyx_vtable_3_sa_VEB._findsucc = (int (*)(struct __pyx_obj_3_sa_VEB *, int))__pyx_f_3_sa_3VEB__findsucc;
- __pyx_vtable_3_sa_VEB._insert = (int (*)(struct __pyx_obj_3_sa_VEB *, int))__pyx_f_3_sa_3VEB__insert;
- __pyx_vtable_3_sa_VEB._first = (int (*)(struct __pyx_obj_3_sa_VEB *))__pyx_f_3_sa_3VEB__first;
- if (PyType_Ready(&__pyx_type_3_sa_VEB) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_VEB.tp_dict, __pyx_vtabptr_3_sa_VEB) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "VEB", (PyObject *)&__pyx_type_3_sa_VEB) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_VEB = &__pyx_type_3_sa_VEB;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_11_encode_words) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __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_LCP) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "LCP", (PyObject *)&__pyx_type_3_sa_LCP) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_LCP = &__pyx_type_3_sa_LCP;
- __pyx_vtabptr_3_sa_DataArray = &__pyx_vtable_3_sa_DataArray;
- __pyx_vtable_3_sa_DataArray.read_handle = (void (*)(struct __pyx_obj_3_sa_DataArray *, FILE *))__pyx_f_3_sa_9DataArray_read_handle;
- __pyx_vtable_3_sa_DataArray.write_handle = (void (*)(struct __pyx_obj_3_sa_DataArray *, FILE *))__pyx_f_3_sa_9DataArray_write_handle;
- if (PyType_Ready(&__pyx_type_3_sa_DataArray) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_DataArray.tp_dict, __pyx_vtabptr_3_sa_DataArray) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "DataArray", (PyObject *)&__pyx_type_3_sa_DataArray) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_DataArray = &__pyx_type_3_sa_DataArray;
- if (PyType_Ready(&__pyx_type_3_sa_BitSetIterator) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "BitSetIterator", (PyObject *)&__pyx_type_3_sa_BitSetIterator) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_BitSetIterator = &__pyx_type_3_sa_BitSetIterator;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_23_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_23_genexpr = &__pyx_type_3_sa___pyx_scope_struct_23_genexpr;
- __pyx_vtabptr_3_sa_Precomputation = &__pyx_vtable_3_sa_Precomputation;
- __pyx_vtable_3_sa_Precomputation.read_map = (PyObject *(*)(struct __pyx_obj_3_sa_Precomputation *, FILE *))__pyx_f_3_sa_14Precomputation_read_map;
- __pyx_vtable_3_sa_Precomputation.write_map = (PyObject *(*)(struct __pyx_obj_3_sa_Precomputation *, PyObject *, FILE *))__pyx_f_3_sa_14Precomputation_write_map;
- if (PyType_Ready(&__pyx_type_3_sa_Precomputation) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_Precomputation.tp_dict, __pyx_vtabptr_3_sa_Precomputation) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "Precomputation", (PyObject *)&__pyx_type_3_sa_Precomputation) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_Precomputation = &__pyx_type_3_sa_Precomputation;
- 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_14_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 125; __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;
- __pyx_vtabptr_3_sa_SuffixArray = &__pyx_vtable_3_sa_SuffixArray;
- __pyx_vtable_3_sa_SuffixArray.__pyx___search_high = (int (*)(struct __pyx_obj_3_sa_SuffixArray *, int, int, int, int))__pyx_f_3_sa_11SuffixArray___search_high;
- __pyx_vtable_3_sa_SuffixArray.__pyx___search_low = (int (*)(struct __pyx_obj_3_sa_SuffixArray *, int, int, int, int))__pyx_f_3_sa_11SuffixArray___search_low;
- __pyx_vtable_3_sa_SuffixArray.__pyx___get_range = (PyObject *(*)(struct __pyx_obj_3_sa_SuffixArray *, int, int, int, int, int))__pyx_f_3_sa_11SuffixArray___get_range;
- __pyx_vtable_3_sa_SuffixArray.__pyx___lookup_helper = (PyObject *(*)(struct __pyx_obj_3_sa_SuffixArray *, int, int, int, int))__pyx_f_3_sa_11SuffixArray___lookup_helper;
- if (PyType_Ready(&__pyx_type_3_sa_SuffixArray) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_SuffixArray.tp_dict, __pyx_vtabptr_3_sa_SuffixArray) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "SuffixArray", (PyObject *)&__pyx_type_3_sa_SuffixArray) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_SuffixArray = &__pyx_type_3_sa_SuffixArray;
- 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__;
- __pyx_vtabptr_3_sa_Alphabet = &__pyx_vtable_3_sa_Alphabet;
- __pyx_vtable_3_sa_Alphabet.isvar = (int (*)(struct __pyx_obj_3_sa_Alphabet *, int))__pyx_f_3_sa_8Alphabet_isvar;
- __pyx_vtable_3_sa_Alphabet.isword = (int (*)(struct __pyx_obj_3_sa_Alphabet *, int))__pyx_f_3_sa_8Alphabet_isword;
- __pyx_vtable_3_sa_Alphabet.getindex = (int (*)(struct __pyx_obj_3_sa_Alphabet *, int))__pyx_f_3_sa_8Alphabet_getindex;
- __pyx_vtable_3_sa_Alphabet.setindex = (int (*)(struct __pyx_obj_3_sa_Alphabet *, int, int))__pyx_f_3_sa_8Alphabet_setindex;
- __pyx_vtable_3_sa_Alphabet.clearindex = (int (*)(struct __pyx_obj_3_sa_Alphabet *, int))__pyx_f_3_sa_8Alphabet_clearindex;
- __pyx_vtable_3_sa_Alphabet.match = (int (*)(struct __pyx_obj_3_sa_Alphabet *, int, int))__pyx_f_3_sa_8Alphabet_match;
- __pyx_vtable_3_sa_Alphabet.tocat = (char *(*)(struct __pyx_obj_3_sa_Alphabet *, int))__pyx_f_3_sa_8Alphabet_tocat;
- __pyx_vtable_3_sa_Alphabet.fromcat = (int (*)(struct __pyx_obj_3_sa_Alphabet *, char *))__pyx_f_3_sa_8Alphabet_fromcat;
- __pyx_vtable_3_sa_Alphabet.tostring = (char *(*)(struct __pyx_obj_3_sa_Alphabet *, int))__pyx_f_3_sa_8Alphabet_tostring;
- __pyx_vtable_3_sa_Alphabet.fromstring = (int (*)(struct __pyx_obj_3_sa_Alphabet *, char *, int))__pyx_f_3_sa_8Alphabet_fromstring;
- if (PyType_Ready(&__pyx_type_3_sa_Alphabet) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_Alphabet.tp_dict, __pyx_vtabptr_3_sa_Alphabet) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "Alphabet", (PyObject *)&__pyx_type_3_sa_Alphabet) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_Alphabet = &__pyx_type_3_sa_Alphabet;
- if (PyType_Ready(&__pyx_type_3_sa_Rule) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "Rule", (PyObject *)&__pyx_type_3_sa_Rule) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_Rule = &__pyx_type_3_sa_Rule;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_6_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_6_genexpr = &__pyx_type_3_sa___pyx_scope_struct_6_genexpr;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_21_add_instance) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_21_add_instance = &__pyx_type_3_sa___pyx_scope_struct_21_add_instance;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_2_genexpr = &__pyx_type_3_sa___pyx_scope_struct_2_genexpr;
- __pyx_vtabptr_3_sa_PhraseLocation = &__pyx_vtable_3_sa_PhraseLocation;
- __pyx_vtable_3_sa_PhraseLocation.contains = (int (*)(struct __pyx_obj_3_sa_PhraseLocation *, int))__pyx_f_3_sa_14PhraseLocation_contains;
- if (PyType_Ready(&__pyx_type_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_PhraseLocation.tp_dict, __pyx_vtabptr_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "PhraseLocation", (PyObject *)&__pyx_type_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_PhraseLocation = &__pyx_type_3_sa_PhraseLocation;
- 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_22_form_rule) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_22_form_rule = &__pyx_type_3_sa___pyx_scope_struct_22_form_rule;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_25_genexpr = &__pyx_type_3_sa___pyx_scope_struct_25_genexpr;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_24_fmt_rule) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_24_fmt_rule = &__pyx_type_3_sa___pyx_scope_struct_24_fmt_rule;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_28___str__) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_28___str__ = &__pyx_type_3_sa___pyx_scope_struct_28___str__;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_1_read_bitext) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_1_read_bitext = &__pyx_type_3_sa___pyx_scope_struct_1_read_bitext;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_13_decode_words) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __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_FeatureVector) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "FeatureVector", (PyObject *)&__pyx_type_3_sa_FeatureVector) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_FeatureVector = &__pyx_type_3_sa_FeatureVector;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_7_decode_lattice) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_7_decode_lattice = &__pyx_type_3_sa___pyx_scope_struct_7_decode_lattice;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_19_input) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __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;
- __pyx_vtabptr_3_sa_Scorer = &__pyx_vtable_3_sa_Scorer;
- __pyx_vtable_3_sa_Scorer.score = (struct __pyx_obj_3_sa_FeatureVector *(*)(struct __pyx_obj_3_sa_Scorer *, PyObject *))__pyx_f_3_sa_6Scorer_score;
- if (PyType_Ready(&__pyx_type_3_sa_Scorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_Scorer.tp_dict, __pyx_vtabptr_3_sa_Scorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "Scorer", (PyObject *)&__pyx_type_3_sa_Scorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_Scorer = &__pyx_type_3_sa_Scorer;
- __pyx_vtabptr_3_sa_Alignment = &__pyx_vtable_3_sa_Alignment;
- __pyx_vtable_3_sa_Alignment.link = (int (*)(struct __pyx_obj_3_sa_Alignment *, int, int))__pyx_f_3_sa_9Alignment_link;
- __pyx_vtable_3_sa_Alignment._unlink = (PyObject *(*)(struct __pyx_obj_3_sa_Alignment *, int, int *, int *))__pyx_f_3_sa_9Alignment__unlink;
- __pyx_vtable_3_sa_Alignment._get_sent_links = (int *(*)(struct __pyx_obj_3_sa_Alignment *, int, int *))__pyx_f_3_sa_9Alignment__get_sent_links;
- if (PyType_Ready(&__pyx_type_3_sa_Alignment) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_Alignment.tp_dict, __pyx_vtabptr_3_sa_Alignment) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "Alignment", (PyObject *)&__pyx_type_3_sa_Alignment) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_Alignment = &__pyx_type_3_sa_Alignment;
- if (PyType_Ready(&__pyx_type_3_sa_BitSet) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "BitSet", (PyObject *)&__pyx_type_3_sa_BitSet) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_BitSet = &__pyx_type_3_sa_BitSet;
- if (PyType_Ready(&__pyx_type_3_sa_Sampler) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "Sampler", (PyObject *)&__pyx_type_3_sa_Sampler) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_Sampler = &__pyx_type_3_sa_Sampler;
- __pyx_vtabptr_3_sa_StringMap = &__pyx_vtable_3_sa_StringMap;
- __pyx_vtable_3_sa_StringMap.word = (char *(*)(struct __pyx_obj_3_sa_StringMap *, int))__pyx_f_3_sa_9StringMap_word;
- __pyx_vtable_3_sa_StringMap.index = (int (*)(struct __pyx_obj_3_sa_StringMap *, char *))__pyx_f_3_sa_9StringMap_index;
- if (PyType_Ready(&__pyx_type_3_sa_StringMap) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_StringMap.tp_dict, __pyx_vtabptr_3_sa_StringMap) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "StringMap", (PyObject *)&__pyx_type_3_sa_StringMap) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_StringMap = &__pyx_type_3_sa_StringMap;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_26_get_f_phrases) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_26_get_f_phrases = &__pyx_type_3_sa___pyx_scope_struct_26_get_f_phrases;
- if (PyType_Ready(&__pyx_type_3_sa_TrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "TrieNode", (PyObject *)&__pyx_type_3_sa_TrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_TrieNode = &__pyx_type_3_sa_TrieNode;
- __pyx_type_3_sa_ExtendedTrieNode.tp_base = __pyx_ptype_3_sa_TrieNode;
- if (PyType_Ready(&__pyx_type_3_sa_ExtendedTrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "ExtendedTrieNode", (PyObject *)&__pyx_type_3_sa_ExtendedTrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_ExtendedTrieNode = &__pyx_type_3_sa_ExtendedTrieNode;
- __pyx_vtabptr_3_sa_TrieMap = &__pyx_vtable_3_sa_TrieMap;
- __pyx_vtable_3_sa_TrieMap._insert = (struct __pyx_t_3_sa__Trie_Node *(*)(struct __pyx_obj_3_sa_TrieMap *, int *, int))__pyx_f_3_sa_7TrieMap__insert;
- __pyx_vtable_3_sa_TrieMap._contains = (struct __pyx_t_3_sa__Trie_Node *(*)(struct __pyx_obj_3_sa_TrieMap *, int *, int))__pyx_f_3_sa_7TrieMap__contains;
- if (PyType_Ready(&__pyx_type_3_sa_TrieMap) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_TrieMap.tp_dict, __pyx_vtabptr_3_sa_TrieMap) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "TrieMap", (PyObject *)&__pyx_type_3_sa_TrieMap) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_TrieMap = &__pyx_type_3_sa_TrieMap;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_8_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_8_genexpr = &__pyx_type_3_sa___pyx_scope_struct_8_genexpr;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_4_make_lattice) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_4_make_lattice = &__pyx_type_3_sa___pyx_scope_struct_4_make_lattice;
- __pyx_vtabptr_3_sa_Phrase = &__pyx_vtable_3_sa_Phrase;
- __pyx_vtable_3_sa_Phrase.chunkpos = (int (*)(struct __pyx_obj_3_sa_Phrase *, int))__pyx_f_3_sa_6Phrase_chunkpos;
- __pyx_vtable_3_sa_Phrase.chunklen = (int (*)(struct __pyx_obj_3_sa_Phrase *, int))__pyx_f_3_sa_6Phrase_chunklen;
- if (PyType_Ready(&__pyx_type_3_sa_Phrase) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_Phrase.tp_dict, __pyx_vtabptr_3_sa_Phrase) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "Phrase", (PyObject *)&__pyx_type_3_sa_Phrase) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_Phrase = &__pyx_type_3_sa_Phrase;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_27___iter__) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_27___iter__ = &__pyx_type_3_sa___pyx_scope_struct_27___iter__;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct____iter__ = &__pyx_type_3_sa___pyx_scope_struct____iter__;
- if (PyType_Ready(&__pyx_type_3_sa_TrieTable) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "TrieTable", (PyObject *)&__pyx_type_3_sa_TrieTable) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_TrieTable = &__pyx_type_3_sa_TrieTable;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_5_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa___pyx_scope_struct_5_genexpr = &__pyx_type_3_sa___pyx_scope_struct_5_genexpr;
- if (PyType_Ready(&__pyx_type_3_sa___pyx_scope_struct_10_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __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;
- __pyx_vtabptr_3_sa_FloatList = &__pyx_vtable_3_sa_FloatList;
- __pyx_vtable_3_sa_FloatList.set = (void (*)(struct __pyx_obj_3_sa_FloatList *, int, float))__pyx_f_3_sa_9FloatList_set;
- __pyx_vtable_3_sa_FloatList.write_handle = (void (*)(struct __pyx_obj_3_sa_FloatList *, FILE *))__pyx_f_3_sa_9FloatList_write_handle;
- __pyx_vtable_3_sa_FloatList.read_handle = (void (*)(struct __pyx_obj_3_sa_FloatList *, FILE *))__pyx_f_3_sa_9FloatList_read_handle;
- if (PyType_Ready(&__pyx_type_3_sa_FloatList) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_3_sa_FloatList.tp_dict, __pyx_vtabptr_3_sa_FloatList) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "FloatList", (PyObject *)&__pyx_type_3_sa_FloatList) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_3_sa_FloatList = &__pyx_type_3_sa_FloatList;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_FeatureVector) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "FeatureVector", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_FeatureVector) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_FeatureVector = &__pyx_type_4cdec_2sa_3_sa_FeatureVector;
+ __pyx_vtabptr_4cdec_2sa_3_sa_SuffixArray = &__pyx_vtable_4cdec_2sa_3_sa_SuffixArray;
+ __pyx_vtable_4cdec_2sa_3_sa_SuffixArray.__pyx___search_high = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *, int, int, int, int))__pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high;
+ __pyx_vtable_4cdec_2sa_3_sa_SuffixArray.__pyx___search_low = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *, int, int, int, int))__pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low;
+ __pyx_vtable_4cdec_2sa_3_sa_SuffixArray.__pyx___get_range = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *, int, int, int, int, int))__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range;
+ __pyx_vtable_4cdec_2sa_3_sa_SuffixArray.__pyx___lookup_helper = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *, int, int, int, int))__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_SuffixArray) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_SuffixArray.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_SuffixArray) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "SuffixArray", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_SuffixArray) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_SuffixArray = &__pyx_type_4cdec_2sa_3_sa_SuffixArray;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_4_make_lattice;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_LCP) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "LCP", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_LCP) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_LCP = &__pyx_type_4cdec_2sa_3_sa_LCP;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_17_genexpr;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_OnlineStats) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "OnlineStats", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_OnlineStats) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_OnlineStats = &__pyx_type_4cdec_2sa_3_sa_OnlineStats;
+ __pyx_vtabptr_4cdec_2sa_3_sa_IntList = &__pyx_vtable_4cdec_2sa_3_sa_IntList;
+ __pyx_vtable_4cdec_2sa_3_sa_IntList.set = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, int, int))__pyx_f_4cdec_2sa_3_sa_7IntList_set;
+ __pyx_vtable_4cdec_2sa_3_sa_IntList._append = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, int))__pyx_f_4cdec_2sa_3_sa_7IntList__append;
+ __pyx_vtable_4cdec_2sa_3_sa_IntList._extend = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, struct __pyx_obj_4cdec_2sa_3_sa_IntList *))__pyx_f_4cdec_2sa_3_sa_7IntList__extend;
+ __pyx_vtable_4cdec_2sa_3_sa_IntList._extend_arr = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, int *, int))__pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr;
+ __pyx_vtable_4cdec_2sa_3_sa_IntList._clear = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *))__pyx_f_4cdec_2sa_3_sa_7IntList__clear;
+ __pyx_vtable_4cdec_2sa_3_sa_IntList.write_handle = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, FILE *))__pyx_f_4cdec_2sa_3_sa_7IntList_write_handle;
+ __pyx_vtable_4cdec_2sa_3_sa_IntList.read_handle = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_IntList *, FILE *))__pyx_f_4cdec_2sa_3_sa_7IntList_read_handle;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_IntList) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_IntList.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_IntList) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "IntList", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_IntList) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_IntList = &__pyx_type_4cdec_2sa_3_sa_IntList;
+ __pyx_vtabptr_4cdec_2sa_3_sa_Phrase = &__pyx_vtable_4cdec_2sa_3_sa_Phrase;
+ __pyx_vtable_4cdec_2sa_3_sa_Phrase.chunkpos = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, int))__pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos;
+ __pyx_vtable_4cdec_2sa_3_sa_Phrase.chunklen = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, int))__pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_Phrase) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_Phrase.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_Phrase) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "Phrase", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_Phrase) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_Phrase = &__pyx_type_4cdec_2sa_3_sa_Phrase;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_TrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "TrieNode", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_TrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_TrieNode = &__pyx_type_4cdec_2sa_3_sa_TrieNode;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_2_genexpr;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_1_read_bitext;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_29_genexpr;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases;
+ __pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode.tp_base = __pyx_ptype_4cdec_2sa_3_sa_TrieNode;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "ExtendedTrieNode", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode = &__pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode;
+ __pyx_vtabptr_4cdec_2sa_3_sa_Alignment = &__pyx_vtable_4cdec_2sa_3_sa_Alignment;
+ __pyx_vtable_4cdec_2sa_3_sa_Alignment.link = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *, int, int))__pyx_f_4cdec_2sa_3_sa_9Alignment_link;
+ __pyx_vtable_4cdec_2sa_3_sa_Alignment._unlink = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *, int, int *, int *))__pyx_f_4cdec_2sa_3_sa_9Alignment__unlink;
+ __pyx_vtable_4cdec_2sa_3_sa_Alignment._get_sent_links = (int *(*)(struct __pyx_obj_4cdec_2sa_3_sa_Alignment *, int, int *))__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_Alignment) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_Alignment.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_Alignment) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "Alignment", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_Alignment) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_Alignment = &__pyx_type_4cdec_2sa_3_sa_Alignment;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_19_input) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_19_input = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_19_input;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_13_decode_words;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_Rule) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "Rule", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_Rule) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_Rule = &__pyx_type_4cdec_2sa_3_sa_Rule;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr;
+ __pyx_vtabptr_4cdec_2sa_3_sa_Precomputation = &__pyx_vtable_4cdec_2sa_3_sa_Precomputation;
+ __pyx_vtable_4cdec_2sa_3_sa_Precomputation.read_map = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *, FILE *))__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map;
+ __pyx_vtable_4cdec_2sa_3_sa_Precomputation.write_map = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *, PyObject *, FILE *))__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_Precomputation) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_Precomputation.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_Precomputation) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "Precomputation", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_Precomputation) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_Precomputation = &__pyx_type_4cdec_2sa_3_sa_Precomputation;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__ = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance;
+ __pyx_vtabptr_4cdec_2sa_3_sa_TrieMap = &__pyx_vtable_4cdec_2sa_3_sa_TrieMap;
+ __pyx_vtable_4cdec_2sa_3_sa_TrieMap._insert = (struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *(*)(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *, int *, int))__pyx_f_4cdec_2sa_3_sa_7TrieMap__insert;
+ __pyx_vtable_4cdec_2sa_3_sa_TrieMap._contains = (struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *(*)(struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *, int *, int))__pyx_f_4cdec_2sa_3_sa_7TrieMap__contains;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_TrieMap) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_TrieMap.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_TrieMap) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "TrieMap", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_TrieMap) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_TrieMap = &__pyx_type_4cdec_2sa_3_sa_TrieMap;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_VEBIterator) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "VEBIterator", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_VEBIterator) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_VEBIterator = &__pyx_type_4cdec_2sa_3_sa_VEBIterator;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_5_genexpr;
+ __pyx_vtabptr_4cdec_2sa_3_sa_FloatList = &__pyx_vtable_4cdec_2sa_3_sa_FloatList;
+ __pyx_vtable_4cdec_2sa_3_sa_FloatList.set = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, int, float))__pyx_f_4cdec_2sa_3_sa_9FloatList_set;
+ __pyx_vtable_4cdec_2sa_3_sa_FloatList.write_handle = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *))__pyx_f_4cdec_2sa_3_sa_9FloatList_write_handle;
+ __pyx_vtable_4cdec_2sa_3_sa_FloatList.read_handle = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *))__pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_FloatList) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_FloatList.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_FloatList) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "FloatList", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_FloatList) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_FloatList = &__pyx_type_4cdec_2sa_3_sa_FloatList;
+ __pyx_vtabptr_4cdec_2sa_3_sa_StringMap = &__pyx_vtable_4cdec_2sa_3_sa_StringMap;
+ __pyx_vtable_4cdec_2sa_3_sa_StringMap.word = (char *(*)(struct __pyx_obj_4cdec_2sa_3_sa_StringMap *, int))__pyx_f_4cdec_2sa_3_sa_9StringMap_word;
+ __pyx_vtable_4cdec_2sa_3_sa_StringMap.index = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_StringMap *, char *))__pyx_f_4cdec_2sa_3_sa_9StringMap_index;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_StringMap) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_StringMap.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_StringMap) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "StringMap", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_StringMap) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_StringMap = &__pyx_type_4cdec_2sa_3_sa_StringMap;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__ = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_15___iter__;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_16___str__) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_16___str__ = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_16___str__;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_TrieTable) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "TrieTable", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_TrieTable) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_TrieTable = &__pyx_type_4cdec_2sa_3_sa_TrieTable;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_11_encode_words;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_12_genexpr;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_6_genexpr;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_10_genexpr;
+ __pyx_vtabptr_4cdec_2sa_3_sa_VEB = &__pyx_vtable_4cdec_2sa_3_sa_VEB;
+ __pyx_vtable_4cdec_2sa_3_sa_VEB._findsucc = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_VEB *, int))__pyx_f_4cdec_2sa_3_sa_3VEB__findsucc;
+ __pyx_vtable_4cdec_2sa_3_sa_VEB._insert = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_VEB *, int))__pyx_f_4cdec_2sa_3_sa_3VEB__insert;
+ __pyx_vtable_4cdec_2sa_3_sa_VEB._first = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_VEB *))__pyx_f_4cdec_2sa_3_sa_3VEB__first;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_VEB) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_VEB.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_VEB) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "VEB", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_VEB) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_VEB = &__pyx_type_4cdec_2sa_3_sa_VEB;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_7_decode_lattice;
+ __pyx_vtabptr_4cdec_2sa_3_sa_PhraseLocation = &__pyx_vtable_4cdec_2sa_3_sa_PhraseLocation;
+ __pyx_vtable_4cdec_2sa_3_sa_PhraseLocation.contains = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *, int))__pyx_f_4cdec_2sa_3_sa_14PhraseLocation_contains;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_PhraseLocation.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "PhraseLocation", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation = &__pyx_type_4cdec_2sa_3_sa_PhraseLocation;
+ __pyx_vtabptr_4cdec_2sa_3_sa_Scorer = &__pyx_vtable_4cdec_2sa_3_sa_Scorer;
+ __pyx_vtable_4cdec_2sa_3_sa_Scorer.score = (struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *(*)(struct __pyx_obj_4cdec_2sa_3_sa_Scorer *, PyObject *))__pyx_f_4cdec_2sa_3_sa_6Scorer_score;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_Scorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_Scorer.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_Scorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "Scorer", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_Scorer) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_Scorer = &__pyx_type_4cdec_2sa_3_sa_Scorer;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_Sampler) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "Sampler", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_Sampler) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_Sampler = &__pyx_type_4cdec_2sa_3_sa_Sampler;
+ __pyx_vtabptr_4cdec_2sa_3_sa_Alphabet = &__pyx_vtable_4cdec_2sa_3_sa_Alphabet;
+ __pyx_vtable_4cdec_2sa_3_sa_Alphabet.isvar = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int))__pyx_f_4cdec_2sa_3_sa_8Alphabet_isvar;
+ __pyx_vtable_4cdec_2sa_3_sa_Alphabet.isword = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int))__pyx_f_4cdec_2sa_3_sa_8Alphabet_isword;
+ __pyx_vtable_4cdec_2sa_3_sa_Alphabet.getindex = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int))__pyx_f_4cdec_2sa_3_sa_8Alphabet_getindex;
+ __pyx_vtable_4cdec_2sa_3_sa_Alphabet.setindex = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int, int))__pyx_f_4cdec_2sa_3_sa_8Alphabet_setindex;
+ __pyx_vtable_4cdec_2sa_3_sa_Alphabet.clearindex = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int))__pyx_f_4cdec_2sa_3_sa_8Alphabet_clearindex;
+ __pyx_vtable_4cdec_2sa_3_sa_Alphabet.match = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int, int))__pyx_f_4cdec_2sa_3_sa_8Alphabet_match;
+ __pyx_vtable_4cdec_2sa_3_sa_Alphabet.tocat = (char *(*)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int))__pyx_f_4cdec_2sa_3_sa_8Alphabet_tocat;
+ __pyx_vtable_4cdec_2sa_3_sa_Alphabet.fromcat = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, char *))__pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat;
+ __pyx_vtable_4cdec_2sa_3_sa_Alphabet.tostring = (char *(*)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, int))__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring;
+ __pyx_vtable_4cdec_2sa_3_sa_Alphabet.fromstring = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *, char *, int))__pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_Alphabet) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_Alphabet.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_Alphabet) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "Alphabet", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_Alphabet) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_Alphabet = &__pyx_type_4cdec_2sa_3_sa_Alphabet;
+ __pyx_vtabptr_4cdec_2sa_3_sa_BiLex = &__pyx_vtable_4cdec_2sa_3_sa_BiLex;
+ __pyx_vtable_4cdec_2sa_3_sa_BiLex.compute_from_data = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *, struct __pyx_obj_4cdec_2sa_3_sa_DataArray *, struct __pyx_obj_4cdec_2sa_3_sa_Alignment *))__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data;
+ __pyx_vtable_4cdec_2sa_3_sa_BiLex._add_node = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, struct __pyx_t_4cdec_2sa_3_sa__node *, int *, float, int *))__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node;
+ __pyx_vtable_4cdec_2sa_3_sa_BiLex.write_wordlist = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, PyObject *, FILE *))__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist;
+ __pyx_vtable_4cdec_2sa_3_sa_BiLex.read_wordlist = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, PyObject *, PyObject *, FILE *))__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist;
+ __pyx_vtable_4cdec_2sa_3_sa_BiLex.swap = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, int, int))__pyx_f_4cdec_2sa_3_sa_5BiLex_swap;
+ __pyx_vtable_4cdec_2sa_3_sa_BiLex.qsort = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_BiLex *, int, int, PyObject *))__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_BiLex) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_BiLex.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_BiLex) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "BiLex", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_BiLex) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_BiLex = &__pyx_type_4cdec_2sa_3_sa_BiLex;
+ __pyx_vtabptr_4cdec_2sa_3_sa_DataArray = &__pyx_vtable_4cdec_2sa_3_sa_DataArray;
+ __pyx_vtable_4cdec_2sa_3_sa_DataArray.read_handle = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *, FILE *))__pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle;
+ __pyx_vtable_4cdec_2sa_3_sa_DataArray.write_handle = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_DataArray *, FILE *))__pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_DataArray) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_DataArray.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_DataArray) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "DataArray", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_DataArray) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_DataArray = &__pyx_type_4cdec_2sa_3_sa_DataArray;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_BitSetIterator) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "BitSetIterator", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_BitSetIterator) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_BitSetIterator = &__pyx_type_4cdec_2sa_3_sa_BitSetIterator;
+ __pyx_vtabptr_4cdec_2sa_3_sa_HieroCachingRuleFactory = &__pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.set_idmap = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_DataArray *))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.baeza_yates_helper = (int *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int, int, int, int *, int, int, int, int, int *))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.compare_matchings_set = (long (*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int, struct __pyx_t_4cdec_2sa_3_sa_Matching *, int, int))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_set;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.compare_matchings = (long (*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_t_4cdec_2sa_3_sa_Matching *, struct __pyx_t_4cdec_2sa_3_sa_Matching *, int, int))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.merge_helper = (int *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int, int, int, int *, int, int, int, int, int *))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.sort_phrase_loc = (void (*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_IntList *, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.intersect_helper = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *, int))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_helper;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.loc2str = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.intersect = (struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, PyObject *, PyObject *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.find_fixpoint = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, PyObject *, int *, int *, int *, int *, int, int, int *, int *, int *, int *, int, int, int, int, int, int, int, int, int, int, int))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.find_projection = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int *, int *, int *))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projection;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.int_arr_extend = (int *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int *, int *, int *, int))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.extract_phrases = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int *, int *, int, int, int, int *, int *, int *, int, int, int))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrases;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.create_alignments = (struct __pyx_obj_4cdec_2sa_3_sa_IntList *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int *, int, struct __pyx_obj_4cdec_2sa_3_sa_IntList *, struct __pyx_obj_4cdec_2sa_3_sa_IntList *))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_create_alignments;
+ __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.extract = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, struct __pyx_t_4cdec_2sa_3_sa_Matching *, int *, int))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "HieroCachingRuleFactory", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_HieroCachingRuleFactory = &__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_28___str__) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_28___str__ = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_28___str__;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_3_compute_stats;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_14_genexpr;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct____iter__ = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct____iter__;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_8_genexpr;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_BitSet) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "BitSet", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_BitSet) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa_BitSet = &__pyx_type_4cdec_2sa_3_sa_BitSet;
+ if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_9_decode_sentence;
/*--- Type import code ---*/
/*--- Variable import code ---*/
/*--- Function import code ---*/
/*--- Execution code ---*/
- /* "_sa.pyx":1
+ /* "cdec/sa/_sa.pyx":1
* import logging # <<<<<<<<<<<<<<
* import resource
* import gzip
@@ -76758,7 +76898,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyDict_SetItem(__pyx_d, __pyx_n_s__logging, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "_sa.pyx":2
+ /* "cdec/sa/_sa.pyx":2
* import logging
* import resource # <<<<<<<<<<<<<<
* import gzip
@@ -76769,7 +76909,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyDict_SetItem(__pyx_d, __pyx_n_s__resource, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "_sa.pyx":3
+ /* "cdec/sa/_sa.pyx":3
* import logging
* import resource
* import gzip # <<<<<<<<<<<<<<
@@ -76781,31 +76921,31 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyDict_SetItem(__pyx_d, __pyx_n_s__gzip, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "_sa.pyx":5
+ /* "cdec/sa/_sa.pyx":5
* import gzip
*
* def monitor_cpu(): # <<<<<<<<<<<<<<
* return (resource.getrusage(resource.RUSAGE_SELF).ru_utime+
* resource.getrusage(resource.RUSAGE_SELF).ru_stime)
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_1monitor_cpu, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_1monitor_cpu, NULL, __pyx_n_s_102); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s__monitor_cpu, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "_sa.pyx":9
+ /* "cdec/sa/_sa.pyx":9
* resource.getrusage(resource.RUSAGE_SELF).ru_stime)
*
* def gzip_or_text(char* filename): # <<<<<<<<<<<<<<
* if filename.endswith('.gz'):
* return gzip.GzipFile(filename)
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_3gzip_or_text, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_3gzip_or_text, NULL, __pyx_n_s_102); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s__gzip_or_text, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "_sa.pyx":15
+ /* "cdec/sa/_sa.pyx":15
* return open(filename)
*
* logger = logging.getLogger('cdec.sa') # <<<<<<<<<<<<<<
@@ -76817,22 +76957,22 @@ PyMODINIT_FUNC PyInit__sa(void)
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__getLogger); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_173), 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_162), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (PyDict_SetItem(__pyx_d, __pyx_n_s__logger, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/alignment.pxi":8
+ /* "/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":8
* # May need to revisit if things get really tight, though.
*
* cdef int ALIGNMENT_CODE = 1 << 16 # <<<<<<<<<<<<<<
*
* cdef class Alignment:
*/
- __pyx_v_3_sa_ALIGNMENT_CODE = 65536;
+ __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE = 65536;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/bilex.pxi":54
+ /* "/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":54
* cdef id2eword, id2fword, eword2id, fword2id
*
* def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<<
@@ -76845,138 +76985,138 @@ 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/mdenkows/cdec/python/cdec/sa/veb.pxi":17
* from libc.string cimport memset
*
* cdef int MIN_BOTTOM_SIZE = 32 # <<<<<<<<<<<<<<
* cdef int MIN_BOTTOM_BITS = 5
* cdef int LOWER_MASK[32]
*/
- __pyx_v_3_sa_MIN_BOTTOM_SIZE = 32;
+ __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE = 32;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":18
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":18
*
* cdef int MIN_BOTTOM_SIZE = 32
* cdef int MIN_BOTTOM_BITS = 5 # <<<<<<<<<<<<<<
* cdef int LOWER_MASK[32]
*
*/
- __pyx_v_3_sa_MIN_BOTTOM_BITS = 5;
+ __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS = 5;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/veb.pxi":28
+ /* "/home/mdenkows/cdec/python/cdec/sa/veb.pxi":28
* LOWER_MASK[i] = mask
*
* _init_lower_mask() # <<<<<<<<<<<<<<
*
* cdef struct _BitSet:
*/
- __pyx_f_3_sa__init_lower_mask();
+ __pyx_f_4cdec_2sa_3_sa__init_lower_mask();
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":4
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":4
* from libc.stdlib cimport malloc, realloc, strtol
*
* cdef int INDEX_SHIFT = 3 # <<<<<<<<<<<<<<
* cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1
*
*/
- __pyx_v_3_sa_INDEX_SHIFT = 3;
+ __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT = 3;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":5
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":5
*
* cdef int INDEX_SHIFT = 3
* cdef int INDEX_MASK = (1<<INDEX_SHIFT)-1 # <<<<<<<<<<<<<<
*
* cdef class Alphabet:
*/
- __pyx_v_3_sa_INDEX_MASK = ((1 << __pyx_v_3_sa_INDEX_SHIFT) - 1);
+ __pyx_v_4cdec_2sa_3_sa_INDEX_MASK = ((1 << __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT) - 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":87
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":87
* return self.terminals.index(s)
*
* cdef Alphabet ALPHABET = Alphabet() # <<<<<<<<<<<<<<
*
* cdef char* sym_tostring(int sym):
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_Alphabet)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Alphabet)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_XGOTREF(((PyObject *)__pyx_v_3_sa_ALPHABET));
- __Pyx_DECREF(((PyObject *)__pyx_v_3_sa_ALPHABET));
+ __Pyx_XGOTREF(((PyObject *)__pyx_v_4cdec_2sa_3_sa_ALPHABET));
+ __Pyx_DECREF(((PyObject *)__pyx_v_4cdec_2sa_3_sa_ALPHABET));
__Pyx_GIVEREF(__pyx_t_1);
- __pyx_v_3_sa_ALPHABET = ((struct __pyx_obj_3_sa_Alphabet *)__pyx_t_1);
+ __pyx_v_4cdec_2sa_3_sa_ALPHABET = ((struct __pyx_obj_4cdec_2sa_3_sa_Alphabet *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":107
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":107
* return ALPHABET.fromstring(string, terminal)
*
* def isvar(sym): # <<<<<<<<<<<<<<
* return sym_isvar(sym)
*
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_5isvar, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_5isvar, NULL, __pyx_n_s_102); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s__isvar, __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":110
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":110
* return sym_isvar(sym)
*
* def make_lattice(words): # <<<<<<<<<<<<<<
* word_ids = (sym_fromstring(word, True) for word in words)
* return tuple(((word, None, 1), ) for word in word_ids)
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_7make_lattice, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_7make_lattice, NULL, __pyx_n_s_102); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s__make_lattice, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __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":114
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":114
* return tuple(((word, None, 1), ) for word in word_ids)
*
* def decode_lattice(lattice): # <<<<<<<<<<<<<<
* return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc
* for arc in node for node in lattice)
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_9decode_lattice, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_9decode_lattice, NULL, __pyx_n_s_102); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s__decode_lattice, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __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":118
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":118
* for arc in node for node in lattice)
*
* def decode_sentence(lattice): # <<<<<<<<<<<<<<
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
*
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_11decode_sentence, 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_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_11decode_sentence, NULL, __pyx_n_s_102); 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 (PyDict_SetItem(__pyx_d, __pyx_n_s__decode_sentence, __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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":121
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":121
* return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
*
* def encode_words(words): # <<<<<<<<<<<<<<
* return tuple(sym_fromstring(word, True) for word in words)
*
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_13encode_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_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_13encode_words, NULL, __pyx_n_s_102); 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 (PyDict_SetItem(__pyx_d, __pyx_n_s__encode_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;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/sym.pxi":124
+ /* "/home/mdenkows/cdec/python/cdec/sa/sym.pxi":124
* return tuple(sym_fromstring(word, True) for word in words)
*
* def decode_words(syms): # <<<<<<<<<<<<<<
* return tuple(sym_tostring(sym) for sym in syms)
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3_sa_15decode_words, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_15decode_words, NULL, __pyx_n_s_102); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s__decode_words, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __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/mdenkows/cdec/python/cdec/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 # <<<<<<<<<<<<<<
@@ -76988,7 +77128,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyDict_SetItem(__pyx_d, __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/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":6
* # Note to reader: this code is closer to C than Python
* import gc
* import itertools # <<<<<<<<<<<<<<
@@ -77000,7 +77140,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyDict_SetItem(__pyx_d, __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/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":12
* from libc.math cimport fmod, ceil, floor, log
*
* from collections import defaultdict, Counter, namedtuple # <<<<<<<<<<<<<<
@@ -77035,7 +77175,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/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":14
* from collections import defaultdict, Counter, namedtuple
*
* FeatureContext = namedtuple('FeatureContext', # <<<<<<<<<<<<<<
@@ -77045,7 +77185,7 @@ PyMODINIT_FUNC PyInit__sa(void)
__pyx_t_2 = __Pyx_GetModuleGlobalName(__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/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":15
*
* FeatureContext = namedtuple('FeatureContext',
* ['fphrase', # <<<<<<<<<<<<<<
@@ -77108,7 +77248,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyDict_SetItem(__pyx_d, __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":30
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":30
* ])
*
* OnlineFeatureContext = namedtuple('OnlineFeatureContext', # <<<<<<<<<<<<<<
@@ -77118,7 +77258,7 @@ PyMODINIT_FUNC PyInit__sa(void)
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__namedtuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":31
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":31
*
* OnlineFeatureContext = namedtuple('OnlineFeatureContext',
* ['fcount', # <<<<<<<<<<<<<<
@@ -77147,9 +77287,9 @@ PyMODINIT_FUNC PyInit__sa(void)
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__bilex_fe));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)__pyx_n_s_163));
- PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s_163));
- __Pyx_GIVEREF(((PyObject *)__pyx_n_s_163));
+ __Pyx_INCREF(((PyObject *)__pyx_n_s_152));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s_152));
+ __Pyx_GIVEREF(((PyObject *)__pyx_n_s_152));
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_t_3));
__Pyx_GIVEREF(((PyObject *)__pyx_t_3));
__pyx_t_3 = 0;
@@ -77157,108 +77297,108 @@ PyMODINIT_FUNC PyInit__sa(void)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_163, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_152, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 30; __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":39
- * ])
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":64
+ * self.bilex_fe = defaultdict(lambda: defaultdict(int))
*
* cdef int PRECOMPUTE = 0 # <<<<<<<<<<<<<<
* cdef int MERGE = 1
* cdef int BAEZA_YATES = 2
*/
- __pyx_v_3_sa_PRECOMPUTE = 0;
+ __pyx_v_4cdec_2sa_3_sa_PRECOMPUTE = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":40
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":65
*
* cdef int PRECOMPUTE = 0
* cdef int MERGE = 1 # <<<<<<<<<<<<<<
* cdef int BAEZA_YATES = 2
*
*/
- __pyx_v_3_sa_MERGE = 1;
+ __pyx_v_4cdec_2sa_3_sa_MERGE = 1;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":41
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":66
* cdef int PRECOMPUTE = 0
* cdef int MERGE = 1
* cdef int BAEZA_YATES = 2 # <<<<<<<<<<<<<<
*
* # NOTE: was encoded as a non-terminal in the previous version
*/
- __pyx_v_3_sa_BAEZA_YATES = 2;
+ __pyx_v_4cdec_2sa_3_sa_BAEZA_YATES = 2;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":44
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":69
*
* # 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_187, 1);
+ __pyx_v_4cdec_2sa_3_sa_EPSILON = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_k_176, 1);
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":67
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":92
* cdef public int count
* cdef public root
* def __cinit__(self, extended=False): # <<<<<<<<<<<<<<
* self.count = 0
* self.extended = extended
*/
- __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_k_101 = __pyx_t_3;
+ __pyx_k_103 = __pyx_t_3;
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/rulefactory.pxi":2206
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2190
*
* # Spans are _inclusive_ on both ends [i, j]
* def span_check(vec, i, j): # <<<<<<<<<<<<<<
* k = i
* while k <= j:
*/
- __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_3_sa_17span_check, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_17span_check, NULL, __pyx_n_s_102); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s__span_check, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s__span_check, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __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":2214
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2198
* return True
*
* def span_inc(vec, i, j): # <<<<<<<<<<<<<<
* k = i
* while k <= j:
*/
- __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_3_sa_19span_inc, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_19span_inc, NULL, __pyx_n_s_102); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s__span_inc, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s__span_inc, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2198; __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":2220
+ /* "/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2204
* k += 1
*
* def span_dec(vec, i, j): # <<<<<<<<<<<<<<
* k = i
* while k <= j:
*/
- __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_3_sa_21span_dec, NULL, __pyx_n_s___sa); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_21span_dec, NULL, __pyx_n_s_102); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s__span_dec, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s__span_dec, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":1
+ /* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":1
* cdef StringMap FD = StringMap() # Feature name dictionary # <<<<<<<<<<<<<<
*
* INITIAL_CAPACITY = 7 # default number of features
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3_sa_StringMap)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_StringMap)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_XGOTREF(((PyObject *)__pyx_v_3_sa_FD));
- __Pyx_DECREF(((PyObject *)__pyx_v_3_sa_FD));
+ __Pyx_XGOTREF(((PyObject *)__pyx_v_4cdec_2sa_3_sa_FD));
+ __Pyx_DECREF(((PyObject *)__pyx_v_4cdec_2sa_3_sa_FD));
__Pyx_GIVEREF(__pyx_t_3);
- __pyx_v_3_sa_FD = ((struct __pyx_obj_3_sa_StringMap *)__pyx_t_3);
+ __pyx_v_4cdec_2sa_3_sa_FD = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/vchahun/Sandbox/cdec/python/src/sa/features.pxi":3
+ /* "/home/mdenkows/cdec/python/cdec/sa/features.pxi":3
* cdef StringMap FD = StringMap() # Feature name dictionary
*
* INITIAL_CAPACITY = 7 # default number of features # <<<<<<<<<<<<<<
@@ -77267,7 +77407,7 @@ PyMODINIT_FUNC PyInit__sa(void)
*/
if (PyDict_SetItem(__pyx_d, __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/mdenkows/cdec/python/cdec/sa/features.pxi":4
*
* INITIAL_CAPACITY = 7 # default number of features
* INCREMENT = INITIAL_CAPACITY # double size # <<<<<<<<<<<<<<
@@ -77279,7 +77419,7 @@ PyMODINIT_FUNC PyInit__sa(void)
if (PyDict_SetItem(__pyx_d, __pyx_n_s__INCREMENT, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "_sa.pyx":1
+ /* "cdec/sa/_sa.pyx":1
* import logging # <<<<<<<<<<<<<<
* import resource
* import gzip
@@ -77294,10 +77434,10 @@ PyMODINIT_FUNC PyInit__sa(void)
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
if (__pyx_m) {
- __Pyx_AddTraceback("init _sa", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("init cdec.sa._sa", __pyx_clineno, __pyx_lineno, __pyx_filename);
Py_DECREF(__pyx_m); __pyx_m = 0;
} else if (!PyErr_Occurred()) {
- PyErr_SetString(PyExc_ImportError, "init _sa");
+ PyErr_SetString(PyExc_ImportError, "init cdec.sa._sa");
}
__pyx_L0:;
__Pyx_RefNannyFinishContext();
diff --git a/python/cdec/sa/compile.py b/python/cdec/sa/compile.py
index d4cd8387..caa93f8b 100644
--- a/python/cdec/sa/compile.py
+++ b/python/cdec/sa/compile.py
@@ -75,6 +75,13 @@ def main():
a_bin = os.path.join(args.output, 'a.bin')
lex_bin = os.path.join(args.output, 'lex.bin')
+ config = cdec.configobj.ConfigObj(args.config, unrepr=True)
+ config['f_sa_file'] = os.path.abspath(f_sa_bin)
+ config['e_file'] = os.path.abspath(e_bin)
+ config['a_file'] = os.path.abspath(a_bin)
+ config['lex_file'] = os.path.abspath(lex_bin)
+ config['precompute_file'] = os.path.abspath(precomp_bin)
+
start_time = monitor_cpu()
logger.info('Compiling source suffix array')
if args.bitext:
@@ -116,12 +123,6 @@ def main():
logger.info('Compiling bilexical dictionary took %f seconds', stop_time - start_time)
# Write configuration
- config = cdec.configobj.ConfigObj(args.config, unrepr=True)
- config['f_sa_file'] = os.path.abspath(f_sa_bin)
- config['e_file'] = os.path.abspath(e_bin)
- config['a_file'] = os.path.abspath(a_bin)
- config['lex_file'] = os.path.abspath(lex_bin)
- config['precompute_file'] = os.path.abspath(precomp_bin)
for name, value in zip(param_names, params):
config[name] = value
config.write()
diff --git a/python/cdec/sa/extractor.py b/python/cdec/sa/extractor.py
index acc13cbc..5a95ded8 100644
--- a/python/cdec/sa/extractor.py
+++ b/python/cdec/sa/extractor.py
@@ -84,23 +84,21 @@ class GrammarExtractor:
for fn in cdec.sa._SA_CONFIGURE:
fn(config)
- def grammar(self, sentence):
+ def grammar(self, sentence, ctx_name=None):
if isinstance(sentence, unicode):
sentence = sentence.encode('utf8')
words = tuple(chain(('<s>',), sentence.split(), ('</s>',)))
meta = cdec.sa.annotate(words)
cnet = cdec.sa.make_lattice(words)
- return self.factory.input(cnet, meta)
+ return self.factory.input(cnet, meta, ctx_name)
# Add training instance to data
- def add_instance(self, sentence, reference, alignment):
+ def add_instance(self, sentence, reference, alignment, ctx_name=None):
f_words = cdec.sa.encode_words(sentence.split())
e_words = cdec.sa.encode_words(reference.split())
al = sorted(tuple(int(i) for i in pair.split('-')) for pair in alignment.split())
- self.factory.add_instance(f_words, e_words, al)
-
- # Debugging
- def dump_online_stats(self):
- self.factory.dump_online_stats()
- def dump_online_rules(self):
- self.factory.dump_online_rules() \ No newline at end of file
+ self.factory.add_instance(f_words, e_words, al, ctx_name)
+
+ # Remove all incremental data for a context
+ def drop_ctx(self, ctx_name=None):
+ self.factory.drop_ctx(ctx_name)
diff --git a/python/cdec/sa/rulefactory.pxi b/python/cdec/sa/rulefactory.pxi
index 10bb9737..2be5cad6 100644
--- a/python/cdec/sa/rulefactory.pxi
+++ b/python/cdec/sa/rulefactory.pxi
@@ -36,6 +36,31 @@ OnlineFeatureContext = namedtuple('OnlineFeatureContext',
'bilex_fe'
])
+cdef class OnlineStats:
+ cdef public samples_f
+ cdef public phrases_f
+ cdef public phrases_e
+ cdef public phrases_fe
+ cdef public phrases_al
+ cdef public bilex_f
+ cdef public bilex_e
+ cdef public bilex_fe
+
+ def __cinit__(self):
+ # Keep track of everything that can be sampled:
+ self.samples_f = defaultdict(int)
+
+ # Phrase counts
+ self.phrases_f = defaultdict(int)
+ self.phrases_e = defaultdict(int)
+ self.phrases_fe = defaultdict(lambda: defaultdict(int))
+ self.phrases_al = defaultdict(lambda: defaultdict(tuple))
+
+ # Bilexical counts
+ self.bilex_f = defaultdict(int)
+ self.bilex_e = defaultdict(int)
+ self.bilex_fe = defaultdict(lambda: defaultdict(int))
+
cdef int PRECOMPUTE = 0
cdef int MERGE = 1
cdef int BAEZA_YATES = 2
@@ -276,14 +301,7 @@ cdef class HieroCachingRuleFactory:
cdef IntList findexes1
cdef bint online
- cdef samples_f
- cdef phrases_f
- cdef phrases_e
- cdef phrases_fe
- cdef phrases_al
- cdef bilex_f
- cdef bilex_e
- cdef bilex_fe
+ cdef online_stats
def __cinit__(self,
# compiled alignment object (REQUIRED)
@@ -396,21 +414,8 @@ cdef class HieroCachingRuleFactory:
# True after data is added
self.online = False
+ self.online_stats = defaultdict(OnlineStats)
- # Keep track of everything that can be sampled:
- self.samples_f = defaultdict(int)
-
- # Phrase counts
- self.phrases_f = defaultdict(int)
- self.phrases_e = defaultdict(int)
- self.phrases_fe = defaultdict(lambda: defaultdict(int))
- self.phrases_al = defaultdict(lambda: defaultdict(tuple))
-
- # Bilexical counts
- self.bilex_f = defaultdict(int)
- self.bilex_e = defaultdict(int)
- self.bilex_fe = defaultdict(lambda: defaultdict(int))
-
def configure(self, SuffixArray fsarray, DataArray edarray,
Sampler sampler, Scorer scorer):
'''This gives the RuleFactory access to the Context object.
@@ -970,7 +975,7 @@ cdef class HieroCachingRuleFactory:
candidate.append([next_id,curr[1]+jump])
return sorted(result);
- def input(self, fwords, meta):
+ def input(self, fwords, meta, ctx_name=None):
'''When this function is called on the RuleFactory,
it looks up all of the rules that can be used to translate
the input sentence'''
@@ -1154,7 +1159,7 @@ cdef class HieroCachingRuleFactory:
fwords, self.fda, self.eda,
meta,
# Include online stats. None if none.
- self.online_ctx_lookup(f, e)))
+ self.online_ctx_lookup(f, e, ctx_name)))
# Phrase pair processed
if self.online:
seen_phrases.add((f, e))
@@ -1184,6 +1189,7 @@ cdef class HieroCachingRuleFactory:
# Online rule extraction and scoring
if self.online:
+ stats = self.online_stats[ctx_name]
f_syms = tuple(word[0][0] for word in fwords)
for f, lex_i, lex_j in self.get_f_phrases(f_syms):
spanlen = (lex_j - lex_i) + 1
@@ -1191,7 +1197,7 @@ cdef class HieroCachingRuleFactory:
spanlen += 1
if not sym_isvar(f[1]):
spanlen += 1
- for e in self.phrases_fe.get(f, ()):
+ for e in stats.phrases_fe.get(f, ()):
if (f, e) not in seen_phrases:
# Don't add multiple instances of the same phrase here
seen_phrases.add((f, e))
@@ -1200,8 +1206,8 @@ cdef class HieroCachingRuleFactory:
spanlen, None, None,
fwords, self.fda, self.eda,
meta,
- self.online_ctx_lookup(f, e)))
- alignment = self.phrases_al[f][e]
+ self.online_ctx_lookup(f, e, ctx_name)))
+ alignment = stats.phrases_al[f][e]
yield Rule(self.category, f, e, scores, alignment)
stop_time = monitor_cpu()
@@ -1882,7 +1888,7 @@ cdef class HieroCachingRuleFactory:
# Aggregate stats from a training instance
# (Extract rules, update counts)
- def add_instance(self, f_words, e_words, alignment):
+ def add_instance(self, f_words, e_words, alignment, ctx_name=None):
self.online = True
@@ -2028,28 +2034,30 @@ cdef class HieroCachingRuleFactory:
continue
extract(f_i, f_i, f_len + 1, -1, f_i, 0, [], [], False)
+ stats = self.online_stats[ctx_name]
+
# Update possible phrases (samples)
# This could be more efficiently integrated with extraction
# at the cost of readability
for f, lex_i, lex_j in self.get_f_phrases(f_words):
- self.samples_f[f] += 1
+ stats.samples_f[f] += 1
# Update phrase counts
for rule in rules:
(f_ph, e_ph, al) = rule[:3]
- self.phrases_f[f_ph] += 1
- self.phrases_e[e_ph] += 1
- self.phrases_fe[f_ph][e_ph] += 1
- if not self.phrases_al[f_ph][e_ph]:
- self.phrases_al[f_ph][e_ph] = al
+ stats.phrases_f[f_ph] += 1
+ stats.phrases_e[e_ph] += 1
+ stats.phrases_fe[f_ph][e_ph] += 1
+ if not stats.phrases_al[f_ph][e_ph]:
+ stats.phrases_al[f_ph][e_ph] = al
# Update Bilexical counts
for e_w in e_words:
- self.bilex_e[e_w] += 1
+ stats.bilex_e[e_w] += 1
for f_w in f_words:
- self.bilex_f[f_w] += 1
+ stats.bilex_f[f_w] += 1
for e_w in e_words:
- self.bilex_fe[f_w][e_w] += 1
+ stats.bilex_fe[f_w][e_w] += 1
# Create a rule from source, target, non-terminals, and alignments
def form_rule(self, f_i, e_i, f_span, e_span, nt, al):
@@ -2121,44 +2129,16 @@ cdef class HieroCachingRuleFactory:
a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a)
return '[X] ||| {0} ||| {1} ||| {2}'.format(f, e, a_str)
- # Debugging
- def dump_online_stats(self):
- logger.info('------------------------------')
- logger.info(' Online Stats ')
- logger.info('------------------------------')
- logger.info('f')
- for w in self.bilex_f:
- logger.info(sym_tostring(w) + ' : ' + str(self.bilex_f[w]))
- logger.info('e')
- for w in self.bilex_e:
- logger.info(sym_tostring(w) + ' : ' + str(self.bilex_e[w]))
- logger.info('fe')
- for w in self.bilex_fe:
- for w2 in self.bilex_fe[w]:
- logger.info(sym_tostring(w) + ' : ' + sym_tostring(w2) + ' : ' + str(self.bilex_fe[w][w2]))
- logger.info('F')
- for ph in self.phrases_f:
- logger.info(str(ph) + ' ||| ' + str(self.phrases_f[ph]))
- logger.info('E')
- for ph in self.phrases_e:
- logger.info(str(ph) + ' ||| ' + str(self.phrases_e[ph]))
- logger.info('FE')
- self.dump_online_rules()
-
- def dump_online_rules(self):
- for ph in self.phrases_fe:
- for ph2 in self.phrases_fe[ph]:
- logger.info(self.fmt_rule(str(ph), str(ph2), self.phrases_al[ph][ph2]) + ' ||| ' + str(self.phrases_fe[ph][ph2]))
-
# Lookup online stats for phrase pair (f, e). Return None if no match.
# IMPORTANT: use get() to avoid adding items to defaultdict
- def online_ctx_lookup(self, f, e):
+ def online_ctx_lookup(self, f, e, ctx_name=None):
if self.online:
- fcount = self.phrases_f.get(f, 0)
- fsample_count = self.samples_f.get(f, 0)
- d = self.phrases_fe.get(f, None)
+ stats = self.online_stats[ctx_name]
+ fcount = stats.phrases_f.get(f, 0)
+ fsample_count = stats.samples_f.get(f, 0)
+ d = stats.phrases_fe.get(f, None)
paircount = d.get(e, 0) if d else 0
- return OnlineFeatureContext(fcount, fsample_count, paircount, self.bilex_f, self.bilex_e, self.bilex_fe)
+ return OnlineFeatureContext(fcount, fsample_count, paircount, stats.bilex_f, stats.bilex_e, stats.bilex_fe)
return None
# Find all phrases that we might try to extract
@@ -2201,6 +2181,10 @@ cdef class HieroCachingRuleFactory:
extract(f_i, f_i, f_len, -1, 0, 0, [])
return phrases
+
+ # Drop online stats for a context
+ def drop_ctx(self, ctx_name=None):
+ self.online_stats.pop(ctx_name, None)
# Spans are _inclusive_ on both ends [i, j]
def span_check(vec, i, j):
diff --git a/python/cdec/sa/strmap.cc b/python/cdec/sa/strmap.cc
index 5040477e..b6debfb0 100644
--- a/python/cdec/sa/strmap.cc
+++ b/python/cdec/sa/strmap.cc
@@ -2,11 +2,16 @@
#include <vector>
#include <string>
-#include <tr1/unordered_map>
-#include <stdint.h>
+#include <cstdint>
+
+#ifndef HAVE_OLD_CPP
+# include <unordered_map>
+#else
+# include <tr1/unordered_map>
+namespace std { using std::tr1::unordered_map; }
+#endif
using namespace std;
-using namespace std::tr1;
#undef HAVE_64_BITS