diff options
author | Michael Denkowski <mdenkows@cs.cmu.edu> | 2013-09-23 08:21:58 -0700 |
---|---|---|
committer | Michael Denkowski <mdenkows@cs.cmu.edu> | 2013-09-23 08:21:58 -0700 |
commit | 6efdb6758dc2d204d203bf3dcdb0ea14b6e2bbd5 (patch) | |
tree | 41a5223781397a7c9bcab70054be0495c160101f /python/cdec/_cdec.cpp | |
parent | ee384acf34de0d7613a70b81c674d607a3bd782a (diff) |
One extractor, multiple online contexts.
Diffstat (limited to 'python/cdec/_cdec.cpp')
-rw-r--r-- | python/cdec/_cdec.cpp | 10240 |
1 files changed, 5120 insertions, 5120 deletions
diff --git a/python/cdec/_cdec.cpp b/python/cdec/_cdec.cpp index ae36b773..ca693bcd 100644 --- a/python/cdec/_cdec.cpp +++ b/python/cdec/_cdec.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 0.19.1 on Sun Jun 2 14:47:49 2013 */ +/* Generated by Cython 0.19.1 on Mon Sep 23 08:04:01 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___cdec -#define __PYX_HAVE_API___cdec +#define __PYX_HAVE__cdec___cdec +#define __PYX_HAVE_API__cdec___cdec #include "string.h" #include <string> #include "ios" @@ -525,75 +525,75 @@ static const char *__pyx_f[] = { "hypergraph.pxi", "lattice.pxi", "mteval.pxi", - "cdec.sa._sa.pxd", + "_sa.pxd", }; /*--- Type declarations ---*/ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector; -struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__; -struct __pyx_obj_5_cdec_NTRef; -struct __pyx_obj_5_cdec_Scorer; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__; +struct __pyx_obj_4cdec_5_cdec_DenseVector; +struct __pyx_obj_4cdec_5_cdec_SufficientStats; +struct __pyx_obj_4cdec_5_cdec_TRule; +struct __pyx_obj_4cdec_5_cdec_MRule; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__; +struct __pyx_obj_4cdec_5_cdec_Metric; struct __pyx_obj_4cdec_2sa_3_sa_IntList; -struct __pyx_obj_4cdec_2sa_3_sa_Phrase; -struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__; -struct __pyx_obj_5_cdec_Grammar; -struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines; -struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees; -struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__; -struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase; -struct __pyx_obj_5_cdec_CandidateSet; -struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__; -struct __pyx_obj_5_cdec_TRule; +struct __pyx_obj_4cdec_5_cdec_SparseVector; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__; +struct __pyx_obj_4cdec_5_cdec_NT; +struct __pyx_obj_4cdec_5_cdec_Lattice; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config; +struct __pyx_obj_4cdec_5_cdec_HypergraphEdge; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__; struct __pyx_obj_4cdec_2sa_3_sa_Rule; -struct __pyx_obj_5_cdec_MRule; -struct __pyx_obj_5_cdec_SegmentEvaluator; -struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr; -struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot; -struct __pyx_obj_5_cdec_Candidate; -struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr; -struct __pyx_obj_5_cdec_NT; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines; +struct __pyx_obj_4cdec_5_cdec_Scorer; +struct __pyx_obj_4cdec_5_cdec_HypergraphNode; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features; +struct __pyx_obj_4cdec_5_cdec_NTRef; +struct __pyx_obj_4cdec_5_cdec_Grammar; +struct __pyx_obj_4cdec_5_cdec_Hypergraph; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__; +struct __pyx_obj_4cdec_5_cdec_CandidateSet; struct __pyx_obj_4cdec_2sa_3_sa_FloatList; -struct __pyx_obj_5_cdec_HypergraphEdge; -struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__; -struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__; -struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__; -struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__; -struct __pyx_obj_5_cdec_Decoder; -struct __pyx_obj_5_cdec_HypergraphNode; -struct __pyx_obj_5_cdec_SparseVector; -struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__; -struct __pyx_obj_5_cdec___pyx_scope_struct____iter__; -struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__; -struct __pyx_obj_5_cdec_DenseVector; -struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__; -struct __pyx_obj_5_cdec_Metric; -struct __pyx_obj_5_cdec_SufficientStats; -struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest; -struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features; -struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__; -struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__; -struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr; -struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees; -struct __pyx_obj_5_cdec_Hypergraph; -struct __pyx_obj_5_cdec_Lattice; -struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample; -struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config; -struct __pyx_obj_5_cdec_TextGrammar; -struct __pyx_opt_args_5_cdec_as_str; - -/* "_cdec.pyx":6 +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__; +struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__; +struct __pyx_obj_4cdec_2sa_3_sa_Phrase; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__; +struct __pyx_obj_4cdec_5_cdec_TextGrammar; +struct __pyx_obj_4cdec_5_cdec_Decoder; +struct __pyx_obj_4cdec_5_cdec_Candidate; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__; +struct __pyx_opt_args_4cdec_5_cdec_as_str; + +/* "cdec/_cdec.pyx":6 * cimport decoder * * cdef bytes as_str(data, char* error_msg='Cannot convert type %s to str'): # <<<<<<<<<<<<<< * cdef bytes ret * if isinstance(data, unicode): */ -struct __pyx_opt_args_5_cdec_as_str { +struct __pyx_opt_args_4cdec_5_cdec_as_str { int __pyx_n; char *error_msg; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/cdec.sa._sa.pxd":25 +/* "cdec/sa/_sa.pxd":25 * cdef void read_handle(self, FILE* f) * * cdef class FeatureVector: # <<<<<<<<<<<<<< @@ -607,47 +607,106 @@ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector { }; -/* "_cdec.pyx":47 - * cdef DenseVector weights +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":90 + * return candidate * - * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< - * """Decoder('formalism = scfg') -> initialize from configuration string - * Decoder(formalism='scfg') -> initialize from named parameters + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(len(self)): */ -struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ { PyObject_HEAD - PyObject *__pyx_v_config; + unsigned int __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self; + Py_ssize_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":21 - * return '[%s]' % self.cat +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":3 + * from cython.operator cimport preincrement as pinc * - * cdef class NTRef: # <<<<<<<<<<<<<< - * cdef public unsigned ref - * def __init__(self, unsigned ref): + * cdef class DenseVector: # <<<<<<<<<<<<<< + * cdef vector[weight_t]* vector + * cdef bint owned # if True, do not manage memory */ -struct __pyx_obj_5_cdec_NTRef { +struct __pyx_obj_4cdec_5_cdec_DenseVector { PyObject_HEAD - unsigned int ref; + std::vector<weight_t> *vector; + int owned; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":121 - * return CandidateSet(self) +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":26 + * return fmap * - * cdef class Scorer: # <<<<<<<<<<<<<< - * cdef string* name + * cdef class SufficientStats: # <<<<<<<<<<<<<< + * cdef mteval.SufficientStats* stats * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_5_cdec_Scorer { +struct __pyx_obj_4cdec_5_cdec_SufficientStats { PyObject_HEAD - std::string *name; + SufficientStats *stats; EvaluationMetric *metric; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/cdec.sa._sa.pxd":12 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":49 + * return TRule(lhs, f, e, scores, a) + * + * cdef class TRule: # <<<<<<<<<<<<<< + * cdef shared_ptr[grammar.TRule]* rule + * + */ +struct __pyx_obj_4cdec_5_cdec_TRule { + PyObject_HEAD + boost::shared_ptr<TRule> *rule; +}; + + +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":177 + * _phrase(self.f), _phrase(self.e), scores) + * + * cdef class MRule(TRule): # <<<<<<<<<<<<<< + * def __init__(self, lhs, rhs, scores): + * """MRule(lhs, rhs, scores, a=None) -> Monolingual rule. + */ +struct __pyx_obj_4cdec_5_cdec_MRule { + struct __pyx_obj_4cdec_5_cdec_TRule __pyx_base; +}; + + +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":44 + * return self.stats.size() + * + * def __iter__(self): # <<<<<<<<<<<<<< + * for i in range(len(self)): + * yield self[i] + */ +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ { + PyObject_HEAD + PyObject *__pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self; + Py_ssize_t __pyx_t_0; + PyObject *__pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); +}; + + +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":176 + * out.fields[i] = ss[i] + * + * cdef class Metric: # <<<<<<<<<<<<<< + * cdef Scorer scorer + * def __cinit__(self): + */ +struct __pyx_obj_4cdec_5_cdec_Metric { + PyObject_HEAD + struct __pyx_obj_4cdec_5_cdec_Scorer *scorer; +}; + + +/* "cdec/sa/_sa.pxd":12 * cdef void read_handle(self, FILE* f) * * cdef class IntList: # <<<<<<<<<<<<<< @@ -664,167 +723,131 @@ struct __pyx_obj_4cdec_2sa_3_sa_IntList { }; -/* "/Users/vchahun/Sandbox/cdec/python/src/cdec.sa._sa.pxd":29 - * cdef FloatList values +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":48 + * return sparse + * + * cdef class SparseVector: # <<<<<<<<<<<<<< + * cdef FastSparseVector[weight_t]* vector * - * cdef class Phrase: # <<<<<<<<<<<<<< - * cdef int *syms - * cdef int n, *varpos, n_vars */ -struct __pyx_obj_4cdec_2sa_3_sa_Phrase { +struct __pyx_obj_4cdec_5_cdec_SparseVector { PyObject_HEAD - struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtab; - int *syms; - int n; - int *varpos; - int n_vars; + FastSparseVector<weight_t> *vector; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":90 - * return candidate +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":216 * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(len(self)): + * property tail_nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.edge.tail_nodes_.size()): */ -struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ { PyObject_HEAD unsigned int __pyx_v_i; - struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self; - Py_ssize_t __pyx_t_0; + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self; + unsigned int __pyx_t_0; unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":193 - * super(MRule, self).__init__(lhs, rhs, e, scores, None) - * - * cdef class Grammar: # <<<<<<<<<<<<<< - * cdef shared_ptr[grammar.Grammar]* grammar +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":8 + * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) * + * cdef class NT: # <<<<<<<<<<<<<< + * cdef public bytes cat + * cdef public unsigned ref */ -struct __pyx_obj_5_cdec_Grammar { +struct __pyx_obj_4cdec_5_cdec_NT { PyObject_HEAD - boost::shared_ptr<Grammar> *grammar; + PyObject *cat; + unsigned int ref; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":63 - * def todot(self): - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): # <<<<<<<<<<<<<< - * yield 'digraph lattice {' - * yield 'rankdir = LR;' +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":3 + * cimport lattice + * + * cdef class Lattice: # <<<<<<<<<<<<<< + * cdef lattice.Lattice* lattice + * */ -struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines { +struct __pyx_obj_4cdec_5_cdec_Lattice { PyObject_HEAD - struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *__pyx_outer_scope; - PyObject *__pyx_v_delta; - PyObject *__pyx_v_i; - PyObject *__pyx_v_label; - PyObject *__pyx_v_weight; - Py_ssize_t __pyx_t_0; - PyObject *__pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); - PyObject *__pyx_t_3; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); + Lattice *lattice; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":108 - * del hypos +/* "cdec/_cdec.pyx":32 + * SetSilent(yn) * - * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" - * cdef vector[string]* trees = new vector[string]() + * def _make_config(config): # <<<<<<<<<<<<<< + * for key, value in config.items(): + * if isinstance(value, dict): */ -struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config { PyObject_HEAD - unsigned int __pyx_v_k; - unsigned int __pyx_v_n; - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self; - std::vector<std::string> *__pyx_v_trees; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + PyObject *__pyx_v_config; + PyObject *__pyx_v_info; + PyObject *__pyx_v_key; + PyObject *__pyx_v_name; + PyObject *__pyx_v_value; + PyObject *__pyx_t_0; + PyObject *__pyx_t_1; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":161 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":196 + * return vector * - * property edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.hg.edges_.size()): + * cdef class HypergraphEdge: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphEdge* edge */ -struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ { +struct __pyx_obj_4cdec_5_cdec_HypergraphEdge { PyObject_HEAD - unsigned int __pyx_v_i; - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *__pyx_vtab; + Hypergraph *hg; + Hypergraph::Edge *edge; + struct __pyx_obj_4cdec_5_cdec_TRule *trule; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":5 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":5 * import cdec.sa._sa as _sa * * def _phrase(phrase): # <<<<<<<<<<<<<< * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) * */ -struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase { PyObject_HEAD PyObject *__pyx_v_phrase; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":65 - * return result - * - * cdef class CandidateSet: # <<<<<<<<<<<<<< - * cdef shared_ptr[mteval.SegmentEvaluator]* scorer - * cdef mteval.EvaluationMetric* metric - */ -struct __pyx_obj_5_cdec_CandidateSet { - PyObject_HEAD - boost::shared_ptr<SegmentEvaluator> *scorer; - EvaluationMetric *metric; - training::CandidateSet *cs; -}; - - -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":167 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":161 * - * property nodes: + * property edges: * def __get__(self): # <<<<<<<<<<<<<< * cdef unsigned i - * for i in range(self.hg.nodes_.size()): + * for i in range(self.hg.edges_.size()): */ -struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ { PyObject_HEAD unsigned int __pyx_v_i; - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; size_t __pyx_t_0; unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":49 - * return TRule(lhs, f, e, scores, a) - * - * cdef class TRule: # <<<<<<<<<<<<<< - * cdef shared_ptr[grammar.TRule]* rule - * - */ -struct __pyx_obj_5_cdec_TRule { - PyObject_HEAD - boost::shared_ptr<TRule> *rule; -}; - - -/* "/Users/vchahun/Sandbox/cdec/python/src/cdec.sa._sa.pxd":35 +/* "cdec/sa/_sa.pxd":35 * cdef public int chunklen(self, int k) * * cdef class Rule: # <<<<<<<<<<<<<< @@ -842,108 +865,148 @@ struct __pyx_obj_4cdec_2sa_3_sa_Rule { }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":177 - * _phrase(self.f), _phrase(self.e), scores) - * - * cdef class MRule(TRule): # <<<<<<<<<<<<<< - * def __init__(self, lhs, rhs, scores): - * """MRule(lhs, rhs, scores, a=None) -> Monolingual rule. +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":63 + * def todot(self): + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): # <<<<<<<<<<<<<< + * yield 'digraph lattice {' + * yield 'rankdir = LR;' */ -struct __pyx_obj_5_cdec_MRule { - struct __pyx_obj_5_cdec_TRule __pyx_base; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines { + PyObject_HEAD + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *__pyx_outer_scope; + PyObject *__pyx_v_delta; + PyObject *__pyx_v_i; + PyObject *__pyx_v_label; + PyObject *__pyx_v_weight; + Py_ssize_t __pyx_t_0; + PyObject *__pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); + PyObject *__pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); }; -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":100 - * self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get()) +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":121 + * return CandidateSet(self) * - * cdef class SegmentEvaluator: # <<<<<<<<<<<<<< - * cdef shared_ptr[mteval.SegmentEvaluator]* scorer + * cdef class Scorer: # <<<<<<<<<<<<<< + * cdef string* name * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_5_cdec_SegmentEvaluator { +struct __pyx_obj_4cdec_5_cdec_Scorer { PyObject_HEAD - boost::shared_ptr<SegmentEvaluator> *scorer; + std::string *name; EvaluationMetric *metric; }; -/* "_cdec.pyx":56 - * 'csplit', 'tagger', 'lexalign'): - * raise InvalidConfig('formalism "%s" unknown' % formalism) - * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) # <<<<<<<<<<<<<< - * cdef istringstream* config_stream = new istringstream(config_str) - * self.dec = new decoder.Decoder(config_stream) +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":246 + * raise NotImplemented('comparison not implemented for HypergraphEdge') + * + * cdef class HypergraphNode: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphNode* node */ -struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr { +struct __pyx_obj_4cdec_5_cdec_HypergraphNode { PyObject_HEAD - struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *__pyx_outer_scope; - PyObject *__pyx_v_kv; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); + struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtab; + Hypergraph *hg; + Hypergraph::Node *node; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":61 - * yield self[i] +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":81 + * del e_derivations * - * def todot(self): # <<<<<<<<<<<<<< - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): + * def kbest_features(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) */ -struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features { PyObject_HEAD - struct __pyx_obj_5_cdec_Lattice *__pyx_v_self; + KBest::KBestDerivations<FastSparseVector<weight_t>,FeatureVectorTraversal>::Derivation *__pyx_v_derivation; + KBest::KBestDerivations<FastSparseVector<weight_t>,FeatureVectorTraversal> *__pyx_v_derivations; + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap; + unsigned int __pyx_v_k; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":12 - * return stats +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":21 + * return '[%s]' % self.cat * - * cdef class Candidate: # <<<<<<<<<<<<<< - * cdef mteval.const_Candidate* candidate - * cdef public float score + * cdef class NTRef: # <<<<<<<<<<<<<< + * cdef public unsigned ref + * def __init__(self, unsigned ref): */ -struct __pyx_obj_5_cdec_Candidate { +struct __pyx_obj_4cdec_5_cdec_NTRef { PyObject_HEAD - const training::Candidate *candidate; - float score; + unsigned int ref; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":173 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":193 + * super(MRule, self).__init__(lhs, rhs, e, scores, None) + * + * cdef class Grammar: # <<<<<<<<<<<<<< + * cdef shared_ptr[grammar.Grammar]* grammar * - * def __str__(self): - * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< - * return '%s ||| %s ||| %s ||| %s' % (self.lhs, - * _phrase(self.f), _phrase(self.e), scores) */ -struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr { +struct __pyx_obj_4cdec_5_cdec_Grammar { PyObject_HEAD - struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *__pyx_outer_scope; - PyObject *__pyx_v_feat; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); + boost::shared_ptr<Grammar> *grammar; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":8 - * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":4 + * cimport kbest * - * cdef class NT: # <<<<<<<<<<<<<< - * cdef public bytes cat - * cdef public unsigned ref + * cdef class Hypergraph: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef MT19937* rng */ -struct __pyx_obj_5_cdec_NT { +struct __pyx_obj_4cdec_5_cdec_Hypergraph { PyObject_HEAD - PyObject *cat; - unsigned int ref; + struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *__pyx_vtab; + Hypergraph *hg; + MT19937 *rng; +}; + + +/* "cdec/_cdec.pyx":47 + * cdef DenseVector weights + * + * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< + * """Decoder('formalism = scfg') -> initialize from configuration string + * Decoder(formalism='scfg') -> initialize from named parameters + */ +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ { + PyObject_HEAD + PyObject *__pyx_v_config; +}; + + +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":65 + * return result + * + * cdef class CandidateSet: # <<<<<<<<<<<<<< + * cdef shared_ptr[mteval.SegmentEvaluator]* scorer + * cdef mteval.EvaluationMetric* metric + */ +struct __pyx_obj_4cdec_5_cdec_CandidateSet { + PyObject_HEAD + boost::shared_ptr<SegmentEvaluator> *scorer; + EvaluationMetric *metric; + training::CandidateSet *cs; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/cdec.sa._sa.pxd":3 +/* "cdec/sa/_sa.pxd":3 * from libc.stdio cimport FILE * * cdef class FloatList: # <<<<<<<<<<<<<< @@ -960,444 +1023,381 @@ struct __pyx_obj_4cdec_2sa_3_sa_FloatList { }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":196 - * return vector +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":62 + * del derivations * - * cdef class HypergraphEdge: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphEdge* edge + * def kbest_trees(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) */ -struct __pyx_obj_5_cdec_HypergraphEdge { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees { PyObject_HEAD - struct __pyx_vtabstruct_5_cdec_HypergraphEdge *__pyx_vtab; - Hypergraph *hg; - Hypergraph::Edge *edge; - struct __pyx_obj_5_cdec_TRule *trule; + KBest::KBestDerivations<std::vector<WordID>,ETreeTraversal>::Derivation *__pyx_v_e_derivation; + KBest::KBestDerivations<std::vector<WordID>,ETreeTraversal> *__pyx_v_e_derivations; + PyObject *__pyx_v_e_tree; + KBest::KBestDerivations<std::vector<WordID>,FTreeTraversal>::Derivation *__pyx_v_f_derivation; + KBest::KBestDerivations<std::vector<WordID>,FTreeTraversal> *__pyx_v_f_derivations; + PyObject *__pyx_v_f_tree; + unsigned int __pyx_v_k; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":72 - * self.vector.set_value(fid, value) +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":61 + * yield self[i] * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) - * cdef unsigned i + * def todot(self): # <<<<<<<<<<<<<< + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): */ -struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot { PyObject_HEAD - unsigned int __pyx_v_i; - FastSparseVector<weight_t>::const_iterator *__pyx_v_it; - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":256 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":172 + * self.rule.get().lhs_ = -TDConvert((<NT> lhs).cat) * - * property in_edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.node.in_edges_.size()): + * def __str__(self): # <<<<<<<<<<<<<< + * scores = ' '.join('%s=%s' % feat for feat in self.scores) + * return '%s ||| %s ||| %s ||| %s' % (self.lhs, */ -struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ { PyObject_HEAD - unsigned int __pyx_v_i; - struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":131 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":100 + * self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get()) * - * property a: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ + * cdef class SegmentEvaluator: # <<<<<<<<<<<<<< + * cdef shared_ptr[mteval.SegmentEvaluator]* scorer + * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ { +struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator { PyObject_HEAD - std::vector<AlignmentPoint> *__pyx_v_a; - unsigned int __pyx_v_i; - struct __pyx_obj_5_cdec_TRule *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + boost::shared_ptr<SegmentEvaluator> *scorer; + EvaluationMetric *metric; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":56 - * return unicode(str(self), 'utf8') +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":256 * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(len(self)): + * property in_edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.node.in_edges_.size()): */ -struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ { PyObject_HEAD unsigned int __pyx_v_i; - struct __pyx_obj_5_cdec_Lattice *__pyx_v_self; - Py_ssize_t __pyx_t_0; + struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self; + size_t __pyx_t_0; unsigned int __pyx_t_1; }; -/* "_cdec.pyx":43 - * yield key, str(value) - * - * cdef class Decoder: # <<<<<<<<<<<<<< - * cdef decoder.Decoder* dec - * cdef DenseVector weights +/* "cdec/_cdec.pyx":56 + * 'csplit', 'tagger', 'lexalign'): + * raise InvalidConfig('formalism "%s" unknown' % formalism) + * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) # <<<<<<<<<<<<<< + * cdef istringstream* config_stream = new istringstream(config_str) + * self.dec = new decoder.Decoder(config_stream) */ -struct __pyx_obj_5_cdec_Decoder { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr { PyObject_HEAD - Decoder *dec; - struct __pyx_obj_5_cdec_DenseVector *weights; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *__pyx_outer_scope; + PyObject *__pyx_v_kv; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":246 - * raise NotImplemented('comparison not implemented for HypergraphEdge') +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":6 * - * cdef class HypergraphNode: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphNode* node - */ -struct __pyx_obj_5_cdec_HypergraphNode { - PyObject_HEAD - struct __pyx_vtabstruct_5_cdec_HypergraphNode *__pyx_vtab; - Hypergraph *hg; - Hypergraph::Node *node; -}; - - -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":48 - * return sparse - * - * cdef class SparseVector: # <<<<<<<<<<<<<< - * cdef FastSparseVector[weight_t]* vector + * def _phrase(phrase): + * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< * + * cdef class NT: */ -struct __pyx_obj_5_cdec_SparseVector { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr { PyObject_HEAD - FastSparseVector<weight_t> *vector; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_outer_scope; + PyObject *__pyx_v_w; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":262 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":97 + * del derivations * - * property out_edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.node.out_edges_.size()): + * def sample(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" + * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() */ -struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample { PyObject_HEAD - unsigned int __pyx_v_i; - struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self; + std::vector<HypergraphSampler::Hypothesis> *__pyx_v_hypos; + unsigned int __pyx_v_k; + unsigned int __pyx_v_n; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; size_t __pyx_t_0; unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":32 - * self.vector[0][fid] = value +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":49 + * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned fid - * for fid in range(1, self.vector.size()): + * def kbest(self, size): # <<<<<<<<<<<<<< + * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) */ -struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest { PyObject_HEAD - unsigned int __pyx_v_fid; - struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + KBest::KBestDerivations<std::vector<WordID>,ESentenceTraversal>::Derivation *__pyx_v_derivation; + KBest::KBestDerivations<std::vector<WordID>,ESentenceTraversal> *__pyx_v_derivations; + unsigned int __pyx_v_k; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":44 - * return self.stats.size() +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":167 * - * def __iter__(self): # <<<<<<<<<<<<<< - * for i in range(len(self)): - * yield self[i] + * property nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.hg.nodes_.size()): */ -struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ { PyObject_HEAD - PyObject *__pyx_v_i; - struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self; - Py_ssize_t __pyx_t_0; - PyObject *__pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); + unsigned int __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":3 - * from cython.operator cimport preincrement as pinc +/* "cdec/sa/_sa.pxd":29 + * cdef FloatList values * - * cdef class DenseVector: # <<<<<<<<<<<<<< - * cdef vector[weight_t]* vector - * cdef bint owned # if True, do not manage memory + * cdef class Phrase: # <<<<<<<<<<<<<< + * cdef int *syms + * cdef int n, *varpos, n_vars */ -struct __pyx_obj_5_cdec_DenseVector { +struct __pyx_obj_4cdec_2sa_3_sa_Phrase { PyObject_HEAD - std::vector<weight_t> *vector; - int owned; + 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/grammar.pxi":199 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":199 * del self.grammar * * def __iter__(self): # <<<<<<<<<<<<<< * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() * cdef grammar.const_RuleBin* rbin = root.GetRules() */ -struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ { PyObject_HEAD unsigned int __pyx_v_i; const RuleBin *__pyx_v_rbin; const GrammarIter *__pyx_v_root; - struct __pyx_obj_5_cdec_Grammar *__pyx_v_self; - struct __pyx_obj_5_cdec_TRule *__pyx_v_trule; + struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self; + struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_trule; int __pyx_t_0; unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":176 - * out.fields[i] = ss[i] +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":217 + * self.grammar.get().SetGrammarName(name) * - * cdef class Metric: # <<<<<<<<<<<<<< - * cdef Scorer scorer - * def __cinit__(self): + * cdef class TextGrammar(Grammar): # <<<<<<<<<<<<<< + * def __init__(self, rules): + * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" */ -struct __pyx_obj_5_cdec_Metric { - PyObject_HEAD - struct __pyx_obj_5_cdec_Scorer *scorer; +struct __pyx_obj_4cdec_5_cdec_TextGrammar { + struct __pyx_obj_4cdec_5_cdec_Grammar __pyx_base; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":26 - * return fmap +/* "cdec/_cdec.pyx":43 + * yield key, str(value) * - * cdef class SufficientStats: # <<<<<<<<<<<<<< - * cdef mteval.SufficientStats* stats - * cdef mteval.EvaluationMetric* metric + * cdef class Decoder: # <<<<<<<<<<<<<< + * cdef decoder.Decoder* dec + * cdef DenseVector weights */ -struct __pyx_obj_5_cdec_SufficientStats { +struct __pyx_obj_4cdec_5_cdec_Decoder { PyObject_HEAD - SufficientStats *stats; - EvaluationMetric *metric; + Decoder *dec; + struct __pyx_obj_4cdec_5_cdec_DenseVector *weights; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":49 - * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":12 + * return stats * - * def kbest(self, size): # <<<<<<<<<<<<<< - * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) + * cdef class Candidate: # <<<<<<<<<<<<<< + * cdef mteval.const_Candidate* candidate + * cdef public float score */ -struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest { +struct __pyx_obj_4cdec_5_cdec_Candidate { PyObject_HEAD - KBest::KBestDerivations<std::vector<WordID>,ESentenceTraversal>::Derivation *__pyx_v_derivation; - KBest::KBestDerivations<std::vector<WordID>,ESentenceTraversal> *__pyx_v_derivations; - unsigned int __pyx_v_k; - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self; - PyObject *__pyx_v_size; - unsigned int __pyx_t_0; - long __pyx_t_1; + const training::Candidate *candidate; + float score; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":81 - * del e_derivations +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":262 * - * def kbest_features(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" - * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) + * property out_edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.node.out_edges_.size()): */ -struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ { PyObject_HEAD - KBest::KBestDerivations<FastSparseVector<weight_t>,FeatureVectorTraversal>::Derivation *__pyx_v_derivation; - KBest::KBestDerivations<FastSparseVector<weight_t>,FeatureVectorTraversal> *__pyx_v_derivations; - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_fmap; - unsigned int __pyx_v_k; - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self; - PyObject *__pyx_v_size; - unsigned int __pyx_t_0; - long __pyx_t_1; + unsigned int __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":216 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":56 + * return unicode(str(self), 'utf8') * - * property tail_nodes: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.edge.tail_nodes_.size()): + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(len(self)): */ -struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ { PyObject_HEAD unsigned int __pyx_v_i; - struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self; - unsigned int __pyx_t_0; + struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self; + Py_ssize_t __pyx_t_0; unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":172 - * self.rule.get().lhs_ = -TDConvert((<NT> lhs).cat) +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":32 + * self.vector[0][fid] = value * - * def __str__(self): # <<<<<<<<<<<<<< - * scores = ' '.join('%s=%s' % feat for feat in self.scores) - * return '%s ||| %s ||| %s ||| %s' % (self.lhs, + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned fid + * for fid in range(1, self.vector.size()): */ -struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ { PyObject_HEAD - struct __pyx_obj_5_cdec_TRule *__pyx_v_self; + unsigned int __pyx_v_fid; + struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":6 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":173 * - * def _phrase(phrase): - * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< - * - * cdef class NT: + * def __str__(self): + * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< + * return '%s ||| %s ||| %s ||| %s' % (self.lhs, + * _phrase(self.f), _phrase(self.e), scores) */ -struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr { PyObject_HEAD - struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *__pyx_outer_scope; - PyObject *__pyx_v_w; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *__pyx_outer_scope; + PyObject *__pyx_v_feat; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":62 - * del derivations - * - * def kbest_trees(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) - */ -struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees { - PyObject_HEAD - KBest::KBestDerivations<std::vector<WordID>,ETreeTraversal>::Derivation *__pyx_v_e_derivation; - KBest::KBestDerivations<std::vector<WordID>,ETreeTraversal> *__pyx_v_e_derivations; - PyObject *__pyx_v_e_tree; - KBest::KBestDerivations<std::vector<WordID>,FTreeTraversal>::Derivation *__pyx_v_f_derivation; - KBest::KBestDerivations<std::vector<WordID>,FTreeTraversal> *__pyx_v_f_derivations; - PyObject *__pyx_v_f_tree; - unsigned int __pyx_v_k; - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self; - PyObject *__pyx_v_size; - unsigned int __pyx_t_0; - long __pyx_t_1; -}; - - -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":4 - * cimport kbest - * - * cdef class Hypergraph: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef MT19937* rng - */ -struct __pyx_obj_5_cdec_Hypergraph { - PyObject_HEAD - struct __pyx_vtabstruct_5_cdec_Hypergraph *__pyx_vtab; - Hypergraph *hg; - MT19937 *rng; -}; - - -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":3 - * cimport lattice - * - * cdef class Lattice: # <<<<<<<<<<<<<< - * cdef lattice.Lattice* lattice - * - */ -struct __pyx_obj_5_cdec_Lattice { - PyObject_HEAD - Lattice *lattice; -}; - - -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":97 - * del derivations +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":108 + * del hypos * - * def sample(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" - * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() + * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" + * cdef vector[string]* trees = new vector[string]() */ -struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees { PyObject_HEAD - std::vector<HypergraphSampler::Hypothesis> *__pyx_v_hypos; unsigned int __pyx_v_k; unsigned int __pyx_v_n; - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + std::vector<std::string> *__pyx_v_trees; size_t __pyx_t_0; unsigned int __pyx_t_1; }; -/* "_cdec.pyx":32 - * SetSilent(yn) +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":131 * - * def _make_config(config): # <<<<<<<<<<<<<< - * for key, value in config.items(): - * if isinstance(value, dict): + * property a: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ */ -struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ { PyObject_HEAD - PyObject *__pyx_v_config; - PyObject *__pyx_v_info; - PyObject *__pyx_v_key; - PyObject *__pyx_v_name; - PyObject *__pyx_v_value; - PyObject *__pyx_t_0; - PyObject *__pyx_t_1; - Py_ssize_t __pyx_t_2; - PyObject *(*__pyx_t_3)(PyObject *); - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); + std::vector<AlignmentPoint> *__pyx_v_a; + unsigned int __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":217 - * self.grammar.get().SetGrammarName(name) +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":72 + * self.vector.set_value(fid, value) * - * cdef class TextGrammar(Grammar): # <<<<<<<<<<<<<< - * def __init__(self, rules): - * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) + * cdef unsigned i */ -struct __pyx_obj_5_cdec_TextGrammar { - struct __pyx_obj_5_cdec_Grammar __pyx_base; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ { + PyObject_HEAD + unsigned int __pyx_v_i; + FastSparseVector<weight_t>::const_iterator *__pyx_v_it; + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":4 - * cimport kbest +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":246 + * raise NotImplemented('comparison not implemented for HypergraphEdge') * - * cdef class Hypergraph: # <<<<<<<<<<<<<< + * cdef class HypergraphNode: # <<<<<<<<<<<<<< * cdef hypergraph.Hypergraph* hg - * cdef MT19937* rng + * cdef hypergraph.HypergraphNode* node */ -struct __pyx_vtabstruct_5_cdec_Hypergraph { - MT19937 *(*_rng)(struct __pyx_obj_5_cdec_Hypergraph *); +struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode { + PyObject *(*init)(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *, Hypergraph *, unsigned int); }; -static struct __pyx_vtabstruct_5_cdec_Hypergraph *__pyx_vtabptr_5_cdec_Hypergraph; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtabptr_4cdec_5_cdec_HypergraphNode; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":196 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":196 * return vector * * cdef class HypergraphEdge: # <<<<<<<<<<<<<< @@ -1405,13 +1405,13 @@ static struct __pyx_vtabstruct_5_cdec_Hypergraph *__pyx_vtabptr_5_cdec_Hypergrap * cdef hypergraph.HypergraphEdge* edge */ -struct __pyx_vtabstruct_5_cdec_HypergraphEdge { - PyObject *(*init)(struct __pyx_obj_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int); +struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge { + PyObject *(*init)(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int); }; -static struct __pyx_vtabstruct_5_cdec_HypergraphEdge *__pyx_vtabptr_5_cdec_HypergraphEdge; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *__pyx_vtabptr_4cdec_5_cdec_HypergraphEdge; -/* "/Users/vchahun/Sandbox/cdec/python/src/cdec.sa._sa.pxd":12 +/* "cdec/sa/_sa.pxd":12 * cdef void read_handle(self, FILE* f) * * cdef class IntList: # <<<<<<<<<<<<<< @@ -1431,7 +1431,7 @@ struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList { static struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *__pyx_vtabptr_4cdec_2sa_3_sa_IntList; -/* "/Users/vchahun/Sandbox/cdec/python/src/cdec.sa._sa.pxd":3 +/* "cdec/sa/_sa.pxd":3 * from libc.stdio cimport FILE * * cdef class FloatList: # <<<<<<<<<<<<<< @@ -1447,7 +1447,7 @@ struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList { static struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtabptr_4cdec_2sa_3_sa_FloatList; -/* "/Users/vchahun/Sandbox/cdec/python/src/cdec.sa._sa.pxd":29 +/* "cdec/sa/_sa.pxd":29 * cdef FloatList values * * cdef class Phrase: # <<<<<<<<<<<<<< @@ -1462,18 +1462,18 @@ struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase { static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtabptr_4cdec_2sa_3_sa_Phrase; -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":246 - * raise NotImplemented('comparison not implemented for HypergraphEdge') +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":4 + * cimport kbest * - * cdef class HypergraphNode: # <<<<<<<<<<<<<< + * cdef class Hypergraph: # <<<<<<<<<<<<<< * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphNode* node + * cdef MT19937* rng */ -struct __pyx_vtabstruct_5_cdec_HypergraphNode { - PyObject *(*init)(struct __pyx_obj_5_cdec_HypergraphNode *, Hypergraph *, unsigned int); +struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph { + MT19937 *(*_rng)(struct __pyx_obj_4cdec_5_cdec_Hypergraph *); }; -static struct __pyx_vtabstruct_5_cdec_HypergraphNode *__pyx_vtabptr_5_cdec_HypergraphNode; +static struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *__pyx_vtabptr_4cdec_5_cdec_Hypergraph; #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif @@ -1895,15 +1895,15 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ /* Module declarations from 'libcpp.pair' */ -/* Module declarations from 'utils' */ +/* Module declarations from 'cdec.utils' */ -/* Module declarations from 'grammar' */ +/* Module declarations from 'cdec.grammar' */ -/* Module declarations from 'lattice' */ +/* Module declarations from 'cdec.lattice' */ -/* Module declarations from 'hypergraph' */ +/* Module declarations from 'cdec.hypergraph' */ -/* Module declarations from 'decoder' */ +/* Module declarations from 'cdec.decoder' */ /* Module declarations from 'libc.stdio' */ @@ -1918,66 +1918,66 @@ static char *(*__pyx_f_4cdec_2sa_3_sa_sym_tocat)(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*/ -/* Module declarations from 'kbest' */ - -/* Module declarations from 'mteval' */ - -/* Module declarations from '_cdec' */ -static PyTypeObject *__pyx_ptype_5_cdec_Scorer = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_24___init__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec_NTRef = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_22___iter__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec_Grammar = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_20_lines = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_12_sample_trees = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_13___get__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_2__phrase = 0; -static PyTypeObject *__pyx_ptype_5_cdec_CandidateSet = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_14___get__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec_TRule = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_3_genexpr = 0; -static PyTypeObject *__pyx_ptype_5_cdec_MRule = 0; -static PyTypeObject *__pyx_ptype_5_cdec_SegmentEvaluator = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_25_genexpr = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_19_todot = 0; -static PyTypeObject *__pyx_ptype_5_cdec_Candidate = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_6_genexpr = 0; -static PyTypeObject *__pyx_ptype_5_cdec_NT = 0; -static PyTypeObject *__pyx_ptype_5_cdec_HypergraphEdge = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_1___iter__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_16___get__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_4___get__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_18___iter__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec_Decoder = 0; -static PyTypeObject *__pyx_ptype_5_cdec_HypergraphNode = 0; -static PyTypeObject *__pyx_ptype_5_cdec_SparseVector = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_17___get__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct____iter__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_21___iter__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec_DenseVector = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_7___iter__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec_Metric = 0; -static PyTypeObject *__pyx_ptype_5_cdec_SufficientStats = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_8_kbest = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_10_kbest_features = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_15___get__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_5___str__ = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_9_kbest_trees = 0; -static PyTypeObject *__pyx_ptype_5_cdec_Hypergraph = 0; -static PyTypeObject *__pyx_ptype_5_cdec_Lattice = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_11_sample = 0; -static PyTypeObject *__pyx_ptype_5_cdec___pyx_scope_struct_23__make_config = 0; -static PyTypeObject *__pyx_ptype_5_cdec_TextGrammar = 0; -static PyObject *__pyx_f_5_cdec_as_str(PyObject *, struct __pyx_opt_args_5_cdec_as_str *__pyx_optional_args); /*proto*/ -static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_obj_4cdec_2sa_3_sa_Rule *); /*proto*/ -static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject *, PyObject *); /*proto*/ -static float __pyx_f_5_cdec__compute_score(void *, SufficientStats *); /*proto*/ -static void __pyx_f_5_cdec__compute_sufficient_stats(void *, std::string *, std::vector<std::string> *, SufficientStats *); /*proto*/ +/* Module declarations from 'cdec.kbest' */ + +/* Module declarations from 'cdec.mteval' */ + +/* Module declarations from 'cdec._cdec' */ +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_TRule = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_MRule = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_DenseVector = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SufficientStats = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Metric = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Candidate = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SparseVector = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_NT = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Lattice = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23__make_config = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_HypergraphEdge = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20_lines = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Scorer = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_HypergraphNode = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_NTRef = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Grammar = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Hypergraph = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___init__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_CandidateSet = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19_todot = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SegmentEvaluator = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25_genexpr = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_3_genexpr = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_sample = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_8_kbest = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_TextGrammar = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Decoder = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct____iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_17___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_6_genexpr = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__ = 0; +static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *, struct __pyx_opt_args_4cdec_5_cdec_as_str *__pyx_optional_args); /*proto*/ +static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(struct __pyx_obj_4cdec_2sa_3_sa_Rule *); /*proto*/ +static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_stats(PyObject *, PyObject *); /*proto*/ +static float __pyx_f_4cdec_5_cdec__compute_score(void *, SufficientStats *); /*proto*/ +static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *, std::string *, std::vector<std::string> *, SufficientStats *); /*proto*/ static std::string __pyx_convert_string_from_py_(PyObject *); /*proto*/ -#define __Pyx_MODULE_NAME "_cdec" -int __pyx_module_is_main__cdec = 0; +#define __Pyx_MODULE_NAME "cdec._cdec" +int __pyx_module_is_main_cdec___cdec = 0; -/* Implementation of '_cdec' */ +/* Implementation of 'cdec._cdec' */ static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_KeyError; @@ -1989,204 +1989,204 @@ static PyObject *__pyx_builtin_eval; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_open; -static int __pyx_pf_5_cdec_11DenseVector___init__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self); /* proto */ -static void __pyx_pf_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self); /* proto */ -static Py_ssize_t __pyx_pf_5_cdec_11DenseVector_4__len__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname); /* proto */ -static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value); /* proto */ -static PyObject *__pyx_pf_5_cdec_11DenseVector_10__iter__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_11DenseVector_13dot(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_other); /* proto */ -static PyObject *__pyx_pf_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_12SparseVector___init__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self); /* proto */ -static void __pyx_pf_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_4copy(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname); /* proto */ -static int __pyx_pf_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_10__iter__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_y, int __pyx_v_op); /* proto */ -static Py_ssize_t __pyx_pf_5_cdec_12SparseVector_17__len__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_12SparseVector_19__contains__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_23__iadd__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_other); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_25__isub__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_other); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_27__imul__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar); /* proto */ +static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_pf_4cdec_5_cdec_11DenseVector_4__len__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname); /* proto */ +static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_12SparseVector___init__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname); /* proto */ +static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_10__iter__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y, int __pyx_v_op); /* proto */ +static Py_ssize_t __pyx_pf_4cdec_5_cdec_12SparseVector_17__len__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_12SparseVector_19__contains__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar); /* proto */ #if PY_MAJOR_VERSION < 3 -static PyObject *__pyx_pf_5_cdec_12SparseVector_29__idiv__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar); /* proto */ #endif -static PyObject *__pyx_pf_5_cdec_12SparseVector_31__add__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_y); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_y); /* proto */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ #if PY_MAJOR_VERSION < 3 -static PyObject *__pyx_pf_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ #endif -static PyObject *__pyx_pf_5_cdec_7_phrase_genexpr(PyObject *__pyx_self); /* proto */ -static PyObject *__pyx_pf_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phrase); /* proto */ -static int __pyx_pf_5_cdec_2NT___init__(struct __pyx_obj_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_cat, unsigned int __pyx_v_ref); /* proto */ -static PyObject *__pyx_pf_5_cdec_2NT_2__str__(struct __pyx_obj_5_cdec_NT *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_2NT_3cat___get__(struct __pyx_obj_5_cdec_NT *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_2NT_3cat_2__set__(struct __pyx_obj_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static int __pyx_pf_5_cdec_2NT_3cat_4__del__(struct __pyx_obj_5_cdec_NT *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_2NT_3ref___get__(struct __pyx_obj_5_cdec_NT *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_2NT_3ref_2__set__(struct __pyx_obj_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static int __pyx_pf_5_cdec_5NTRef___init__(struct __pyx_obj_5_cdec_NTRef *__pyx_v_self, unsigned int __pyx_v_ref); /* proto */ -static PyObject *__pyx_pf_5_cdec_5NTRef_2__str__(struct __pyx_obj_5_cdec_NTRef *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_5_cdec_NTRef *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_5_cdec_NTRef *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_a); /* proto */ -static void __pyx_pf_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_TRule *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_5TRule_5arity___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_f); /* proto */ -static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_e); /* proto */ -static PyObject *__pyx_pf_5_cdec_5TRule_1a___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_a); /* proto */ -static PyObject *__pyx_pf_5_cdec_5TRule_6scores___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_scores); /* proto */ -static PyObject *__pyx_pf_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs); /* proto */ -static PyObject *__pyx_pf_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_5TRule_4__str__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_scores); /* proto */ -static void __pyx_pf_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_Grammar *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Grammar_2__iter__(struct __pyx_obj_5_cdec_Grammar *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Grammar_4name___get__(struct __pyx_obj_5_cdec_Grammar *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_5_cdec_Grammar *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ -static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGrammar *__pyx_v_self, PyObject *__pyx_v_rules); /* proto */ -static void __pyx_pf_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_10viterbi_joshua(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_18kbest_features(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_21sample(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_24sample_trees(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_inp); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_beam_alpha, PyObject *__pyx_v_density, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_33plf(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_5edges___get__(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static Py_ssize_t __pyx_pf_5_cdec_14HypergraphEdge___len__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_9head_node___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_10tail_nodes___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4span___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_8src_span___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_14feature_values___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4prob___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_x, struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_y, int __pyx_v_op); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_5trule___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_14HypergraphEdge_5trule_2__set__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static int __pyx_pf_5_cdec_14HypergraphEdge_5trule_4__del__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphNode_8in_edges___get__(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphNode_9out_edges___get__(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphNode_4span___get__(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_x, struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_y, int __pyx_v_op); /* proto */ -static int __pyx_pf_5_cdec_7Lattice___cinit__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self, PyObject *__pyx_v_inp); /* proto */ -static void __pyx_pf_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_Lattice *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index); /* proto */ -static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index, PyObject *__pyx_v_arcs); /* proto */ -static Py_ssize_t __pyx_pf_5_cdec_7Lattice_10__len__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Lattice_12__str__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Lattice_16__iter__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Lattice_5todot_lines(PyObject *__pyx_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Lattice_19todot(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_9Candidate_5words___get__(struct __pyx_obj_5_cdec_Candidate *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_5_cdec_Candidate *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_9Candidate_5score___get__(struct __pyx_obj_5_cdec_Candidate *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_5_cdec_Candidate *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static void __pyx_pf_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_5score___get__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_6detail___get__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self); /* proto */ -static Py_ssize_t __pyx_pf_5_cdec_15SufficientStats_2__len__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_4__iter__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self, int __pyx_v_index); /* proto */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self, struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_other); /* proto */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ -static int __pyx_pf_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_5_cdec_SegmentEvaluator *__pyx_v_evaluator); /* proto */ -static void __pyx_pf_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self); /* proto */ -static Py_ssize_t __pyx_pf_5_cdec_12CandidateSet_4__len__(struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self, int __pyx_v_k); /* proto */ -static PyObject *__pyx_pf_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_hypergraph, unsigned int __pyx_v_k); /* proto */ -static void __pyx_pf_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_SegmentEvaluator *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5_cdec_SegmentEvaluator *__pyx_v_self, PyObject *__pyx_v_sentence); /* proto */ -static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_obj_5_cdec_SegmentEvaluator *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_6Scorer___cinit__(struct __pyx_obj_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ -static void __pyx_pf_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_Scorer *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_refs); /* proto */ -static PyObject *__pyx_pf_5_cdec_6Scorer_6__str__(struct __pyx_obj_5_cdec_Scorer *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_6Metric___cinit__(struct __pyx_obj_5_cdec_Metric *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_6Metric_2__call__(struct __pyx_obj_5_cdec_Metric *__pyx_v_self, PyObject *__pyx_v_refs); /* proto */ -static PyObject *__pyx_pf_5_cdec_6Metric_4score(CYTHON_UNUSED struct __pyx_obj_5_cdec_Metric *__pyx_v_stats); /* proto */ -static PyObject *__pyx_pf_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __pyx_obj_5_cdec_Metric *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_hyp, CYTHON_UNUSED PyObject *__pyx_v_refs); /* proto */ -static PyObject *__pyx_pf_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_yn); /* proto */ -static PyObject *__pyx_pf_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Decoder_8__init___genexpr(PyObject *__pyx_self); /* proto */ -static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_config_str, PyObject *__pyx_v_config); /* proto */ -static void __pyx_pf_5_cdec_7Decoder_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_Decoder *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Decoder_7weights___get__(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self); /* proto */ -static int __pyx_pf_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ -static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_sentence, PyObject *__pyx_v_grammar); /* proto */ -static PyObject *__pyx_tp_new_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_24___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_NTRef(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_22___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_Grammar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_20_lines(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_12_sample_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_13___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_CandidateSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_14___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_TRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_SegmentEvaluator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_25_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_19_todot(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_Candidate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_NT(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_HypergraphEdge(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_18___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_Decoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_HypergraphNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_SparseVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_17___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_DenseVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_Metric(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_SufficientStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_8_kbest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_15___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_Hypergraph(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_Lattice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_11_sample(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_23__make_config(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_pf_4cdec_5_cdec_7_phrase_genexpr(PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phrase); /* proto */ +static int __pyx_pf_4cdec_5_cdec_2NT___init__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_cat, unsigned int __pyx_v_ref); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_2NT_3cat___get__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_2NT_3cat_2__set__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_4cdec_5_cdec_2NT_3cat_4__del__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_2NT_3ref___get__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_2NT_3ref_2__set__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_4cdec_5_cdec_5NTRef___init__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self, unsigned int __pyx_v_ref); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_a); /* proto */ +static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_f); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_e); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1a___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_a); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_scores); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_4__str__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_MRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_scores); /* proto */ +static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5_cdec_TextGrammar *__pyx_v_self, PyObject *__pyx_v_rules); /* proto */ +static void __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_18kbest_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_inp); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_beam_alpha, PyObject *__pyx_v_density, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_y, int __pyx_v_op); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_2__set__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static int __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_4__del__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_8in_edges___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_9out_edges___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_y, int __pyx_v_op); /* proto */ +static int __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, PyObject *__pyx_v_inp); /* proto */ +static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index); /* proto */ +static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index, PyObject *__pyx_v_arcs); /* proto */ +static Py_ssize_t __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_12__str__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_16__iter__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_19todot(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ +static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_4__iter__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self, int __pyx_v_index); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ +static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_evaluator); /* proto */ +static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, int __pyx_v_k); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hypergraph, unsigned int __pyx_v_k); /* proto */ +static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self, PyObject *__pyx_v_sentence); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_refs); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_2__call__(struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self, PyObject *__pyx_v_refs); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_4score(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_stats); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_hyp, CYTHON_UNUSED PyObject *__pyx_v_refs); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_yn); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(PyObject *__pyx_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_config_str, PyObject *__pyx_v_config); /* proto */ +static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_sentence, PyObject *__pyx_v_grammar); /* proto */ +static PyObject *__pyx_tp_new_4cdec_5_cdec_TRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_DenseVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_SufficientStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Metric(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Candidate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_SparseVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_NT(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Lattice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphEdge(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_NTRef(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Grammar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Hypergraph(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_CandidateSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_SegmentEvaluator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Decoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static char __pyx_k_1[] = "Cannot convert type %s to str"; static char __pyx_k_3[] = "cannot take the dot product of %s and SparseVector"; static char __pyx_k_4[] = "comparison not implemented for SparseVector"; @@ -2212,21 +2212,22 @@ static char __pyx_k_26[] = "digraph lattice {"; static char __pyx_k_31[] = "\\\""; static char __pyx_k_33[] = "%d [shape=doublecircle]"; static char __pyx_k_34[] = "}"; -static char __pyx_k_37[] = "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi"; +static char __pyx_k_37[] = "/home/mdenkows/cdec/python/cdec/lattice.pxi"; static char __pyx_k_38[] = "Lattice.todot.<locals>.lines"; -static char __pyx_k_39[] = "\n"; -static char __pyx_k_41[] = "sufficient stats vector index out of range"; -static char __pyx_k_43[] = "candidate set index out of range"; -static char __pyx_k_45[] = "%s %s"; -static char __pyx_k_46[] = "%s = %s"; -static char __pyx_k_47[] = "formalism \"%s\" unknown"; -static char __pyx_k_48[] = "cannot initialize weights with %s"; -static char __pyx_k_49[] = "#"; -static char __pyx_k_52[] = "Cannot translate input type %s"; -static char __pyx_k_53[] = "cdec.sa._sa"; -static char __pyx_k_54[] = "*"; -static char __pyx_k_57[] = "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi"; -static char __pyx_k_65[] = "/Users/vchahun/Sandbox/cdec/python/src/_cdec.pyx"; +static char __pyx_k_39[] = "cdec._cdec"; +static char __pyx_k_40[] = "\n"; +static char __pyx_k_42[] = "sufficient stats vector index out of range"; +static char __pyx_k_44[] = "candidate set index out of range"; +static char __pyx_k_46[] = "%s %s"; +static char __pyx_k_47[] = "%s = %s"; +static char __pyx_k_48[] = "formalism \"%s\" unknown"; +static char __pyx_k_49[] = "cannot initialize weights with %s"; +static char __pyx_k_50[] = "#"; +static char __pyx_k_53[] = "Cannot translate input type %s"; +static char __pyx_k_54[] = "cdec.sa._sa"; +static char __pyx_k_55[] = "*"; +static char __pyx_k_58[] = "/home/mdenkows/cdec/python/cdec/grammar.pxi"; +static char __pyx_k_66[] = "/home/mdenkows/cdec/python/cdec/_cdec.pyx"; static char __pyx_k__a[] = "a"; static char __pyx_k__e[] = "e"; static char __pyx_k__f[] = "f"; @@ -2263,7 +2264,6 @@ static char __pyx_k__self[] = "self"; static char __pyx_k__send[] = "send"; static char __pyx_k__span[] = "span"; static char __pyx_k__utf8[] = "utf8"; -static char __pyx_k___cdec[] = "_cdec"; static char __pyx_k__close[] = "close"; static char __pyx_k__delta[] = "delta"; static char __pyx_k__items[] = "items"; @@ -2352,20 +2352,21 @@ static PyObject *__pyx_kp_s_33; static PyObject *__pyx_kp_s_34; static PyObject *__pyx_kp_s_37; static PyObject *__pyx_n_s_38; -static PyObject *__pyx_kp_s_39; +static PyObject *__pyx_n_s_39; static PyObject *__pyx_kp_s_4; -static PyObject *__pyx_kp_s_41; -static PyObject *__pyx_kp_s_43; -static PyObject *__pyx_kp_s_45; +static PyObject *__pyx_kp_s_40; +static PyObject *__pyx_kp_s_42; +static PyObject *__pyx_kp_s_44; static PyObject *__pyx_kp_s_46; static PyObject *__pyx_kp_s_47; static PyObject *__pyx_kp_s_48; static PyObject *__pyx_kp_s_49; -static PyObject *__pyx_kp_s_52; -static PyObject *__pyx_n_s_53; +static PyObject *__pyx_kp_s_50; +static PyObject *__pyx_kp_s_53; static PyObject *__pyx_n_s_54; -static PyObject *__pyx_kp_s_57; -static PyObject *__pyx_kp_s_65; +static PyObject *__pyx_n_s_55; +static PyObject *__pyx_kp_s_58; +static PyObject *__pyx_kp_s_66; static PyObject *__pyx_kp_s_7; static PyObject *__pyx_kp_s_8; static PyObject *__pyx_kp_s_9; @@ -2397,7 +2398,6 @@ static PyObject *__pyx_n_s____name__; static PyObject *__pyx_n_s____pyx_vtable__; static PyObject *__pyx_n_s____qualname__; static PyObject *__pyx_n_s____test__; -static PyObject *__pyx_n_s___cdec; static PyObject *__pyx_n_s___make_config; static PyObject *__pyx_n_s___phrase; static PyObject *__pyx_n_s___sa; @@ -2484,25 +2484,25 @@ static PyObject *__pyx_k_tuple_24; static PyObject *__pyx_k_tuple_25; static PyObject *__pyx_k_tuple_32; static PyObject *__pyx_k_tuple_35; -static PyObject *__pyx_k_tuple_40; -static PyObject *__pyx_k_tuple_42; -static PyObject *__pyx_k_tuple_44; -static PyObject *__pyx_k_tuple_50; +static PyObject *__pyx_k_tuple_41; +static PyObject *__pyx_k_tuple_43; +static PyObject *__pyx_k_tuple_45; static PyObject *__pyx_k_tuple_51; -static PyObject *__pyx_k_tuple_55; -static PyObject *__pyx_k_tuple_58; +static PyObject *__pyx_k_tuple_52; +static PyObject *__pyx_k_tuple_56; static PyObject *__pyx_k_tuple_59; static PyObject *__pyx_k_tuple_60; static PyObject *__pyx_k_tuple_61; static PyObject *__pyx_k_tuple_62; static PyObject *__pyx_k_tuple_63; -static PyObject *__pyx_k_tuple_66; +static PyObject *__pyx_k_tuple_64; +static PyObject *__pyx_k_tuple_67; static PyObject *__pyx_k_codeobj_36; -static PyObject *__pyx_k_codeobj_56; -static PyObject *__pyx_k_codeobj_64; -static PyObject *__pyx_k_codeobj_67; +static PyObject *__pyx_k_codeobj_57; +static PyObject *__pyx_k_codeobj_65; +static PyObject *__pyx_k_codeobj_68; -/* "_cdec.pyx":6 +/* "cdec/_cdec.pyx":6 * cimport decoder * * cdef bytes as_str(data, char* error_msg='Cannot convert type %s to str'): # <<<<<<<<<<<<<< @@ -2510,7 +2510,7 @@ static PyObject *__pyx_k_codeobj_67; * if isinstance(data, unicode): */ -static PyObject *__pyx_f_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_args_5_cdec_as_str *__pyx_optional_args) { +static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_args_4cdec_5_cdec_as_str *__pyx_optional_args) { char *__pyx_v_error_msg = ((char *)__pyx_k_1); PyObject *__pyx_v_ret = 0; PyObject *__pyx_r = NULL; @@ -2530,7 +2530,7 @@ static PyObject *__pyx_f_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_ } } - /* "_cdec.pyx":8 + /* "cdec/_cdec.pyx":8 * cdef bytes as_str(data, char* error_msg='Cannot convert type %s to str'): * cdef bytes ret * if isinstance(data, unicode): # <<<<<<<<<<<<<< @@ -2541,7 +2541,7 @@ static PyObject *__pyx_f_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_cdec.pyx":9 + /* "cdec/_cdec.pyx":9 * cdef bytes ret * if isinstance(data, unicode): * ret = data.encode('utf8') # <<<<<<<<<<<<<< @@ -2559,7 +2559,7 @@ static PyObject *__pyx_f_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_ goto __pyx_L3; } - /* "_cdec.pyx":10 + /* "cdec/_cdec.pyx":10 * if isinstance(data, unicode): * ret = data.encode('utf8') * elif isinstance(data, str): # <<<<<<<<<<<<<< @@ -2570,7 +2570,7 @@ static PyObject *__pyx_f_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "_cdec.pyx":11 + /* "cdec/_cdec.pyx":11 * ret = data.encode('utf8') * elif isinstance(data, str): * ret = data # <<<<<<<<<<<<<< @@ -2584,7 +2584,7 @@ static PyObject *__pyx_f_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_ } /*else*/ { - /* "_cdec.pyx":13 + /* "cdec/_cdec.pyx":13 * ret = data * else: * raise TypeError(error_msg.format(type(data))) # <<<<<<<<<<<<<< @@ -2619,7 +2619,7 @@ static PyObject *__pyx_f_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_ } __pyx_L3:; - /* "_cdec.pyx":14 + /* "cdec/_cdec.pyx":14 * else: * raise TypeError(error_msg.format(type(data))) * return ret # <<<<<<<<<<<<<< @@ -2637,7 +2637,7 @@ static PyObject *__pyx_f_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("_cdec.as_str", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.as_str", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ret); @@ -2647,24 +2647,24 @@ static PyObject *__pyx_f_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_ } /* Python wrapper */ -static int __pyx_pw_5_cdec_11DenseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_11DenseVector___init__[] = "DenseVector() -> Dense weight/feature vector."; +static int __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_11DenseVector___init__[] = "DenseVector() -> Dense weight/feature vector."; #if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_5_cdec_11DenseVector___init__; +struct wrapperbase __pyx_wrapperbase_4cdec_5_cdec_11DenseVector___init__; #endif -static int __pyx_pw_5_cdec_11DenseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; - __pyx_r = __pyx_pf_5_cdec_11DenseVector___init__(((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector___init__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":7 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":7 * cdef bint owned # if True, do not manage memory * * def __init__(self): # <<<<<<<<<<<<<< @@ -2672,7 +2672,7 @@ static int __pyx_pw_5_cdec_11DenseVector_1__init__(PyObject *__pyx_v_self, PyObj * self.vector = new vector[weight_t]() */ -static int __pyx_pf_5_cdec_11DenseVector___init__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self) { +static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations std::vector<weight_t> *__pyx_t_1; @@ -2681,7 +2681,7 @@ static int __pyx_pf_5_cdec_11DenseVector___init__(struct __pyx_obj_5_cdec_DenseV int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":9 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":9 * def __init__(self): * """DenseVector() -> Dense weight/feature vector.""" * self.vector = new vector[weight_t]() # <<<<<<<<<<<<<< @@ -2696,7 +2696,7 @@ static int __pyx_pf_5_cdec_11DenseVector___init__(struct __pyx_obj_5_cdec_DenseV } __pyx_v_self->vector = __pyx_t_1; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":10 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":10 * """DenseVector() -> Dense weight/feature vector.""" * self.vector = new vector[weight_t]() * self.owned = False # <<<<<<<<<<<<<< @@ -2708,7 +2708,7 @@ static int __pyx_pf_5_cdec_11DenseVector___init__(struct __pyx_obj_5_cdec_DenseV __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.DenseVector.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.DenseVector.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); @@ -2716,15 +2716,15 @@ static int __pyx_pf_5_cdec_11DenseVector___init__(struct __pyx_obj_5_cdec_DenseV } /* Python wrapper */ -static void __pyx_pw_5_cdec_11DenseVector_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_11DenseVector_3__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_11DenseVector_2__dealloc__(((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":12 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":12 * self.owned = False * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -2732,12 +2732,12 @@ static void __pyx_pw_5_cdec_11DenseVector_3__dealloc__(PyObject *__pyx_v_self) { * del self.vector */ -static void __pyx_pf_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":13 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":13 * * def __dealloc__(self): * if not self.owned: # <<<<<<<<<<<<<< @@ -2747,7 +2747,7 @@ static void __pyx_pf_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_5_cdec_D __pyx_t_1 = ((!(__pyx_v_self->owned != 0)) != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":14 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":14 * def __dealloc__(self): * if not self.owned: * del self.vector # <<<<<<<<<<<<<< @@ -2763,17 +2763,17 @@ static void __pyx_pf_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_5_cdec_D } /* Python wrapper */ -static Py_ssize_t __pyx_pw_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v_self); /*proto*/ -static Py_ssize_t __pyx_pw_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v_self) { +static Py_ssize_t __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_11DenseVector_4__len__(((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_4__len__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":16 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":16 * del self.vector * * def __len__(self): # <<<<<<<<<<<<<< @@ -2781,12 +2781,12 @@ static Py_ssize_t __pyx_pw_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v_self) * */ -static Py_ssize_t __pyx_pf_5_cdec_11DenseVector_4__len__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self) { +static Py_ssize_t __pyx_pf_4cdec_5_cdec_11DenseVector_4__len__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":17 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":17 * * def __len__(self): * return self.vector.size() # <<<<<<<<<<<<<< @@ -2803,8 +2803,8 @@ static Py_ssize_t __pyx_pf_5_cdec_11DenseVector_4__len__(struct __pyx_obj_5_cdec } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ -static PyObject *__pyx_pw_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { +static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { char *__pyx_v_fname; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -2817,16 +2817,16 @@ static PyObject *__pyx_pw_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.DenseVector.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.DenseVector.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_11DenseVector_6__getitem__(((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); + __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":19 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":19 * return self.vector.size() * * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< @@ -2834,7 +2834,7 @@ static PyObject *__pyx_pw_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_se * if 0 <= fid < self.vector.size(): */ -static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname) { +static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname) { int __pyx_v_fid; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2847,7 +2847,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":20 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":20 * * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -2856,7 +2856,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_c */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":21 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":21 * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) * if 0 <= fid < self.vector.size(): # <<<<<<<<<<<<<< @@ -2870,7 +2870,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_c __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":22 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":22 * cdef int fid = FDConvert(fname) * if 0 <= fid < self.vector.size(): * return self.vector[0][fid] # <<<<<<<<<<<<<< @@ -2887,7 +2887,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_c } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":23 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":23 * if 0 <= fid < self.vector.size(): * return self.vector[0][fid] * raise KeyError(fname) # <<<<<<<<<<<<<< @@ -2913,7 +2913,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_c __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("_cdec.DenseVector.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.DenseVector.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -2922,8 +2922,8 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_c } /* Python wrapper */ -static int __pyx_pw_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value); /*proto*/ -static int __pyx_pw_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value) { +static int __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value) { char *__pyx_v_fname; float __pyx_v_value; int __pyx_lineno = 0; @@ -2940,16 +2940,16 @@ static int __pyx_pw_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.DenseVector.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.DenseVector.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_11DenseVector_8__setitem__(((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_self), ((char *)__pyx_v_fname), ((float)__pyx_v_value)); + __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self), ((char *)__pyx_v_fname), ((float)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":25 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":25 * raise KeyError(fname) * * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< @@ -2957,7 +2957,7 @@ static int __pyx_pw_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, Py * if fid < 0: raise KeyError(fname) */ -static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value) { +static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value) { int __pyx_v_fid; int __pyx_r; __Pyx_RefNannyDeclarations @@ -2969,7 +2969,7 @@ static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_De int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":26 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":26 * * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -2978,7 +2978,7 @@ static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_De */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":27 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":27 * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -3004,7 +3004,7 @@ static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_De } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":28 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":28 * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) * if self.vector.size() <= fid: # <<<<<<<<<<<<<< @@ -3014,7 +3014,7 @@ static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_De __pyx_t_1 = ((__pyx_v_self->vector->size() <= __pyx_v_fid) != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":29 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":29 * if fid < 0: raise KeyError(fname) * if self.vector.size() <= fid: * self.vector.resize(fid + 1) # <<<<<<<<<<<<<< @@ -3026,7 +3026,7 @@ static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_De } __pyx_L4:; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":30 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":30 * if self.vector.size() <= fid: * self.vector.resize(fid + 1) * self.vector[0][fid] = value # <<<<<<<<<<<<<< @@ -3040,26 +3040,26 @@ static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_De __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.DenseVector.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.DenseVector.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_11DenseVector_12generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_11DenseVector_10__iter__(((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":32 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":32 * self.vector[0][fid] = value * * def __iter__(self): # <<<<<<<<<<<<<< @@ -3067,15 +3067,15 @@ static PyObject *__pyx_pw_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_v_self * for fid in range(1, self.vector.size()): */ -static PyObject *__pyx_pf_5_cdec_11DenseVector_10__iter__(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __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_5_cdec___pyx_scope_struct____iter__ *)__pyx_tp_new_5_cdec___pyx_scope_struct____iter__(__pyx_ptype_5_cdec___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -3085,7 +3085,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_10__iter__(struct __pyx_obj_5_cde __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_5_cdec_11DenseVector_12generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_11DenseVector_12generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -3094,7 +3094,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_10__iter__(struct __pyx_obj_5_cde __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.DenseVector.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.DenseVector.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -3103,9 +3103,9 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_10__iter__(struct __pyx_obj_5_cde return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_11DenseVector_12generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -3127,7 +3127,7 @@ static PyObject *__pyx_gb_5_cdec_11DenseVector_12generator(__pyx_GeneratorObject __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":34 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":34 * def __iter__(self): * cdef unsigned fid * for fid in range(1, self.vector.size()): # <<<<<<<<<<<<<< @@ -3138,7 +3138,7 @@ static PyObject *__pyx_gb_5_cdec_11DenseVector_12generator(__pyx_GeneratorObject for (__pyx_t_2 = 1; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_fid = __pyx_t_2; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":35 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":35 * cdef unsigned fid * for fid in range(1, self.vector.size()): * yield str(FDConvert(fid).c_str()), self.vector[0][fid] # <<<<<<<<<<<<<< @@ -3195,17 +3195,17 @@ static PyObject *__pyx_gb_5_cdec_11DenseVector_12generator(__pyx_GeneratorObject } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static char __pyx_doc_5_cdec_11DenseVector_13dot[] = "vector.dot(SparseVector other) -> Dot product of the two vectors."; -static PyObject *__pyx_pw_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_11DenseVector_13dot[] = "vector.dot(SparseVector other) -> Dot product of the two vectors."; +static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_14dot(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; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dot (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_11DenseVector_13dot(((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_self), ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_other)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_13dot(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_other)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -3214,7 +3214,7 @@ static PyObject *__pyx_pw_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_self, PyO return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":37 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":37 * yield str(FDConvert(fid).c_str()), self.vector[0][fid] * * def dot(self, SparseVector other): # <<<<<<<<<<<<<< @@ -3222,7 +3222,7 @@ static PyObject *__pyx_pw_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_self, PyO * return other.dot(self) */ -static PyObject *__pyx_pf_5_cdec_11DenseVector_13dot(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_other) { +static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -3233,7 +3233,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_13dot(struct __pyx_obj_5_cdec_Den int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dot", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":39 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":39 * def dot(self, SparseVector other): * """vector.dot(SparseVector other) -> Dot product of the two vectors.""" * return other.dot(self) # <<<<<<<<<<<<<< @@ -3262,7 +3262,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_13dot(struct __pyx_obj_5_cdec_Den __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.DenseVector.dot", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.DenseVector.dot", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -3271,18 +3271,18 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_13dot(struct __pyx_obj_5_cdec_Den } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_11DenseVector_16tosparse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_11DenseVector_15tosparse[] = "vector.tosparse() -> Equivalent SparseVector."; -static PyObject *__pyx_pw_5_cdec_11DenseVector_16tosparse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_11DenseVector_15tosparse[] = "vector.tosparse() -> Equivalent SparseVector."; +static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tosparse (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_11DenseVector_15tosparse(((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":41 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":41 * return other.dot(self) * * def tosparse(self): # <<<<<<<<<<<<<< @@ -3290,8 +3290,8 @@ static PyObject *__pyx_pw_5_cdec_11DenseVector_16tosparse(PyObject *__pyx_v_self * cdef SparseVector sparse = SparseVector.__new__(SparseVector) */ -static PyObject *__pyx_pf_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_5_cdec_DenseVector *__pyx_v_self) { - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_sparse = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_sparse = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -3300,20 +3300,20 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tosparse", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":43 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":43 * def tosparse(self): * """vector.tosparse() -> Equivalent SparseVector.""" * cdef SparseVector sparse = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * sparse.vector = new FastSparseVector[weight_t]() * InitSparseVector(self.vector[0], sparse.vector) */ - __pyx_t_1 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_sparse = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_sparse = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":44 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":44 * """vector.tosparse() -> Equivalent SparseVector.""" * cdef SparseVector sparse = SparseVector.__new__(SparseVector) * sparse.vector = new FastSparseVector[weight_t]() # <<<<<<<<<<<<<< @@ -3322,7 +3322,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_5_cde */ __pyx_v_sparse->vector = new FastSparseVector<weight_t>(); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":45 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":45 * cdef SparseVector sparse = SparseVector.__new__(SparseVector) * sparse.vector = new FastSparseVector[weight_t]() * InitSparseVector(self.vector[0], sparse.vector) # <<<<<<<<<<<<<< @@ -3331,7 +3331,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_5_cde */ Weights::InitSparseVector((__pyx_v_self->vector[0]), __pyx_v_sparse->vector); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":46 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":46 * sparse.vector = new FastSparseVector[weight_t]() * InitSparseVector(self.vector[0], sparse.vector) * return sparse # <<<<<<<<<<<<<< @@ -3347,7 +3347,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_5_cde goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.DenseVector.tosparse", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.DenseVector.tosparse", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_sparse); @@ -3357,24 +3357,24 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_5_cde } /* Python wrapper */ -static int __pyx_pw_5_cdec_12SparseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_12SparseVector___init__[] = "SparseVector() -> Sparse feature/weight vector."; +static int __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_12SparseVector___init__[] = "SparseVector() -> Sparse feature/weight vector."; #if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_5_cdec_12SparseVector___init__; +struct wrapperbase __pyx_wrapperbase_4cdec_5_cdec_12SparseVector___init__; #endif -static int __pyx_pw_5_cdec_12SparseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; - __pyx_r = __pyx_pf_5_cdec_12SparseVector___init__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector___init__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":51 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":51 * cdef FastSparseVector[weight_t]* vector * * def __init__(self): # <<<<<<<<<<<<<< @@ -3382,12 +3382,12 @@ static int __pyx_pw_5_cdec_12SparseVector_1__init__(PyObject *__pyx_v_self, PyOb * self.vector = new FastSparseVector[weight_t]() */ -static int __pyx_pf_5_cdec_12SparseVector___init__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self) { +static int __pyx_pf_4cdec_5_cdec_12SparseVector___init__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":53 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":53 * def __init__(self): * """SparseVector() -> Sparse feature/weight vector.""" * self.vector = new FastSparseVector[weight_t]() # <<<<<<<<<<<<<< @@ -3402,15 +3402,15 @@ static int __pyx_pf_5_cdec_12SparseVector___init__(struct __pyx_obj_5_cdec_Spars } /* Python wrapper */ -static void __pyx_pw_5_cdec_12SparseVector_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_12SparseVector_3__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_12SparseVector_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_12SparseVector_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_12SparseVector_2__dealloc__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":55 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":55 * self.vector = new FastSparseVector[weight_t]() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -3418,11 +3418,11 @@ static void __pyx_pw_5_cdec_12SparseVector_3__dealloc__(PyObject *__pyx_v_self) * */ -static void __pyx_pf_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":56 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":56 * * def __dealloc__(self): * del self.vector # <<<<<<<<<<<<<< @@ -3435,18 +3435,18 @@ static void __pyx_pf_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED struct __p } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_5copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_12SparseVector_4copy[] = "vector.copy() -> SparseVector copy."; -static PyObject *__pyx_pw_5_cdec_12SparseVector_5copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_5copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_12SparseVector_4copy[] = "vector.copy() -> SparseVector copy."; +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_5copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_12SparseVector_4copy(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_4copy(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":58 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":58 * del self.vector * * def copy(self): # <<<<<<<<<<<<<< @@ -3454,7 +3454,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_5copy(PyObject *__pyx_v_self, CY * return self * 1 */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_4copy(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -3463,7 +3463,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_4copy(struct __pyx_obj_5_cdec_Sp int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":60 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":60 * def copy(self): * """vector.copy() -> SparseVector copy.""" * return self * 1 # <<<<<<<<<<<<<< @@ -3481,7 +3481,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_4copy(struct __pyx_obj_5_cdec_Sp goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.SparseVector.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -3490,8 +3490,8 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_4copy(struct __pyx_obj_5_cdec_Sp } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { char *__pyx_v_fname; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -3504,16 +3504,16 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.SparseVector.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_12SparseVector_6__getitem__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":62 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":62 * return self * 1 * * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< @@ -3521,7 +3521,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_s * if fid < 0: raise KeyError(fname) */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname) { +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname) { int __pyx_v_fid; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -3533,7 +3533,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_5_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":63 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":63 * * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -3542,7 +3542,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_5_ */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":64 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":64 * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -3568,7 +3568,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_5_ } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":65 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":65 * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) * return self.vector.value(fid) # <<<<<<<<<<<<<< @@ -3587,7 +3587,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_5_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.SparseVector.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -3596,8 +3596,8 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_5_ } /* Python wrapper */ -static int __pyx_pw_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value); /*proto*/ -static int __pyx_pw_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value) { +static int __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value) { char *__pyx_v_fname; float __pyx_v_value; int __pyx_lineno = 0; @@ -3614,16 +3614,16 @@ static int __pyx_pw_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.SparseVector.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_12SparseVector_8__setitem__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname), ((float)__pyx_v_value)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname), ((float)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":67 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":67 * return self.vector.value(fid) * * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< @@ -3631,7 +3631,7 @@ static int __pyx_pw_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, P * if fid < 0: raise KeyError(fname) */ -static int __pyx_pf_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value) { +static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value) { int __pyx_v_fid; int __pyx_r; __Pyx_RefNannyDeclarations @@ -3643,7 +3643,7 @@ static int __pyx_pf_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_5_cdec_S int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":68 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":68 * * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -3652,7 +3652,7 @@ static int __pyx_pf_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_5_cdec_S */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":69 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":69 * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -3678,7 +3678,7 @@ static int __pyx_pf_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_5_cdec_S } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":70 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":70 * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) * self.vector.set_value(fid, value) # <<<<<<<<<<<<<< @@ -3692,26 +3692,26 @@ static int __pyx_pf_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_5_cdec_S __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.SparseVector.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_11__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_11__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_12SparseVector_10__iter__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_10__iter__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":72 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":72 * self.vector.set_value(fid, value) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -3719,15 +3719,15 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_11__iter__(PyObject *__pyx_v_sel * cdef unsigned i */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_10__iter__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_10__iter__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __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_5_cdec___pyx_scope_struct_1___iter__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_1___iter__(__pyx_ptype_5_cdec___pyx_scope_struct_1___iter__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -3737,7 +3737,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_10__iter__(struct __pyx_obj_5_cd __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_5_cdec_12SparseVector_12generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_12SparseVector_12generator1, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -3746,7 +3746,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_10__iter__(struct __pyx_obj_5_cd __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.SparseVector.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -3755,9 +3755,9 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_10__iter__(struct __pyx_obj_5_cd return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -3779,7 +3779,7 @@ static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObje __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":73 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":73 * * def __iter__(self): * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) # <<<<<<<<<<<<<< @@ -3788,7 +3788,7 @@ static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObje */ __pyx_cur_scope->__pyx_v_it = new FastSparseVector<weight_t>::const_iterator((__pyx_cur_scope->__pyx_v_self->vector[0]), 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":75 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":75 * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) * cdef unsigned i * try: # <<<<<<<<<<<<<< @@ -3797,7 +3797,7 @@ static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObje */ /*try:*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":76 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":76 * cdef unsigned i * try: * for i in range(self.vector.size()): # <<<<<<<<<<<<<< @@ -3808,7 +3808,7 @@ static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObje for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":77 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":77 * try: * for i in range(self.vector.size()): * yield (str(FDConvert(it[0].ptr().first).c_str()), it[0].ptr().second) # <<<<<<<<<<<<<< @@ -3849,7 +3849,7 @@ static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObje __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":78 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":78 * for i in range(self.vector.size()): * yield (str(FDConvert(it[0].ptr().first).c_str()), it[0].ptr().second) * pinc(it[0]) # ++it # <<<<<<<<<<<<<< @@ -3860,7 +3860,7 @@ static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObje } } - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":80 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":80 * pinc(it[0]) # ++it * finally: * del it # <<<<<<<<<<<<<< @@ -3911,18 +3911,18 @@ static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObje } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static char __pyx_doc_5_cdec_12SparseVector_13dot[] = "vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors."; -static PyObject *__pyx_pw_5_cdec_12SparseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_12SparseVector_13dot[] = "vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors."; +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dot (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_12SparseVector_13dot(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_13dot(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((PyObject *)__pyx_v_other)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":82 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":82 * del it * * def dot(self, other): # <<<<<<<<<<<<<< @@ -3930,7 +3930,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_14dot(PyObject *__pyx_v_self, Py * if isinstance(other, DenseVector): */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -3942,18 +3942,18 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dot", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":84 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":84 * def dot(self, other): * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" * if isinstance(other, DenseVector): # <<<<<<<<<<<<<< * return self.vector.dot((<DenseVector> other).vector[0]) * elif isinstance(other, SparseVector): */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_5_cdec_DenseVector)); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_4cdec_5_cdec_DenseVector)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":85 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":85 * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" * if isinstance(other, DenseVector): * return self.vector.dot((<DenseVector> other).vector[0]) # <<<<<<<<<<<<<< @@ -3961,7 +3961,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp * return self.vector.dot((<SparseVector> other).vector[0]) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->vector->dot((((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_other)->vector[0]))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->vector->dot((((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_other)->vector[0]))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -3969,18 +3969,18 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp goto __pyx_L3; } - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":86 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":86 * if isinstance(other, DenseVector): * return self.vector.dot((<DenseVector> other).vector[0]) * elif isinstance(other, SparseVector): # <<<<<<<<<<<<<< * return self.vector.dot((<SparseVector> other).vector[0]) * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) */ - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_5_cdec_SparseVector)); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":87 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":87 * return self.vector.dot((<DenseVector> other).vector[0]) * elif isinstance(other, SparseVector): * return self.vector.dot((<SparseVector> other).vector[0]) # <<<<<<<<<<<<<< @@ -3988,7 +3988,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->vector->dot((((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_other)->vector[0]))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->vector->dot((((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_other)->vector[0]))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -3997,7 +3997,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":88 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":88 * elif isinstance(other, SparseVector): * return self.vector.dot((<SparseVector> other).vector[0]) * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) # <<<<<<<<<<<<<< @@ -4023,7 +4023,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("_cdec.SparseVector.dot", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.dot", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -4032,17 +4032,17 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { 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("__richcmp__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_12SparseVector_15__richcmp__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_y), ((int)__pyx_v_op)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_y), ((int)__pyx_v_op)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4051,7 +4051,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_ return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":90 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":90 * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) * * def __richcmp__(SparseVector x, SparseVector y, int op): # <<<<<<<<<<<<<< @@ -4059,7 +4059,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_ * return x.vector[0] == y.vector[0] */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_y, int __pyx_v_op) { +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4069,7 +4069,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":93 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":93 * if op == 2: # == * return x.vector[0] == y.vector[0] * elif op == 3: # != # <<<<<<<<<<<<<< @@ -4078,7 +4078,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5 */ switch (__pyx_v_op) { - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":91 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":91 * * def __richcmp__(SparseVector x, SparseVector y, int op): * if op == 2: # == # <<<<<<<<<<<<<< @@ -4087,7 +4087,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5 */ case 2: - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":92 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":92 * def __richcmp__(SparseVector x, SparseVector y, int op): * if op == 2: # == * return x.vector[0] == y.vector[0] # <<<<<<<<<<<<<< @@ -4102,7 +4102,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5 goto __pyx_L0; break; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":93 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":93 * if op == 2: # == * return x.vector[0] == y.vector[0] * elif op == 3: # != # <<<<<<<<<<<<<< @@ -4111,7 +4111,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5 */ case 3: - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":94 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":94 * return x.vector[0] == y.vector[0] * elif op == 3: # != * return not (x == y) # <<<<<<<<<<<<<< @@ -4130,7 +4130,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5 break; } - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":95 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":95 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for SparseVector') # <<<<<<<<<<<<<< @@ -4147,7 +4147,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5 goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.SparseVector.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -4156,17 +4156,17 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5 } /* Python wrapper */ -static Py_ssize_t __pyx_pw_5_cdec_12SparseVector_18__len__(PyObject *__pyx_v_self); /*proto*/ -static Py_ssize_t __pyx_pw_5_cdec_12SparseVector_18__len__(PyObject *__pyx_v_self) { +static Py_ssize_t __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_12SparseVector_17__len__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_17__len__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":97 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":97 * raise NotImplemented('comparison not implemented for SparseVector') * * def __len__(self): # <<<<<<<<<<<<<< @@ -4174,12 +4174,12 @@ static Py_ssize_t __pyx_pw_5_cdec_12SparseVector_18__len__(PyObject *__pyx_v_sel * */ -static Py_ssize_t __pyx_pf_5_cdec_12SparseVector_17__len__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self) { +static Py_ssize_t __pyx_pf_4cdec_5_cdec_12SparseVector_17__len__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":98 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":98 * * def __len__(self): * return self.vector.size() # <<<<<<<<<<<<<< @@ -4196,8 +4196,8 @@ static Py_ssize_t __pyx_pf_5_cdec_12SparseVector_17__len__(struct __pyx_obj_5_cd } /* Python wrapper */ -static int __pyx_pw_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ -static int __pyx_pw_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { +static int __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { char *__pyx_v_fname; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -4210,16 +4210,16 @@ static int __pyx_pw_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.SparseVector.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_12SparseVector_19__contains__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_19__contains__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":100 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":100 * return self.vector.size() * * def __contains__(self, char* fname): # <<<<<<<<<<<<<< @@ -4227,12 +4227,12 @@ static int __pyx_pw_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self, * */ -static int __pyx_pf_5_cdec_12SparseVector_19__contains__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname) { +static int __pyx_pf_4cdec_5_cdec_12SparseVector_19__contains__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":101 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":101 * * def __contains__(self, char* fname): * return self.vector.nonzero(FDConvert(fname)) # <<<<<<<<<<<<<< @@ -4249,17 +4249,17 @@ static int __pyx_pf_5_cdec_12SparseVector_19__contains__(struct __pyx_obj_5_cdec } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_12SparseVector_21__neg__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":103 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":103 * return self.vector.nonzero(FDConvert(fname)) * * def __neg__(self): # <<<<<<<<<<<<<< @@ -4267,8 +4267,8 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_v_self * result.vector = new FastSparseVector[weight_t](self.vector[0]) */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self) { - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_result = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4277,20 +4277,20 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__neg__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":104 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":104 * * def __neg__(self): * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](self.vector[0]) * result.vector[0] *= -1.0 */ - __pyx_t_1 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_result = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":105 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":105 * def __neg__(self): * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](self.vector[0]) # <<<<<<<<<<<<<< @@ -4299,7 +4299,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_5_cde */ __pyx_v_result->vector = new FastSparseVector<weight_t>((__pyx_v_self->vector[0])); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":106 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":106 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](self.vector[0]) * result.vector[0] *= -1.0 # <<<<<<<<<<<<<< @@ -4308,7 +4308,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_5_cde */ (__pyx_v_result->vector[0]) *= -1.0; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":107 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":107 * result.vector = new FastSparseVector[weight_t](self.vector[0]) * result.vector[0] *= -1.0 * return result # <<<<<<<<<<<<<< @@ -4324,7 +4324,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_5_cde goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.SparseVector.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); @@ -4334,16 +4334,16 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_5_cde } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { 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("__iadd__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_12SparseVector_23__iadd__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self), ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_other)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_other)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4352,7 +4352,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_sel return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":109 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":109 * return result * * def __iadd__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< @@ -4360,12 +4360,12 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_sel * return self */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_23__iadd__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_other) { +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iadd__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":110 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":110 * * def __iadd__(SparseVector self, SparseVector other): * self.vector[0] += other.vector[0] # <<<<<<<<<<<<<< @@ -4374,7 +4374,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_23__iadd__(struct __pyx_obj_5_cd */ (__pyx_v_self->vector[0]) += (__pyx_v_other->vector[0]); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":111 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":111 * def __iadd__(SparseVector self, SparseVector other): * self.vector[0] += other.vector[0] * return self # <<<<<<<<<<<<<< @@ -4394,16 +4394,16 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_23__iadd__(struct __pyx_obj_5_cd } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { 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("__isub__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_12SparseVector_25__isub__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self), ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_other)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_other)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4412,7 +4412,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_sel return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":113 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":113 * return self * * def __isub__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< @@ -4420,12 +4420,12 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_sel * return self */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_25__isub__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_other) { +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__isub__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":114 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":114 * * def __isub__(SparseVector self, SparseVector other): * self.vector[0] -= other.vector[0] # <<<<<<<<<<<<<< @@ -4434,7 +4434,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_25__isub__(struct __pyx_obj_5_cd */ (__pyx_v_self->vector[0]) -= (__pyx_v_other->vector[0]); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":115 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":115 * def __isub__(SparseVector self, SparseVector other): * self.vector[0] -= other.vector[0] * return self # <<<<<<<<<<<<<< @@ -4454,8 +4454,8 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_25__isub__(struct __pyx_obj_5_cd } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar) { float __pyx_v_scalar; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -4468,16 +4468,16 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.SparseVector.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_12SparseVector_27__imul__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self), ((float)__pyx_v_scalar)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((float)__pyx_v_scalar)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":117 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":117 * return self * * def __imul__(SparseVector self, float scalar): # <<<<<<<<<<<<<< @@ -4485,12 +4485,12 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_sel * return self */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_27__imul__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar) { +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__imul__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":118 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":118 * * def __imul__(SparseVector self, float scalar): * self.vector[0] *= scalar # <<<<<<<<<<<<<< @@ -4499,7 +4499,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_27__imul__(struct __pyx_obj_5_cd */ (__pyx_v_self->vector[0]) *= __pyx_v_scalar; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":119 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":119 * def __imul__(SparseVector self, float scalar): * self.vector[0] *= scalar * return self # <<<<<<<<<<<<<< @@ -4520,8 +4520,8 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_27__imul__(struct __pyx_obj_5_cd /* Python wrapper */ #if PY_MAJOR_VERSION < 3 -static PyObject *__pyx_pw_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar) { float __pyx_v_scalar; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -4534,17 +4534,17 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.SparseVector.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_12SparseVector_29__idiv__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_self), ((float)__pyx_v_scalar)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((float)__pyx_v_scalar)); __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":121 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":121 * return self * * def __idiv__(SparseVector self, float scalar): # <<<<<<<<<<<<<< @@ -4553,12 +4553,12 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx_v_sel */ #if PY_MAJOR_VERSION < 3 -static PyObject *__pyx_pf_5_cdec_12SparseVector_29__idiv__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar) { +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__idiv__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":122 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":122 * * def __idiv__(SparseVector self, float scalar): * self.vector[0] /= scalar # <<<<<<<<<<<<<< @@ -4567,7 +4567,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_29__idiv__(struct __pyx_obj_5_cd */ (__pyx_v_self->vector[0]) /= __pyx_v_scalar; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":123 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":123 * def __idiv__(SparseVector self, float scalar): * self.vector[0] /= scalar * return self # <<<<<<<<<<<<<< @@ -4588,17 +4588,17 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_29__idiv__(struct __pyx_obj_5_cd #endif /*!(#if PY_MAJOR_VERSION < 3)*/ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { 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("__add__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_12SparseVector_31__add__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_y)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_y)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4607,7 +4607,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, P return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":125 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":125 * return self * * def __add__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< @@ -4615,8 +4615,8 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, P * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_31__add__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_y) { - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_result = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y) { + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4625,20 +4625,20 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_31__add__(struct __pyx_obj_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":126 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":126 * * def __add__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) * return result */ - __pyx_t_1 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_result = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":127 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":127 * def __add__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) # <<<<<<<<<<<<<< @@ -4647,7 +4647,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_31__add__(struct __pyx_obj_5_cde */ __pyx_v_result->vector = new FastSparseVector<weight_t>(((__pyx_v_x->vector[0]) + (__pyx_v_y->vector[0]))); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":128 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":128 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) * return result # <<<<<<<<<<<<<< @@ -4663,7 +4663,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_31__add__(struct __pyx_obj_5_cde goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.SparseVector.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); @@ -4673,17 +4673,17 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_31__add__(struct __pyx_obj_5_cde } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_12SparseVector_33__sub__(((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_y)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_y)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4692,7 +4692,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, P return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":130 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":130 * return result * * def __sub__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< @@ -4700,8 +4700,8 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, P * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_5_cdec_SparseVector *__pyx_v_y) { - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_result = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y) { + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -4710,20 +4710,20 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__sub__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":131 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":131 * * def __sub__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) * return result */ - __pyx_t_1 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_result = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":132 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":132 * def __sub__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) # <<<<<<<<<<<<<< @@ -4732,7 +4732,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_5_cde */ __pyx_v_result->vector = new FastSparseVector<weight_t>(((__pyx_v_x->vector[0]) - (__pyx_v_y->vector[0]))); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":133 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":133 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) * return result # <<<<<<<<<<<<<< @@ -4748,7 +4748,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_5_cde goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.SparseVector.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); @@ -4758,17 +4758,17 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_5_cde } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_12SparseVector_35__mul__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":135 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":135 * return result * * def __mul__(x, y): # <<<<<<<<<<<<<< @@ -4776,10 +4776,10 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_v_x, P * cdef float scalar */ -static PyObject *__pyx_pf_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_vector = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; float __pyx_v_scalar; - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_result = 0; + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -4791,58 +4791,58 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__mul__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":138 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":138 * cdef SparseVector vector * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y # <<<<<<<<<<<<<< * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_x, ((PyObject*)__pyx_ptype_5_cdec_SparseVector)); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_x, ((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - if (!(likely(((__pyx_v_x) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_x, __pyx_ptype_5_cdec_SparseVector))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_x) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_x, __pyx_ptype_4cdec_5_cdec_SparseVector))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_v_x; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_v_y); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_vector = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_3); + __pyx_v_vector = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_3); __pyx_t_3 = 0; __pyx_v_scalar = __pyx_t_4; goto __pyx_L3; } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":139 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":139 * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x # <<<<<<<<<<<<<< * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) */ - if (!(likely(((__pyx_v_y) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_y, __pyx_ptype_5_cdec_SparseVector))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_y) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_y, __pyx_ptype_4cdec_5_cdec_SparseVector))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_v_y; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_v_x); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_vector = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_3); + __pyx_v_vector = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_3); __pyx_t_3 = 0; __pyx_v_scalar = __pyx_t_4; } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":140 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":140 * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) * return result */ - __pyx_t_3 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_result = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_3); + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":141 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":141 * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) # <<<<<<<<<<<<<< @@ -4851,7 +4851,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, P */ __pyx_v_result->vector = new FastSparseVector<weight_t>(((__pyx_v_vector->vector[0]) * __pyx_v_scalar)); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":142 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":142 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) * return result # <<<<<<<<<<<<<< @@ -4867,7 +4867,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, P goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.SparseVector.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_vector); @@ -4879,18 +4879,18 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, P /* Python wrapper */ #if PY_MAJOR_VERSION < 3 -static PyObject *__pyx_pw_5_cdec_12SparseVector_38__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12SparseVector_38__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_38__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_38__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__div__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_12SparseVector_37__div__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ -/* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":144 +/* "/home/mdenkows/cdec/python/cdec/vectors.pxi":144 * return result * * def __div__(x, y): # <<<<<<<<<<<<<< @@ -4899,10 +4899,10 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_38__div__(PyObject *__pyx_v_x, P */ #if PY_MAJOR_VERSION < 3 -static PyObject *__pyx_pf_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_vector = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; float __pyx_v_scalar; - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_result = 0; + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -4914,58 +4914,58 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__div__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":147 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":147 * cdef SparseVector vector * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y # <<<<<<<<<<<<<< * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_x, ((PyObject*)__pyx_ptype_5_cdec_SparseVector)); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_x, ((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - if (!(likely(((__pyx_v_x) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_x, __pyx_ptype_5_cdec_SparseVector))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_x) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_x, __pyx_ptype_4cdec_5_cdec_SparseVector))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_v_x; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_v_y); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_vector = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_3); + __pyx_v_vector = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_3); __pyx_t_3 = 0; __pyx_v_scalar = __pyx_t_4; goto __pyx_L3; } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":148 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":148 * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x # <<<<<<<<<<<<<< * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) */ - if (!(likely(((__pyx_v_y) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_y, __pyx_ptype_5_cdec_SparseVector))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_y) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_y, __pyx_ptype_4cdec_5_cdec_SparseVector))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __pyx_v_y; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_v_x); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_vector = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_3); + __pyx_v_vector = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_3); __pyx_t_3 = 0; __pyx_v_scalar = __pyx_t_4; } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":149 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":149 * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) * return result */ - __pyx_t_3 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_result = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_3); + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":150 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":150 * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) # <<<<<<<<<<<<<< @@ -4973,7 +4973,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, P */ __pyx_v_result->vector = new FastSparseVector<weight_t>(((__pyx_v_vector->vector[0]) / __pyx_v_scalar)); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":151 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":151 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) * return result # <<<<<<<<<<<<<< @@ -4987,7 +4987,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, P goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.SparseVector.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SparseVector.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_vector); @@ -4999,19 +4999,19 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, P #endif /*!(#if PY_MAJOR_VERSION < 3)*/ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_1_phrase(PyObject *__pyx_self, PyObject *__pyx_v_phrase); /*proto*/ -static PyMethodDef __pyx_mdef_5_cdec_1_phrase = {__Pyx_NAMESTR("_phrase"), (PyCFunction)__pyx_pw_5_cdec_1_phrase, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pw_5_cdec_1_phrase(PyObject *__pyx_self, PyObject *__pyx_v_phrase) { +static PyObject *__pyx_pw_4cdec_5_cdec_1_phrase(PyObject *__pyx_self, PyObject *__pyx_v_phrase); /*proto*/ +static PyMethodDef __pyx_mdef_4cdec_5_cdec_1_phrase = {__Pyx_NAMESTR("_phrase"), (PyCFunction)__pyx_pw_4cdec_5_cdec_1_phrase, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_4cdec_5_cdec_1_phrase(PyObject *__pyx_self, PyObject *__pyx_v_phrase) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_phrase (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec__phrase(__pyx_self, ((PyObject *)__pyx_v_phrase)); + __pyx_r = __pyx_pf_4cdec_5_cdec__phrase(__pyx_self, ((PyObject *)__pyx_v_phrase)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":6 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":6 * * def _phrase(phrase): * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< @@ -5019,25 +5019,25 @@ static PyObject *__pyx_gb_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__ * cdef class NT: */ -static PyObject *__pyx_pf_5_cdec_7_phrase_genexpr(PyObject *__pyx_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_7_phrase_genexpr(PyObject *__pyx_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_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_5_cdec___pyx_scope_struct_3_genexpr *)__pyx_tp_new_5_cdec___pyx_scope_struct_3_genexpr(__pyx_ptype_5_cdec___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_3_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_5_cdec___pyx_scope_struct_2__phrase *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *) __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_5_cdec_7_phrase_2generator18, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7_phrase_2generator18, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5046,7 +5046,7 @@ static PyObject *__pyx_pf_5_cdec_7_phrase_genexpr(PyObject *__pyx_self) { __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec._phrase.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec._phrase.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -5055,9 +5055,9 @@ static PyObject *__pyx_pf_5_cdec_7_phrase_genexpr(PyObject *__pyx_self) { return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -5177,7 +5177,7 @@ static PyObject *__pyx_gb_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__ return NULL; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":5 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":5 * import cdec.sa._sa as _sa * * def _phrase(phrase): # <<<<<<<<<<<<<< @@ -5185,8 +5185,8 @@ static PyObject *__pyx_gb_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__ * */ -static PyObject *__pyx_pf_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phrase) { - struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_phrase) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -5196,7 +5196,7 @@ static PyObject *__pyx_pf_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_self, PyO const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_phrase", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *)__pyx_tp_new_5_cdec___pyx_scope_struct_2__phrase(__pyx_ptype_5_cdec___pyx_scope_struct_2__phrase, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -5206,7 +5206,7 @@ static PyObject *__pyx_pf_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_self, PyO __Pyx_INCREF(__pyx_cur_scope->__pyx_v_phrase); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_phrase); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":6 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":6 * * def _phrase(phrase): * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< @@ -5216,7 +5216,7 @@ static PyObject *__pyx_pf_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_self, PyO __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_pf_5_cdec_7_phrase_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_pf_4cdec_5_cdec_7_phrase_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -5237,7 +5237,7 @@ static PyObject *__pyx_pf_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_self, PyO __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec._phrase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec._phrase", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -5247,12 +5247,12 @@ static PyObject *__pyx_pf_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_self, PyO } /* Python wrapper */ -static int __pyx_pw_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_2NT___init__[] = "NT(bytes cat, int ref=0) -> Non-terminal from category `cat`."; +static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_2NT___init__[] = "NT(bytes cat, int ref=0) -> Non-terminal from category `cat`."; #if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_5_cdec_2NT___init__; +struct wrapperbase __pyx_wrapperbase_4cdec_5_cdec_2NT___init__; #endif -static int __pyx_pw_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_cat = 0; unsigned int __pyx_v_ref; int __pyx_lineno = 0; @@ -5306,12 +5306,12 @@ static int __pyx_pw_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject *__pyx __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, 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("_cdec.NT.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.NT.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cat), (&PyBytes_Type), 1, "cat", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_2NT___init__(((struct __pyx_obj_5_cdec_NT *)__pyx_v_self), __pyx_v_cat, __pyx_v_ref); + __pyx_r = __pyx_pf_4cdec_5_cdec_2NT___init__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self), __pyx_v_cat, __pyx_v_ref); goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -5320,7 +5320,7 @@ static int __pyx_pw_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject *__pyx return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":11 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":11 * cdef public bytes cat * cdef public unsigned ref * def __init__(self, bytes cat, unsigned ref=0): # <<<<<<<<<<<<<< @@ -5328,12 +5328,12 @@ static int __pyx_pw_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject *__pyx * self.cat = cat */ -static int __pyx_pf_5_cdec_2NT___init__(struct __pyx_obj_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_cat, unsigned int __pyx_v_ref) { +static int __pyx_pf_4cdec_5_cdec_2NT___init__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_cat, unsigned int __pyx_v_ref) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":13 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":13 * def __init__(self, bytes cat, unsigned ref=0): * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" * self.cat = cat # <<<<<<<<<<<<<< @@ -5346,7 +5346,7 @@ static int __pyx_pf_5_cdec_2NT___init__(struct __pyx_obj_5_cdec_NT *__pyx_v_self __Pyx_DECREF(((PyObject *)__pyx_v_self->cat)); __pyx_v_self->cat = __pyx_v_cat; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":14 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":14 * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" * self.cat = cat * self.ref = ref # <<<<<<<<<<<<<< @@ -5361,17 +5361,17 @@ static int __pyx_pf_5_cdec_2NT___init__(struct __pyx_obj_5_cdec_NT *__pyx_v_self } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_2NT_3__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_2NT_3__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3__str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_2NT_2__str__(((struct __pyx_obj_5_cdec_NT *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_2__str__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":16 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":16 * self.ref = ref * * def __str__(self): # <<<<<<<<<<<<<< @@ -5379,7 +5379,7 @@ static PyObject *__pyx_pw_5_cdec_2NT_3__str__(PyObject *__pyx_v_self) { * return '[%s,%d]' % (self.cat, self.ref) */ -static PyObject *__pyx_pf_5_cdec_2NT_2__str__(struct __pyx_obj_5_cdec_NT *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -5390,7 +5390,7 @@ static PyObject *__pyx_pf_5_cdec_2NT_2__str__(struct __pyx_obj_5_cdec_NT *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":17 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":17 * * def __str__(self): * if self.ref > 0: # <<<<<<<<<<<<<< @@ -5400,7 +5400,7 @@ static PyObject *__pyx_pf_5_cdec_2NT_2__str__(struct __pyx_obj_5_cdec_NT *__pyx_ __pyx_t_1 = ((__pyx_v_self->ref > 0) != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":18 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":18 * def __str__(self): * if self.ref > 0: * return '[%s,%d]' % (self.cat, self.ref) # <<<<<<<<<<<<<< @@ -5428,7 +5428,7 @@ static PyObject *__pyx_pf_5_cdec_2NT_2__str__(struct __pyx_obj_5_cdec_NT *__pyx_ } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":19 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":19 * if self.ref > 0: * return '[%s,%d]' % (self.cat, self.ref) * return '[%s]' % self.cat # <<<<<<<<<<<<<< @@ -5447,7 +5447,7 @@ static PyObject *__pyx_pf_5_cdec_2NT_2__str__(struct __pyx_obj_5_cdec_NT *__pyx_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.NT.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.NT.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -5456,17 +5456,17 @@ static PyObject *__pyx_pf_5_cdec_2NT_2__str__(struct __pyx_obj_5_cdec_NT *__pyx_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_2NT_3cat___get__(((struct __pyx_obj_5_cdec_NT *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3cat___get__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":9 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":9 * * cdef class NT: * cdef public bytes cat # <<<<<<<<<<<<<< @@ -5474,7 +5474,7 @@ static PyObject *__pyx_pw_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self) { * def __init__(self, bytes cat, unsigned ref=0): */ -static PyObject *__pyx_pf_5_cdec_2NT_3cat___get__(struct __pyx_obj_5_cdec_NT *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_2NT_3cat___get__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); @@ -5491,17 +5491,17 @@ static PyObject *__pyx_pf_5_cdec_2NT_3cat___get__(struct __pyx_obj_5_cdec_NT *__ } /* Python wrapper */ -static int __pyx_pw_5_cdec_2NT_3cat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pw_5_cdec_2NT_3cat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_2NT_3cat_2__set__(((struct __pyx_obj_5_cdec_NT *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3cat_2__set__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_5_cdec_2NT_3cat_2__set__(struct __pyx_obj_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pf_4cdec_5_cdec_2NT_3cat_2__set__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; @@ -5518,7 +5518,7 @@ static int __pyx_pf_5_cdec_2NT_3cat_2__set__(struct __pyx_obj_5_cdec_NT *__pyx_v __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.NT.cat.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.NT.cat.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); @@ -5526,17 +5526,17 @@ static int __pyx_pf_5_cdec_2NT_3cat_2__set__(struct __pyx_obj_5_cdec_NT *__pyx_v } /* Python wrapper */ -static int __pyx_pw_5_cdec_2NT_3cat_5__del__(PyObject *__pyx_v_self); /*proto*/ -static int __pyx_pw_5_cdec_2NT_3cat_5__del__(PyObject *__pyx_v_self) { +static int __pyx_pw_4cdec_5_cdec_2NT_3cat_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_2NT_3cat_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_2NT_3cat_4__del__(((struct __pyx_obj_5_cdec_NT *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3cat_4__del__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_5_cdec_2NT_3cat_4__del__(struct __pyx_obj_5_cdec_NT *__pyx_v_self) { +static int __pyx_pf_4cdec_5_cdec_2NT_3cat_4__del__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); @@ -5552,17 +5552,17 @@ static int __pyx_pf_5_cdec_2NT_3cat_4__del__(struct __pyx_obj_5_cdec_NT *__pyx_v } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_2NT_3ref___get__(((struct __pyx_obj_5_cdec_NT *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3ref___get__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":10 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":10 * cdef class NT: * cdef public bytes cat * cdef public unsigned ref # <<<<<<<<<<<<<< @@ -5570,7 +5570,7 @@ static PyObject *__pyx_pw_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self) { * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" */ -static PyObject *__pyx_pf_5_cdec_2NT_3ref___get__(struct __pyx_obj_5_cdec_NT *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_2NT_3ref___get__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -5589,7 +5589,7 @@ static PyObject *__pyx_pf_5_cdec_2NT_3ref___get__(struct __pyx_obj_5_cdec_NT *__ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.NT.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.NT.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -5598,17 +5598,17 @@ static PyObject *__pyx_pf_5_cdec_2NT_3ref___get__(struct __pyx_obj_5_cdec_NT *__ } /* Python wrapper */ -static int __pyx_pw_5_cdec_2NT_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pw_5_cdec_2NT_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pw_4cdec_5_cdec_2NT_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_2NT_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_2NT_3ref_2__set__(((struct __pyx_obj_5_cdec_NT *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3ref_2__set__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_5_cdec_2NT_3ref_2__set__(struct __pyx_obj_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pf_4cdec_5_cdec_2NT_3ref_2__set__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations unsigned int __pyx_t_1; @@ -5622,7 +5622,7 @@ static int __pyx_pf_5_cdec_2NT_3ref_2__set__(struct __pyx_obj_5_cdec_NT *__pyx_v __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.NT.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.NT.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); @@ -5630,12 +5630,12 @@ static int __pyx_pf_5_cdec_2NT_3ref_2__set__(struct __pyx_obj_5_cdec_NT *__pyx_v } /* Python wrapper */ -static int __pyx_pw_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_5NTRef___init__[] = "NTRef(int ref) -> Non-terminal reference."; +static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_5NTRef___init__[] = "NTRef(int ref) -> Non-terminal reference."; #if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_5_cdec_5NTRef___init__; +struct wrapperbase __pyx_wrapperbase_4cdec_5_cdec_5NTRef___init__; #endif -static int __pyx_pw_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { unsigned int __pyx_v_ref; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -5674,16 +5674,16 @@ static int __pyx_pw_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObject *__ __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.NTRef.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.NTRef.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_5NTRef___init__(((struct __pyx_obj_5_cdec_NTRef *)__pyx_v_self), __pyx_v_ref); + __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef___init__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self), __pyx_v_ref); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":23 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":23 * cdef class NTRef: * cdef public unsigned ref * def __init__(self, unsigned ref): # <<<<<<<<<<<<<< @@ -5691,12 +5691,12 @@ static int __pyx_pw_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObject *__ * self.ref = ref */ -static int __pyx_pf_5_cdec_5NTRef___init__(struct __pyx_obj_5_cdec_NTRef *__pyx_v_self, unsigned int __pyx_v_ref) { +static int __pyx_pf_4cdec_5_cdec_5NTRef___init__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self, unsigned int __pyx_v_ref) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":25 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":25 * def __init__(self, unsigned ref): * """NTRef(int ref) -> Non-terminal reference.""" * self.ref = ref # <<<<<<<<<<<<<< @@ -5711,17 +5711,17 @@ static int __pyx_pf_5_cdec_5NTRef___init__(struct __pyx_obj_5_cdec_NTRef *__pyx_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5NTRef_2__str__(((struct __pyx_obj_5_cdec_NTRef *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef_2__str__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":27 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":27 * self.ref = ref * * def __str__(self): # <<<<<<<<<<<<<< @@ -5729,7 +5729,7 @@ static PyObject *__pyx_pw_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self) { * */ -static PyObject *__pyx_pf_5_cdec_5NTRef_2__str__(struct __pyx_obj_5_cdec_NTRef *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -5739,7 +5739,7 @@ static PyObject *__pyx_pf_5_cdec_5NTRef_2__str__(struct __pyx_obj_5_cdec_NTRef * int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":28 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":28 * * def __str__(self): * return '[%d]' % self.ref # <<<<<<<<<<<<<< @@ -5761,7 +5761,7 @@ static PyObject *__pyx_pf_5_cdec_5NTRef_2__str__(struct __pyx_obj_5_cdec_NTRef * __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.NTRef.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.NTRef.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -5770,17 +5770,17 @@ static PyObject *__pyx_pf_5_cdec_5NTRef_2__str__(struct __pyx_obj_5_cdec_NTRef * } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5NTRef_3ref___get__(((struct __pyx_obj_5_cdec_NTRef *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":22 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":22 * * cdef class NTRef: * cdef public unsigned ref # <<<<<<<<<<<<<< @@ -5788,7 +5788,7 @@ static PyObject *__pyx_pw_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_self) { * """NTRef(int ref) -> Non-terminal reference.""" */ -static PyObject *__pyx_pf_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_5_cdec_NTRef *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -5807,7 +5807,7 @@ static PyObject *__pyx_pf_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_5_cdec_NTR goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.NTRef.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.NTRef.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -5816,17 +5816,17 @@ static PyObject *__pyx_pf_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_5_cdec_NTR } /* Python wrapper */ -static int __pyx_pw_5_cdec_5NTRef_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pw_5_cdec_5NTRef_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pw_4cdec_5_cdec_5NTRef_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_5NTRef_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5NTRef_3ref_2__set__(((struct __pyx_obj_5_cdec_NTRef *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_5_cdec_NTRef *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations unsigned int __pyx_t_1; @@ -5840,14 +5840,14 @@ static int __pyx_pf_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_5_cdec_NTRef *_ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.NTRef.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.NTRef.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":30 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":30 * return '[%d]' % self.ref * * cdef TRule convert_rule(_sa.Rule rule): # <<<<<<<<<<<<<< @@ -5855,7 +5855,7 @@ static int __pyx_pf_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_5_cdec_NTRef *_ * scores = dict(rule.scores) */ -static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_rule) { +static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(struct __pyx_obj_4cdec_2sa_3_sa_Rule *__pyx_v_rule) { char *__pyx_v_lhs; PyObject *__pyx_v_scores = NULL; PyObject *__pyx_v_f = NULL; @@ -5864,7 +5864,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o int __pyx_v_i; int *__pyx_v_esyms; PyObject *__pyx_v_a = NULL; - struct __pyx_obj_5_cdec_TRule *__pyx_r = NULL; + struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -5878,7 +5878,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_rule", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":31 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":31 * * cdef TRule convert_rule(_sa.Rule rule): * lhs = _sa.sym_tocat(rule.lhs) # <<<<<<<<<<<<<< @@ -5887,7 +5887,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o */ __pyx_v_lhs = __pyx_f_4cdec_2sa_3_sa_sym_tocat(__pyx_v_rule->lhs); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":32 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":32 * cdef TRule convert_rule(_sa.Rule rule): * lhs = _sa.sym_tocat(rule.lhs) * scores = dict(rule.scores) # <<<<<<<<<<<<<< @@ -5905,7 +5905,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o __pyx_v_scores = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":33 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":33 * lhs = _sa.sym_tocat(rule.lhs) * scores = dict(rule.scores) * f, e = [], [] # <<<<<<<<<<<<<< @@ -5921,7 +5921,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o __pyx_v_e = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":34 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":34 * scores = dict(rule.scores) * f, e = [], [] * cdef int* fsyms = rule.f.syms # <<<<<<<<<<<<<< @@ -5931,7 +5931,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o __pyx_t_3 = __pyx_v_rule->f->syms; __pyx_v_fsyms = __pyx_t_3; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":35 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":35 * f, e = [], [] * cdef int* fsyms = rule.f.syms * for i in range(rule.f.n): # <<<<<<<<<<<<<< @@ -5942,7 +5942,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":36 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":36 * cdef int* fsyms = rule.f.syms * for i in range(rule.f.n): * if _sa.sym_isvar(fsyms[i]): # <<<<<<<<<<<<<< @@ -5952,7 +5952,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o __pyx_t_6 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_fsyms[__pyx_v_i])) != 0); if (__pyx_t_6) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":37 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":37 * for i in range(rule.f.n): * if _sa.sym_isvar(fsyms[i]): * f.append(NT(_sa.sym_tocat(fsyms[i]))) # <<<<<<<<<<<<<< @@ -5966,7 +5966,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_NT)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_f, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -5975,7 +5975,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":39 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":39 * f.append(NT(_sa.sym_tocat(fsyms[i]))) * else: * f.append(_sa.sym_tostring(fsyms[i])) # <<<<<<<<<<<<<< @@ -5990,7 +5990,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o __pyx_L5:; } - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":40 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":40 * else: * f.append(_sa.sym_tostring(fsyms[i])) * cdef int* esyms = rule.e.syms # <<<<<<<<<<<<<< @@ -6000,7 +6000,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o __pyx_t_3 = __pyx_v_rule->e->syms; __pyx_v_esyms = __pyx_t_3; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":41 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":41 * f.append(_sa.sym_tostring(fsyms[i])) * cdef int* esyms = rule.e.syms * for i in range(rule.e.n): # <<<<<<<<<<<<<< @@ -6011,7 +6011,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":42 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":42 * cdef int* esyms = rule.e.syms * for i in range(rule.e.n): * if _sa.sym_isvar(esyms[i]): # <<<<<<<<<<<<<< @@ -6021,7 +6021,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o __pyx_t_6 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_esyms[__pyx_v_i])) != 0); if (__pyx_t_6) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":43 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":43 * for i in range(rule.e.n): * if _sa.sym_isvar(esyms[i]): * e.append(NTRef(_sa.sym_getindex(esyms[i]))) # <<<<<<<<<<<<<< @@ -6035,7 +6035,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o 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_5_cdec_NTRef)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_e, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6044,7 +6044,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":45 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":45 * e.append(NTRef(_sa.sym_getindex(esyms[i]))) * else: * e.append(_sa.sym_tostring(esyms[i])) # <<<<<<<<<<<<<< @@ -6059,7 +6059,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o __pyx_L8:; } - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":46 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":46 * else: * e.append(_sa.sym_tostring(esyms[i])) * a = list(rule.alignments()) # <<<<<<<<<<<<<< @@ -6082,7 +6082,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o __pyx_v_a = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":47 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":47 * e.append(_sa.sym_tostring(esyms[i])) * a = list(rule.alignments()) * return TRule(lhs, f, e, scores, a) # <<<<<<<<<<<<<< @@ -6109,19 +6109,19 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_a)); __Pyx_GIVEREF(((PyObject *)__pyx_v_a)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_TRule)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_r = ((struct __pyx_obj_5_cdec_TRule *)__pyx_t_2); + __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = ((struct __pyx_obj_5_cdec_TRule *)Py_None); __Pyx_INCREF(Py_None); + __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.convert_rule", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.convert_rule", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_scores); @@ -6134,12 +6134,12 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o } /* Python wrapper */ -static int __pyx_pw_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_5TRule___init__[] = "TRule(lhs, f, e, scores, a=None) -> Translation rule.\n lhs: left hand side non-terminal\n f: source phrase (list of words/NT)\n e: target phrase (list of words/NTRef)\n scores: dictionary of feature scores\n a: optional list of alignment points"; +static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_5TRule___init__[] = "TRule(lhs, f, e, scores, a=None) -> Translation rule.\n lhs: left hand side non-terminal\n f: source phrase (list of words/NT)\n e: target phrase (list of words/NTRef)\n scores: dictionary of feature scores\n a: optional list of alignment points"; #if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_5_cdec_5TRule___init__; +struct wrapperbase __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__; #endif -static int __pyx_pw_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lhs = 0; PyObject *__pyx_v_f = 0; PyObject *__pyx_v_e = 0; @@ -6155,7 +6155,7 @@ static int __pyx_pw_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObject *__ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lhs,&__pyx_n_s__f,&__pyx_n_s__e,&__pyx_n_s__scores,&__pyx_n_s__a,0}; PyObject* values[5] = {0,0,0,0,0}; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":52 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":52 * cdef shared_ptr[grammar.TRule]* rule * * def __init__(self, lhs, f, e, scores, a=None): # <<<<<<<<<<<<<< @@ -6225,16 +6225,16 @@ static int __pyx_pw_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObject *__ __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.TRule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_5TRule___init__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_f, __pyx_v_e, __pyx_v_scores, __pyx_v_a); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule___init__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_f, __pyx_v_e, __pyx_v_scores, __pyx_v_a); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_a) { +static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_a) { int __pyx_r; __Pyx_RefNannyDeclarations TRule *__pyx_t_1; @@ -6244,7 +6244,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":59 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":59 * scores: dictionary of feature scores * a: optional list of alignment points""" * self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) # <<<<<<<<<<<<<< @@ -6259,7 +6259,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_ } __pyx_v_self->rule = new boost::shared_ptr<TRule>(__pyx_t_1); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":60 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":60 * a: optional list of alignment points""" * self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) * self.lhs = lhs # <<<<<<<<<<<<<< @@ -6268,7 +6268,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_ */ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__lhs, __pyx_v_lhs) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":61 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":61 * self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) * self.lhs = lhs * self.e = e # <<<<<<<<<<<<<< @@ -6277,7 +6277,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_ */ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__e, __pyx_v_e) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":62 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":62 * self.lhs = lhs * self.e = e * self.f = f # <<<<<<<<<<<<<< @@ -6286,7 +6286,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_ */ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__f, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":63 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":63 * self.e = e * self.f = f * self.scores = scores # <<<<<<<<<<<<<< @@ -6295,7 +6295,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_ */ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__scores, __pyx_v_scores) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":64 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":64 * self.f = f * self.scores = scores * if a: # <<<<<<<<<<<<<< @@ -6305,7 +6305,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_a); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":65 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":65 * self.scores = scores * if a: * self.a = a # <<<<<<<<<<<<<< @@ -6317,7 +6317,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_ } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":66 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":66 * if a: * self.a = a * self.rule.get().ComputeArity() # <<<<<<<<<<<<<< @@ -6329,7 +6329,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.TRule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); @@ -6337,15 +6337,15 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_ } /* Python wrapper */ -static void __pyx_pw_5_cdec_5TRule_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_5TRule_3__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_5TRule_2__dealloc__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":68 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":68 * self.rule.get().ComputeArity() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -6353,11 +6353,11 @@ static void __pyx_pw_5_cdec_5TRule_3__dealloc__(PyObject *__pyx_v_self) { * */ -static void __pyx_pf_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_TRule *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":69 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":69 * * def __dealloc__(self): * del self.rule # <<<<<<<<<<<<<< @@ -6370,17 +6370,17 @@ static void __pyx_pf_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5 } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_5arity___get__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":72 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":72 * * property arity: * def __get__(self): # <<<<<<<<<<<<<< @@ -6388,7 +6388,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_self) * */ -static PyObject *__pyx_pf_5_cdec_5TRule_5arity___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -6397,7 +6397,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_5arity___get__(struct __pyx_obj_5_cdec_T int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":73 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":73 * property arity: * def __get__(self): * return self.rule.get().arity_ # <<<<<<<<<<<<<< @@ -6415,7 +6415,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_5arity___get__(struct __pyx_obj_5_cdec_T goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.TRule.arity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.arity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -6424,17 +6424,17 @@ static PyObject *__pyx_pf_5_cdec_5TRule_5arity___get__(struct __pyx_obj_5_cdec_T } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_1f___get__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1f___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":76 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":76 * * property f: * def __get__(self): # <<<<<<<<<<<<<< @@ -6442,7 +6442,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self) { * cdef WordID w */ -static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { std::vector<WordID> *__pyx_v_f_; WordID __pyx_v_w; PyObject *__pyx_v_f = 0; @@ -6461,7 +6461,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":77 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":77 * property f: * def __get__(self): * cdef vector[WordID]* f_ = &self.rule.get().f_ # <<<<<<<<<<<<<< @@ -6470,7 +6470,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule */ __pyx_v_f_ = (&__pyx_v_self->rule->get()->f_); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":79 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":79 * cdef vector[WordID]* f_ = &self.rule.get().f_ * cdef WordID w * cdef f = [] # <<<<<<<<<<<<<< @@ -6482,7 +6482,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule __pyx_v_f = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":81 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":81 * cdef f = [] * cdef unsigned i * cdef int idx = 0 # <<<<<<<<<<<<<< @@ -6491,7 +6491,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule */ __pyx_v_idx = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":82 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":82 * cdef unsigned i * cdef int idx = 0 * for i in range(f_.size()): # <<<<<<<<<<<<<< @@ -6502,7 +6502,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule 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/grammar.pxi":83 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":83 * cdef int idx = 0 * for i in range(f_.size()): * w = f_[0][i] # <<<<<<<<<<<<<< @@ -6511,7 +6511,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule */ __pyx_v_w = ((__pyx_v_f_[0])[__pyx_v_i]); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":84 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":84 * for i in range(f_.size()): * w = f_[0][i] * if w < 0: # <<<<<<<<<<<<<< @@ -6521,7 +6521,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule __pyx_t_4 = ((__pyx_v_w < 0) != 0); if (__pyx_t_4) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":85 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":85 * w = f_[0][i] * if w < 0: * idx += 1 # <<<<<<<<<<<<<< @@ -6530,7 +6530,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule */ __pyx_v_idx = (__pyx_v_idx + 1); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":86 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":86 * if w < 0: * idx += 1 * f.append(NT(TDConvert(-w).c_str(), idx)) # <<<<<<<<<<<<<< @@ -6549,7 +6549,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule __Pyx_GIVEREF(__pyx_t_5); __pyx_t_1 = 0; __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_NT)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_f, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6560,7 +6560,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":88 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":88 * f.append(NT(TDConvert(-w).c_str(), idx)) * else: * f.append(unicode(TDConvert(w).c_str(), encoding='utf8')) # <<<<<<<<<<<<<< @@ -6589,7 +6589,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule __pyx_L5:; } - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":89 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":89 * else: * f.append(unicode(TDConvert(w).c_str(), encoding='utf8')) * return f # <<<<<<<<<<<<<< @@ -6607,7 +6607,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("_cdec.TRule.f.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.f.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_f); @@ -6617,17 +6617,17 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule } /* Python wrapper */ -static int __pyx_pw_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_f); /*proto*/ -static int __pyx_pw_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_f) { +static int __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_f); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_f) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_1f_2__set__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_f)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_f)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":91 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":91 * return f * * def __set__(self, f): # <<<<<<<<<<<<<< @@ -6635,7 +6635,7 @@ static int __pyx_pw_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyObject * * f_.resize(len(f)) */ -static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_f) { +static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_f) { std::vector<WordID> *__pyx_v_f_; unsigned int __pyx_v_i; CYTHON_UNUSED int __pyx_v_idx; @@ -6654,7 +6654,7 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":92 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":92 * * def __set__(self, f): * cdef vector[WordID]* f_ = &self.rule.get().f_ # <<<<<<<<<<<<<< @@ -6663,7 +6663,7 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p */ __pyx_v_f_ = (&__pyx_v_self->rule->get()->f_); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":93 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":93 * def __set__(self, f): * cdef vector[WordID]* f_ = &self.rule.get().f_ * f_.resize(len(f)) # <<<<<<<<<<<<<< @@ -6673,7 +6673,7 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p __pyx_t_1 = PyObject_Length(__pyx_v_f); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f_->resize(__pyx_t_1); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":95 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":95 * f_.resize(len(f)) * cdef unsigned i * cdef int idx = 0 # <<<<<<<<<<<<<< @@ -6682,7 +6682,7 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p */ __pyx_v_idx = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":96 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":96 * cdef unsigned i * cdef int idx = 0 * for i in range(len(f)): # <<<<<<<<<<<<<< @@ -6693,7 +6693,7 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p 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/grammar.pxi":97 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":97 * cdef int idx = 0 * for i in range(len(f)): * if isinstance(f[i], NT): # <<<<<<<<<<<<<< @@ -6702,12 +6702,12 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_3, ((PyObject*)__pyx_ptype_5_cdec_NT)); + __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_3, ((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":98 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":98 * for i in range(len(f)): * if isinstance(f[i], NT): * f_[0][i] = -TDConvert((<NT> f[i]).cat) # <<<<<<<<<<<<<< @@ -6716,14 +6716,14 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_AsString(((PyObject *)((struct __pyx_obj_5_cdec_NT *)__pyx_t_3)->cat)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_AsString(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_t_3)->cat)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; ((__pyx_v_f_[0])[__pyx_v_i]) = (-TD::Convert(__pyx_t_6)); goto __pyx_L5; } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":100 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":100 * f_[0][i] = -TDConvert((<NT> f[i]).cat) * else: * fi = as_str(f[i]) # <<<<<<<<<<<<<< @@ -6732,14 +6732,14 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = ((PyObject *)__pyx_f_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_fi)); __pyx_v_fi = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":101 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":101 * else: * fi = as_str(f[i]) * f_[0][i] = TDConvert(fi) # <<<<<<<<<<<<<< @@ -6757,7 +6757,7 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("_cdec.TRule.f.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.f.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fi); @@ -6766,17 +6766,17 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_1e___get__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1e___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":104 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":104 * * property e: * def __get__(self): # <<<<<<<<<<<<<< @@ -6784,7 +6784,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self) { * cdef WordID w */ -static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { std::vector<WordID> *__pyx_v_e_; WordID __pyx_v_w; PyObject *__pyx_v_e = 0; @@ -6803,7 +6803,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":105 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":105 * property e: * def __get__(self): * cdef vector[WordID]* e_ = &self.rule.get().e_ # <<<<<<<<<<<<<< @@ -6812,7 +6812,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule */ __pyx_v_e_ = (&__pyx_v_self->rule->get()->e_); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":107 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":107 * cdef vector[WordID]* e_ = &self.rule.get().e_ * cdef WordID w * cdef e = [] # <<<<<<<<<<<<<< @@ -6824,7 +6824,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule __pyx_v_e = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":109 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":109 * cdef e = [] * cdef unsigned i * cdef int idx = 0 # <<<<<<<<<<<<<< @@ -6833,7 +6833,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule */ __pyx_v_idx = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":110 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":110 * cdef unsigned i * cdef int idx = 0 * for i in range(e_.size()): # <<<<<<<<<<<<<< @@ -6844,7 +6844,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule 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/grammar.pxi":111 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":111 * cdef int idx = 0 * for i in range(e_.size()): * w = e_[0][i] # <<<<<<<<<<<<<< @@ -6853,7 +6853,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule */ __pyx_v_w = ((__pyx_v_e_[0])[__pyx_v_i]); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":112 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":112 * for i in range(e_.size()): * w = e_[0][i] * if w < 1: # <<<<<<<<<<<<<< @@ -6863,7 +6863,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule __pyx_t_4 = ((__pyx_v_w < 1) != 0); if (__pyx_t_4) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":113 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":113 * w = e_[0][i] * if w < 1: * idx += 1 # <<<<<<<<<<<<<< @@ -6872,7 +6872,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule */ __pyx_v_idx = (__pyx_v_idx + 1); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":114 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":114 * if w < 1: * idx += 1 * e.append(NTRef(1-w)) # <<<<<<<<<<<<<< @@ -6886,7 +6886,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_NTRef)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_e, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6897,7 +6897,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":116 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":116 * e.append(NTRef(1-w)) * else: * e.append(unicode(TDConvert(w).c_str(), encoding='utf8')) # <<<<<<<<<<<<<< @@ -6926,7 +6926,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule __pyx_L5:; } - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":117 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":117 * else: * e.append(unicode(TDConvert(w).c_str(), encoding='utf8')) * return e # <<<<<<<<<<<<<< @@ -6944,7 +6944,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("_cdec.TRule.e.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.e.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_e); @@ -6954,17 +6954,17 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule } /* Python wrapper */ -static int __pyx_pw_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_e); /*proto*/ -static int __pyx_pw_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_e) { +static int __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_e); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_e) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_1e_2__set__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_e)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_e)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":119 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":119 * return e * * def __set__(self, e): # <<<<<<<<<<<<<< @@ -6972,7 +6972,7 @@ static int __pyx_pw_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyObject * * e_.resize(len(e)) */ -static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_e) { +static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_e) { std::vector<WordID> *__pyx_v_e_; unsigned int __pyx_v_i; PyObject *__pyx_v_ei = NULL; @@ -6991,7 +6991,7 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":120 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":120 * * def __set__(self, e): * cdef vector[WordID]* e_ = &self.rule.get().e_ # <<<<<<<<<<<<<< @@ -7000,7 +7000,7 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p */ __pyx_v_e_ = (&__pyx_v_self->rule->get()->e_); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":121 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":121 * def __set__(self, e): * cdef vector[WordID]* e_ = &self.rule.get().e_ * e_.resize(len(e)) # <<<<<<<<<<<<<< @@ -7010,7 +7010,7 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p __pyx_t_1 = PyObject_Length(__pyx_v_e); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_e_->resize(__pyx_t_1); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":123 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":123 * e_.resize(len(e)) * cdef unsigned i * for i in range(len(e)): # <<<<<<<<<<<<<< @@ -7021,7 +7021,7 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p 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/grammar.pxi":124 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":124 * cdef unsigned i * for i in range(len(e)): * if isinstance(e[i], NTRef): # <<<<<<<<<<<<<< @@ -7030,12 +7030,12 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_3, ((PyObject*)__pyx_ptype_5_cdec_NTRef)); + __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_3, ((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":125 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":125 * for i in range(len(e)): * if isinstance(e[i], NTRef): * e_[0][i] = 1-e[i].ref # <<<<<<<<<<<<<< @@ -7057,7 +7057,7 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":127 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":127 * e_[0][i] = 1-e[i].ref * else: * ei = as_str(e[i]) # <<<<<<<<<<<<<< @@ -7066,14 +7066,14 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = ((PyObject *)__pyx_f_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(((PyObject *)__pyx_v_ei)); __pyx_v_ei = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":128 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":128 * else: * ei = as_str(e[i]) * e_[0][i] = TDConvert(ei) # <<<<<<<<<<<<<< @@ -7091,27 +7091,27 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("_cdec.TRule.e.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.e.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ei); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_1a___get__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1a___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":131 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":131 * * property a: * def __get__(self): # <<<<<<<<<<<<<< @@ -7119,15 +7119,15 @@ static PyObject *__pyx_pw_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self) { * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ */ -static PyObject *__pyx_pf_5_cdec_5TRule_1a___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1a___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_4___get__(__pyx_ptype_5_cdec___pyx_scope_struct_4___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -7137,7 +7137,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1a___get__(struct __pyx_obj_5_cdec_TRule __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_5_cdec_5TRule_1a_2generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -7146,7 +7146,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1a___get__(struct __pyx_obj_5_cdec_TRule __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.TRule.a.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.a.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -7155,9 +7155,9 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1a___get__(struct __pyx_obj_5_cdec_TRule return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -7179,7 +7179,7 @@ static PyObject *__pyx_gb_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObject *__ __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":133 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":133 * def __get__(self): * cdef unsigned i * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ # <<<<<<<<<<<<<< @@ -7188,7 +7188,7 @@ static PyObject *__pyx_gb_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObject *__ */ __pyx_cur_scope->__pyx_v_a = (&__pyx_cur_scope->__pyx_v_self->rule->get()->a_); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":134 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":134 * cdef unsigned i * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ * for i in range(a.size()): # <<<<<<<<<<<<<< @@ -7199,7 +7199,7 @@ static PyObject *__pyx_gb_5_cdec_5TRule_1a_2generator2(__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/grammar.pxi":135 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":135 * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ * for i in range(a.size()): * yield (a[0][i].s_, a[0][i].t_) # <<<<<<<<<<<<<< @@ -7248,17 +7248,17 @@ static PyObject *__pyx_gb_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObject *__ } /* Python wrapper */ -static int __pyx_pw_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_a); /*proto*/ -static int __pyx_pw_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_a) { +static int __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_a); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_a) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_1a_3__set__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_a)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_a)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":137 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":137 * yield (a[0][i].s_, a[0][i].t_) * * def __set__(self, a): # <<<<<<<<<<<<<< @@ -7266,7 +7266,7 @@ static int __pyx_pw_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyObject * * a_.resize(len(a)) */ -static int __pyx_pf_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_a) { +static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_a) { std::vector<AlignmentPoint> *__pyx_v_a_; unsigned int __pyx_v_i; int __pyx_v_s; @@ -7287,7 +7287,7 @@ static int __pyx_pf_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_5_cdec_TRule *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":138 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":138 * * def __set__(self, a): * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ # <<<<<<<<<<<<<< @@ -7296,7 +7296,7 @@ static int __pyx_pf_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_5_cdec_TRule *__p */ __pyx_v_a_ = (&__pyx_v_self->rule->get()->a_); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":139 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":139 * def __set__(self, a): * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ * a_.resize(len(a)) # <<<<<<<<<<<<<< @@ -7306,7 +7306,7 @@ static int __pyx_pf_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_5_cdec_TRule *__p __pyx_t_1 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_a_->resize(__pyx_t_1); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":142 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":142 * cdef unsigned i * cdef int s, t * for i in range(len(a)): # <<<<<<<<<<<<<< @@ -7317,7 +7317,7 @@ static int __pyx_pf_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_5_cdec_TRule *__p 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/grammar.pxi":143 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":143 * cdef int s, t * for i in range(len(a)): * s, t = a[i] # <<<<<<<<<<<<<< @@ -7384,7 +7384,7 @@ static int __pyx_pf_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_5_cdec_TRule *__p __pyx_v_s = __pyx_t_8; __pyx_v_t = __pyx_t_9; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":144 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":144 * for i in range(len(a)): * s, t = a[i] * a_[0][i] = grammar.AlignmentPoint(s, t) # <<<<<<<<<<<<<< @@ -7401,7 +7401,7 @@ static int __pyx_pf_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_5_cdec_TRule *__p __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("_cdec.TRule.a.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.a.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); @@ -7409,17 +7409,17 @@ static int __pyx_pf_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_5_cdec_TRule *__p } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_6scores___get__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":147 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":147 * * property scores: * def __get__(self): # <<<<<<<<<<<<<< @@ -7427,8 +7427,8 @@ static PyObject *__pyx_pw_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v_self) * scores.vector = new FastSparseVector[double](self.rule.get().scores_) */ -static PyObject *__pyx_pf_5_cdec_5TRule_6scores___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self) { - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_scores = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_scores = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -7437,20 +7437,20 @@ static PyObject *__pyx_pf_5_cdec_5TRule_6scores___get__(struct __pyx_obj_5_cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":148 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":148 * property scores: * def __get__(self): * cdef SparseVector scores = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * scores.vector = new FastSparseVector[double](self.rule.get().scores_) * return scores */ - __pyx_t_1 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_scores = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_scores = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":149 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":149 * def __get__(self): * cdef SparseVector scores = SparseVector.__new__(SparseVector) * scores.vector = new FastSparseVector[double](self.rule.get().scores_) # <<<<<<<<<<<<<< @@ -7459,7 +7459,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_6scores___get__(struct __pyx_obj_5_cdec_ */ __pyx_v_scores->vector = new FastSparseVector<double>(__pyx_v_self->rule->get()->scores_); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":150 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":150 * cdef SparseVector scores = SparseVector.__new__(SparseVector) * scores.vector = new FastSparseVector[double](self.rule.get().scores_) * return scores # <<<<<<<<<<<<<< @@ -7475,7 +7475,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_6scores___get__(struct __pyx_obj_5_cdec_ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.TRule.scores.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.scores.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_scores); @@ -7485,17 +7485,17 @@ static PyObject *__pyx_pf_5_cdec_5TRule_6scores___get__(struct __pyx_obj_5_cdec_ } /* Python wrapper */ -static int __pyx_pw_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_scores); /*proto*/ -static int __pyx_pw_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_scores) { +static int __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_scores); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_scores) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_6scores_2__set__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_scores)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_scores)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":152 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":152 * return scores * * def __set__(self, scores): # <<<<<<<<<<<<<< @@ -7503,7 +7503,7 @@ static int __pyx_pw_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, PyObj * scores_.clear() */ -static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_scores) { +static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_scores) { FastSparseVector<double> *__pyx_v_scores_; int __pyx_v_fid; float __pyx_v_fval; @@ -7527,7 +7527,7 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":153 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":153 * * def __set__(self, scores): * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ # <<<<<<<<<<<<<< @@ -7536,7 +7536,7 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule */ __pyx_v_scores_ = (&__pyx_v_self->rule->get()->scores_); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":154 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":154 * def __set__(self, scores): * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ * scores_.clear() # <<<<<<<<<<<<<< @@ -7545,7 +7545,7 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule */ __pyx_v_scores_->clear(); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":157 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":157 * cdef int fid * cdef float fval * for fname, fval in scores.items(): # <<<<<<<<<<<<<< @@ -7650,20 +7650,20 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule __pyx_t_5 = 0; __pyx_v_fval = __pyx_t_9; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":158 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":158 * cdef float fval * for fname, fval in scores.items(): * fn = as_str(fname) # <<<<<<<<<<<<<< * fid = FDConvert(fn) * if fid < 0: raise KeyError(fname) */ - __pyx_t_2 = ((PyObject *)__pyx_f_5_cdec_as_str(__pyx_v_fname, NULL)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_fname, NULL)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(((PyObject *)__pyx_v_fn)); __pyx_v_fn = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":159 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":159 * for fname, fval in scores.items(): * fn = as_str(fname) * fid = FDConvert(fn) # <<<<<<<<<<<<<< @@ -7673,7 +7673,7 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule __pyx_t_10 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_fn)); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fid = FD::Convert(__pyx_t_10); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":160 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":160 * fn = as_str(fname) * fid = FDConvert(fn) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -7697,7 +7697,7 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule } __pyx_L7:; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":161 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":161 * fid = FDConvert(fn) * if fid < 0: raise KeyError(fname) * scores_.set_value(fid, fval) # <<<<<<<<<<<<<< @@ -7716,7 +7716,7 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("_cdec.TRule.scores.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.scores.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fname); @@ -7726,17 +7726,17 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_3lhs___get__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":164 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":164 * * property lhs: * def __get__(self): # <<<<<<<<<<<<<< @@ -7744,7 +7744,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_self) { * */ -static PyObject *__pyx_pf_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -7754,7 +7754,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_5_cdec_TRu int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":165 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":165 * property lhs: * def __get__(self): * return NT(TDConvert(-self.rule.get().lhs_).c_str()) # <<<<<<<<<<<<<< @@ -7769,7 +7769,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_5_cdec_TRu PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_NT)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; @@ -7781,7 +7781,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_5_cdec_TRu __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.TRule.lhs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.lhs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -7790,17 +7790,17 @@ static PyObject *__pyx_pf_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_5_cdec_TRu } /* Python wrapper */ -static int __pyx_pw_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_lhs); /*proto*/ -static int __pyx_pw_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_lhs) { +static int __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_lhs); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_lhs) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_3lhs_2__set__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_lhs)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_lhs)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":167 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":167 * return NT(TDConvert(-self.rule.get().lhs_).c_str()) * * def __set__(self, lhs): # <<<<<<<<<<<<<< @@ -7808,7 +7808,7 @@ static int __pyx_pw_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, PyObject * lhs = NT(lhs) */ -static int __pyx_pf_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs) { +static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -7822,18 +7822,18 @@ static int __pyx_pf_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_5_cdec_TRule *_ __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_lhs); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":168 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":168 * * def __set__(self, lhs): * if not isinstance(lhs, NT): # <<<<<<<<<<<<<< * lhs = NT(lhs) * self.rule.get().lhs_ = -TDConvert((<NT> lhs).cat) */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_lhs, ((PyObject*)__pyx_ptype_5_cdec_NT)); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_lhs, ((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":169 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":169 * def __set__(self, lhs): * if not isinstance(lhs, NT): * lhs = NT(lhs) # <<<<<<<<<<<<<< @@ -7845,7 +7845,7 @@ static int __pyx_pf_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_5_cdec_TRule *_ __Pyx_INCREF(__pyx_v_lhs); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lhs); __Pyx_GIVEREF(__pyx_v_lhs); - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_NT)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_v_lhs); @@ -7855,14 +7855,14 @@ static int __pyx_pf_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_5_cdec_TRule *_ } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":170 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":170 * if not isinstance(lhs, NT): * lhs = NT(lhs) * self.rule.get().lhs_ = -TDConvert((<NT> lhs).cat) # <<<<<<<<<<<<<< * * def __str__(self): */ - __pyx_t_5 = __Pyx_PyObject_AsString(((PyObject *)((struct __pyx_obj_5_cdec_NT *)__pyx_v_lhs)->cat)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_lhs)->cat)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->rule->get()->lhs_ = (-TD::Convert(__pyx_t_5)); __pyx_r = 0; @@ -7870,7 +7870,7 @@ static int __pyx_pf_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_5_cdec_TRule *_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("_cdec.TRule.lhs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.lhs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_lhs); @@ -7879,18 +7879,18 @@ static int __pyx_pf_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_5_cdec_TRule *_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_5TRule_4__str__(((struct __pyx_obj_5_cdec_TRule *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_4__str__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":173 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":173 * * def __str__(self): * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< @@ -7898,25 +7898,25 @@ static PyObject *__pyx_gb_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObj * _phrase(self.f), _phrase(self.e), scores) */ -static PyObject *__pyx_pf_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_self) { + struct __pyx_obj_4cdec_5_cdec___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_5_cdec___pyx_scope_struct_6_genexpr *)__pyx_tp_new_5_cdec___pyx_scope_struct_6_genexpr(__pyx_ptype_5_cdec___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(__pyx_ptype_4cdec_5_cdec___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_5_cdec___pyx_scope_struct_5___str__ *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___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_5_cdec_5TRule_7__str___2generator19, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -7925,7 +7925,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_self) { __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.TRule.__str__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.__str__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -7934,9 +7934,9 @@ static PyObject *__pyx_pf_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_self) { return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -8035,7 +8035,7 @@ static PyObject *__pyx_gb_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObj return NULL; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":172 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":172 * self.rule.get().lhs_ = -TDConvert((<NT> lhs).cat) * * def __str__(self): # <<<<<<<<<<<<<< @@ -8043,8 +8043,8 @@ static PyObject *__pyx_gb_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObj * return '%s ||| %s ||| %s ||| %s' % (self.lhs, */ -static PyObject *__pyx_pf_5_cdec_5TRule_4__str__(struct __pyx_obj_5_cdec_TRule *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_4__str__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *__pyx_cur_scope; PyObject *__pyx_v_scores = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -8057,7 +8057,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_4__str__(struct __pyx_obj_5_cdec_TRule * const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_5___str__(__pyx_ptype_5_cdec___pyx_scope_struct_5___str__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -8067,7 +8067,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_4__str__(struct __pyx_obj_5_cdec_TRule * __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":173 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":173 * * def __str__(self): * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< @@ -8076,7 +8076,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_4__str__(struct __pyx_obj_5_cdec_TRule * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_pf_5_cdec_5TRule_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -8090,7 +8090,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_4__str__(struct __pyx_obj_5_cdec_TRule * __pyx_v_scores = __pyx_t_2; __pyx_t_2 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":174 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":174 * def __str__(self): * scores = ' '.join('%s=%s' % feat for feat in self.scores) * return '%s ||| %s ||| %s ||| %s' % (self.lhs, # <<<<<<<<<<<<<< @@ -8101,7 +8101,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_4__str__(struct __pyx_obj_5_cdec_TRule * __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__lhs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":175 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":175 * scores = ' '.join('%s=%s' % feat for feat in self.scores) * return '%s ||| %s ||| %s ||| %s' % (self.lhs, * _phrase(self.f), _phrase(self.e), scores) # <<<<<<<<<<<<<< @@ -8163,7 +8163,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_4__str__(struct __pyx_obj_5_cdec_TRule * __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("_cdec.TRule.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TRule.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_scores); @@ -8174,12 +8174,12 @@ static PyObject *__pyx_pf_5_cdec_5TRule_4__str__(struct __pyx_obj_5_cdec_TRule * } /* Python wrapper */ -static int __pyx_pw_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_5MRule___init__[] = "MRule(lhs, rhs, scores, a=None) -> Monolingual rule.\n lhs: left hand side non-terminal\n rhs: right hand side phrase (list of words/NT)\n scores: dictionary of feature scores"; +static int __pyx_pw_4cdec_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_5MRule___init__[] = "MRule(lhs, rhs, scores, a=None) -> Monolingual rule.\n lhs: left hand side non-terminal\n rhs: right hand side phrase (list of words/NT)\n scores: dictionary of feature scores"; #if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_5_cdec_5MRule___init__; +struct wrapperbase __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__; #endif -static int __pyx_pw_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lhs = 0; PyObject *__pyx_v_rhs = 0; PyObject *__pyx_v_scores = 0; @@ -8236,16 +8236,16 @@ static int __pyx_pw_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObject *__ __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.MRule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.MRule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_5MRule___init__(((struct __pyx_obj_5_cdec_MRule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_rhs, __pyx_v_scores); + __pyx_r = __pyx_pf_4cdec_5_cdec_5MRule___init__(((struct __pyx_obj_4cdec_5_cdec_MRule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_rhs, __pyx_v_scores); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":178 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":178 * * cdef class MRule(TRule): * def __init__(self, lhs, rhs, scores): # <<<<<<<<<<<<<< @@ -8253,7 +8253,7 @@ static int __pyx_pw_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObject *__ * lhs: left hand side non-terminal */ -static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_scores) { +static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_MRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_scores) { unsigned int __pyx_v_i; PyObject *__pyx_v_e = NULL; PyObject *__pyx_v_s = NULL; @@ -8272,7 +8272,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":183 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":183 * rhs: right hand side phrase (list of words/NT) * scores: dictionary of feature scores""" * cdef unsigned i = 1 # <<<<<<<<<<<<<< @@ -8281,7 +8281,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_ */ __pyx_v_i = 1; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":184 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":184 * scores: dictionary of feature scores""" * cdef unsigned i = 1 * e = [] # <<<<<<<<<<<<<< @@ -8293,7 +8293,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_ __pyx_v_e = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":185 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":185 * cdef unsigned i = 1 * e = [] * for s in rhs: # <<<<<<<<<<<<<< @@ -8338,18 +8338,18 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_ __pyx_v_s = __pyx_t_4; __pyx_t_4 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":186 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":186 * e = [] * for s in rhs: * if isinstance(s, NT): # <<<<<<<<<<<<<< * e.append(NTRef(i)) * i += 1 */ - __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_s, ((PyObject*)__pyx_ptype_5_cdec_NT)); + __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_s, ((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":187 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":187 * for s in rhs: * if isinstance(s, NT): * e.append(NTRef(i)) # <<<<<<<<<<<<<< @@ -8363,13 +8363,13 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_NTRef)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_e, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":188 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":188 * if isinstance(s, NT): * e.append(NTRef(i)) * i += 1 # <<<<<<<<<<<<<< @@ -8381,7 +8381,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_ } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":190 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":190 * i += 1 * else: * e.append(s) # <<<<<<<<<<<<<< @@ -8394,7 +8394,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":191 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":191 * else: * e.append(s) * super(MRule, self).__init__(lhs, rhs, e, scores, None) # <<<<<<<<<<<<<< @@ -8403,9 +8403,9 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_ */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_MRule))); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_5_cdec_MRule))); - __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_MRule))); + __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_MRule))); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_MRule))); + __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_MRule))); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -8444,7 +8444,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("_cdec.MRule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.MRule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_e); @@ -8454,15 +8454,15 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_ } /* Python wrapper */ -static void __pyx_pw_5_cdec_7Grammar_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_7Grammar_1__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_7Grammar___dealloc__(((struct __pyx_obj_5_cdec_Grammar *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":196 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":196 * cdef shared_ptr[grammar.Grammar]* grammar * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -8470,11 +8470,11 @@ static void __pyx_pw_5_cdec_7Grammar_1__dealloc__(PyObject *__pyx_v_self) { * */ -static void __pyx_pf_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_Grammar *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":197 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":197 * * def __dealloc__(self): * del self.grammar # <<<<<<<<<<<<<< @@ -8485,20 +8485,20 @@ static void __pyx_pf_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __pyx_obj_ __Pyx_RefNannyFinishContext(); } -static PyObject *__pyx_gb_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Grammar_2__iter__(((struct __pyx_obj_5_cdec_Grammar *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":199 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":199 * del self.grammar * * def __iter__(self): # <<<<<<<<<<<<<< @@ -8506,15 +8506,15 @@ static PyObject *__pyx_pw_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self) { * cdef grammar.const_RuleBin* rbin = root.GetRules() */ -static PyObject *__pyx_pf_5_cdec_7Grammar_2__iter__(struct __pyx_obj_5_cdec_Grammar *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __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_5_cdec___pyx_scope_struct_7___iter__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_7___iter__(__pyx_ptype_5_cdec___pyx_scope_struct_7___iter__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -8524,7 +8524,7 @@ static PyObject *__pyx_pf_5_cdec_7Grammar_2__iter__(struct __pyx_obj_5_cdec_Gram __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_5_cdec_7Grammar_4generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Grammar_4generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -8533,7 +8533,7 @@ static PyObject *__pyx_pf_5_cdec_7Grammar_2__iter__(struct __pyx_obj_5_cdec_Gram __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Grammar.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Grammar.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -8542,9 +8542,9 @@ static PyObject *__pyx_pf_5_cdec_7Grammar_2__iter__(struct __pyx_obj_5_cdec_Gram return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; int __pyx_t_1; unsigned int __pyx_t_2; @@ -8564,7 +8564,7 @@ static PyObject *__pyx_gb_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__p __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":200 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":200 * * def __iter__(self): * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() # <<<<<<<<<<<<<< @@ -8573,7 +8573,7 @@ static PyObject *__pyx_gb_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__p */ __pyx_cur_scope->__pyx_v_root = __pyx_cur_scope->__pyx_v_self->grammar->get()->GetRoot(); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":201 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":201 * def __iter__(self): * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() * cdef grammar.const_RuleBin* rbin = root.GetRules() # <<<<<<<<<<<<<< @@ -8582,7 +8582,7 @@ static PyObject *__pyx_gb_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__p */ __pyx_cur_scope->__pyx_v_rbin = __pyx_cur_scope->__pyx_v_root->GetRules(); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":204 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":204 * cdef TRule trule * cdef unsigned i * for i in range(rbin.GetNumRules()): # <<<<<<<<<<<<<< @@ -8593,23 +8593,23 @@ static PyObject *__pyx_gb_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__p 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/grammar.pxi":205 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":205 * cdef unsigned i * for i in range(rbin.GetNumRules()): * trule = TRule.__new__(TRule) # <<<<<<<<<<<<<< * trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i)) * yield trule */ - __pyx_t_3 = __pyx_tp_new_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_TRule)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5_cdec_TRule)))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_5_cdec_TRule)))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_trule)); __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_trule)); __Pyx_GIVEREF(__pyx_t_3); - __pyx_cur_scope->__pyx_v_trule = ((struct __pyx_obj_5_cdec_TRule *)__pyx_t_3); + __pyx_cur_scope->__pyx_v_trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":206 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":206 * for i in range(rbin.GetNumRules()): * trule = TRule.__new__(TRule) * trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i)) # <<<<<<<<<<<<<< @@ -8618,7 +8618,7 @@ static PyObject *__pyx_gb_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__p */ __pyx_cur_scope->__pyx_v_trule->rule = new boost::shared_ptr<TRule>(__pyx_cur_scope->__pyx_v_rbin->GetIthRule(__pyx_cur_scope->__pyx_v_i)); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":207 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":207 * trule = TRule.__new__(TRule) * trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i)) * yield trule # <<<<<<<<<<<<<< @@ -8653,17 +8653,17 @@ static PyObject *__pyx_gb_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__p } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Grammar_4name___get__(((struct __pyx_obj_5_cdec_Grammar *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":210 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":210 * * property name: * def __get__(self): # <<<<<<<<<<<<<< @@ -8671,7 +8671,7 @@ static PyObject *__pyx_pw_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v_self) * */ -static PyObject *__pyx_pf_5_cdec_7Grammar_4name___get__(struct __pyx_obj_5_cdec_Grammar *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -8681,7 +8681,7 @@ static PyObject *__pyx_pf_5_cdec_7Grammar_4name___get__(struct __pyx_obj_5_cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":211 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":211 * property name: * def __get__(self): * str(self.grammar.get().GetGrammarName().c_str()) # <<<<<<<<<<<<<< @@ -8705,7 +8705,7 @@ static PyObject *__pyx_pf_5_cdec_7Grammar_4name___get__(struct __pyx_obj_5_cdec_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Grammar.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Grammar.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -8714,17 +8714,17 @@ static PyObject *__pyx_pf_5_cdec_7Grammar_4name___get__(struct __pyx_obj_5_cdec_ } /* Python wrapper */ -static int __pyx_pw_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ -static int __pyx_pw_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { +static int __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Grammar_4name_2__set__(((struct __pyx_obj_5_cdec_Grammar *)__pyx_v_self), ((PyObject *)__pyx_v_name)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self), ((PyObject *)__pyx_v_name)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":213 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":213 * str(self.grammar.get().GetGrammarName().c_str()) * * def __set__(self, name): # <<<<<<<<<<<<<< @@ -8732,7 +8732,7 @@ static int __pyx_pw_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, PyObj * self.grammar.get().SetGrammarName(name) */ -static int __pyx_pf_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_5_cdec_Grammar *__pyx_v_self, PyObject *__pyx_v_name) { +static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -8743,20 +8743,20 @@ static int __pyx_pf_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_5_cdec_Gramm __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_name); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":214 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":214 * * def __set__(self, name): * name = as_str(name) # <<<<<<<<<<<<<< * self.grammar.get().SetGrammarName(name) * */ - __pyx_t_1 = ((PyObject *)__pyx_f_5_cdec_as_str(__pyx_v_name, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_name, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_v_name); __pyx_v_name = __pyx_t_1; __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":215 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":215 * def __set__(self, name): * name = as_str(name) * self.grammar.get().SetGrammarName(name) # <<<<<<<<<<<<<< @@ -8770,7 +8770,7 @@ static int __pyx_pf_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_5_cdec_Gramm goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.Grammar.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Grammar.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); @@ -8779,12 +8779,12 @@ static int __pyx_pf_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_5_cdec_Gramm } /* Python wrapper */ -static int __pyx_pw_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_11TextGrammar___init__[] = "TextGrammar(rules) -> SCFG Grammar containing the rules."; +static int __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_11TextGrammar___init__[] = "TextGrammar(rules) -> SCFG Grammar containing the rules."; #if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_5_cdec_11TextGrammar___init__; +struct wrapperbase __pyx_wrapperbase_4cdec_5_cdec_11TextGrammar___init__; #endif -static int __pyx_pw_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_rules = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -8823,16 +8823,16 @@ static int __pyx_pw_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, PyObj __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.TextGrammar.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TextGrammar.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_11TextGrammar___init__(((struct __pyx_obj_5_cdec_TextGrammar *)__pyx_v_self), __pyx_v_rules); + __pyx_r = __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(((struct __pyx_obj_4cdec_5_cdec_TextGrammar *)__pyx_v_self), __pyx_v_rules); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":218 +/* "/home/mdenkows/cdec/python/cdec/grammar.pxi":218 * * cdef class TextGrammar(Grammar): * def __init__(self, rules): # <<<<<<<<<<<<<< @@ -8840,7 +8840,7 @@ static int __pyx_pw_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, PyObj * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) */ -static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGrammar *__pyx_v_self, PyObject *__pyx_v_rules) { +static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5_cdec_TextGrammar *__pyx_v_self, PyObject *__pyx_v_rules) { TextGrammar *__pyx_v__g; PyObject *__pyx_v_trule = NULL; int __pyx_r; @@ -8856,7 +8856,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":220 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":220 * def __init__(self, rules): * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) # <<<<<<<<<<<<<< @@ -8865,7 +8865,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr */ __pyx_v_self->__pyx_base.grammar = new boost::shared_ptr<Grammar>(new TextGrammar()); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":221 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":221 * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) * cdef grammar.TextGrammar* _g = <grammar.TextGrammar*> self.grammar.get() # <<<<<<<<<<<<<< @@ -8874,7 +8874,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr */ __pyx_v__g = ((TextGrammar *)__pyx_v_self->__pyx_base.grammar->get()); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":222 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":222 * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) * cdef grammar.TextGrammar* _g = <grammar.TextGrammar*> self.grammar.get() * for trule in rules: # <<<<<<<<<<<<<< @@ -8919,7 +8919,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr __pyx_v_trule = __pyx_t_4; __pyx_t_4 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":223 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":223 * cdef grammar.TextGrammar* _g = <grammar.TextGrammar*> self.grammar.get() * for trule in rules: * if isinstance(trule, _sa.Rule): # <<<<<<<<<<<<<< @@ -8930,7 +8930,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":224 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":224 * for trule in rules: * if isinstance(trule, _sa.Rule): * trule = convert_rule(trule) # <<<<<<<<<<<<<< @@ -8938,7 +8938,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr * raise ValueError('the grammar should contain TRule objects') */ if (!(likely(((__pyx_v_trule) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_trule, __pyx_ptype_4cdec_2sa_3_sa_Rule))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = ((PyObject *)__pyx_f_5_cdec_convert_rule(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_trule))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((PyObject *)__pyx_f_4cdec_5_cdec_convert_rule(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_trule))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_v_trule); __pyx_v_trule = __pyx_t_4; @@ -8946,18 +8946,18 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr goto __pyx_L5; } - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":225 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":225 * if isinstance(trule, _sa.Rule): * trule = convert_rule(trule) * elif not isinstance(trule, TRule): # <<<<<<<<<<<<<< * raise ValueError('the grammar should contain TRule objects') * _g.AddRule((<TRule> trule).rule[0]) */ - __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_trule, ((PyObject*)__pyx_ptype_5_cdec_TRule)); + __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_trule, ((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)); __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0); if (__pyx_t_5) { - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":226 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":226 * trule = convert_rule(trule) * elif not isinstance(trule, TRule): * raise ValueError('the grammar should contain TRule objects') # <<<<<<<<<<<<<< @@ -8972,12 +8972,12 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr } __pyx_L5:; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":227 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":227 * elif not isinstance(trule, TRule): * raise ValueError('the grammar should contain TRule objects') * _g.AddRule((<TRule> trule).rule[0]) # <<<<<<<<<<<<<< */ - __pyx_v__g->AddRule((((struct __pyx_obj_5_cdec_TRule *)__pyx_v_trule)->rule[0])); + __pyx_v__g->AddRule((((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_trule)->rule[0])); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8986,7 +8986,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("_cdec.TextGrammar.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.TextGrammar.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_trule); @@ -8995,15 +8995,15 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr } /* Python wrapper */ -static void __pyx_pw_5_cdec_10Hypergraph_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_10Hypergraph_1__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_10Hypergraph___dealloc__(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":8 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":8 * cdef MT19937* rng * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -9011,12 +9011,12 @@ static void __pyx_pw_5_cdec_10Hypergraph_1__dealloc__(PyObject *__pyx_v_self) { * if self.rng != NULL: */ -static void __pyx_pf_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":9 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":9 * * def __dealloc__(self): * del self.hg # <<<<<<<<<<<<<< @@ -9025,7 +9025,7 @@ static void __pyx_pf_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_5_cdec_Hyp */ delete __pyx_v_self->hg; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":10 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":10 * def __dealloc__(self): * del self.hg * if self.rng != NULL: # <<<<<<<<<<<<<< @@ -9035,7 +9035,7 @@ static void __pyx_pf_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_5_cdec_Hyp __pyx_t_1 = ((__pyx_v_self->rng != NULL) != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":11 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":11 * del self.hg * if self.rng != NULL: * del self.rng # <<<<<<<<<<<<<< @@ -9050,7 +9050,7 @@ static void __pyx_pf_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_5_cdec_Hyp __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":13 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":13 * del self.rng * * cdef MT19937* _rng(self): # <<<<<<<<<<<<<< @@ -9058,7 +9058,7 @@ static void __pyx_pf_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_5_cdec_Hyp * self.rng = new MT19937() */ -static MT19937 *__pyx_f_5_cdec_10Hypergraph__rng(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { +static MT19937 *__pyx_f_4cdec_5_cdec_10Hypergraph__rng(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { MT19937 *__pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -9068,7 +9068,7 @@ static MT19937 *__pyx_f_5_cdec_10Hypergraph__rng(struct __pyx_obj_5_cdec_Hypergr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_rng", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":14 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":14 * * cdef MT19937* _rng(self): * if self.rng == NULL: # <<<<<<<<<<<<<< @@ -9078,7 +9078,7 @@ static MT19937 *__pyx_f_5_cdec_10Hypergraph__rng(struct __pyx_obj_5_cdec_Hypergr __pyx_t_1 = ((__pyx_v_self->rng == NULL) != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":15 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":15 * cdef MT19937* _rng(self): * if self.rng == NULL: * self.rng = new MT19937() # <<<<<<<<<<<<<< @@ -9096,7 +9096,7 @@ static MT19937 *__pyx_f_5_cdec_10Hypergraph__rng(struct __pyx_obj_5_cdec_Hypergr } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":16 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":16 * if self.rng == NULL: * self.rng = new MT19937() * return self.rng # <<<<<<<<<<<<<< @@ -9109,7 +9109,7 @@ static MT19937 *__pyx_f_5_cdec_10Hypergraph__rng(struct __pyx_obj_5_cdec_Hypergr __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_WriteUnraisable("_cdec.Hypergraph._rng", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_WriteUnraisable("cdec._cdec.Hypergraph._rng", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); @@ -9117,18 +9117,18 @@ static MT19937 *__pyx_f_5_cdec_10Hypergraph__rng(struct __pyx_obj_5_cdec_Hypergr } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_3viterbi(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_2viterbi[] = "hg.viterbi() -> String for the best hypothesis in the hypergraph."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_3viterbi(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_2viterbi[] = "hg.viterbi() -> String for the best hypothesis in the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_2viterbi(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":18 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":18 * return self.rng * * def viterbi(self): # <<<<<<<<<<<<<< @@ -9136,7 +9136,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_3viterbi(PyObject *__pyx_v_self, C * cdef vector[WordID] trans */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { std::vector<WordID> __pyx_v_trans; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -9147,7 +9147,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_5_cdec_H int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":21 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":21 * """hg.viterbi() -> String for the best hypothesis in the hypergraph.""" * cdef vector[WordID] trans * hypergraph.ViterbiESentence(self.hg[0], &trans) # <<<<<<<<<<<<<< @@ -9156,7 +9156,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_5_cdec_H */ ViterbiESentence((__pyx_v_self->hg[0]), (&__pyx_v_trans)); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":22 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":22 * cdef vector[WordID] trans * hypergraph.ViterbiESentence(self.hg[0], &trans) * return unicode(GetString(trans).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9186,7 +9186,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_5_cdec_H __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Hypergraph.viterbi", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.viterbi", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -9195,18 +9195,18 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_5_cdec_H } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_5viterbi_trees(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_4viterbi_trees[] = "hg.viterbi_trees() -> (f_tree, e_tree)\n f_tree: Source tree for the best hypothesis in the hypergraph.\n e_tree: Target tree for the best hypothesis in the hypergraph.\n "; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_5viterbi_trees(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_4viterbi_trees[] = "hg.viterbi_trees() -> (f_tree, e_tree)\n f_tree: Source tree for the best hypothesis in the hypergraph.\n e_tree: Target tree for the best hypothesis in the hypergraph.\n "; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_trees (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_4viterbi_trees(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":24 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":24 * return unicode(GetString(trans).c_str(), 'utf8') * * def viterbi_trees(self): # <<<<<<<<<<<<<< @@ -9214,7 +9214,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_5viterbi_trees(PyObject *__pyx_v_s * f_tree: Source tree for the best hypothesis in the hypergraph. */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_v_f_tree = NULL; PyObject *__pyx_v_e_tree = NULL; PyObject *__pyx_r = NULL; @@ -9226,7 +9226,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_5_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_trees", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":29 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":29 * e_tree: Target tree for the best hypothesis in the hypergraph. * """ * f_tree = unicode(hypergraph.ViterbiFTree(self.hg[0]).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9249,7 +9249,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_5_ __pyx_v_f_tree = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":30 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":30 * """ * f_tree = unicode(hypergraph.ViterbiFTree(self.hg[0]).c_str(), 'utf8') * e_tree = unicode(hypergraph.ViterbiETree(self.hg[0]).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9272,7 +9272,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_5_ __pyx_v_e_tree = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":31 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":31 * f_tree = unicode(hypergraph.ViterbiFTree(self.hg[0]).c_str(), 'utf8') * e_tree = unicode(hypergraph.ViterbiETree(self.hg[0]).c_str(), 'utf8') * return (f_tree, e_tree) # <<<<<<<<<<<<<< @@ -9297,7 +9297,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_5_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Hypergraph.viterbi_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.viterbi_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_f_tree); @@ -9308,18 +9308,18 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_5_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_7viterbi_features(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_6viterbi_features[] = "hg.viterbi_features() -> SparseVector with the features corresponding\n to the best derivation in the hypergraph."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_7viterbi_features(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_6viterbi_features[] = "hg.viterbi_features() -> SparseVector with the features corresponding\n to the best derivation in the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_features (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_6viterbi_features(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":33 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":33 * return (f_tree, e_tree) * * def viterbi_features(self): # <<<<<<<<<<<<<< @@ -9327,8 +9327,8 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_7viterbi_features(PyObject *__pyx_ * to the best derivation in the hypergraph.""" */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_fmap = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -9337,20 +9337,20 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_features", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":36 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":36 * """hg.viterbi_features() -> SparseVector with the features corresponding * to the best derivation in the hypergraph.""" * cdef SparseVector fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * fmap.vector = new FastSparseVector[weight_t](hypergraph.ViterbiFeatures(self.hg[0])) * return fmap */ - __pyx_t_1 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_fmap = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":37 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":37 * to the best derivation in the hypergraph.""" * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](hypergraph.ViterbiFeatures(self.hg[0])) # <<<<<<<<<<<<<< @@ -9359,7 +9359,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj */ __pyx_v_fmap->vector = new FastSparseVector<weight_t>(ViterbiFeatures((__pyx_v_self->hg[0]))); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":38 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":38 * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](hypergraph.ViterbiFeatures(self.hg[0])) * return fmap # <<<<<<<<<<<<<< @@ -9375,7 +9375,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.Hypergraph.viterbi_features", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.viterbi_features", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_fmap); @@ -9385,17 +9385,17 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_forest (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_8viterbi_forest(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":40 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":40 * return fmap * * def viterbi_forest(self): # <<<<<<<<<<<<<< @@ -9403,8 +9403,8 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__pyx_v_ * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_hg = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -9413,19 +9413,19 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_forest", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":41 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":41 * * def viterbi_forest(self): * cdef Hypergraph hg = Hypergraph() # <<<<<<<<<<<<<< * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) * return hg */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_v_hg = ((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_t_1); + __pyx_v_hg = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":42 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":42 * def viterbi_forest(self): * cdef Hypergraph hg = Hypergraph() * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) # <<<<<<<<<<<<<< @@ -9434,7 +9434,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_5 */ __pyx_v_hg->hg = new Hypergraph(((__pyx_v_self->hg[0]).CreateViterbiHypergraph(NULL).get()[0])); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":43 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":43 * cdef Hypergraph hg = Hypergraph() * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) * return hg # <<<<<<<<<<<<<< @@ -9450,7 +9450,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_5 goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.Hypergraph.viterbi_forest", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.viterbi_forest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_hg); @@ -9460,18 +9460,18 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_5 } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_11viterbi_joshua(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_10viterbi_joshua[] = "hg.viterbi_joshua() -> Joshua representation of the best derivation."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_11viterbi_joshua(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_10viterbi_joshua[] = "hg.viterbi_joshua() -> Joshua representation of the best derivation."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_joshua (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_10viterbi_joshua(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":45 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":45 * return hg * * def viterbi_joshua(self): # <<<<<<<<<<<<<< @@ -9479,7 +9479,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_11viterbi_joshua(PyObject *__pyx_v * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_10viterbi_joshua(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -9489,7 +9489,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_10viterbi_joshua(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_joshua", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":47 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":47 * def viterbi_joshua(self): * """hg.viterbi_joshua() -> Joshua representation of the best derivation.""" * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9519,28 +9519,28 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_10viterbi_joshua(struct __pyx_obj_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Hypergraph.viterbi_joshua", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.viterbi_joshua", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_13kbest(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_12kbest[] = "hg.kbest(size) -> List of k-best hypotheses in the hypergraph."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_13kbest(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_12kbest[] = "hg.kbest(size) -> List of k-best hypotheses in the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kbest (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_12kbest(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_12kbest(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":49 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":49 * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') * * def kbest(self, size): # <<<<<<<<<<<<<< @@ -9548,15 +9548,15 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_13kbest(PyObject *__pyx_v_self, Py * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { - struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kbest", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *)__pyx_tp_new_5_cdec___pyx_scope_struct_8_kbest(__pyx_ptype_5_cdec___pyx_scope_struct_8_kbest, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_8_kbest, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -9569,7 +9569,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_5_cdec_Hy __Pyx_INCREF(__pyx_cur_scope->__pyx_v_size); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_size); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5_cdec_10Hypergraph_14generator4, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -9578,7 +9578,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_5_cdec_Hy __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Hypergraph.kbest", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.kbest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -9587,9 +9587,9 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_5_cdec_Hy return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)__pyx_generator->closure); PyObject *__pyx_r = NULL; unsigned int __pyx_t_1; long __pyx_t_2; @@ -9611,7 +9611,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":51 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":51 * def kbest(self, size): * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) # <<<<<<<<<<<<<< @@ -9621,7 +9621,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_derivations = new KBest::KBestDerivations<std::vector<WordID>,ESentenceTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":54 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":54 * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal].Derivation* derivation * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -9630,7 +9630,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject */ /*try:*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":55 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":55 * cdef unsigned k * try: * for k in range(size): # <<<<<<<<<<<<<< @@ -9641,7 +9641,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_1; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":56 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":56 * try: * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -9650,7 +9650,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_derivation = __pyx_cur_scope->__pyx_v_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":57 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":57 * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break # <<<<<<<<<<<<<< @@ -9664,7 +9664,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject } __pyx_L9:; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":58 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":58 * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break * yield unicode(GetString(derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9701,7 +9701,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject __pyx_L8_break:; } - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":60 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":60 * yield unicode(GetString(derivation._yield).c_str(), 'utf8') * finally: * del derivations # <<<<<<<<<<<<<< @@ -9748,21 +9748,21 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject __Pyx_RefNannyFinishContext(); return NULL; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_16kbest_trees(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_15kbest_trees[] = "hg.kbest_trees(size) -> List of k-best trees in the hypergraph."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_16kbest_trees(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_15kbest_trees[] = "hg.kbest_trees(size) -> List of k-best trees in the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kbest_trees (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_15kbest_trees(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_15kbest_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":62 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":62 * del derivations * * def kbest_trees(self, size): # <<<<<<<<<<<<<< @@ -9770,15 +9770,15 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_16kbest_trees(PyObject *__pyx_v_se * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { - struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kbest_trees", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *)__pyx_tp_new_5_cdec___pyx_scope_struct_9_kbest_trees(__pyx_ptype_5_cdec___pyx_scope_struct_9_kbest_trees, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -9791,7 +9791,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_obj_5_c __Pyx_INCREF(__pyx_cur_scope->__pyx_v_size); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_size); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5_cdec_10Hypergraph_17generator5, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -9800,7 +9800,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_obj_5_c __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Hypergraph.kbest_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.kbest_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -9809,9 +9809,9 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_obj_5_c return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)__pyx_generator->closure); PyObject *__pyx_r = NULL; unsigned int __pyx_t_1; long __pyx_t_2; @@ -9835,7 +9835,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":64 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":64 * def kbest_trees(self, size): * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) # <<<<<<<<<<<<<< @@ -9845,7 +9845,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_f_derivations = new KBest::KBestDerivations<std::vector<WordID>,FTreeTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":66 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":66 * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal].Derivation* f_derivation * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal](self.hg[0], size) # <<<<<<<<<<<<<< @@ -9855,7 +9855,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_e_derivations = new KBest::KBestDerivations<std::vector<WordID>,ETreeTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":69 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":69 * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal].Derivation* e_derivation * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -9864,7 +9864,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject */ /*try:*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":70 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":70 * cdef unsigned k * try: * for k in range(size): # <<<<<<<<<<<<<< @@ -9875,7 +9875,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_1; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":71 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":71 * try: * for k in range(size): * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -9884,7 +9884,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_f_derivation = __pyx_cur_scope->__pyx_v_f_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":72 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":72 * for k in range(size): * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -9893,7 +9893,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_e_derivation = __pyx_cur_scope->__pyx_v_e_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":73 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":73 * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not f_derivation or not e_derivation: break # <<<<<<<<<<<<<< @@ -9913,7 +9913,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject } __pyx_L9:; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":74 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":74 * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not f_derivation or not e_derivation: break * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9939,7 +9939,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_f_tree = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":75 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":75 * if not f_derivation or not e_derivation: break * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9965,7 +9965,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_e_tree = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":76 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":76 * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') * yield (f_tree, e_tree) # <<<<<<<<<<<<<< @@ -9997,7 +9997,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject __pyx_L8_break:; } - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":78 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":78 * yield (f_tree, e_tree) * finally: * del f_derivations # <<<<<<<<<<<<<< @@ -10021,7 +10021,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject __pyx_L6:; delete __pyx_cur_scope->__pyx_v_f_derivations; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":79 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":79 * finally: * del f_derivations * del e_derivations # <<<<<<<<<<<<<< @@ -10053,21 +10053,21 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject __Pyx_RefNannyFinishContext(); return NULL; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_19kbest_features(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_18kbest_features[] = "hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_19kbest_features(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_18kbest_features[] = "hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kbest_features (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_18kbest_features(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_18kbest_features(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":81 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":81 * del e_derivations * * def kbest_features(self, size): # <<<<<<<<<<<<<< @@ -10075,15 +10075,15 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_19kbest_features(PyObject *__pyx_v * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_18kbest_features(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { - struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_18kbest_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kbest_features", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *)__pyx_tp_new_5_cdec___pyx_scope_struct_10_kbest_features(__pyx_ptype_5_cdec___pyx_scope_struct_10_kbest_features, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -10096,7 +10096,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_18kbest_features(struct __pyx_obj_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_size); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_size); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5_cdec_10Hypergraph_20generator6, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -10105,7 +10105,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_18kbest_features(struct __pyx_obj_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Hypergraph.kbest_features", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.kbest_features", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -10114,9 +10114,9 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_18kbest_features(struct __pyx_obj_ return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)__pyx_generator->closure); PyObject *__pyx_r = NULL; unsigned int __pyx_t_1; long __pyx_t_2; @@ -10137,7 +10137,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":83 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":83 * def kbest_features(self, size): * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) # <<<<<<<<<<<<<< @@ -10147,7 +10147,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_derivations = new KBest::KBestDerivations<FastSparseVector<weight_t>,FeatureVectorTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":87 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":87 * cdef SparseVector fmap * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -10156,7 +10156,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject */ /*try:*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":88 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":88 * cdef unsigned k * try: * for k in range(size): # <<<<<<<<<<<<<< @@ -10167,7 +10167,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_1; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":89 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":89 * try: * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -10176,7 +10176,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_derivation = __pyx_cur_scope->__pyx_v_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":90 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":90 * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break # <<<<<<<<<<<<<< @@ -10190,23 +10190,23 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject } __pyx_L9:; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":91 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":91 * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break * fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * fmap.vector = new FastSparseVector[weight_t](derivation._yield) * yield fmap */ - __pyx_t_4 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_4 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_4); - if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5;} + if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_fmap)); __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_fmap)); __Pyx_GIVEREF(__pyx_t_4); - __pyx_cur_scope->__pyx_v_fmap = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_4); + __pyx_cur_scope->__pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_4); __pyx_t_4 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":92 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":92 * if not derivation: break * fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](derivation._yield) # <<<<<<<<<<<<<< @@ -10215,7 +10215,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_fmap->vector = new FastSparseVector<weight_t>(__pyx_cur_scope->__pyx_v_derivation->yield); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":93 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":93 * fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](derivation._yield) * yield fmap # <<<<<<<<<<<<<< @@ -10239,7 +10239,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject __pyx_L8_break:; } - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":95 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":95 * yield fmap * finally: * del derivations # <<<<<<<<<<<<<< @@ -10284,12 +10284,12 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject __Pyx_RefNannyFinishContext(); return NULL; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_21sample[] = "hg.sample(n) -> Sample of n hypotheses from the hypergraph."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_self, PyObject *__pyx_arg_n) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_21sample[] = "hg.sample(n) -> Sample of n hypotheses from the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_self, PyObject *__pyx_arg_n) { unsigned int __pyx_v_n; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -10302,16 +10302,16 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.Hypergraph.sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_21sample(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self), ((unsigned int)__pyx_v_n)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((unsigned int)__pyx_v_n)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":97 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":97 * del derivations * * def sample(self, unsigned n): # <<<<<<<<<<<<<< @@ -10319,15 +10319,15 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_self, P * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_21sample(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n) { - struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sample", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *)__pyx_tp_new_5_cdec___pyx_scope_struct_11_sample(__pyx_ptype_5_cdec___pyx_scope_struct_11_sample, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_sample, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -10338,7 +10338,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_21sample(struct __pyx_obj_5_cdec_H __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_n = __pyx_v_n; { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5_cdec_10Hypergraph_23generator7, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -10347,7 +10347,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_21sample(struct __pyx_obj_5_cdec_H __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Hypergraph.sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -10356,9 +10356,9 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_21sample(struct __pyx_obj_5_cdec_H return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)__pyx_generator->closure); PyObject *__pyx_r = NULL; std::vector<HypergraphSampler::Hypothesis> *__pyx_t_1; size_t __pyx_t_2; @@ -10380,7 +10380,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":99 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":99 * def sample(self, unsigned n): * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() # <<<<<<<<<<<<<< @@ -10395,16 +10395,16 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject } __pyx_cur_scope->__pyx_v_hypos = __pyx_t_1; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":100 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":100 * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() * hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos) # <<<<<<<<<<<<<< * cdef unsigned k * try: */ - HypergraphSampler::sample_hypotheses((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_cur_scope->__pyx_v_n, ((struct __pyx_vtabstruct_5_cdec_Hypergraph *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_rng(__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_hypos); + HypergraphSampler::sample_hypotheses((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_cur_scope->__pyx_v_n, ((struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_rng(__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_hypos); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":102 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":102 * hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos) * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -10413,7 +10413,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject */ /*try:*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":103 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":103 * cdef unsigned k * try: * for k in range(hypos.size()): # <<<<<<<<<<<<<< @@ -10424,7 +10424,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_3; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":104 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":104 * try: * for k in range(hypos.size()): * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -10460,7 +10460,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject } } - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":106 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":106 * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') * finally: * del hypos # <<<<<<<<<<<<<< @@ -10507,12 +10507,12 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject __Pyx_RefNannyFinishContext(); return NULL; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_25sample_trees(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_24sample_trees[] = "hg.sample_trees(n) -> Sample of n trees from the hypergraph."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_25sample_trees(PyObject *__pyx_v_self, PyObject *__pyx_arg_n) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_24sample_trees[] = "hg.sample_trees(n) -> Sample of n trees from the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees(PyObject *__pyx_v_self, PyObject *__pyx_arg_n) { unsigned int __pyx_v_n; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -10525,16 +10525,16 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_25sample_trees(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.Hypergraph.sample_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_24sample_trees(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self), ((unsigned int)__pyx_v_n)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((unsigned int)__pyx_v_n)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":108 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":108 * del hypos * * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< @@ -10542,15 +10542,15 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_25sample_trees(PyObject *__pyx_v_s * cdef vector[string]* trees = new vector[string]() */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_24sample_trees(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n) { - struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sample_trees", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *)__pyx_tp_new_5_cdec___pyx_scope_struct_12_sample_trees(__pyx_ptype_5_cdec___pyx_scope_struct_12_sample_trees, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -10561,7 +10561,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_24sample_trees(struct __pyx_obj_5_ __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_n = __pyx_v_n; { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5_cdec_10Hypergraph_26generator8, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -10570,7 +10570,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_24sample_trees(struct __pyx_obj_5_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Hypergraph.sample_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -10579,9 +10579,9 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_24sample_trees(struct __pyx_obj_5_ return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)__pyx_generator->closure); PyObject *__pyx_r = NULL; std::vector<std::string> *__pyx_t_1; size_t __pyx_t_2; @@ -10603,7 +10603,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":110 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":110 * def sample_trees(self, unsigned n): * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" * cdef vector[string]* trees = new vector[string]() # <<<<<<<<<<<<<< @@ -10618,16 +10618,16 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject } __pyx_cur_scope->__pyx_v_trees = __pyx_t_1; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":111 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":111 * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" * cdef vector[string]* trees = new vector[string]() * hypergraph.sample_trees(self.hg[0], n, self._rng(), trees) # <<<<<<<<<<<<<< * cdef unsigned k * try: */ - HypergraphSampler::sample_trees((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_cur_scope->__pyx_v_n, ((struct __pyx_vtabstruct_5_cdec_Hypergraph *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_rng(__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_trees); + HypergraphSampler::sample_trees((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_cur_scope->__pyx_v_n, ((struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_rng(__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_trees); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":113 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":113 * hypergraph.sample_trees(self.hg[0], n, self._rng(), trees) * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -10636,7 +10636,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject */ /*try:*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":114 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":114 * cdef unsigned k * try: * for k in range(trees.size()): # <<<<<<<<<<<<<< @@ -10647,7 +10647,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_3; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":115 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":115 * try: * for k in range(trees.size()): * yield unicode(trees[0][k].c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -10683,7 +10683,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject } } - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":117 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":117 * yield unicode(trees[0][k].c_str(), 'utf8') * finally: * del trees # <<<<<<<<<<<<<< @@ -10732,18 +10732,18 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_28intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_inp); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_27intersect[] = "hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_28intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_inp) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_28intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_inp); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_27intersect[] = "hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_28intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_inp) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("intersect (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_27intersect(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_inp)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_inp)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":119 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":119 * del trees * * def intersect(self, inp): # <<<<<<<<<<<<<< @@ -10751,8 +10751,8 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_28intersect(PyObject *__pyx_v_self * cdef Lattice lat */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_inp) { - struct __pyx_obj_5_cdec_Lattice *__pyx_v_lat = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_inp) { + struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_lat = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -10764,30 +10764,30 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":122 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":122 * """hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference.""" * cdef Lattice lat * if isinstance(inp, Lattice): # <<<<<<<<<<<<<< * lat = <Lattice> inp * elif isinstance(inp, basestring): */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_inp, ((PyObject*)__pyx_ptype_5_cdec_Lattice)); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_inp, ((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":123 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":123 * cdef Lattice lat * if isinstance(inp, Lattice): * lat = <Lattice> inp # <<<<<<<<<<<<<< * elif isinstance(inp, basestring): * lat = Lattice(inp) */ - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_inp))); - __pyx_v_lat = ((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_inp); + __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_inp))); + __pyx_v_lat = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_inp); goto __pyx_L3; } - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":124 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":124 * if isinstance(inp, Lattice): * lat = <Lattice> inp * elif isinstance(inp, basestring): # <<<<<<<<<<<<<< @@ -10798,7 +10798,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":125 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":125 * lat = <Lattice> inp * elif isinstance(inp, basestring): * lat = Lattice(inp) # <<<<<<<<<<<<<< @@ -10810,16 +10810,16 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde __Pyx_INCREF(__pyx_v_inp); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_inp); __Pyx_GIVEREF(__pyx_v_inp); - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_Lattice)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_v_lat = ((struct __pyx_obj_5_cdec_Lattice *)__pyx_t_4); + __pyx_v_lat = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":127 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":127 * lat = Lattice(inp) * else: * raise TypeError('cannot intersect hypergraph with %s' % type(inp)) # <<<<<<<<<<<<<< @@ -10842,7 +10842,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":128 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":128 * else: * raise TypeError('cannot intersect hypergraph with %s' % type(inp)) * return hypergraph.Intersect(lat.lattice[0], self.hg) # <<<<<<<<<<<<<< @@ -10861,7 +10861,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("_cdec.Hypergraph.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_lat); @@ -10871,9 +10871,9 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_29prune[] = "hg.prune(beam_alpha=0, density=0): Prune the hypergraph.\n beam_alpha: use beam pruning\n density: use density pruning"; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_29prune[] = "hg.prune(beam_alpha=0, density=0): Prune the hypergraph.\n beam_alpha: use beam pruning\n density: use density pruning"; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_beam_alpha = 0; PyObject *__pyx_v_density = 0; PyObject *__pyx_v_kwargs = 0; @@ -10931,17 +10931,17 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_self, Py __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; - __Pyx_AddTraceback("_cdec.Hypergraph.prune", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.prune", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_29prune(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self), __pyx_v_beam_alpha, __pyx_v_density, __pyx_v_kwargs); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), __pyx_v_beam_alpha, __pyx_v_density, __pyx_v_kwargs); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":130 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":130 * return hypergraph.Intersect(lat.lattice[0], self.hg) * * def prune(self, beam_alpha=0, density=0, **kwargs): # <<<<<<<<<<<<<< @@ -10949,7 +10949,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_self, Py * beam_alpha: use beam pruning */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_beam_alpha, PyObject *__pyx_v_density, PyObject *__pyx_v_kwargs) { +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_beam_alpha, PyObject *__pyx_v_density, PyObject *__pyx_v_kwargs) { std::vector<bool> *__pyx_v_preserve_mask; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -10962,7 +10962,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy int __pyx_clineno = 0; __Pyx_RefNannySetupContext("prune", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":134 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":134 * beam_alpha: use beam pruning * density: use density pruning""" * cdef hypergraph.EdgeMask* preserve_mask = NULL # <<<<<<<<<<<<<< @@ -10971,7 +10971,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy */ __pyx_v_preserve_mask = NULL; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":135 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":135 * density: use density pruning""" * cdef hypergraph.EdgeMask* preserve_mask = NULL * if 'csplit_preserve_full_word' in kwargs: # <<<<<<<<<<<<<< @@ -10982,7 +10982,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":136 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":136 * cdef hypergraph.EdgeMask* preserve_mask = NULL * if 'csplit_preserve_full_word' in kwargs: * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) # <<<<<<<<<<<<<< @@ -10991,7 +10991,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy */ __pyx_v_preserve_mask = new std::vector<bool>(__pyx_v_self->hg->edges_.size()); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":137 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":137 * if 'csplit_preserve_full_word' in kwargs: * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True # <<<<<<<<<<<<<< @@ -11003,7 +11003,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":138 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":138 * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True * self.hg.PruneInsideOutside(beam_alpha, density, preserve_mask, False, 1, False) # <<<<<<<<<<<<<< @@ -11014,7 +11014,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->hg->PruneInsideOutside(__pyx_t_3, __pyx_t_4, __pyx_v_preserve_mask, 0, 1.0, 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":139 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":139 * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True * self.hg.PruneInsideOutside(beam_alpha, density, preserve_mask, False, 1, False) * if preserve_mask: # <<<<<<<<<<<<<< @@ -11024,7 +11024,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy __pyx_t_2 = (__pyx_v_preserve_mask != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":140 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":140 * self.hg.PruneInsideOutside(beam_alpha, density, preserve_mask, False, 1, False) * if preserve_mask: * del preserve_mask # <<<<<<<<<<<<<< @@ -11039,7 +11039,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Hypergraph.prune", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.prune", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -11048,18 +11048,18 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_32lattice(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_31lattice[] = "hg.lattice() -> Lattice corresponding to the hypergraph."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_32lattice(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_32lattice(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_31lattice[] = "hg.lattice() -> Lattice corresponding to the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_32lattice(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lattice (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_31lattice(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":142 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":142 * del preserve_mask * * def lattice(self): # TODO direct hg -> lattice conversion in cdec # <<<<<<<<<<<<<< @@ -11067,7 +11067,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_32lattice(PyObject *__pyx_v_self, * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_v_plf = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -11079,7 +11079,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_5_cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lattice", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":144 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":144 * def lattice(self): # TODO direct hg -> lattice conversion in cdec * """hg.lattice() -> Lattice corresponding to the hypergraph.""" * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() # <<<<<<<<<<<<<< @@ -11091,7 +11091,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_5_cdec_ __pyx_v_plf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":145 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":145 * """hg.lattice() -> Lattice corresponding to the hypergraph.""" * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() * return Lattice(eval(plf)) # <<<<<<<<<<<<<< @@ -11128,7 +11128,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_5_cdec_ 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_5_cdec_Lattice)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -11141,7 +11141,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_5_cdec_ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.Hypergraph.lattice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.lattice", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_plf); @@ -11151,18 +11151,18 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_5_cdec_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_34plf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_33plf[] = "hg.plf() -> Lattice PLF representation corresponding to the hypergraph."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_34plf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_34plf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_33plf[] = "hg.plf() -> Lattice PLF representation corresponding to the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_34plf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("plf (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_33plf(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":147 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":147 * return Lattice(eval(plf)) * * def plf(self): # <<<<<<<<<<<<<< @@ -11170,7 +11170,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_34plf(PyObject *__pyx_v_self, CYTH * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_33plf(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -11180,7 +11180,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_33plf(struct __pyx_obj_5_cdec_Hype int __pyx_clineno = 0; __Pyx_RefNannySetupContext("plf", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":149 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":149 * def plf(self): * """hg.plf() -> Lattice PLF representation corresponding to the hypergraph.""" * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) # <<<<<<<<<<<<<< @@ -11207,7 +11207,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_33plf(struct __pyx_obj_5_cdec_Hype __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Hypergraph.plf", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.plf", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -11216,18 +11216,18 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_33plf(struct __pyx_obj_5_cdec_Hype } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_36reweight(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_35reweight[] = "hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_36reweight(PyObject *__pyx_v_self, PyObject *__pyx_v_weights) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_36reweight(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_35reweight[] = "hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_36reweight(PyObject *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reweight (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_35reweight(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":151 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":151 * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) * * def reweight(self, weights): # <<<<<<<<<<<<<< @@ -11235,7 +11235,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_36reweight(PyObject *__pyx_v_self, * if isinstance(weights, SparseVector): */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_weights) { +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -11247,52 +11247,52 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_5_cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reweight", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":153 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":153 * def reweight(self, weights): * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" * if isinstance(weights, SparseVector): # <<<<<<<<<<<<<< * self.hg.Reweight((<SparseVector> weights).vector[0]) * elif isinstance(weights, DenseVector): */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_weights, ((PyObject*)__pyx_ptype_5_cdec_SparseVector)); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_weights, ((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":154 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":154 * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" * if isinstance(weights, SparseVector): * self.hg.Reweight((<SparseVector> weights).vector[0]) # <<<<<<<<<<<<<< * elif isinstance(weights, DenseVector): * self.hg.Reweight((<DenseVector> weights).vector[0]) */ - __pyx_v_self->hg->Reweight((((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_weights)->vector[0])); + __pyx_v_self->hg->Reweight((((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_weights)->vector[0])); goto __pyx_L3; } - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":155 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":155 * if isinstance(weights, SparseVector): * self.hg.Reweight((<SparseVector> weights).vector[0]) * elif isinstance(weights, DenseVector): # <<<<<<<<<<<<<< * self.hg.Reweight((<DenseVector> weights).vector[0]) * else: */ - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_weights, ((PyObject*)__pyx_ptype_5_cdec_DenseVector)); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_weights, ((PyObject*)__pyx_ptype_4cdec_5_cdec_DenseVector)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":156 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":156 * self.hg.Reweight((<SparseVector> weights).vector[0]) * elif isinstance(weights, DenseVector): * self.hg.Reweight((<DenseVector> weights).vector[0]) # <<<<<<<<<<<<<< * else: * raise TypeError('cannot reweight hypergraph with %s' % type(weights)) */ - __pyx_v_self->hg->Reweight((((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_weights)->vector[0])); + __pyx_v_self->hg->Reweight((((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_weights)->vector[0])); goto __pyx_L3; } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":158 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":158 * self.hg.Reweight((<DenseVector> weights).vector[0]) * else: * raise TypeError('cannot reweight hypergraph with %s' % type(weights)) # <<<<<<<<<<<<<< @@ -11320,27 +11320,27 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_5_cdec __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("_cdec.Hypergraph.reweight", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.reweight", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_5edges_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_5edges___get__(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":161 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":161 * * property edges: * def __get__(self): # <<<<<<<<<<<<<< @@ -11348,15 +11348,15 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__pyx_v_ * for i in range(self.hg.edges_.size()): */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_5edges___get__(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_13___get__(__pyx_ptype_5_cdec___pyx_scope_struct_13___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -11366,7 +11366,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_5edges___get__(struct __pyx_obj_5_ __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_5_cdec_10Hypergraph_5edges_2generator9, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -11375,7 +11375,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_5edges___get__(struct __pyx_obj_5_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Hypergraph.edges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.edges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -11384,9 +11384,9 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_5edges___get__(struct __pyx_obj_5_ return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_5edges_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -11407,7 +11407,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":163 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":163 * def __get__(self): * cdef unsigned i * for i in range(self.hg.edges_.size()): # <<<<<<<<<<<<<< @@ -11418,16 +11418,16 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Generator 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/hypergraph.pxi":164 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":164 * cdef unsigned i * for i in range(self.hg.edges_.size()): * yield HypergraphEdge().init(self.hg, i) # <<<<<<<<<<<<<< * * property nodes: */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = ((struct __pyx_vtabstruct_5_cdec_HypergraphEdge *)((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -11457,20 +11457,20 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Generator __Pyx_RefNannyFinishContext(); return NULL; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_5nodes___get__(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":167 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":167 * * property nodes: * def __get__(self): # <<<<<<<<<<<<<< @@ -11478,15 +11478,15 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__pyx_v_ * for i in range(self.hg.nodes_.size()): */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_14___get__(__pyx_ptype_5_cdec___pyx_scope_struct_14___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -11496,7 +11496,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_obj_5_ __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_5_cdec_10Hypergraph_5nodes_2generator10, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -11505,7 +11505,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_obj_5_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Hypergraph.nodes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.nodes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -11514,9 +11514,9 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_obj_5_ return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -11537,7 +11537,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Generato __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":169 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":169 * def __get__(self): * cdef unsigned i * for i in range(self.hg.nodes_.size()): # <<<<<<<<<<<<<< @@ -11548,16 +11548,16 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Generato 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/hypergraph.pxi":170 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":170 * cdef unsigned i * for i in range(self.hg.nodes_.size()): * yield HypergraphNode().init(self.hg, i) # <<<<<<<<<<<<<< * * property goal: */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = ((struct __pyx_vtabstruct_5_cdec_HypergraphNode *)((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -11589,17 +11589,17 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Generato } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_4goal___get__(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":173 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":173 * * property goal: * def __get__(self): # <<<<<<<<<<<<<< @@ -11607,7 +11607,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__pyx_v_s * */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -11617,7 +11617,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_5_c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":174 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":174 * property goal: * def __get__(self): * return HypergraphNode().init(self.hg, self.hg.GoalNode()) # <<<<<<<<<<<<<< @@ -11625,9 +11625,9 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_5_c * property npaths: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_5_cdec_HypergraphNode *)((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_t_1), __pyx_v_self->hg, __pyx_v_self->hg->GoalNode()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1), __pyx_v_self->hg, __pyx_v_self->hg->GoalNode()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __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; @@ -11639,7 +11639,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_5_c __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Hypergraph.goal.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.goal.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -11648,17 +11648,17 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_5_c } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_6npaths___get__(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":177 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":177 * * property npaths: * def __get__(self): # <<<<<<<<<<<<<< @@ -11666,7 +11666,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *__pyx_v * */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -11675,7 +11675,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":178 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":178 * property npaths: * def __get__(self): * return self.hg.NumberOfPaths() # <<<<<<<<<<<<<< @@ -11693,7 +11693,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_5 goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.Hypergraph.npaths.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.npaths.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -11702,18 +11702,18 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_5 } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_10Hypergraph_38inside_outside(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_10Hypergraph_37inside_outside[] = "hg.inside_outside() -> SparseVector with inside-outside scores for each feature."; -static PyObject *__pyx_pw_5_cdec_10Hypergraph_38inside_outside(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_38inside_outside(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_37inside_outside[] = "hg.inside_outside() -> SparseVector with inside-outside scores for each feature."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_38inside_outside(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inside_outside (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_10Hypergraph_37inside_outside(((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":180 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":180 * return self.hg.NumberOfPaths() * * def inside_outside(self): # <<<<<<<<<<<<<< @@ -11721,10 +11721,10 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_38inside_outside(PyObject *__pyx_v * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() */ -static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { FastSparseVector<prob_t> *__pyx_v_result; prob_t __pyx_v_z; - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_vector = 0; + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; FastSparseVector<prob_t>::const_iterator *__pyx_v_it; CYTHON_UNUSED unsigned int __pyx_v_i; PyObject *__pyx_r = NULL; @@ -11737,7 +11737,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inside_outside", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":182 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":182 * def inside_outside(self): * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() # <<<<<<<<<<<<<< @@ -11746,7 +11746,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ */ __pyx_v_result = new FastSparseVector<prob_t>(); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":183 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":183 * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() * cdef prob_t z = hypergraph.InsideOutside(self.hg[0], result) # <<<<<<<<<<<<<< @@ -11755,7 +11755,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ */ __pyx_v_z = InsideOutside<prob_t, EdgeProb, SparseVector<prob_t>, EdgeFeaturesAndProbWeightFunction>((__pyx_v_self->hg[0]), __pyx_v_result); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":184 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":184 * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() * cdef prob_t z = hypergraph.InsideOutside(self.hg[0], result) * result[0] /= z # <<<<<<<<<<<<<< @@ -11764,20 +11764,20 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ */ (__pyx_v_result[0]) /= __pyx_v_z; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":185 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":185 * cdef prob_t z = hypergraph.InsideOutside(self.hg[0], result) * result[0] /= z * cdef SparseVector vector = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * vector.vector = new FastSparseVector[double]() * cdef FastSparseVector[prob_t].const_iterator* it = new FastSparseVector[prob_t].const_iterator(result[0], False) */ - __pyx_t_1 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_vector = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vector = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":186 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":186 * result[0] /= z * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double]() # <<<<<<<<<<<<<< @@ -11786,7 +11786,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ */ __pyx_v_vector->vector = new FastSparseVector<double>(); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":187 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":187 * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double]() * cdef FastSparseVector[prob_t].const_iterator* it = new FastSparseVector[prob_t].const_iterator(result[0], False) # <<<<<<<<<<<<<< @@ -11795,7 +11795,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ */ __pyx_v_it = new FastSparseVector<prob_t>::const_iterator((__pyx_v_result[0]), 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":189 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":189 * cdef FastSparseVector[prob_t].const_iterator* it = new FastSparseVector[prob_t].const_iterator(result[0], False) * cdef unsigned i * for i in range(result.size()): # <<<<<<<<<<<<<< @@ -11806,7 +11806,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ 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/hypergraph.pxi":190 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":190 * cdef unsigned i * for i in range(result.size()): * vector.vector.set_value(it[0].ptr().first, log(it[0].ptr().second)) # <<<<<<<<<<<<<< @@ -11815,7 +11815,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ */ __pyx_v_vector->vector->set_value((__pyx_v_it[0]).operator->()->first, log((__pyx_v_it[0]).operator->()->second)); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":191 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":191 * for i in range(result.size()): * vector.vector.set_value(it[0].ptr().first, log(it[0].ptr().second)) * pinc(it[0]) # ++it # <<<<<<<<<<<<<< @@ -11825,7 +11825,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ (++(__pyx_v_it[0])); } - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":192 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":192 * vector.vector.set_value(it[0].ptr().first, log(it[0].ptr().second)) * pinc(it[0]) # ++it * del it # <<<<<<<<<<<<<< @@ -11834,7 +11834,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ */ delete __pyx_v_it; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":193 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":193 * pinc(it[0]) # ++it * del it * del result # <<<<<<<<<<<<<< @@ -11843,7 +11843,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ */ delete __pyx_v_result; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":194 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":194 * del it * del result * return vector # <<<<<<<<<<<<<< @@ -11859,7 +11859,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.Hypergraph.inside_outside", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.inside_outside", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_vector); @@ -11868,7 +11868,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":201 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":201 * cdef public TRule trule * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<< @@ -11876,7 +11876,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_ * self.edge = &hg.edges_[i] */ -static PyObject *__pyx_f_5_cdec_14HypergraphEdge_init(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self, Hypergraph *__pyx_v_hg, unsigned int __pyx_v_i) { +static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self, Hypergraph *__pyx_v_hg, unsigned int __pyx_v_i) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -11885,7 +11885,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphEdge_init(struct __pyx_obj_5_cdec_Hy int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":202 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":202 * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg # <<<<<<<<<<<<<< @@ -11894,7 +11894,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphEdge_init(struct __pyx_obj_5_cdec_Hy */ __pyx_v_self->hg = __pyx_v_hg; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":203 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":203 * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg * self.edge = &hg.edges_[i] # <<<<<<<<<<<<<< @@ -11903,23 +11903,23 @@ static PyObject *__pyx_f_5_cdec_14HypergraphEdge_init(struct __pyx_obj_5_cdec_Hy */ __pyx_v_self->edge = (&(__pyx_v_hg->edges_[__pyx_v_i])); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":204 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":204 * self.hg = hg * self.edge = &hg.edges_[i] * self.trule = TRule.__new__(TRule) # <<<<<<<<<<<<<< * self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_) * return self */ - __pyx_t_1 = __pyx_tp_new_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_TRule)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_TRule)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_TRule)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->trule); __Pyx_DECREF(((PyObject *)__pyx_v_self->trule)); - __pyx_v_self->trule = ((struct __pyx_obj_5_cdec_TRule *)__pyx_t_1); + __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":205 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":205 * self.edge = &hg.edges_[i] * self.trule = TRule.__new__(TRule) * self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_) # <<<<<<<<<<<<<< @@ -11928,7 +11928,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphEdge_init(struct __pyx_obj_5_cdec_Hy */ __pyx_v_self->trule->rule = new boost::shared_ptr<TRule>(__pyx_v_self->edge->rule_); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":206 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":206 * self.trule = TRule.__new__(TRule) * self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_) * return self # <<<<<<<<<<<<<< @@ -11944,7 +11944,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphEdge_init(struct __pyx_obj_5_cdec_Hy goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.HypergraphEdge.init", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -11953,17 +11953,17 @@ static PyObject *__pyx_f_5_cdec_14HypergraphEdge_init(struct __pyx_obj_5_cdec_Hy } /* Python wrapper */ -static Py_ssize_t __pyx_pw_5_cdec_14HypergraphEdge_1__len__(PyObject *__pyx_v_self); /*proto*/ -static Py_ssize_t __pyx_pw_5_cdec_14HypergraphEdge_1__len__(PyObject *__pyx_v_self) { +static Py_ssize_t __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge___len__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":208 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":208 * return self * * def __len__(self): # <<<<<<<<<<<<<< @@ -11971,12 +11971,12 @@ static Py_ssize_t __pyx_pw_5_cdec_14HypergraphEdge_1__len__(PyObject *__pyx_v_se * */ -static Py_ssize_t __pyx_pf_5_cdec_14HypergraphEdge___len__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self) { +static Py_ssize_t __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":209 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":209 * * def __len__(self): * return self.edge.tail_nodes_.size() # <<<<<<<<<<<<<< @@ -11993,17 +11993,17 @@ static Py_ssize_t __pyx_pf_5_cdec_14HypergraphEdge___len__(struct __pyx_obj_5_cd } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_9head_node_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_9head_node_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge_9head_node___get__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":212 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":212 * * property head_node: * def __get__(self): # <<<<<<<<<<<<<< @@ -12011,7 +12011,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_9head_node_1__get__(PyObject * * */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_9head_node___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12021,7 +12021,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_9head_node___get__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":213 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":213 * property head_node: * def __get__(self): * return HypergraphNode().init(self.hg, self.edge.head_node_) # <<<<<<<<<<<<<< @@ -12029,9 +12029,9 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_9head_node___get__(struct __py * property tail_nodes: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_5_cdec_HypergraphNode *)((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_t_1), __pyx_v_self->hg, __pyx_v_self->edge->head_node_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1), __pyx_v_self->hg, __pyx_v_self->edge->head_node_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __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; @@ -12043,27 +12043,27 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_9head_node___get__(struct __py __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.HypergraphEdge.head_node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.head_node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_14HypergraphEdge_10tail_nodes_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge_10tail_nodes___get__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":216 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":216 * * property tail_nodes: * def __get__(self): # <<<<<<<<<<<<<< @@ -12071,15 +12071,15 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(PyObject * for i in range(self.edge.tail_nodes_.size()): */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_10tail_nodes___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_15___get__(__pyx_ptype_5_cdec___pyx_scope_struct_15___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -12089,7 +12089,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_10tail_nodes___get__(struct __ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5_cdec_14HypergraphEdge_10tail_nodes_2generator11, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator11, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -12098,7 +12098,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_10tail_nodes___get__(struct __ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.HypergraphEdge.tail_nodes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.tail_nodes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -12107,9 +12107,9 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_10tail_nodes___get__(struct __ return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_14HypergraphEdge_10tail_nodes_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; unsigned int __pyx_t_1; unsigned int __pyx_t_2; @@ -12130,7 +12130,7 @@ static PyObject *__pyx_gb_5_cdec_14HypergraphEdge_10tail_nodes_2generator11(__py __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":218 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":218 * def __get__(self): * cdef unsigned i * for i in range(self.edge.tail_nodes_.size()): # <<<<<<<<<<<<<< @@ -12141,16 +12141,16 @@ static PyObject *__pyx_gb_5_cdec_14HypergraphEdge_10tail_nodes_2generator11(__py 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/hypergraph.pxi":219 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":219 * cdef unsigned i * for i in range(self.edge.tail_nodes_.size()): * yield HypergraphNode().init(self.hg, self.edge.tail_nodes_[i]) # <<<<<<<<<<<<<< * * property span: */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = ((struct __pyx_vtabstruct_5_cdec_HypergraphNode *)((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->edge->tail_nodes_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->edge->tail_nodes_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -12182,17 +12182,17 @@ static PyObject *__pyx_gb_5_cdec_14HypergraphEdge_10tail_nodes_2generator11(__py } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_4span_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_4span_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge_4span___get__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":222 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":222 * * property span: * def __get__(self): # <<<<<<<<<<<<<< @@ -12200,7 +12200,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_4span_1__get__(PyObject *__pyx * */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4span___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12211,7 +12211,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4span___get__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":223 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":223 * property span: * def __get__(self): * return (self.edge.i_, self.edge.j_) # <<<<<<<<<<<<<< @@ -12241,7 +12241,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4span___get__(struct __pyx_obj __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.HypergraphEdge.span.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.span.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -12250,17 +12250,17 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4span___get__(struct __pyx_obj } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge_8src_span___get__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":226 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":226 * * property src_span: * def __get__(self): # <<<<<<<<<<<<<< @@ -12268,7 +12268,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObject *_ * */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_8src_span___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12279,7 +12279,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_8src_span___get__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":227 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":227 * property src_span: * def __get__(self): * return (self.edge.prev_i_, self.edge.prev_j_) # <<<<<<<<<<<<<< @@ -12309,7 +12309,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_8src_span___get__(struct __pyx __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.HypergraphEdge.src_span.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.src_span.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -12318,17 +12318,17 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_8src_span___get__(struct __pyx } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_14feature_values_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_14feature_values_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge_14feature_values___get__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":230 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":230 * * property feature_values: * def __get__(self): # <<<<<<<<<<<<<< @@ -12336,8 +12336,8 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_14feature_values_1__get__(PyOb * vector.vector = new FastSparseVector[double](self.edge.feature_values_) */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_14feature_values___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self) { - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_vector = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12346,20 +12346,20 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_14feature_values___get__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":231 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":231 * property feature_values: * def __get__(self): * cdef SparseVector vector = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * vector.vector = new FastSparseVector[double](self.edge.feature_values_) * return vector */ - __pyx_t_1 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_vector = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vector = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":232 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":232 * def __get__(self): * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double](self.edge.feature_values_) # <<<<<<<<<<<<<< @@ -12368,7 +12368,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_14feature_values___get__(struc */ __pyx_v_vector->vector = new FastSparseVector<double>(__pyx_v_self->edge->feature_values_); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":233 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":233 * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double](self.edge.feature_values_) * return vector # <<<<<<<<<<<<<< @@ -12384,7 +12384,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_14feature_values___get__(struc goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.HypergraphEdge.feature_values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.feature_values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_vector); @@ -12394,17 +12394,17 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_14feature_values___get__(struc } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge_4prob___get__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":236 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":236 * * property prob: * def __get__(self): # <<<<<<<<<<<<<< @@ -12412,7 +12412,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject *__pyx * */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4prob___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12421,7 +12421,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4prob___get__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":237 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":237 * property prob: * def __get__(self): * return self.edge.edge_prob_.as_float() # <<<<<<<<<<<<<< @@ -12439,7 +12439,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4prob___get__(struct __pyx_obj goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.HypergraphEdge.prob.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.prob.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -12448,17 +12448,17 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4prob___get__(struct __pyx_obj } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { 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("__richcmp__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5_cdec_HypergraphEdge, 1, "x", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5_cdec_HypergraphEdge, 1, "y", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_x), ((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_y), ((int)__pyx_v_op)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_HypergraphEdge, 1, "x", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_HypergraphEdge, 1, "y", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_y), ((int)__pyx_v_op)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -12467,7 +12467,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":239 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":239 * return self.edge.edge_prob_.as_float() * * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): # <<<<<<<<<<<<<< @@ -12475,7 +12475,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v * return x.edge == y.edge */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_x, struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_y, int __pyx_v_op) { +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_y, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12485,7 +12485,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":242 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":242 * if op == 2: # == * return x.edge == y.edge * elif op == 3: # != # <<<<<<<<<<<<<< @@ -12494,7 +12494,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_ */ switch (__pyx_v_op) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":240 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":240 * * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): * if op == 2: # == # <<<<<<<<<<<<<< @@ -12503,7 +12503,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_ */ case 2: - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":241 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":241 * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): * if op == 2: # == * return x.edge == y.edge # <<<<<<<<<<<<<< @@ -12518,7 +12518,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_ goto __pyx_L0; break; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":242 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":242 * if op == 2: # == * return x.edge == y.edge * elif op == 3: # != # <<<<<<<<<<<<<< @@ -12527,7 +12527,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_ */ case 3: - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":243 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":243 * return x.edge == y.edge * elif op == 3: # != * return not (x == y) # <<<<<<<<<<<<<< @@ -12546,7 +12546,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_ break; } - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":244 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":244 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphEdge') # <<<<<<<<<<<<<< @@ -12563,7 +12563,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.HypergraphEdge.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -12572,17 +12572,17 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge_5trule___get__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":199 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":199 * cdef hypergraph.Hypergraph* hg * cdef hypergraph.HypergraphEdge* edge * cdef public TRule trule # <<<<<<<<<<<<<< @@ -12590,7 +12590,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject *__py * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): */ -static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_5trule___get__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); @@ -12607,34 +12607,34 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_5trule___get__(struct __pyx_ob } /* Python wrapper */ -static int __pyx_pw_5_cdec_14HypergraphEdge_5trule_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pw_5_cdec_14HypergraphEdge_5trule_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge_5trule_2__set__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_2__set__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_5_cdec_14HypergraphEdge_5trule_2__set__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_2__set__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations 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_5_cdec_TRule))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_4cdec_5_cdec_TRule))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->trule); __Pyx_DECREF(((PyObject *)__pyx_v_self->trule)); - __pyx_v_self->trule = ((struct __pyx_obj_5_cdec_TRule *)__pyx_v_value); + __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_value); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.HypergraphEdge.trule.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.trule.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); @@ -12642,17 +12642,17 @@ static int __pyx_pf_5_cdec_14HypergraphEdge_5trule_2__set__(struct __pyx_obj_5_c } /* Python wrapper */ -static int __pyx_pw_5_cdec_14HypergraphEdge_5trule_5__del__(PyObject *__pyx_v_self); /*proto*/ -static int __pyx_pw_5_cdec_14HypergraphEdge_5trule_5__del__(PyObject *__pyx_v_self) { +static int __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphEdge_5trule_4__del__(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_4__del__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_5_cdec_14HypergraphEdge_5trule_4__del__(struct __pyx_obj_5_cdec_HypergraphEdge *__pyx_v_self) { +static int __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_4__del__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); @@ -12660,14 +12660,14 @@ static int __pyx_pf_5_cdec_14HypergraphEdge_5trule_4__del__(struct __pyx_obj_5_c __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->trule); __Pyx_DECREF(((PyObject *)__pyx_v_self->trule)); - __pyx_v_self->trule = ((struct __pyx_obj_5_cdec_TRule *)Py_None); + __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":250 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":250 * cdef hypergraph.HypergraphNode* node * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<< @@ -12675,12 +12675,12 @@ static int __pyx_pf_5_cdec_14HypergraphEdge_5trule_4__del__(struct __pyx_obj_5_c * self.node = &hg.nodes_[i] */ -static PyObject *__pyx_f_5_cdec_14HypergraphNode_init(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self, Hypergraph *__pyx_v_hg, unsigned int __pyx_v_i) { +static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphNode_init(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self, Hypergraph *__pyx_v_hg, unsigned int __pyx_v_i) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("init", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":251 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":251 * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg # <<<<<<<<<<<<<< @@ -12689,7 +12689,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphNode_init(struct __pyx_obj_5_cdec_Hy */ __pyx_v_self->hg = __pyx_v_hg; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":252 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":252 * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg * self.node = &hg.nodes_[i] # <<<<<<<<<<<<<< @@ -12698,7 +12698,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphNode_init(struct __pyx_obj_5_cdec_Hy */ __pyx_v_self->node = (&(__pyx_v_hg->nodes_[__pyx_v_i])); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":253 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":253 * self.hg = hg * self.node = &hg.nodes_[i] * return self # <<<<<<<<<<<<<< @@ -12716,20 +12716,20 @@ static PyObject *__pyx_f_5_cdec_14HypergraphNode_init(struct __pyx_obj_5_cdec_Hy __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_14HypergraphNode_8in_edges_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphNode_8in_edges___get__(((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_8in_edges___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":256 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":256 * * property in_edges: * def __get__(self): # <<<<<<<<<<<<<< @@ -12737,15 +12737,15 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObject *_ * for i in range(self.node.in_edges_.size()): */ -static PyObject *__pyx_pf_5_cdec_14HypergraphNode_8in_edges___get__(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_8in_edges___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_16___get__(__pyx_ptype_5_cdec___pyx_scope_struct_16___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -12755,7 +12755,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_8in_edges___get__(struct __pyx __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5_cdec_14HypergraphNode_8in_edges_2generator12, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -12764,7 +12764,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_8in_edges___get__(struct __pyx __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.HypergraphNode.in_edges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphNode.in_edges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -12773,9 +12773,9 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_8in_edges___get__(struct __pyx return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_14HypergraphNode_8in_edges_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -12796,7 +12796,7 @@ static PyObject *__pyx_gb_5_cdec_14HypergraphNode_8in_edges_2generator12(__pyx_G __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":258 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":258 * def __get__(self): * cdef unsigned i * for i in range(self.node.in_edges_.size()): # <<<<<<<<<<<<<< @@ -12807,16 +12807,16 @@ static PyObject *__pyx_gb_5_cdec_14HypergraphNode_8in_edges_2generator12(__pyx_G 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/hypergraph.pxi":259 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":259 * cdef unsigned i * for i in range(self.node.in_edges_.size()): * yield HypergraphEdge().init(self.hg, self.node.in_edges_[i]) # <<<<<<<<<<<<<< * * property out_edges: */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = ((struct __pyx_vtabstruct_5_cdec_HypergraphEdge *)((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->node->in_edges_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->node->in_edges_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -12846,20 +12846,20 @@ static PyObject *__pyx_gb_5_cdec_14HypergraphNode_8in_edges_2generator12(__pyx_G __Pyx_RefNannyFinishContext(); return NULL; } -static PyObject *__pyx_gb_5_cdec_14HypergraphNode_9out_edges_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphNode_9out_edges_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphNode_9out_edges_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphNode_9out_edges___get__(((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_9out_edges___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":262 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":262 * * property out_edges: * def __get__(self): # <<<<<<<<<<<<<< @@ -12867,15 +12867,15 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_9out_edges_1__get__(PyObject * * for i in range(self.node.out_edges_.size()): */ -static PyObject *__pyx_pf_5_cdec_14HypergraphNode_9out_edges___get__(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_9out_edges___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_17___get__(__pyx_ptype_5_cdec___pyx_scope_struct_17___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_17___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -12885,7 +12885,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_9out_edges___get__(struct __py __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_5_cdec_14HypergraphNode_9out_edges_2generator13, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -12894,7 +12894,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_9out_edges___get__(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.HypergraphNode.out_edges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphNode.out_edges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -12903,9 +12903,9 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_9out_edges___get__(struct __py return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_14HypergraphNode_9out_edges_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -12926,7 +12926,7 @@ static PyObject *__pyx_gb_5_cdec_14HypergraphNode_9out_edges_2generator13(__pyx_ __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":264 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":264 * def __get__(self): * cdef unsigned i * for i in range(self.node.out_edges_.size()): # <<<<<<<<<<<<<< @@ -12937,16 +12937,16 @@ static PyObject *__pyx_gb_5_cdec_14HypergraphNode_9out_edges_2generator13(__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/hypergraph.pxi":265 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":265 * cdef unsigned i * for i in range(self.node.out_edges_.size()): * yield HypergraphEdge().init(self.hg, self.node.out_edges_[i]) # <<<<<<<<<<<<<< * * property span: */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = ((struct __pyx_vtabstruct_5_cdec_HypergraphEdge *)((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->node->out_edges_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->node->out_edges_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -12978,17 +12978,17 @@ static PyObject *__pyx_gb_5_cdec_14HypergraphNode_9out_edges_2generator13(__pyx_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphNode_4span_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphNode_4span_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphNode_4span___get__(((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":268 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":268 * * property span: * def __get__(self): # <<<<<<<<<<<<<< @@ -12996,7 +12996,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_4span_1__get__(PyObject *__pyx * */ -static PyObject *__pyx_pf_5_cdec_14HypergraphNode_4span___get__(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -13006,7 +13006,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_4span___get__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":269 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":269 * property span: * def __get__(self): * return next(self.in_edges).span # <<<<<<<<<<<<<< @@ -13031,7 +13031,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_4span___get__(struct __pyx_obj __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.HypergraphNode.span.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphNode.span.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -13040,17 +13040,17 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_4span___get__(struct __pyx_obj } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphNode_3cat_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphNode_3cat_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_14HypergraphNode_3cat___get__(((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":272 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":272 * * property cat: * def __get__(self): # <<<<<<<<<<<<<< @@ -13058,7 +13058,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_3cat_1__get__(PyObject *__pyx_ * return str(TDConvert(-self.node.cat_).c_str()) */ -static PyObject *__pyx_pf_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -13069,7 +13069,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":273 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":273 * property cat: * def __get__(self): * if self.node.cat_: # <<<<<<<<<<<<<< @@ -13079,7 +13079,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_ __pyx_t_1 = (__pyx_v_self->node->cat_ != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":274 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":274 * def __get__(self): * if self.node.cat_: * return str(TDConvert(-self.node.cat_).c_str()) # <<<<<<<<<<<<<< @@ -13109,7 +13109,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.HypergraphNode.cat.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphNode.cat.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -13118,17 +13118,17 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ -static PyObject *__pyx_pw_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { 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("__richcmp__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5_cdec_HypergraphNode, 1, "x", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5_cdec_HypergraphNode, 1, "y", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_14HypergraphNode___richcmp__(((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_v_x), ((struct __pyx_obj_5_cdec_HypergraphNode *)__pyx_v_y), ((int)__pyx_v_op)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_HypergraphNode, 1, "x", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_HypergraphNode, 1, "y", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_y), ((int)__pyx_v_op)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -13137,7 +13137,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":276 +/* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":276 * return str(TDConvert(-self.node.cat_).c_str()) * * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): # <<<<<<<<<<<<<< @@ -13145,7 +13145,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v * return x.node == y.node */ -static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_x, struct __pyx_obj_5_cdec_HypergraphNode *__pyx_v_y, int __pyx_v_op) { +static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_y, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -13155,7 +13155,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":279 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":279 * if op == 2: # == * return x.node == y.node * elif op == 3: # != # <<<<<<<<<<<<<< @@ -13164,7 +13164,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5 */ switch (__pyx_v_op) { - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":277 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":277 * * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): * if op == 2: # == # <<<<<<<<<<<<<< @@ -13173,7 +13173,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5 */ case 2: - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":278 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":278 * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): * if op == 2: # == * return x.node == y.node # <<<<<<<<<<<<<< @@ -13188,7 +13188,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5 goto __pyx_L0; break; - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":279 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":279 * if op == 2: # == * return x.node == y.node * elif op == 3: # != # <<<<<<<<<<<<<< @@ -13197,7 +13197,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5 */ case 3: - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":280 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":280 * return x.node == y.node * elif op == 3: # != * return not (x == y) # <<<<<<<<<<<<<< @@ -13215,7 +13215,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5 break; } - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":281 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":281 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphNode') # <<<<<<<<<<<<<< @@ -13230,7 +13230,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5 goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.HypergraphNode.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.HypergraphNode.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -13239,20 +13239,20 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5 } /* Python wrapper */ -static int __pyx_pw_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { 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_5_cdec_7Lattice___cinit__(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":6 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":6 * cdef lattice.Lattice* lattice * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -13260,12 +13260,12 @@ static int __pyx_pw_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyObject * */ -static int __pyx_pf_5_cdec_7Lattice___cinit__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self) { +static int __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":7 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":7 * * def __cinit__(self): * self.lattice = new lattice.Lattice() # <<<<<<<<<<<<<< @@ -13280,12 +13280,12 @@ static int __pyx_pf_5_cdec_7Lattice___cinit__(struct __pyx_obj_5_cdec_Lattice *_ } /* Python wrapper */ -static int __pyx_pw_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_7Lattice_2__init__[] = "Lattice(tuple) -> Lattice from node list.\n Lattice(string) -> Lattice from PLF representation."; +static int __pyx_pw_4cdec_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_7Lattice_2__init__[] = "Lattice(tuple) -> Lattice from node list.\n Lattice(string) -> Lattice from PLF representation."; #if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_5_cdec_7Lattice_2__init__; +struct wrapperbase __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__; #endif -static int __pyx_pw_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_inp = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -13324,16 +13324,16 @@ static int __pyx_pw_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyObject * __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.Lattice.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_7Lattice_2__init__(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self), __pyx_v_inp); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self), __pyx_v_inp); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":9 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":9 * self.lattice = new lattice.Lattice() * * def __init__(self, inp): # <<<<<<<<<<<<<< @@ -13341,7 +13341,7 @@ static int __pyx_pw_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyObject * * Lattice(string) -> Lattice from PLF representation.""" */ -static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self, PyObject *__pyx_v_inp) { +static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, PyObject *__pyx_v_inp) { PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_arcs = NULL; int __pyx_r; @@ -13359,7 +13359,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":12 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":12 * """Lattice(tuple) -> Lattice from node list. * Lattice(string) -> Lattice from PLF representation.""" * if isinstance(inp, tuple): # <<<<<<<<<<<<<< @@ -13370,7 +13370,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":13 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":13 * Lattice(string) -> Lattice from PLF representation.""" * if isinstance(inp, tuple): * self.lattice.resize(len(inp)) # <<<<<<<<<<<<<< @@ -13380,7 +13380,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_ __pyx_t_3 = PyObject_Length(__pyx_v_inp); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->lattice->resize(__pyx_t_3); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":14 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":14 * if isinstance(inp, tuple): * self.lattice.resize(len(inp)) * for i, arcs in enumerate(inp): # <<<<<<<<<<<<<< @@ -13435,7 +13435,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_ __pyx_t_4 = __pyx_t_7; __pyx_t_7 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":15 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":15 * self.lattice.resize(len(inp)) * for i, arcs in enumerate(inp): * self[i] = arcs # <<<<<<<<<<<<<< @@ -13449,7 +13449,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_ goto __pyx_L3; } - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":16 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":16 * for i, arcs in enumerate(inp): * self[i] = arcs * elif isinstance(inp, basestring): # <<<<<<<<<<<<<< @@ -13460,14 +13460,14 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":17 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":17 * self[i] = arcs * elif isinstance(inp, basestring): * lattice.ConvertTextOrPLF(as_str(inp), self.lattice) # <<<<<<<<<<<<<< * else: * raise TypeError('cannot create lattice from %s' % type(inp)) */ - __pyx_t_4 = ((PyObject *)__pyx_f_5_cdec_as_str(__pyx_v_inp, NULL)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_inp, NULL)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __pyx_convert_string_from_py_(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -13476,7 +13476,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_ } /*else*/ { - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":19 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":19 * lattice.ConvertTextOrPLF(as_str(inp), self.lattice) * else: * raise TypeError('cannot create lattice from %s' % type(inp)) # <<<<<<<<<<<<<< @@ -13505,7 +13505,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("_cdec.Lattice.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_i); @@ -13515,15 +13515,15 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_ } /* Python wrapper */ -static void __pyx_pw_5_cdec_7Lattice_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_7Lattice_5__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_7Lattice_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_7Lattice_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_7Lattice_4__dealloc__(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":21 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":21 * raise TypeError('cannot create lattice from %s' % type(inp)) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -13531,11 +13531,11 @@ static void __pyx_pw_5_cdec_7Lattice_5__dealloc__(PyObject *__pyx_v_self) { * */ -static void __pyx_pf_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_Lattice *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":22 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":22 * * def __dealloc__(self): * del self.lattice # <<<<<<<<<<<<<< @@ -13548,8 +13548,8 @@ static void __pyx_pf_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __pyx_obj } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ -static PyObject *__pyx_pw_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { int __pyx_v_index; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -13562,16 +13562,16 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.Lattice.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_7Lattice_6__getitem__(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self), ((int)__pyx_v_index)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self), ((int)__pyx_v_index)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":24 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":24 * del self.lattice * * def __getitem__(self, int index): # <<<<<<<<<<<<<< @@ -13579,7 +13579,7 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, P * raise IndexError('lattice index out of range') */ -static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index) { +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index) { PyObject *__pyx_v_arcs = NULL; std::vector<LatticeArc> __pyx_v_arc_vector; LatticeArc *__pyx_v_arc; @@ -13601,7 +13601,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":25 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":25 * * def __getitem__(self, int index): * if not 0 <= index < len(self): # <<<<<<<<<<<<<< @@ -13616,7 +13616,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_3) { - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":26 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":26 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< @@ -13632,7 +13632,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":27 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":27 * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') * arcs = [] # <<<<<<<<<<<<<< @@ -13644,7 +13644,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L __pyx_v_arcs = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":28 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":28 * raise IndexError('lattice index out of range') * arcs = [] * cdef vector[lattice.LatticeArc] arc_vector = self.lattice[0][index] # <<<<<<<<<<<<<< @@ -13653,7 +13653,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L */ __pyx_v_arc_vector = ((__pyx_v_self->lattice[0])[__pyx_v_index]); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":31 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":31 * cdef lattice.LatticeArc* arc * cdef unsigned i * for i in range(arc_vector.size()): # <<<<<<<<<<<<<< @@ -13664,7 +13664,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":32 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":32 * cdef unsigned i * for i in range(arc_vector.size()): * arc = &arc_vector[i] # <<<<<<<<<<<<<< @@ -13673,7 +13673,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L */ __pyx_v_arc = (&(__pyx_v_arc_vector[__pyx_v_i])); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":33 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":33 * for i in range(arc_vector.size()): * arc = &arc_vector[i] * label = unicode(TDConvert(arc.label).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -13697,7 +13697,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L __pyx_v_label = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":34 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":34 * arc = &arc_vector[i] * label = unicode(TDConvert(arc.label).c_str(), 'utf8') * arcs.append((label, arc.cost, arc.dist2next)) # <<<<<<<<<<<<<< @@ -13723,7 +13723,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; } - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":35 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":35 * label = unicode(TDConvert(arc.label).c_str(), 'utf8') * arcs.append((label, arc.cost, arc.dist2next)) * return tuple(arcs) # <<<<<<<<<<<<<< @@ -13743,7 +13743,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("_cdec.Lattice.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_arcs); @@ -13754,8 +13754,8 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L } /* Python wrapper */ -static int __pyx_pw_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_v_arcs); /*proto*/ -static int __pyx_pw_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_v_arcs) { +static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_v_arcs); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_v_arcs) { int __pyx_v_index; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -13768,12 +13768,12 @@ static int __pyx_pw_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.Lattice.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arcs), (&PyTuple_Type), 1, "arcs", 1))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_7Lattice_8__setitem__(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self), ((int)__pyx_v_index), ((PyObject*)__pyx_v_arcs)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self), ((int)__pyx_v_index), ((PyObject*)__pyx_v_arcs)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -13782,7 +13782,7 @@ static int __pyx_pw_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObjec return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":37 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":37 * return tuple(arcs) * * def __setitem__(self, int index, tuple arcs): # <<<<<<<<<<<<<< @@ -13790,7 +13790,7 @@ static int __pyx_pw_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObjec * raise IndexError('lattice index out of range') */ -static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index, PyObject *__pyx_v_arcs) { +static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index, PyObject *__pyx_v_arcs) { LatticeArc *__pyx_v_arc; PyObject *__pyx_v_label = NULL; PyObject *__pyx_v_cost = NULL; @@ -13816,7 +13816,7 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":38 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":38 * * def __setitem__(self, int index, tuple arcs): * if not 0 <= index < len(self): # <<<<<<<<<<<<<< @@ -13831,7 +13831,7 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_3) { - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":39 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":39 * def __setitem__(self, int index, tuple arcs): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< @@ -13847,7 +13847,7 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":41 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":41 * raise IndexError('lattice index out of range') * cdef lattice.LatticeArc* arc * for (label, cost, dist2next) in arcs: # <<<<<<<<<<<<<< @@ -13934,20 +13934,20 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice __pyx_v_dist2next = __pyx_t_8; __pyx_t_8 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":42 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":42 * cdef lattice.LatticeArc* arc * for (label, cost, dist2next) in arcs: * label_str = as_str(label) # <<<<<<<<<<<<<< * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) * self.lattice[0][index].push_back(arc[0]) */ - __pyx_t_5 = ((PyObject *)__pyx_f_5_cdec_as_str(__pyx_v_label, NULL)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_label, NULL)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(((PyObject *)__pyx_v_label_str)); __pyx_v_label_str = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":43 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":43 * for (label, cost, dist2next) in arcs: * label_str = as_str(label) * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) # <<<<<<<<<<<<<< @@ -13959,7 +13959,7 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_v_dist2next); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_arc = new LatticeArc(TD::Convert(__pyx_t_11), __pyx_t_12, __pyx_t_13); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":44 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":44 * label_str = as_str(label) * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) * self.lattice[0][index].push_back(arc[0]) # <<<<<<<<<<<<<< @@ -13968,7 +13968,7 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice */ ((__pyx_v_self->lattice[0])[__pyx_v_index]).push_back((__pyx_v_arc[0])); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":45 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":45 * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) * self.lattice[0][index].push_back(arc[0]) * del arc # <<<<<<<<<<<<<< @@ -13988,7 +13988,7 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("_cdec.Lattice.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_label); @@ -14000,17 +14000,17 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice } /* Python wrapper */ -static Py_ssize_t __pyx_pw_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_self); /*proto*/ -static Py_ssize_t __pyx_pw_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_self) { +static Py_ssize_t __pyx_pw_4cdec_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pw_4cdec_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Lattice_10__len__(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":47 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":47 * del arc * * def __len__(self): # <<<<<<<<<<<<<< @@ -14018,12 +14018,12 @@ static Py_ssize_t __pyx_pw_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_self) { * */ -static Py_ssize_t __pyx_pf_5_cdec_7Lattice_10__len__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self) { +static Py_ssize_t __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":48 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":48 * * def __len__(self): * return self.lattice.size() # <<<<<<<<<<<<<< @@ -14040,17 +14040,17 @@ static Py_ssize_t __pyx_pf_5_cdec_7Lattice_10__len__(struct __pyx_obj_5_cdec_Lat } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Lattice_12__str__(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_12__str__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":50 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":50 * return self.lattice.size() * * def __str__(self): # <<<<<<<<<<<<<< @@ -14058,7 +14058,7 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self) { * */ -static PyObject *__pyx_pf_5_cdec_7Lattice_12__str__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_12__str__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -14068,7 +14068,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_12__str__(struct __pyx_obj_5_cdec_Latt int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":51 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":51 * * def __str__(self): * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) # <<<<<<<<<<<<<< @@ -14095,7 +14095,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_12__str__(struct __pyx_obj_5_cdec_Latt __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Lattice.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -14104,17 +14104,17 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_12__str__(struct __pyx_obj_5_cdec_Latt } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Lattice_14__unicode__(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":53 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":53 * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) * * def __unicode__(self): # <<<<<<<<<<<<<< @@ -14122,7 +14122,7 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_self, * */ -static PyObject *__pyx_pf_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -14132,7 +14132,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_5_cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__unicode__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":54 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":54 * * def __unicode__(self): * return unicode(str(self), 'utf8') # <<<<<<<<<<<<<< @@ -14168,27 +14168,27 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_5_cdec_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Lattice.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_7Lattice_18generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Lattice_16__iter__(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_16__iter__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":56 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":56 * return unicode(str(self), 'utf8') * * def __iter__(self): # <<<<<<<<<<<<<< @@ -14196,15 +14196,15 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_self) { * for i in range(len(self)): */ -static PyObject *__pyx_pf_5_cdec_7Lattice_16__iter__(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_16__iter__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __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_5_cdec___pyx_scope_struct_18___iter__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_18___iter__(__pyx_ptype_5_cdec___pyx_scope_struct_18___iter__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -14214,7 +14214,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_16__iter__(struct __pyx_obj_5_cdec_Lat __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_5_cdec_7Lattice_18generator14, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Lattice_18generator14, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -14223,7 +14223,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_16__iter__(struct __pyx_obj_5_cdec_Lat __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Lattice.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -14232,9 +14232,9 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_16__iter__(struct __pyx_obj_5_cdec_Lat return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_7Lattice_18generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; Py_ssize_t __pyx_t_1; unsigned int __pyx_t_2; @@ -14254,7 +14254,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_18generator14(__pyx_GeneratorObject *_ __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":58 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":58 * def __iter__(self): * cdef unsigned i * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -14265,7 +14265,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_18generator14(__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/lattice.pxi":59 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":59 * cdef unsigned i * for i in range(len(self)): * yield self[i] # <<<<<<<<<<<<<< @@ -14302,31 +14302,31 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_18generator14(__pyx_GeneratorObject *_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Lattice_20todot(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_7Lattice_19todot[] = "lattice.todot() -> Representation of the lattice in GraphViz dot format."; -static PyObject *__pyx_pw_5_cdec_7Lattice_20todot(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_20todot(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_7Lattice_19todot[] = "lattice.todot() -> Representation of the lattice in GraphViz dot format."; +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_20todot(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("todot (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Lattice_19todot(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_19todot(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Lattice_5todot_1lines(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyMethodDef __pyx_mdef_5_cdec_7Lattice_5todot_1lines = {__Pyx_NAMESTR("lines"), (PyCFunction)__pyx_pw_5_cdec_7Lattice_5todot_1lines, METH_NOARGS, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pw_5_cdec_7Lattice_5todot_1lines(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_5todot_1lines(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_4cdec_5_cdec_7Lattice_5todot_1lines = {__Pyx_NAMESTR("lines"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_5todot_1lines, METH_NOARGS, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_5todot_1lines(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lines (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Lattice_5todot_lines(__pyx_self); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(__pyx_self); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":63 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":63 * def todot(self): * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" * def lines(): # <<<<<<<<<<<<<< @@ -14334,25 +14334,25 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_5todot_1lines(PyObject *__pyx_self, CY * yield 'rankdir = LR;' */ -static PyObject *__pyx_pf_5_cdec_7Lattice_5todot_lines(PyObject *__pyx_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(PyObject *__pyx_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lines", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *)__pyx_tp_new_5_cdec___pyx_scope_struct_20_lines(__pyx_ptype_5_cdec___pyx_scope_struct_20_lines, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20_lines, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *) __Pyx_CyFunction_GetClosure(__pyx_self); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5_cdec_7Lattice_5todot_2generator20, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -14361,7 +14361,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_5todot_lines(PyObject *__pyx_self) { __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Lattice.todot.lines", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.todot.lines", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -14370,9 +14370,9 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_5todot_lines(PyObject *__pyx_self) { return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -14406,7 +14406,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":64 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":64 * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" * def lines(): * yield 'digraph lattice {' # <<<<<<<<<<<<<< @@ -14423,7 +14423,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj __pyx_L4_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":65 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":65 * def lines(): * yield 'digraph lattice {' * yield 'rankdir = LR;' # <<<<<<<<<<<<<< @@ -14440,7 +14440,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj __pyx_L5_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":66 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":66 * yield 'digraph lattice {' * yield 'rankdir = LR;' * yield 'node [shape=circle];' # <<<<<<<<<<<<<< @@ -14457,7 +14457,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj __pyx_L6_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":67 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":67 * yield 'rankdir = LR;' * yield 'node [shape=circle];' * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -14520,7 +14520,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj __pyx_cur_scope->__pyx_v_i = __pyx_t_1; __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":68 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":68 * yield 'node [shape=circle];' * for i in range(len(self)): * for label, weight, delta in self[i]: # <<<<<<<<<<<<<< @@ -14638,7 +14638,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj __pyx_cur_scope->__pyx_v_delta = __pyx_t_10; __pyx_t_10 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":69 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":69 * for i in range(len(self)): * for label, weight, delta in self[i]: * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) # <<<<<<<<<<<<<< @@ -14698,7 +14698,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":70 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":70 * for label, weight, delta in self[i]: * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) * yield '%d [shape=doublecircle]' % len(self) # <<<<<<<<<<<<<< @@ -14724,7 +14724,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj __pyx_L14_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":71 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":71 * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) * yield '%d [shape=doublecircle]' % len(self) * yield '}' # <<<<<<<<<<<<<< @@ -14759,7 +14759,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj return NULL; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":61 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":61 * yield self[i] * * def todot(self): # <<<<<<<<<<<<<< @@ -14767,8 +14767,8 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj * def lines(): */ -static PyObject *__pyx_pf_5_cdec_7Lattice_19todot(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_19todot(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *__pyx_cur_scope; PyObject *__pyx_v_lines = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -14779,7 +14779,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_19todot(struct __pyx_obj_5_cdec_Lattic const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("todot", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *)__pyx_tp_new_5_cdec___pyx_scope_struct_19_todot(__pyx_ptype_5_cdec___pyx_scope_struct_19_todot, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19_todot, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -14789,19 +14789,19 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_19todot(struct __pyx_obj_5_cdec_Lattic __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":63 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":63 * def todot(self): * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" * def lines(): # <<<<<<<<<<<<<< * yield 'digraph lattice {' * yield 'rankdir = LR;' */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5_cdec_7Lattice_5todot_1lines, 0, __pyx_n_s_38, ((PyObject*)__pyx_cur_scope), __pyx_n_s___cdec, ((PyObject *)__pyx_k_codeobj_36)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_7Lattice_5todot_1lines, 0, __pyx_n_s_38, ((PyObject*)__pyx_cur_scope), __pyx_n_s_39, ((PyObject *)__pyx_k_codeobj_36)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_lines = __pyx_t_1; __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":72 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":72 * yield '%d [shape=doublecircle]' % len(self) * yield '}' * return '\n'.join(lines()).encode('utf8') # <<<<<<<<<<<<<< @@ -14809,9 +14809,9 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_19todot(struct __pyx_obj_5_cdec_Lattic * def as_hypergraph(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_39), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_40), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_pf_5_cdec_7Lattice_5todot_lines(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -14825,7 +14825,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_19todot(struct __pyx_obj_5_cdec_Lattic __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_40), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -14838,7 +14838,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_19todot(struct __pyx_obj_5_cdec_Lattic __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.Lattice.todot", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.todot", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_lines); @@ -14849,18 +14849,18 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_19todot(struct __pyx_obj_5_cdec_Lattic } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Lattice_22as_hypergraph(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_7Lattice_21as_hypergraph[] = "lattice.as_hypergraph() -> Hypergraph representation of the lattice."; -static PyObject *__pyx_pw_5_cdec_7Lattice_22as_hypergraph(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_22as_hypergraph(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_7Lattice_21as_hypergraph[] = "lattice.as_hypergraph() -> Hypergraph representation of the lattice."; +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_22as_hypergraph(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("as_hypergraph (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Lattice_21as_hypergraph(((struct __pyx_obj_5_cdec_Lattice *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":74 +/* "/home/mdenkows/cdec/python/cdec/lattice.pxi":74 * return '\n'.join(lines()).encode('utf8') * * def as_hypergraph(self): # <<<<<<<<<<<<<< @@ -14868,8 +14868,8 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_22as_hypergraph(PyObject *__pyx_v_self * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) */ -static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cdec_Lattice *__pyx_v_self) { - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_result = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_result = 0; PyObject *__pyx_v_plf = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -14881,20 +14881,20 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_hypergraph", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":76 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":76 * def as_hypergraph(self): * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) # <<<<<<<<<<<<<< * result.hg = new hypergraph.Hypergraph() * cdef bytes plf = str(self) */ - __pyx_t_1 = __pyx_tp_new_5_cdec_Hypergraph(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_Hypergraph(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_Hypergraph)))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_result = ((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_Hypergraph)))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":77 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":77 * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) * result.hg = new hypergraph.Hypergraph() # <<<<<<<<<<<<<< @@ -14903,7 +14903,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde */ __pyx_v_result->hg = new Hypergraph(); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":78 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":78 * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) * result.hg = new hypergraph.Hypergraph() * cdef bytes plf = str(self) # <<<<<<<<<<<<<< @@ -14922,7 +14922,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde __pyx_v_plf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":79 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":79 * result.hg = new hypergraph.Hypergraph() * cdef bytes plf = str(self) * hypergraph.ReadFromPLF(plf, result.hg) # <<<<<<<<<<<<<< @@ -14931,7 +14931,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_plf)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} HypergraphIO::ReadFromPLF(__pyx_t_3, __pyx_v_result->hg); - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":80 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":80 * cdef bytes plf = str(self) * hypergraph.ReadFromPLF(plf, result.hg) * return result # <<<<<<<<<<<<<< @@ -14946,7 +14946,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Lattice.as_hypergraph", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Lattice.as_hypergraph", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_result); @@ -14956,7 +14956,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":3 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":3 * cimport mteval * * cdef SufficientStats as_stats(x, y): # <<<<<<<<<<<<<< @@ -14964,9 +14964,9 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde * return x */ -static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { - struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_stats = NULL; - struct __pyx_obj_5_cdec_SufficientStats *__pyx_r = NULL; +static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_stats(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { + struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_stats = NULL; + struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; @@ -14978,18 +14978,18 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_stats", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":4 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":4 * * cdef SufficientStats as_stats(x, y): * if isinstance(x, SufficientStats): # <<<<<<<<<<<<<< * return x * elif x == 0 and isinstance(y, SufficientStats): */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_x, ((PyObject*)__pyx_ptype_5_cdec_SufficientStats)); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_x, ((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":5 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":5 * cdef SufficientStats as_stats(x, y): * if isinstance(x, SufficientStats): * return x # <<<<<<<<<<<<<< @@ -14997,14 +14997,14 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject * stats = SufficientStats() */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - if (!(likely(((__pyx_v_x) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_x, __pyx_ptype_5_cdec_SufficientStats))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_x) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_x, __pyx_ptype_4cdec_5_cdec_SufficientStats))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_x); - __pyx_r = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_x); + __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_x); goto __pyx_L0; goto __pyx_L3; } - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":6 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":6 * if isinstance(x, SufficientStats): * return x * elif x == 0 and isinstance(y, SufficientStats): # <<<<<<<<<<<<<< @@ -15015,26 +15015,26 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_y, ((PyObject*)__pyx_ptype_5_cdec_SufficientStats)); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_y, ((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)); __pyx_t_4 = __pyx_t_1; } else { __pyx_t_4 = __pyx_t_2; } if (__pyx_t_4) { - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":7 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":7 * return x * elif x == 0 and isinstance(y, SufficientStats): * stats = SufficientStats() # <<<<<<<<<<<<<< * stats.stats = new mteval.SufficientStats() * stats.metric = (<SufficientStats> y).metric */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_v_stats = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_t_3); + __pyx_v_stats = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":8 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":8 * elif x == 0 and isinstance(y, SufficientStats): * stats = SufficientStats() * stats.stats = new mteval.SufficientStats() # <<<<<<<<<<<<<< @@ -15043,17 +15043,17 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject */ __pyx_v_stats->stats = new SufficientStats(); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":9 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":9 * stats = SufficientStats() * stats.stats = new mteval.SufficientStats() * stats.metric = (<SufficientStats> y).metric # <<<<<<<<<<<<<< * return stats * */ - __pyx_t_5 = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_y)->metric; + __pyx_t_5 = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_y)->metric; __pyx_v_stats->metric = __pyx_t_5; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":10 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":10 * stats.stats = new mteval.SufficientStats() * stats.metric = (<SufficientStats> y).metric * return stats # <<<<<<<<<<<<<< @@ -15068,11 +15068,11 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject } __pyx_L3:; - __pyx_r = ((struct __pyx_obj_5_cdec_SufficientStats *)Py_None); __Pyx_INCREF(Py_None); + __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.as_stats", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.as_stats", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_stats); @@ -15082,17 +15082,17 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_9Candidate_5words_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_9Candidate_5words_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_9Candidate_5words___get__(((struct __pyx_obj_5_cdec_Candidate *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":17 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":17 * * property words: * def __get__(self): # <<<<<<<<<<<<<< @@ -15100,7 +15100,7 @@ static PyObject *__pyx_pw_5_cdec_9Candidate_5words_1__get__(PyObject *__pyx_v_se * */ -static PyObject *__pyx_pf_5_cdec_9Candidate_5words___get__(struct __pyx_obj_5_cdec_Candidate *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -15111,7 +15111,7 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_5words___get__(struct __pyx_obj_5_cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":18 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":18 * property words: * def __get__(self): * return unicode(GetString(self.candidate.ewords).c_str(), encoding='utf8') # <<<<<<<<<<<<<< @@ -15143,7 +15143,7 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_5words___get__(struct __pyx_obj_5_cd __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.Candidate.words.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Candidate.words.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -15152,17 +15152,17 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_5words___get__(struct __pyx_obj_5_cd } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_9Candidate_4fmap___get__(((struct __pyx_obj_5_cdec_Candidate *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":21 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":21 * * property fmap: * def __get__(self): # <<<<<<<<<<<<<< @@ -15170,8 +15170,8 @@ static PyObject *__pyx_pw_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx_v_sel * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) */ -static PyObject *__pyx_pf_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_5_cdec_Candidate *__pyx_v_self) { - struct __pyx_obj_5_cdec_SparseVector *__pyx_v_fmap = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -15180,20 +15180,20 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":22 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":22 * property fmap: * def __get__(self): * cdef SparseVector fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) * return fmap */ - __pyx_t_1 = __pyx_tp_new_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_fmap = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1); + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":23 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":23 * def __get__(self): * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) # <<<<<<<<<<<<<< @@ -15202,7 +15202,7 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_5_cde */ __pyx_v_fmap->vector = new FastSparseVector<weight_t>(__pyx_v_self->candidate->fmap); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":24 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":24 * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) * return fmap # <<<<<<<<<<<<<< @@ -15218,7 +15218,7 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_5_cde goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.Candidate.fmap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Candidate.fmap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_fmap); @@ -15228,17 +15228,17 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_5_cde } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_9Candidate_5score_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_9Candidate_5score_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_9Candidate_5score___get__(((struct __pyx_obj_5_cdec_Candidate *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":14 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":14 * cdef class Candidate: * cdef mteval.const_Candidate* candidate * cdef public float score # <<<<<<<<<<<<<< @@ -15246,7 +15246,7 @@ static PyObject *__pyx_pw_5_cdec_9Candidate_5score_1__get__(PyObject *__pyx_v_se * property words: */ -static PyObject *__pyx_pf_5_cdec_9Candidate_5score___get__(struct __pyx_obj_5_cdec_Candidate *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -15265,7 +15265,7 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_5score___get__(struct __pyx_obj_5_cd goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.Candidate.score.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Candidate.score.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -15274,17 +15274,17 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_5score___get__(struct __pyx_obj_5_cd } /* Python wrapper */ -static int __pyx_pw_5_cdec_9Candidate_5score_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pw_5_cdec_9Candidate_5score_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pw_4cdec_5_cdec_9Candidate_5score_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_9Candidate_5score_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_9Candidate_5score_2__set__(((struct __pyx_obj_5_cdec_Candidate *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self), ((PyObject *)__pyx_v_value)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_5_cdec_Candidate *__pyx_v_self, PyObject *__pyx_v_value) { +static int __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations float __pyx_t_1; @@ -15298,7 +15298,7 @@ static int __pyx_pf_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_5_cdec_Ca __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Candidate.score.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Candidate.score.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); @@ -15306,15 +15306,15 @@ static int __pyx_pf_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_5_cdec_Ca } /* Python wrapper */ -static void __pyx_pw_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_15SufficientStats___dealloc__(((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":30 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":30 * cdef mteval.EvaluationMetric* metric * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -15322,11 +15322,11 @@ static void __pyx_pw_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_sel * */ -static void __pyx_pf_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":31 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":31 * * def __dealloc__(self): * del self.stats # <<<<<<<<<<<<<< @@ -15339,17 +15339,17 @@ static void __pyx_pf_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED struct _ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_5score_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_5score_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_15SufficientStats_5score___get__(((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":34 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":34 * * property score: * def __get__(self): # <<<<<<<<<<<<<< @@ -15357,7 +15357,7 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_5score_1__get__(PyObject *__p * */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_5score___get__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -15366,7 +15366,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_5score___get__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":35 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":35 * property score: * def __get__(self): * return self.metric.ComputeScore(self.stats[0]) # <<<<<<<<<<<<<< @@ -15384,7 +15384,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_5score___get__(struct __pyx_o goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.SufficientStats.score.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SufficientStats.score.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -15393,17 +15393,17 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_5score___get__(struct __pyx_o } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_6detail_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_6detail_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_15SufficientStats_6detail___get__(((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":38 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":38 * * property detail: * def __get__(self): # <<<<<<<<<<<<<< @@ -15411,7 +15411,7 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_6detail_1__get__(PyObject *__ * */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_6detail___get__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -15421,7 +15421,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_6detail___get__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":39 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":39 * property detail: * def __get__(self): * return str(self.metric.DetailedScore(self.stats[0]).c_str()) # <<<<<<<<<<<<<< @@ -15448,7 +15448,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_6detail___get__(struct __pyx_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.SufficientStats.detail.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SufficientStats.detail.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -15457,17 +15457,17 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_6detail___get__(struct __pyx_ } /* Python wrapper */ -static Py_ssize_t __pyx_pw_5_cdec_15SufficientStats_3__len__(PyObject *__pyx_v_self); /*proto*/ -static Py_ssize_t __pyx_pw_5_cdec_15SufficientStats_3__len__(PyObject *__pyx_v_self) { +static Py_ssize_t __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_15SufficientStats_2__len__(((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":41 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":41 * return str(self.metric.DetailedScore(self.stats[0]).c_str()) * * def __len__(self): # <<<<<<<<<<<<<< @@ -15475,12 +15475,12 @@ static Py_ssize_t __pyx_pw_5_cdec_15SufficientStats_3__len__(PyObject *__pyx_v_s * */ -static Py_ssize_t __pyx_pf_5_cdec_15SufficientStats_2__len__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self) { +static Py_ssize_t __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":42 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":42 * * def __len__(self): * return self.stats.size() # <<<<<<<<<<<<<< @@ -15495,20 +15495,20 @@ static Py_ssize_t __pyx_pf_5_cdec_15SufficientStats_2__len__(struct __pyx_obj_5_ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_5__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_5__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_15SufficientStats_4__iter__(((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_4__iter__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":44 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":44 * return self.stats.size() * * def __iter__(self): # <<<<<<<<<<<<<< @@ -15516,15 +15516,15 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_5__iter__(PyObject *__pyx_v_s * yield self[i] */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_4__iter__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_4__iter__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __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_5_cdec___pyx_scope_struct_21___iter__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_21___iter__(__pyx_ptype_5_cdec___pyx_scope_struct_21___iter__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -15534,7 +15534,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_4__iter__(struct __pyx_obj_5_ __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_5_cdec_15SufficientStats_6generator15, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -15543,7 +15543,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_4__iter__(struct __pyx_obj_5_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.SufficientStats.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SufficientStats.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -15552,9 +15552,9 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_4__iter__(struct __pyx_obj_5_ return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -15575,7 +15575,7 @@ static PyObject *__pyx_gb_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorO __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":45 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":45 * * def __iter__(self): * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -15634,7 +15634,7 @@ static PyObject *__pyx_gb_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorO __pyx_cur_scope->__pyx_v_i = __pyx_t_2; __pyx_t_2 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":46 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":46 * def __iter__(self): * for i in range(len(self)): * yield self[i] # <<<<<<<<<<<<<< @@ -15678,8 +15678,8 @@ static PyObject *__pyx_gb_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorO } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { int __pyx_v_index; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -15692,16 +15692,16 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.SufficientStats.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SufficientStats.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_15SufficientStats_7__getitem__(((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_self), ((int)__pyx_v_index)); + __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self), ((int)__pyx_v_index)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":48 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":48 * yield self[i] * * def __getitem__(self, int index): # <<<<<<<<<<<<<< @@ -15709,7 +15709,7 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_ * raise IndexError('sufficient stats vector index out of range') */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self, int __pyx_v_index) { +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self, int __pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -15721,7 +15721,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":49 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":49 * * def __getitem__(self, int index): * if not 0 <= index < len(self): # <<<<<<<<<<<<<< @@ -15736,14 +15736,14 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_3) { - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":50 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":50 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('sufficient stats vector index out of range') # <<<<<<<<<<<<<< * return self.stats[0][index] * */ - __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -15752,7 +15752,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":51 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":51 * if not 0 <= index < len(self): * raise IndexError('sufficient stats vector index out of range') * return self.stats[0][index] # <<<<<<<<<<<<<< @@ -15770,7 +15770,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("_cdec.SufficientStats.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SufficientStats.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -15779,16 +15779,16 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { 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("__iadd__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5_cdec_SufficientStats, 1, "other", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_15SufficientStats_9__iadd__(((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_self), ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_other)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SufficientStats, 1, "other", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_other)); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -15797,7 +15797,7 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_ return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":53 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":53 * return self.stats[0][index] * * def __iadd__(SufficientStats self, SufficientStats other): # <<<<<<<<<<<<<< @@ -15805,12 +15805,12 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_ * return self */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_self, struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_other) { +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iadd__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":54 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":54 * * def __iadd__(SufficientStats self, SufficientStats other): * self.stats[0] += other.stats[0] # <<<<<<<<<<<<<< @@ -15819,7 +15819,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_5_ */ (__pyx_v_self->stats[0]) += (__pyx_v_other->stats[0]); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":55 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":55 * def __iadd__(SufficientStats self, SufficientStats other): * self.stats[0] += other.stats[0] * return self # <<<<<<<<<<<<<< @@ -15839,17 +15839,17 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_5_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_12__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ -static PyObject *__pyx_pw_5_cdec_15SufficientStats_12__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__add__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_15SufficientStats_11__add__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); + __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":57 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":57 * return self * * def __add__(x, y): # <<<<<<<<<<<<<< @@ -15857,10 +15857,10 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_12__add__(PyObject *__pyx_v_x * cdef SufficientStats sy = as_stats(y, x) */ -static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { - struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_sx = 0; - struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_sy = 0; - struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_result = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { + struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_sx = 0; + struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_sy = 0; + struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -15870,43 +15870,43 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":58 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":58 * * def __add__(x, y): * cdef SufficientStats sx = as_stats(x, y) # <<<<<<<<<<<<<< * cdef SufficientStats sy = as_stats(y, x) * cdef SufficientStats result = SufficientStats() */ - __pyx_t_1 = ((PyObject *)__pyx_f_5_cdec_as_stats(__pyx_v_x, __pyx_v_y)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_stats(__pyx_v_x, __pyx_v_y)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_v_sx = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_t_1); + __pyx_v_sx = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":59 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":59 * def __add__(x, y): * cdef SufficientStats sx = as_stats(x, y) * cdef SufficientStats sy = as_stats(y, x) # <<<<<<<<<<<<<< * cdef SufficientStats result = SufficientStats() * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) */ - __pyx_t_1 = ((PyObject *)__pyx_f_5_cdec_as_stats(__pyx_v_y, __pyx_v_x)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_stats(__pyx_v_y, __pyx_v_x)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_v_sy = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_t_1); + __pyx_v_sy = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":60 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":60 * cdef SufficientStats sx = as_stats(x, y) * cdef SufficientStats sy = as_stats(y, x) * cdef SufficientStats result = SufficientStats() # <<<<<<<<<<<<<< * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) * result.metric = sx.metric */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_v_result = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_t_1); + __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":61 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":61 * cdef SufficientStats sy = as_stats(y, x) * cdef SufficientStats result = SufficientStats() * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) # <<<<<<<<<<<<<< @@ -15915,7 +15915,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x */ __pyx_v_result->stats = new SufficientStats(operator+((__pyx_v_sx->stats[0]), (__pyx_v_sy->stats[0]))); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":62 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":62 * cdef SufficientStats result = SufficientStats() * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) * result.metric = sx.metric # <<<<<<<<<<<<<< @@ -15925,7 +15925,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x __pyx_t_2 = __pyx_v_sx->metric; __pyx_v_result->metric = __pyx_t_2; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":63 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":63 * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) * result.metric = sx.metric * return result # <<<<<<<<<<<<<< @@ -15941,7 +15941,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.SufficientStats.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SufficientStats.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_sx); @@ -15953,9 +15953,9 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x } /* Python wrapper */ -static int __pyx_pw_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - struct __pyx_obj_5_cdec_SegmentEvaluator *__pyx_v_evaluator = 0; +static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_evaluator = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -15987,18 +15987,18 @@ static int __pyx_pw_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyO } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } - __pyx_v_evaluator = ((struct __pyx_obj_5_cdec_SegmentEvaluator *)values[0]); + __pyx_v_evaluator = ((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)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[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.CandidateSet.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.CandidateSet.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_evaluator), __pyx_ptype_5_cdec_SegmentEvaluator, 1, "evaluator", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_12CandidateSet___cinit__(((struct __pyx_obj_5_cdec_CandidateSet *)__pyx_v_self), __pyx_v_evaluator); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_evaluator), __pyx_ptype_4cdec_5_cdec_SegmentEvaluator, 1, "evaluator", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self), __pyx_v_evaluator); goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -16007,7 +16007,7 @@ static int __pyx_pw_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyO return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":70 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":70 * cdef mteval.CandidateSet* cs * * def __cinit__(self, SegmentEvaluator evaluator): # <<<<<<<<<<<<<< @@ -16015,13 +16015,13 @@ static int __pyx_pw_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyO * self.metric = evaluator.metric */ -static int __pyx_pf_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_5_cdec_SegmentEvaluator *__pyx_v_evaluator) { +static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_evaluator) { int __pyx_r; __Pyx_RefNannyDeclarations EvaluationMetric *__pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":71 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":71 * * def __cinit__(self, SegmentEvaluator evaluator): * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) # <<<<<<<<<<<<<< @@ -16030,7 +16030,7 @@ static int __pyx_pf_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_5_cdec_Cand */ __pyx_v_self->scorer = new boost::shared_ptr<SegmentEvaluator>((__pyx_v_evaluator->scorer[0])); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":72 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":72 * def __cinit__(self, SegmentEvaluator evaluator): * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) * self.metric = evaluator.metric # <<<<<<<<<<<<<< @@ -16040,7 +16040,7 @@ static int __pyx_pf_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_5_cdec_Cand __pyx_t_1 = __pyx_v_evaluator->metric; __pyx_v_self->metric = __pyx_t_1; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":73 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":73 * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) * self.metric = evaluator.metric * self.cs = new mteval.CandidateSet() # <<<<<<<<<<<<<< @@ -16055,15 +16055,15 @@ static int __pyx_pf_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_5_cdec_Cand } /* Python wrapper */ -static void __pyx_pw_5_cdec_12CandidateSet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_12CandidateSet_3__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_12CandidateSet_2__dealloc__(((struct __pyx_obj_5_cdec_CandidateSet *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":75 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":75 * self.cs = new mteval.CandidateSet() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16071,11 +16071,11 @@ static void __pyx_pw_5_cdec_12CandidateSet_3__dealloc__(PyObject *__pyx_v_self) * del self.cs */ -static void __pyx_pf_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":76 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":76 * * def __dealloc__(self): * del self.scorer # <<<<<<<<<<<<<< @@ -16084,7 +16084,7 @@ static void __pyx_pf_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __p */ delete __pyx_v_self->scorer; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":77 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":77 * def __dealloc__(self): * del self.scorer * del self.cs # <<<<<<<<<<<<<< @@ -16097,17 +16097,17 @@ static void __pyx_pf_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __p } /* Python wrapper */ -static Py_ssize_t __pyx_pw_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_v_self); /*proto*/ -static Py_ssize_t __pyx_pw_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_v_self) { +static Py_ssize_t __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_12CandidateSet_4__len__(((struct __pyx_obj_5_cdec_CandidateSet *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":79 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":79 * del self.cs * * def __len__(self): # <<<<<<<<<<<<<< @@ -16115,12 +16115,12 @@ static Py_ssize_t __pyx_pw_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_v_self * */ -static Py_ssize_t __pyx_pf_5_cdec_12CandidateSet_4__len__(struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self) { +static Py_ssize_t __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":80 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":80 * * def __len__(self): * return self.cs.size() # <<<<<<<<<<<<<< @@ -16137,8 +16137,8 @@ static Py_ssize_t __pyx_pf_5_cdec_12CandidateSet_4__len__(struct __pyx_obj_5_cde } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) { +static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) { int __pyx_v_k; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -16151,16 +16151,16 @@ static PyObject *__pyx_pw_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.CandidateSet.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.CandidateSet.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_12CandidateSet_6__getitem__(((struct __pyx_obj_5_cdec_CandidateSet *)__pyx_v_self), ((int)__pyx_v_k)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self), ((int)__pyx_v_k)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":82 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":82 * return self.cs.size() * * def __getitem__(self,int k): # <<<<<<<<<<<<<< @@ -16168,8 +16168,8 @@ static PyObject *__pyx_pw_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_s * raise IndexError('candidate set index out of range') */ -static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self, int __pyx_v_k) { - struct __pyx_obj_5_cdec_Candidate *__pyx_v_candidate = 0; +static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, int __pyx_v_k) { + struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_candidate = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -16180,7 +16180,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":83 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":83 * * def __getitem__(self,int k): * if not 0 <= k < self.cs.size(): # <<<<<<<<<<<<<< @@ -16194,14 +16194,14 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":84 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":84 * def __getitem__(self,int k): * if not 0 <= k < self.cs.size(): * raise IndexError('candidate set index out of range') # <<<<<<<<<<<<<< * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -16210,19 +16210,19 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_ } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":85 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":85 * if not 0 <= k < self.cs.size(): * raise IndexError('candidate set index out of range') * cdef Candidate candidate = Candidate() # <<<<<<<<<<<<<< * candidate.candidate = &self.cs[0][k] * candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats) */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_Candidate)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Candidate)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_v_candidate = ((struct __pyx_obj_5_cdec_Candidate *)__pyx_t_3); + __pyx_v_candidate = ((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":86 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":86 * raise IndexError('candidate set index out of range') * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] # <<<<<<<<<<<<<< @@ -16231,7 +16231,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_ */ __pyx_v_candidate->candidate = (&((__pyx_v_self->cs[0])[__pyx_v_k])); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":87 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":87 * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] * candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats) # <<<<<<<<<<<<<< @@ -16240,7 +16240,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_ */ __pyx_v_candidate->score = __pyx_v_self->metric->ComputeScore(((__pyx_v_self->cs[0])[__pyx_v_k]).eval_feats); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":88 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":88 * candidate.candidate = &self.cs[0][k] * candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats) * return candidate # <<<<<<<<<<<<<< @@ -16256,7 +16256,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.CandidateSet.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.CandidateSet.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_candidate); @@ -16264,20 +16264,20 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_12CandidateSet_10generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_12CandidateSet_8__iter__(((struct __pyx_obj_5_cdec_CandidateSet *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":90 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":90 * return candidate * * def __iter__(self): # <<<<<<<<<<<<<< @@ -16285,15 +16285,15 @@ static PyObject *__pyx_pw_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_v_self * for i in range(len(self)): */ -static PyObject *__pyx_pf_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __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_5_cdec___pyx_scope_struct_22___iter__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_22___iter__(__pyx_ptype_5_cdec___pyx_scope_struct_22___iter__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22___iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -16303,7 +16303,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_5_cde __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_5_cdec_12CandidateSet_10generator16, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -16312,7 +16312,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_5_cde __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.CandidateSet.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.CandidateSet.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -16321,9 +16321,9 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_5_cde return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_12CandidateSet_10generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; Py_ssize_t __pyx_t_1; unsigned int __pyx_t_2; @@ -16343,7 +16343,7 @@ static PyObject *__pyx_gb_5_cdec_12CandidateSet_10generator16(__pyx_GeneratorObj __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":92 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":92 * def __iter__(self): * cdef unsigned i * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -16354,7 +16354,7 @@ static PyObject *__pyx_gb_5_cdec_12CandidateSet_10generator16(__pyx_GeneratorObj for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":93 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":93 * cdef unsigned i * for i in range(len(self)): * yield self[i] # <<<<<<<<<<<<<< @@ -16391,10 +16391,10 @@ static PyObject *__pyx_gb_5_cdec_12CandidateSet_10generator16(__pyx_GeneratorObj } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_12CandidateSet_12add_kbest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_12CandidateSet_11add_kbest[] = "cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses \n from the hypergraph and add them to the candidate set."; -static PyObject *__pyx_pw_5_cdec_12CandidateSet_12add_kbest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_hypergraph = 0; +static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_12CandidateSet_11add_kbest[] = "cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses \n from the hypergraph and add them to the candidate set."; +static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hypergraph = 0; unsigned int __pyx_v_k; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -16434,19 +16434,19 @@ static PyObject *__pyx_pw_5_cdec_12CandidateSet_12add_kbest(PyObject *__pyx_v_se values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_hypergraph = ((struct __pyx_obj_5_cdec_Hypergraph *)values[0]); + __pyx_v_hypergraph = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)values[0]); __pyx_v_k = __Pyx_PyInt_AsUnsignedInt(values[1]); if (unlikely((__pyx_v_k == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_kbest", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.CandidateSet.add_kbest", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.CandidateSet.add_kbest", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hypergraph), __pyx_ptype_5_cdec_Hypergraph, 1, "hypergraph", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_12CandidateSet_11add_kbest(((struct __pyx_obj_5_cdec_CandidateSet *)__pyx_v_self), __pyx_v_hypergraph, __pyx_v_k); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hypergraph), __pyx_ptype_4cdec_5_cdec_Hypergraph, 1, "hypergraph", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self), __pyx_v_hypergraph, __pyx_v_k); goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -16455,7 +16455,7 @@ static PyObject *__pyx_pw_5_cdec_12CandidateSet_12add_kbest(PyObject *__pyx_v_se return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":95 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":95 * yield self[i] * * def add_kbest(self, Hypergraph hypergraph, unsigned k): # <<<<<<<<<<<<<< @@ -16463,12 +16463,12 @@ static PyObject *__pyx_pw_5_cdec_12CandidateSet_12add_kbest(PyObject *__pyx_v_se * from the hypergraph and add them to the candidate set.""" */ -static PyObject *__pyx_pf_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_hypergraph, unsigned int __pyx_v_k) { +static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hypergraph, unsigned int __pyx_v_k) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_kbest", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":98 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":98 * """cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses * from the hypergraph and add them to the candidate set.""" * self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get()) # <<<<<<<<<<<<<< @@ -16484,15 +16484,15 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_5_c } /* Python wrapper */ -static void __pyx_pw_5_cdec_16SegmentEvaluator_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_16SegmentEvaluator_1__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_16SegmentEvaluator___dealloc__(((struct __pyx_obj_5_cdec_SegmentEvaluator *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":104 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":104 * cdef mteval.EvaluationMetric* metric * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16500,11 +16500,11 @@ static void __pyx_pw_5_cdec_16SegmentEvaluator_1__dealloc__(PyObject *__pyx_v_se * */ -static void __pyx_pf_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_SegmentEvaluator *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":105 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":105 * * def __dealloc__(self): * del self.scorer # <<<<<<<<<<<<<< @@ -16517,18 +16517,18 @@ static void __pyx_pf_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED struct } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_16SegmentEvaluator_3evaluate(PyObject *__pyx_v_self, PyObject *__pyx_v_sentence); /*proto*/ -static char __pyx_doc_5_cdec_16SegmentEvaluator_2evaluate[] = "se.evaluate(sentence) -> SufficientStats for the given hypothesis."; -static PyObject *__pyx_pw_5_cdec_16SegmentEvaluator_3evaluate(PyObject *__pyx_v_self, PyObject *__pyx_v_sentence) { +static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate(PyObject *__pyx_v_self, PyObject *__pyx_v_sentence); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_16SegmentEvaluator_2evaluate[] = "se.evaluate(sentence) -> SufficientStats for the given hypothesis."; +static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate(PyObject *__pyx_v_self, PyObject *__pyx_v_sentence) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("evaluate (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(((struct __pyx_obj_5_cdec_SegmentEvaluator *)__pyx_v_self), ((PyObject *)__pyx_v_sentence)); + __pyx_r = __pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_v_self), ((PyObject *)__pyx_v_sentence)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":107 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":107 * del self.scorer * * def evaluate(self, sentence): # <<<<<<<<<<<<<< @@ -16536,9 +16536,9 @@ static PyObject *__pyx_pw_5_cdec_16SegmentEvaluator_3evaluate(PyObject *__pyx_v_ * cdef vector[WordID] hyp */ -static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5_cdec_SegmentEvaluator *__pyx_v_self, PyObject *__pyx_v_sentence) { +static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self, PyObject *__pyx_v_sentence) { std::vector<WordID> __pyx_v_hyp; - struct __pyx_obj_5_cdec_SufficientStats *__pyx_v_sf = 0; + struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_sf = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -16550,19 +16550,19 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("evaluate", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":110 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":110 * """se.evaluate(sentence) -> SufficientStats for the given hypothesis.""" * cdef vector[WordID] hyp * cdef SufficientStats sf = SufficientStats() # <<<<<<<<<<<<<< * sf.metric = self.metric * sf.stats = new mteval.SufficientStats() */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_v_sf = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_t_1); + __pyx_v_sf = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":111 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":111 * cdef vector[WordID] hyp * cdef SufficientStats sf = SufficientStats() * sf.metric = self.metric # <<<<<<<<<<<<<< @@ -16572,7 +16572,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5 __pyx_t_2 = __pyx_v_self->metric; __pyx_v_sf->metric = __pyx_t_2; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":112 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":112 * cdef SufficientStats sf = SufficientStats() * sf.metric = self.metric * sf.stats = new mteval.SufficientStats() # <<<<<<<<<<<<<< @@ -16581,7 +16581,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5 */ __pyx_v_sf->stats = new SufficientStats(); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":113 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":113 * sf.metric = self.metric * sf.stats = new mteval.SufficientStats() * ConvertSentence(as_str(sentence.strip()), &hyp) # <<<<<<<<<<<<<< @@ -16593,14 +16593,14 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = ((PyObject *)__pyx_f_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_convert_string_from_py_(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; TD::ConvertSentence(__pyx_t_4, (&__pyx_v_hyp)); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":114 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":114 * sf.stats = new mteval.SufficientStats() * ConvertSentence(as_str(sentence.strip()), &hyp) * self.scorer.get().Evaluate(hyp, sf.stats) # <<<<<<<<<<<<<< @@ -16609,7 +16609,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5 */ __pyx_v_self->scorer->get()->Evaluate(__pyx_v_hyp, __pyx_v_sf->stats); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":115 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":115 * ConvertSentence(as_str(sentence.strip()), &hyp) * self.scorer.get().Evaluate(hyp, sf.stats) * return sf # <<<<<<<<<<<<<< @@ -16626,7 +16626,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5 __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("_cdec.SegmentEvaluator.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SegmentEvaluator.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_sf); @@ -16636,18 +16636,18 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5 } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_16SegmentEvaluator_5candidate_set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_5_cdec_16SegmentEvaluator_4candidate_set[] = "se.candidate_set() -> Candidate set using this segment evaluator for scoring."; -static PyObject *__pyx_pw_5_cdec_16SegmentEvaluator_5candidate_set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_16SegmentEvaluator_4candidate_set[] = "se.candidate_set() -> Candidate set using this segment evaluator for scoring."; +static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("candidate_set (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_16SegmentEvaluator_4candidate_set(((struct __pyx_obj_5_cdec_SegmentEvaluator *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":117 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":117 * return sf * * def candidate_set(self): # <<<<<<<<<<<<<< @@ -16655,7 +16655,7 @@ static PyObject *__pyx_pw_5_cdec_16SegmentEvaluator_5candidate_set(PyObject *__p * return CandidateSet(self) */ -static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_obj_5_cdec_SegmentEvaluator *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -16665,7 +16665,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("candidate_set", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":119 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":119 * def candidate_set(self): * """se.candidate_set() -> Candidate set using this segment evaluator for scoring.""" * return CandidateSet(self) # <<<<<<<<<<<<<< @@ -16678,7 +16678,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_ __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_CandidateSet)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_CandidateSet)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -16690,7 +16690,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.SegmentEvaluator.candidate_set", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.SegmentEvaluator.candidate_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -16699,8 +16699,8 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_ } /* Python wrapper */ -static int __pyx_pw_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -16712,7 +16712,7 @@ static int __pyx_pw_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject * static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,0}; PyObject* values[1] = {0}; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":125 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":125 * cdef mteval.EvaluationMetric* metric * * def __cinit__(self, bytes name=None): # <<<<<<<<<<<<<< @@ -16752,12 +16752,12 @@ static int __pyx_pw_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject * __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.Scorer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Scorer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyBytes_Type), 1, "name", 1))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_pf_5_cdec_6Scorer___cinit__(((struct __pyx_obj_5_cdec_Scorer *)__pyx_v_self), __pyx_v_name); + __pyx_r = __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self), __pyx_v_name); goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -16766,7 +16766,7 @@ static int __pyx_pw_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject * return __pyx_r; } -static int __pyx_pf_5_cdec_6Scorer___cinit__(struct __pyx_obj_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_name) { +static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -16777,7 +16777,7 @@ static int __pyx_pf_5_cdec_6Scorer___cinit__(struct __pyx_obj_5_cdec_Scorer *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":126 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":126 * * def __cinit__(self, bytes name=None): * if name: # <<<<<<<<<<<<<< @@ -16787,7 +16787,7 @@ static int __pyx_pf_5_cdec_6Scorer___cinit__(struct __pyx_obj_5_cdec_Scorer *__p __pyx_t_1 = (((PyObject *)__pyx_v_name) != Py_None) && (PyBytes_GET_SIZE(((PyObject *)__pyx_v_name)) != 0); if (__pyx_t_1) { - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":127 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":127 * def __cinit__(self, bytes name=None): * if name: * self.name = new string(name) # <<<<<<<<<<<<<< @@ -16803,7 +16803,7 @@ static int __pyx_pf_5_cdec_6Scorer___cinit__(struct __pyx_obj_5_cdec_Scorer *__p } __pyx_v_self->name = __pyx_t_3; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":128 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":128 * if name: * self.name = new string(name) * self.metric = mteval.MetricInstance(self.name[0]) # <<<<<<<<<<<<<< @@ -16818,7 +16818,7 @@ static int __pyx_pf_5_cdec_6Scorer___cinit__(struct __pyx_obj_5_cdec_Scorer *__p __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Scorer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Scorer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); @@ -16826,15 +16826,15 @@ static int __pyx_pf_5_cdec_6Scorer___cinit__(struct __pyx_obj_5_cdec_Scorer *__p } /* Python wrapper */ -static void __pyx_pw_5_cdec_6Scorer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_6Scorer_3__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_6Scorer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_6Scorer_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_6Scorer_2__dealloc__(((struct __pyx_obj_5_cdec_Scorer *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":130 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":130 * self.metric = mteval.MetricInstance(self.name[0]) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -16842,11 +16842,11 @@ static void __pyx_pw_5_cdec_6Scorer_3__dealloc__(PyObject *__pyx_v_self) { * */ -static void __pyx_pf_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_Scorer *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":131 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":131 * * def __dealloc__(self): * del self.name # <<<<<<<<<<<<<< @@ -16859,8 +16859,8 @@ static void __pyx_pf_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_refs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -16899,16 +16899,16 @@ static PyObject *__pyx_pw_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObj __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.Scorer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Scorer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_6Scorer_4__call__(((struct __pyx_obj_5_cdec_Scorer *)__pyx_v_self), __pyx_v_refs); + __pyx_r = __pyx_pf_4cdec_5_cdec_6Scorer_4__call__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self), __pyx_v_refs); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":133 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":133 * del self.name * * def __call__(self, refs): # <<<<<<<<<<<<<< @@ -16916,11 +16916,11 @@ static PyObject *__pyx_pw_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObj * refs = [refs] */ -static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_refs) { +static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_refs) { std::vector<std::vector<WordID> > *__pyx_v_refsv; std::vector<WordID> *__pyx_v_refv; PyObject *__pyx_v_ref = NULL; - struct __pyx_obj_5_cdec_SegmentEvaluator *__pyx_v_evaluator = 0; + struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_evaluator = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -16940,7 +16940,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score __Pyx_RefNannySetupContext("__call__", 0); __Pyx_INCREF(__pyx_v_refs); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":134 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":134 * * def __call__(self, refs): * if isinstance(refs, basestring): # <<<<<<<<<<<<<< @@ -16951,7 +16951,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":135 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":135 * def __call__(self, refs): * if isinstance(refs, basestring): * refs = [refs] # <<<<<<<<<<<<<< @@ -16970,7 +16970,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score } __pyx_L3:; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":136 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":136 * if isinstance(refs, basestring): * refs = [refs] * cdef vector[vector[WordID]]* refsv = new vector[vector[WordID]]() # <<<<<<<<<<<<<< @@ -16985,7 +16985,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score } __pyx_v_refsv = __pyx_t_4; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":138 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":138 * cdef vector[vector[WordID]]* refsv = new vector[vector[WordID]]() * cdef vector[WordID]* refv * for ref in refs: # <<<<<<<<<<<<<< @@ -17030,7 +17030,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score __pyx_v_ref = __pyx_t_7; __pyx_t_7 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":139 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":139 * cdef vector[WordID]* refv * for ref in refs: * refv = new vector[WordID]() # <<<<<<<<<<<<<< @@ -17045,7 +17045,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score } __pyx_v_refv = __pyx_t_8; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":140 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":140 * for ref in refs: * refv = new vector[WordID]() * ConvertSentence(as_str(ref.strip()), refv) # <<<<<<<<<<<<<< @@ -17057,14 +17057,14 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score __pyx_t_9 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = ((PyObject *)__pyx_f_5_cdec_as_str(__pyx_t_9, NULL)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_9, NULL)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = __pyx_convert_string_from_py_(__pyx_t_7); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; TD::ConvertSentence(__pyx_t_10, __pyx_v_refv); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":141 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":141 * refv = new vector[WordID]() * ConvertSentence(as_str(ref.strip()), refv) * refsv.push_back(refv[0]) # <<<<<<<<<<<<<< @@ -17073,7 +17073,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score */ __pyx_v_refsv->push_back((__pyx_v_refv[0])); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":142 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":142 * ConvertSentence(as_str(ref.strip()), refv) * refsv.push_back(refv[0]) * del refv # <<<<<<<<<<<<<< @@ -17084,19 +17084,19 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":144 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":144 * del refv * cdef unsigned i * cdef SegmentEvaluator evaluator = SegmentEvaluator() # <<<<<<<<<<<<<< * evaluator.metric = self.metric * evaluator.scorer = new shared_ptr[mteval.SegmentEvaluator]( */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_SegmentEvaluator)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SegmentEvaluator)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_v_evaluator = ((struct __pyx_obj_5_cdec_SegmentEvaluator *)__pyx_t_3); + __pyx_v_evaluator = ((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":145 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":145 * cdef unsigned i * cdef SegmentEvaluator evaluator = SegmentEvaluator() * evaluator.metric = self.metric # <<<<<<<<<<<<<< @@ -17106,7 +17106,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score __pyx_t_11 = __pyx_v_self->metric; __pyx_v_evaluator->metric = __pyx_t_11; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":146 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":146 * cdef SegmentEvaluator evaluator = SegmentEvaluator() * evaluator.metric = self.metric * evaluator.scorer = new shared_ptr[mteval.SegmentEvaluator]( # <<<<<<<<<<<<<< @@ -17115,7 +17115,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score */ __pyx_v_evaluator->scorer = new boost::shared_ptr<SegmentEvaluator>(__pyx_v_self->metric->CreateSegmentEvaluator((__pyx_v_refsv[0]))); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":148 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":148 * evaluator.scorer = new shared_ptr[mteval.SegmentEvaluator]( * self.metric.CreateSegmentEvaluator(refsv[0])) * del refsv # in theory should not delete but store in SegmentEvaluator # <<<<<<<<<<<<<< @@ -17124,7 +17124,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score */ delete __pyx_v_refsv; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":149 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":149 * self.metric.CreateSegmentEvaluator(refsv[0])) * del refsv # in theory should not delete but store in SegmentEvaluator * return evaluator # <<<<<<<<<<<<<< @@ -17142,7 +17142,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("_cdec.Scorer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Scorer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ref); @@ -17154,17 +17154,17 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_6Scorer_6__str__(((struct __pyx_obj_5_cdec_Scorer *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_6Scorer_6__str__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":151 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":151 * return evaluator * * def __str__(self): # <<<<<<<<<<<<<< @@ -17172,7 +17172,7 @@ static PyObject *__pyx_pw_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self) { * */ -static PyObject *__pyx_pf_5_cdec_6Scorer_6__str__(struct __pyx_obj_5_cdec_Scorer *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -17182,7 +17182,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_6__str__(struct __pyx_obj_5_cdec_Scorer int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":152 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":152 * * def __str__(self): * return str(self.name.c_str()) # <<<<<<<<<<<<<< @@ -17209,7 +17209,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_6__str__(struct __pyx_obj_5_cdec_Scorer __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Scorer.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Scorer.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -17217,7 +17217,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_6__str__(struct __pyx_obj_5_cdec_Scorer return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":154 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":154 * return str(self.name.c_str()) * * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): # <<<<<<<<<<<<<< @@ -17225,8 +17225,8 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_6__str__(struct __pyx_obj_5_cdec_Scorer * cdef list ss = [] */ -static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStats *__pyx_v_stats) { - struct __pyx_obj_5_cdec_Metric *__pyx_v_metric = 0; +static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStats *__pyx_v_stats) { + struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_metric = 0; PyObject *__pyx_v_ss = 0; unsigned int __pyx_v_i; float __pyx_r; @@ -17243,17 +17243,17 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compute_score", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":155 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":155 * * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): * cdef Metric metric = <Metric> metric_ # <<<<<<<<<<<<<< * cdef list ss = [] * cdef unsigned i */ - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_5_cdec_Metric *)__pyx_v_metric_))); - __pyx_v_metric = ((struct __pyx_obj_5_cdec_Metric *)__pyx_v_metric_); + __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_))); + __pyx_v_metric = ((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":156 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":156 * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): * cdef Metric metric = <Metric> metric_ * cdef list ss = [] # <<<<<<<<<<<<<< @@ -17265,7 +17265,7 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat __pyx_v_ss = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":158 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":158 * cdef list ss = [] * cdef unsigned i * for i in range(stats.size()): # <<<<<<<<<<<<<< @@ -17276,7 +17276,7 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat 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/mteval.pxi":159 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":159 * cdef unsigned i * for i in range(stats.size()): * ss.append(stats[0][i]) # <<<<<<<<<<<<<< @@ -17289,7 +17289,7 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":160 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":160 * for i in range(stats.size()): * ss.append(stats[0][i]) * return metric.score(ss) # <<<<<<<<<<<<<< @@ -17318,7 +17318,7 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_WriteUnraisable("_cdec._compute_score", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_WriteUnraisable("cdec._cdec._compute_score", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_metric); @@ -17327,7 +17327,7 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":162 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":162 * return metric.score(ss) * * cdef void _compute_sufficient_stats(void* metric_, # <<<<<<<<<<<<<< @@ -17335,8 +17335,8 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat * vector[string]* refs, */ -static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std::string *__pyx_v_hyp, std::vector<std::string> *__pyx_v_refs, SufficientStats *__pyx_v_out) { - struct __pyx_obj_5_cdec_Metric *__pyx_v_metric = 0; +static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std::string *__pyx_v_hyp, std::vector<std::string> *__pyx_v_refs, SufficientStats *__pyx_v_out) { + struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_metric = 0; PyObject *__pyx_v_refs_ = 0; unsigned int __pyx_v_i; PyObject *__pyx_v_ss = 0; @@ -17354,17 +17354,17 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std: int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compute_sufficient_stats", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":166 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":166 * vector[string]* refs, * mteval.SufficientStats* out): * cdef Metric metric = <Metric> metric_ # <<<<<<<<<<<<<< * cdef list refs_ = [] * cdef unsigned i */ - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_5_cdec_Metric *)__pyx_v_metric_))); - __pyx_v_metric = ((struct __pyx_obj_5_cdec_Metric *)__pyx_v_metric_); + __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_))); + __pyx_v_metric = ((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":167 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":167 * mteval.SufficientStats* out): * cdef Metric metric = <Metric> metric_ * cdef list refs_ = [] # <<<<<<<<<<<<<< @@ -17376,7 +17376,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std: __pyx_v_refs_ = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":169 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":169 * cdef list refs_ = [] * cdef unsigned i * for i in range(refs.size()): # <<<<<<<<<<<<<< @@ -17387,7 +17387,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std: 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/mteval.pxi":170 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":170 * cdef unsigned i * for i in range(refs.size()): * refs_.append(str(refs[0][i].c_str())) # <<<<<<<<<<<<<< @@ -17408,7 +17408,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std: __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":171 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":171 * for i in range(refs.size()): * refs_.append(str(refs[0][i].c_str())) * cdef list ss = metric.evaluate(str(hyp.c_str()), refs_) # <<<<<<<<<<<<<< @@ -17443,7 +17443,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std: __pyx_v_ss = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":172 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":172 * refs_.append(str(refs[0][i].c_str())) * cdef list ss = metric.evaluate(str(hyp.c_str()), refs_) * out.fields.resize(len(ss)) # <<<<<<<<<<<<<< @@ -17457,7 +17457,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std: __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_ss)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_out->fields.resize(__pyx_t_7); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":173 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":173 * cdef list ss = metric.evaluate(str(hyp.c_str()), refs_) * out.fields.resize(len(ss)) * for i in range(len(ss)): # <<<<<<<<<<<<<< @@ -17472,7 +17472,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std: for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_7; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":174 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":174 * out.fields.resize(len(ss)) * for i in range(len(ss)): * out.fields[i] = ss[i] # <<<<<<<<<<<<<< @@ -17495,7 +17495,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std: __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); - __Pyx_WriteUnraisable("_cdec._compute_sufficient_stats", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_WriteUnraisable("cdec._cdec._compute_sufficient_stats", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_metric); __Pyx_XDECREF(__pyx_v_refs_); @@ -17504,20 +17504,20 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std: } /* Python wrapper */ -static int __pyx_pw_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { 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_5_cdec_6Metric___cinit__(((struct __pyx_obj_5_cdec_Metric *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric___cinit__(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":178 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":178 * cdef class Metric: * cdef Scorer scorer * def __cinit__(self): # <<<<<<<<<<<<<< @@ -17525,7 +17525,7 @@ static int __pyx_pw_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyObject * * cdef bytes class_name = self.__class__.__name__ */ -static int __pyx_pf_5_cdec_6Metric___cinit__(struct __pyx_obj_5_cdec_Metric *__pyx_v_self) { +static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self) { PyObject *__pyx_v_class_name = 0; int __pyx_r; __Pyx_RefNannyDeclarations @@ -17538,22 +17538,22 @@ static int __pyx_pf_5_cdec_6Metric___cinit__(struct __pyx_obj_5_cdec_Metric *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":179 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":179 * cdef Scorer scorer * def __cinit__(self): * self.scorer = Scorer() # <<<<<<<<<<<<<< * cdef bytes class_name = self.__class__.__name__ * self.scorer.name = new string(class_name) */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_Scorer)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->scorer); __Pyx_DECREF(((PyObject *)__pyx_v_self->scorer)); - __pyx_v_self->scorer = ((struct __pyx_obj_5_cdec_Scorer *)__pyx_t_1); + __pyx_v_self->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":180 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":180 * def __cinit__(self): * self.scorer = Scorer() * cdef bytes class_name = self.__class__.__name__ # <<<<<<<<<<<<<< @@ -17569,7 +17569,7 @@ static int __pyx_pf_5_cdec_6Metric___cinit__(struct __pyx_obj_5_cdec_Metric *__p __pyx_v_class_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":181 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":181 * self.scorer = Scorer() * cdef bytes class_name = self.__class__.__name__ * self.scorer.name = new string(class_name) # <<<<<<<<<<<<<< @@ -17585,21 +17585,21 @@ static int __pyx_pf_5_cdec_6Metric___cinit__(struct __pyx_obj_5_cdec_Metric *__p } __pyx_v_self->scorer->name = __pyx_t_4; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":182 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":182 * cdef bytes class_name = self.__class__.__name__ * self.scorer.name = new string(class_name) * self.scorer.metric = mteval.PyMetricInstance(self.scorer.name[0], # <<<<<<<<<<<<<< * <void*> self, _compute_sufficient_stats, _compute_score) * */ - __pyx_v_self->scorer->metric = PythonEvaluationMetric::Instance((__pyx_v_self->scorer->name[0]), ((void *)__pyx_v_self), __pyx_f_5_cdec__compute_sufficient_stats, __pyx_f_5_cdec__compute_score); + __pyx_v_self->scorer->metric = PythonEvaluationMetric::Instance((__pyx_v_self->scorer->name[0]), ((void *)__pyx_v_self), __pyx_f_4cdec_5_cdec__compute_sufficient_stats, __pyx_f_4cdec_5_cdec__compute_score); __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Metric.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Metric.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_class_name); @@ -17608,8 +17608,8 @@ static int __pyx_pf_5_cdec_6Metric___cinit__(struct __pyx_obj_5_cdec_Metric *__p } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_refs = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -17648,16 +17648,16 @@ static PyObject *__pyx_pw_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObj __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.Metric.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Metric.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_6Metric_2__call__(((struct __pyx_obj_5_cdec_Metric *)__pyx_v_self), __pyx_v_refs); + __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric_2__call__(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_self), __pyx_v_refs); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":185 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":185 * <void*> self, _compute_sufficient_stats, _compute_score) * * def __call__(self, refs): # <<<<<<<<<<<<<< @@ -17665,7 +17665,7 @@ static PyObject *__pyx_pw_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObj * */ -static PyObject *__pyx_pf_5_cdec_6Metric_2__call__(struct __pyx_obj_5_cdec_Metric *__pyx_v_self, PyObject *__pyx_v_refs) { +static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_2__call__(struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self, PyObject *__pyx_v_refs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -17675,7 +17675,7 @@ static PyObject *__pyx_pf_5_cdec_6Metric_2__call__(struct __pyx_obj_5_cdec_Metri int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":186 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":186 * * def __call__(self, refs): * return self.scorer(refs) # <<<<<<<<<<<<<< @@ -17700,7 +17700,7 @@ static PyObject *__pyx_pf_5_cdec_6Metric_2__call__(struct __pyx_obj_5_cdec_Metri __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Metric.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Metric.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -17709,17 +17709,17 @@ static PyObject *__pyx_pf_5_cdec_6Metric_2__call__(struct __pyx_obj_5_cdec_Metri } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("score (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_6Metric_4score(((struct __pyx_obj_5_cdec_Metric *)__pyx_v_stats)); + __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric_4score(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_stats)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":188 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":188 * return self.scorer(refs) * * def score(SufficientStats stats): # <<<<<<<<<<<<<< @@ -17727,12 +17727,12 @@ static PyObject *__pyx_pw_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, CYTHON_ * */ -static PyObject *__pyx_pf_5_cdec_6Metric_4score(CYTHON_UNUSED struct __pyx_obj_5_cdec_Metric *__pyx_v_stats) { +static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_4score(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_stats) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("score", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":189 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":189 * * def score(SufficientStats stats): * return 0 # <<<<<<<<<<<<<< @@ -17752,8 +17752,8 @@ static PyObject *__pyx_pf_5_cdec_6Metric_4score(CYTHON_UNUSED struct __pyx_obj_5 } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_hyp = 0; CYTHON_UNUSED PyObject *__pyx_v_refs = 0; int __pyx_lineno = 0; @@ -17801,16 +17801,16 @@ static PyObject *__pyx_pw_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObj __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("evaluate", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.Metric.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Metric.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_6Metric_6evaluate(((struct __pyx_obj_5_cdec_Metric *)__pyx_v_self), __pyx_v_hyp, __pyx_v_refs); + __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric_6evaluate(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_self), __pyx_v_hyp, __pyx_v_refs); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":191 +/* "/home/mdenkows/cdec/python/cdec/mteval.pxi":191 * return 0 * * def evaluate(self, hyp, refs): # <<<<<<<<<<<<<< @@ -17818,7 +17818,7 @@ static PyObject *__pyx_pw_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObj * */ -static PyObject *__pyx_pf_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __pyx_obj_5_cdec_Metric *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_hyp, CYTHON_UNUSED PyObject *__pyx_v_refs) { +static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_hyp, CYTHON_UNUSED PyObject *__pyx_v_refs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -17827,7 +17827,7 @@ static PyObject *__pyx_pf_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("evaluate", 0); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":192 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":192 * * def evaluate(self, hyp, refs): * return [] # <<<<<<<<<<<<<< @@ -17845,7 +17845,7 @@ static PyObject *__pyx_pf_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __pyx_ob goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_cdec.Metric.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Metric.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -17854,19 +17854,19 @@ static PyObject *__pyx_pf_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __pyx_ob } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_3set_silent(PyObject *__pyx_self, PyObject *__pyx_v_yn); /*proto*/ -static char __pyx_doc_5_cdec_2set_silent[] = "set_silent(bool): Configure the verbosity of cdec."; -static PyMethodDef __pyx_mdef_5_cdec_3set_silent = {__Pyx_NAMESTR("set_silent"), (PyCFunction)__pyx_pw_5_cdec_3set_silent, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_2set_silent)}; -static PyObject *__pyx_pw_5_cdec_3set_silent(PyObject *__pyx_self, PyObject *__pyx_v_yn) { +static PyObject *__pyx_pw_4cdec_5_cdec_3set_silent(PyObject *__pyx_self, PyObject *__pyx_v_yn); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_2set_silent[] = "set_silent(bool): Configure the verbosity of cdec."; +static PyMethodDef __pyx_mdef_4cdec_5_cdec_3set_silent = {__Pyx_NAMESTR("set_silent"), (PyCFunction)__pyx_pw_4cdec_5_cdec_3set_silent, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_2set_silent)}; +static PyObject *__pyx_pw_4cdec_5_cdec_3set_silent(PyObject *__pyx_self, PyObject *__pyx_v_yn) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_silent (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_2set_silent(__pyx_self, ((PyObject *)__pyx_v_yn)); + __pyx_r = __pyx_pf_4cdec_5_cdec_2set_silent(__pyx_self, ((PyObject *)__pyx_v_yn)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_cdec.pyx":28 +/* "cdec/_cdec.pyx":28 * class ParseFailed(Exception): pass * * def set_silent(yn): # <<<<<<<<<<<<<< @@ -17874,7 +17874,7 @@ static PyObject *__pyx_pw_5_cdec_3set_silent(PyObject *__pyx_self, PyObject *__p * SetSilent(yn) */ -static PyObject *__pyx_pf_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_yn) { +static PyObject *__pyx_pf_4cdec_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_yn) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -17883,7 +17883,7 @@ static PyObject *__pyx_pf_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_silent", 0); - /* "_cdec.pyx":30 + /* "cdec/_cdec.pyx":30 * def set_silent(yn): * """set_silent(bool): Configure the verbosity of cdec.""" * SetSilent(yn) # <<<<<<<<<<<<<< @@ -17896,28 +17896,28 @@ static PyObject *__pyx_pf_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx_self, __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.set_silent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.set_silent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_5_make_config(PyObject *__pyx_self, PyObject *__pyx_v_config); /*proto*/ -static PyMethodDef __pyx_mdef_5_cdec_5_make_config = {__Pyx_NAMESTR("_make_config"), (PyCFunction)__pyx_pw_5_cdec_5_make_config, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pw_5_cdec_5_make_config(PyObject *__pyx_self, PyObject *__pyx_v_config) { +static PyObject *__pyx_pw_4cdec_5_cdec_5_make_config(PyObject *__pyx_self, PyObject *__pyx_v_config); /*proto*/ +static PyMethodDef __pyx_mdef_4cdec_5_cdec_5_make_config = {__Pyx_NAMESTR("_make_config"), (PyCFunction)__pyx_pw_4cdec_5_cdec_5_make_config, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_4cdec_5_cdec_5_make_config(PyObject *__pyx_self, PyObject *__pyx_v_config) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_make_config (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_4_make_config(__pyx_self, ((PyObject *)__pyx_v_config)); + __pyx_r = __pyx_pf_4cdec_5_cdec_4_make_config(__pyx_self, ((PyObject *)__pyx_v_config)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_cdec.pyx":32 +/* "cdec/_cdec.pyx":32 * SetSilent(yn) * * def _make_config(config): # <<<<<<<<<<<<<< @@ -17925,15 +17925,15 @@ static PyObject *__pyx_pw_5_cdec_5_make_config(PyObject *__pyx_self, PyObject *_ * if isinstance(value, dict): */ -static PyObject *__pyx_pf_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config) { - struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_config", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *)__pyx_tp_new_5_cdec___pyx_scope_struct_23__make_config(__pyx_ptype_5_cdec___pyx_scope_struct_23__make_config, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23__make_config, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -17943,7 +17943,7 @@ static PyObject *__pyx_pf_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_INCREF(__pyx_cur_scope->__pyx_v_config); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_config); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5_cdec_6generator17, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_6generator17, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -17952,7 +17952,7 @@ static PyObject *__pyx_pf_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_sel __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec._make_config", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec._make_config", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -17961,9 +17961,9 @@ static PyObject *__pyx_pf_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -17995,7 +17995,7 @@ static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_gener __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_cdec.pyx":33 + /* "cdec/_cdec.pyx":33 * * def _make_config(config): * for key, value in config.items(): # <<<<<<<<<<<<<< @@ -18104,7 +18104,7 @@ static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_gener __pyx_cur_scope->__pyx_v_value = __pyx_t_6; __pyx_t_6 = 0; - /* "_cdec.pyx":34 + /* "cdec/_cdec.pyx":34 * def _make_config(config): * for key, value in config.items(): * if isinstance(value, dict): # <<<<<<<<<<<<<< @@ -18115,7 +18115,7 @@ static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_gener __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "_cdec.pyx":35 + /* "cdec/_cdec.pyx":35 * for key, value in config.items(): * if isinstance(value, dict): * for name, info in value.items(): # <<<<<<<<<<<<<< @@ -18224,7 +18224,7 @@ static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_gener __pyx_cur_scope->__pyx_v_info = __pyx_t_7; __pyx_t_7 = 0; - /* "_cdec.pyx":36 + /* "cdec/_cdec.pyx":36 * if isinstance(value, dict): * for name, info in value.items(): * yield key, '%s %s' % (name, info) # <<<<<<<<<<<<<< @@ -18239,7 +18239,7 @@ static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_gener __Pyx_INCREF(__pyx_cur_scope->__pyx_v_info); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_v_info); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_info); - __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_45), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_7)); __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -18282,7 +18282,7 @@ static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_gener goto __pyx_L8; } - /* "_cdec.pyx":37 + /* "cdec/_cdec.pyx":37 * for name, info in value.items(): * yield key, '%s %s' % (name, info) * elif isinstance(value, list): # <<<<<<<<<<<<<< @@ -18293,7 +18293,7 @@ static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_gener __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "_cdec.pyx":38 + /* "cdec/_cdec.pyx":38 * yield key, '%s %s' % (name, info) * elif isinstance(value, list): * for name in value: # <<<<<<<<<<<<<< @@ -18340,7 +18340,7 @@ static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_gener __pyx_cur_scope->__pyx_v_name = __pyx_t_6; __pyx_t_6 = 0; - /* "_cdec.pyx":39 + /* "cdec/_cdec.pyx":39 * elif isinstance(value, list): * for name in value: * yield key, name # <<<<<<<<<<<<<< @@ -18388,7 +18388,7 @@ static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_gener } /*else*/ { - /* "_cdec.pyx":41 + /* "cdec/_cdec.pyx":41 * yield key, name * else: * yield key, str(value) # <<<<<<<<<<<<<< @@ -18452,12 +18452,12 @@ static PyObject *__pyx_gb_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_gener } /* Python wrapper */ -static int __pyx_pw_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_7Decoder___init__[] = "Decoder('formalism = scfg') -> initialize from configuration string\n Decoder(formalism='scfg') -> initialize from named parameters\n Create a decoder using a given configuration. Formalism is required."; +static int __pyx_pw_4cdec_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_7Decoder___init__[] = "Decoder('formalism = scfg') -> initialize from configuration string\n Decoder(formalism='scfg') -> initialize from named parameters\n Create a decoder using a given configuration. Formalism is required."; #if CYTHON_COMPILING_IN_CPYTHON -struct wrapperbase __pyx_wrapperbase_5_cdec_7Decoder___init__; +struct wrapperbase __pyx_wrapperbase_4cdec_5_cdec_7Decoder___init__; #endif -static int __pyx_pw_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pw_4cdec_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_config_str = 0; PyObject *__pyx_v_config = 0; int __pyx_lineno = 0; @@ -18472,7 +18472,7 @@ static int __pyx_pw_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyObject * static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__config_str,0}; PyObject* values[1] = {0}; - /* "_cdec.pyx":47 + /* "cdec/_cdec.pyx":47 * cdef DenseVector weights * * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< @@ -18513,18 +18513,18 @@ static int __pyx_pw_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyObject * __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_CLEAR(__pyx_v_config); - __Pyx_AddTraceback("_cdec.Decoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Decoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_7Decoder___init__(((struct __pyx_obj_5_cdec_Decoder *)__pyx_v_self), __pyx_v_config_str, __pyx_v_config); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder___init__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), __pyx_v_config_str, __pyx_v_config); __Pyx_XDECREF(__pyx_v_config); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_7Decoder_8__init___2generator21(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "_cdec.pyx":56 +/* "cdec/_cdec.pyx":56 * 'csplit', 'tagger', 'lexalign'): * raise InvalidConfig('formalism "%s" unknown' % formalism) * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) # <<<<<<<<<<<<<< @@ -18532,25 +18532,25 @@ static PyObject *__pyx_gb_5_cdec_7Decoder_8__init___2generator21(__pyx_Generator * self.dec = new decoder.Decoder(config_stream) */ -static PyObject *__pyx_pf_5_cdec_7Decoder_8__init___genexpr(PyObject *__pyx_self) { - struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *__pyx_cur_scope; +static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(PyObject *__pyx_self) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *__pyx_cur_scope; 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_5_cdec___pyx_scope_struct_25_genexpr *)__pyx_tp_new_5_cdec___pyx_scope_struct_25_genexpr(__pyx_ptype_5_cdec___pyx_scope_struct_25_genexpr, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5_cdec_7Decoder_8__init___2generator21, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -18559,7 +18559,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_8__init___genexpr(PyObject *__pyx_self __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("_cdec.Decoder.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Decoder.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -18568,9 +18568,9 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_8__init___genexpr(PyObject *__pyx_self return __pyx_r; } -static PyObject *__pyx_gb_5_cdec_7Decoder_8__init___2generator21(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -18643,7 +18643,7 @@ static PyObject *__pyx_gb_5_cdec_7Decoder_8__init___2generator21(__pyx_Generator __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_kv = __pyx_t_3; __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), __pyx_cur_scope->__pyx_v_kv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_47), __pyx_cur_scope->__pyx_v_kv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; @@ -18680,7 +18680,7 @@ static PyObject *__pyx_gb_5_cdec_7Decoder_8__init___2generator21(__pyx_Generator return NULL; } -/* "_cdec.pyx":47 +/* "cdec/_cdec.pyx":47 * cdef DenseVector weights * * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< @@ -18688,8 +18688,8 @@ static PyObject *__pyx_gb_5_cdec_7Decoder_8__init___2generator21(__pyx_Generator * Decoder(formalism='scfg') -> initialize from named parameters */ -static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_config_str, PyObject *__pyx_v_config) { - struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *__pyx_cur_scope; +static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_config_str, PyObject *__pyx_v_config) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *__pyx_cur_scope; PyObject *__pyx_v_formalism = NULL; std::istringstream *__pyx_v_config_stream; int __pyx_r; @@ -18705,7 +18705,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - __pyx_cur_scope = (struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *)__pyx_tp_new_5_cdec___pyx_scope_struct_24___init__(__pyx_ptype_5_cdec___pyx_scope_struct_24___init__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___init__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return -1; @@ -18716,7 +18716,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_config); __Pyx_INCREF(__pyx_v_config_str); - /* "_cdec.pyx":51 + /* "cdec/_cdec.pyx":51 * Decoder(formalism='scfg') -> initialize from named parameters * Create a decoder using a given configuration. Formalism is required.""" * if config_str is None: # <<<<<<<<<<<<<< @@ -18727,7 +18727,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_cdec.pyx":52 + /* "cdec/_cdec.pyx":52 * Create a decoder using a given configuration. Formalism is required.""" * if config_str is None: * formalism = config.get('formalism', None) # <<<<<<<<<<<<<< @@ -18739,7 +18739,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ __pyx_v_formalism = __pyx_t_3; __pyx_t_3 = 0; - /* "_cdec.pyx":53 + /* "cdec/_cdec.pyx":53 * if config_str is None: * formalism = config.get('formalism', None) * if formalism not in ('scfg', 'fst', 'lextrans', 'pb', # <<<<<<<<<<<<<< @@ -18803,7 +18803,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "_cdec.pyx":55 + /* "cdec/_cdec.pyx":55 * if formalism not in ('scfg', 'fst', 'lextrans', 'pb', * 'csplit', 'tagger', 'lexalign'): * raise InvalidConfig('formalism "%s" unknown' % formalism) # <<<<<<<<<<<<<< @@ -18812,7 +18812,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ */ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__InvalidConfig); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_47), __pyx_v_formalism); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_48), __pyx_v_formalism); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); @@ -18830,16 +18830,16 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ } __pyx_L4:; - /* "_cdec.pyx":56 + /* "cdec/_cdec.pyx":56 * 'csplit', 'tagger', 'lexalign'): * raise InvalidConfig('formalism "%s" unknown' % formalism) * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) # <<<<<<<<<<<<<< * cdef istringstream* config_stream = new istringstream(config_str) * self.dec = new decoder.Decoder(config_stream) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_39), __pyx_n_s__join); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_40), __pyx_n_s__join); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __pyx_pf_5_cdec_7Decoder_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -18857,7 +18857,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ } __pyx_L3:; - /* "_cdec.pyx":57 + /* "cdec/_cdec.pyx":57 * raise InvalidConfig('formalism "%s" unknown' % formalism) * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) * cdef istringstream* config_stream = new istringstream(config_str) # <<<<<<<<<<<<<< @@ -18867,7 +18867,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_config_str); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_config_stream = new std::istringstream(__pyx_t_7); - /* "_cdec.pyx":58 + /* "cdec/_cdec.pyx":58 * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) * cdef istringstream* config_stream = new istringstream(config_str) * self.dec = new decoder.Decoder(config_stream) # <<<<<<<<<<<<<< @@ -18876,7 +18876,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ */ __pyx_v_self->dec = new Decoder(__pyx_v_config_stream); - /* "_cdec.pyx":59 + /* "cdec/_cdec.pyx":59 * cdef istringstream* config_stream = new istringstream(config_str) * self.dec = new decoder.Decoder(config_stream) * del config_stream # <<<<<<<<<<<<<< @@ -18885,23 +18885,23 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ */ delete __pyx_v_config_stream; - /* "_cdec.pyx":60 + /* "cdec/_cdec.pyx":60 * self.dec = new decoder.Decoder(config_stream) * del config_stream * self.weights = DenseVector.__new__(DenseVector) # <<<<<<<<<<<<<< * self.weights.vector = &self.dec.CurrentWeightVector() * self.weights.owned = True */ - __pyx_t_6 = __pyx_tp_new_5_cdec_DenseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_5_cdec_DenseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_tp_new_4cdec_5_cdec_DenseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_DenseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5_cdec_DenseVector)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4cdec_5_cdec_DenseVector)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->weights); __Pyx_DECREF(((PyObject *)__pyx_v_self->weights)); - __pyx_v_self->weights = ((struct __pyx_obj_5_cdec_DenseVector *)__pyx_t_6); + __pyx_v_self->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_t_6); __pyx_t_6 = 0; - /* "_cdec.pyx":61 + /* "cdec/_cdec.pyx":61 * del config_stream * self.weights = DenseVector.__new__(DenseVector) * self.weights.vector = &self.dec.CurrentWeightVector() # <<<<<<<<<<<<<< @@ -18910,7 +18910,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ */ __pyx_v_self->weights->vector = (&__pyx_v_self->dec->CurrentWeightVector()); - /* "_cdec.pyx":62 + /* "cdec/_cdec.pyx":62 * self.weights = DenseVector.__new__(DenseVector) * self.weights.vector = &self.dec.CurrentWeightVector() * self.weights.owned = True # <<<<<<<<<<<<<< @@ -18925,7 +18925,7 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("_cdec.Decoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Decoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_formalism); @@ -18936,15 +18936,15 @@ static int __pyx_pf_5_cdec_7Decoder___init__(struct __pyx_obj_5_cdec_Decoder *__ } /* Python wrapper */ -static void __pyx_pw_5_cdec_7Decoder_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5_cdec_7Decoder_3__dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5_cdec_7Decoder_2__dealloc__(((struct __pyx_obj_5_cdec_Decoder *)__pyx_v_self)); + __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); } -/* "_cdec.pyx":64 +/* "cdec/_cdec.pyx":64 * self.weights.owned = True * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -18952,11 +18952,11 @@ static void __pyx_pw_5_cdec_7Decoder_3__dealloc__(PyObject *__pyx_v_self) { * */ -static void __pyx_pf_5_cdec_7Decoder_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5_cdec_Decoder *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "_cdec.pyx":65 + /* "cdec/_cdec.pyx":65 * * def __dealloc__(self): * del self.dec # <<<<<<<<<<<<<< @@ -18969,17 +18969,17 @@ static void __pyx_pf_5_cdec_7Decoder_2__dealloc__(CYTHON_UNUSED struct __pyx_obj } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Decoder_7weights_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_7Decoder_7weights_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Decoder_7weights___get__(((struct __pyx_obj_5_cdec_Decoder *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_cdec.pyx":68 +/* "cdec/_cdec.pyx":68 * * property weights: * def __get__(self): # <<<<<<<<<<<<<< @@ -18987,12 +18987,12 @@ static PyObject *__pyx_pw_5_cdec_7Decoder_7weights_1__get__(PyObject *__pyx_v_se * */ -static PyObject *__pyx_pf_5_cdec_7Decoder_7weights___get__(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "_cdec.pyx":69 + /* "cdec/_cdec.pyx":69 * property weights: * def __get__(self): * return self.weights # <<<<<<<<<<<<<< @@ -19012,17 +19012,17 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_7weights___get__(struct __pyx_obj_5_cd } /* Python wrapper */ -static int __pyx_pw_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ -static int __pyx_pw_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_weights) { +static int __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ +static int __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_weights) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Decoder_7weights_2__set__(((struct __pyx_obj_5_cdec_Decoder *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_cdec.pyx":71 +/* "cdec/_cdec.pyx":71 * return self.weights * * def __set__(self, weights): # <<<<<<<<<<<<<< @@ -19030,7 +19030,7 @@ static int __pyx_pw_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_self, Py * self.weights.vector[0] = (<DenseVector> weights).vector[0] */ -static int __pyx_pf_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights) { +static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_v_fname = NULL; PyObject *__pyx_v_fval = NULL; int __pyx_r; @@ -19050,51 +19050,51 @@ static int __pyx_pf_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_5_cdec_De int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "_cdec.pyx":72 + /* "cdec/_cdec.pyx":72 * * def __set__(self, weights): * if isinstance(weights, DenseVector): # <<<<<<<<<<<<<< * self.weights.vector[0] = (<DenseVector> weights).vector[0] * elif isinstance(weights, SparseVector): */ - __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_weights, ((PyObject*)__pyx_ptype_5_cdec_DenseVector)); + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_weights, ((PyObject*)__pyx_ptype_4cdec_5_cdec_DenseVector)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_cdec.pyx":73 + /* "cdec/_cdec.pyx":73 * def __set__(self, weights): * if isinstance(weights, DenseVector): * self.weights.vector[0] = (<DenseVector> weights).vector[0] # <<<<<<<<<<<<<< * elif isinstance(weights, SparseVector): * ((<SparseVector> weights).vector[0]).init_vector(self.weights.vector) */ - (__pyx_v_self->weights->vector[0]) = (((struct __pyx_obj_5_cdec_DenseVector *)__pyx_v_weights)->vector[0]); + (__pyx_v_self->weights->vector[0]) = (((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_weights)->vector[0]); goto __pyx_L3; } - /* "_cdec.pyx":74 + /* "cdec/_cdec.pyx":74 * if isinstance(weights, DenseVector): * self.weights.vector[0] = (<DenseVector> weights).vector[0] * elif isinstance(weights, SparseVector): # <<<<<<<<<<<<<< * ((<SparseVector> weights).vector[0]).init_vector(self.weights.vector) * elif isinstance(weights, dict): */ - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_weights, ((PyObject*)__pyx_ptype_5_cdec_SparseVector)); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_weights, ((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "_cdec.pyx":75 + /* "cdec/_cdec.pyx":75 * self.weights.vector[0] = (<DenseVector> weights).vector[0] * elif isinstance(weights, SparseVector): * ((<SparseVector> weights).vector[0]).init_vector(self.weights.vector) # <<<<<<<<<<<<<< * elif isinstance(weights, dict): * self.weights.vector.clear() */ - (((struct __pyx_obj_5_cdec_SparseVector *)__pyx_v_weights)->vector[0]).init_vector(__pyx_v_self->weights->vector); + (((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_weights)->vector[0]).init_vector(__pyx_v_self->weights->vector); goto __pyx_L3; } - /* "_cdec.pyx":76 + /* "cdec/_cdec.pyx":76 * elif isinstance(weights, SparseVector): * ((<SparseVector> weights).vector[0]).init_vector(self.weights.vector) * elif isinstance(weights, dict): # <<<<<<<<<<<<<< @@ -19105,7 +19105,7 @@ static int __pyx_pf_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_5_cdec_De __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_cdec.pyx":77 + /* "cdec/_cdec.pyx":77 * ((<SparseVector> weights).vector[0]).init_vector(self.weights.vector) * elif isinstance(weights, dict): * self.weights.vector.clear() # <<<<<<<<<<<<<< @@ -19114,7 +19114,7 @@ static int __pyx_pf_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_5_cdec_De */ __pyx_v_self->weights->vector->clear(); - /* "_cdec.pyx":78 + /* "cdec/_cdec.pyx":78 * elif isinstance(weights, dict): * self.weights.vector.clear() * for fname, fval in weights.items(): # <<<<<<<<<<<<<< @@ -19219,7 +19219,7 @@ static int __pyx_pf_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_5_cdec_De __pyx_v_fval = __pyx_t_8; __pyx_t_8 = 0; - /* "_cdec.pyx":79 + /* "cdec/_cdec.pyx":79 * self.weights.vector.clear() * for fname, fval in weights.items(): * self.weights[fname] = fval # <<<<<<<<<<<<<< @@ -19233,14 +19233,14 @@ static int __pyx_pf_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_5_cdec_De } /*else*/ { - /* "_cdec.pyx":81 + /* "cdec/_cdec.pyx":81 * self.weights[fname] = fval * else: * raise TypeError('cannot initialize weights with %s' % type(weights)) # <<<<<<<<<<<<<< * * property formalism: */ - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_48), ((PyObject *)Py_TYPE(__pyx_v_weights))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), ((PyObject *)Py_TYPE(__pyx_v_weights))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -19264,7 +19264,7 @@ static int __pyx_pf_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_5_cdec_De __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("_cdec.Decoder.weights.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Decoder.weights.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fname); @@ -19274,17 +19274,17 @@ static int __pyx_pf_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_5_cdec_De } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Decoder_9formalism_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5_cdec_7Decoder_9formalism_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Decoder_9formalism___get__(((struct __pyx_obj_5_cdec_Decoder *)__pyx_v_self)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_cdec.pyx":84 +/* "cdec/_cdec.pyx":84 * * property formalism: * def __get__(self): # <<<<<<<<<<<<<< @@ -19292,7 +19292,7 @@ static PyObject *__pyx_pw_5_cdec_7Decoder_9formalism_1__get__(PyObject *__pyx_v_ * return str(conf[0]['formalism'].as_str().c_str()) */ -static PyObject *__pyx_pf_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self) { +static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { const boost::program_options::variables_map *__pyx_v_conf; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -19303,7 +19303,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_5_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "_cdec.pyx":85 + /* "cdec/_cdec.pyx":85 * property formalism: * def __get__(self): * cdef variables_map* conf = &self.dec.GetConf() # <<<<<<<<<<<<<< @@ -19312,7 +19312,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_5_ */ __pyx_v_conf = (&__pyx_v_self->dec->GetConf()); - /* "_cdec.pyx":86 + /* "cdec/_cdec.pyx":86 * def __get__(self): * cdef variables_map* conf = &self.dec.GetConf() * return str(conf[0]['formalism'].as_str().c_str()) # <<<<<<<<<<<<<< @@ -19339,7 +19339,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_5_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("_cdec.Decoder.formalism.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Decoder.formalism.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -19348,18 +19348,18 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_5_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Decoder_5read_weights(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ -static char __pyx_doc_5_cdec_7Decoder_4read_weights[] = "decoder.read_weights(filename): Read decoder weights from a file."; -static PyObject *__pyx_pw_5_cdec_7Decoder_5read_weights(PyObject *__pyx_v_self, PyObject *__pyx_v_weights) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_7Decoder_4read_weights[] = "decoder.read_weights(filename): Read decoder weights from a file."; +static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights(PyObject *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_weights (wrapper)", 0); - __pyx_r = __pyx_pf_5_cdec_7Decoder_4read_weights(((struct __pyx_obj_5_cdec_Decoder *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_cdec.pyx":88 +/* "cdec/_cdec.pyx":88 * return str(conf[0]['formalism'].as_str().c_str()) * * def read_weights(self, weights): # <<<<<<<<<<<<<< @@ -19367,7 +19367,7 @@ static PyObject *__pyx_pw_5_cdec_7Decoder_5read_weights(PyObject *__pyx_v_self, * with open(weights) as fp: */ -static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights) { +static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_v_fp = NULL; PyObject *__pyx_v_line = NULL; PyObject *__pyx_v_fname = NULL; @@ -19395,7 +19395,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_weights", 0); - /* "_cdec.pyx":90 + /* "cdec/_cdec.pyx":90 * def read_weights(self, weights): * """decoder.read_weights(filename): Read decoder weights from a file.""" * with open(weights) as fp: # <<<<<<<<<<<<<< @@ -19430,7 +19430,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ __pyx_v_fp = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_cdec.pyx":91 + /* "cdec/_cdec.pyx":91 * """decoder.read_weights(filename): Read decoder weights from a file.""" * with open(weights) as fp: * for line in fp: # <<<<<<<<<<<<<< @@ -19475,7 +19475,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ __pyx_v_line = __pyx_t_2; __pyx_t_2 = 0; - /* "_cdec.pyx":92 + /* "cdec/_cdec.pyx":92 * with open(weights) as fp: * for line in fp: * if line.strip().startswith('#'): continue # <<<<<<<<<<<<<< @@ -19490,7 +19490,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} @@ -19501,7 +19501,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ } __pyx_L18:; - /* "_cdec.pyx":93 + /* "cdec/_cdec.pyx":93 * for line in fp: * if line.strip().startswith('#'): continue * fname, value = line.split() # <<<<<<<<<<<<<< @@ -19571,7 +19571,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ __pyx_v_value = __pyx_t_11; __pyx_t_11 = 0; - /* "_cdec.pyx":94 + /* "cdec/_cdec.pyx":94 * if line.strip().startswith('#'): continue * fname, value = line.split() * self.weights[fname.strip()] = float(value) # <<<<<<<<<<<<<< @@ -19604,7 +19604,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_cdec.pyx":90 + /* "cdec/_cdec.pyx":90 * def read_weights(self, weights): * """decoder.read_weights(filename): Read decoder weights from a file.""" * with open(weights) as fp: # <<<<<<<<<<<<<< @@ -19612,7 +19612,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ * if line.strip().startswith('#'): continue */ /*except:*/ { - __Pyx_AddTraceback("_cdec.Decoder.read_weights", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Decoder.read_weights", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); @@ -19668,7 +19668,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ } /*finally:*/ { if (__pyx_t_3) { - __pyx_t_7 = PyObject_Call(__pyx_t_3, __pyx_k_tuple_51, NULL); + __pyx_t_7 = PyObject_Call(__pyx_t_3, __pyx_k_tuple_52, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); @@ -19692,7 +19692,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); - __Pyx_AddTraceback("_cdec.Decoder.read_weights", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Decoder.read_weights", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fp); @@ -19705,9 +19705,9 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_4read_weights(struct __pyx_obj_5_cdec_ } /* Python wrapper */ -static PyObject *__pyx_pw_5_cdec_7Decoder_7translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_5_cdec_7Decoder_6translate[] = "decoder.translate(sentence, grammar=None) -> Hypergraph\n Translate a sentence (string/Lattice) with a grammar (string/list of rules)."; -static PyObject *__pyx_pw_5_cdec_7Decoder_7translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_7Decoder_6translate[] = "decoder.translate(sentence, grammar=None) -> Hypergraph\n Translate a sentence (string/Lattice) with a grammar (string/list of rules)."; +static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sentence = 0; PyObject *__pyx_v_grammar = 0; int __pyx_lineno = 0; @@ -19720,7 +19720,7 @@ static PyObject *__pyx_pw_5_cdec_7Decoder_7translate(PyObject *__pyx_v_self, PyO static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sentence,&__pyx_n_s__grammar,0}; PyObject* values[2] = {0,0}; - /* "_cdec.pyx":96 + /* "cdec/_cdec.pyx":96 * self.weights[fname.strip()] = float(value) * * def translate(self, sentence, grammar=None): # <<<<<<<<<<<<<< @@ -19766,19 +19766,19 @@ static PyObject *__pyx_pw_5_cdec_7Decoder_7translate(PyObject *__pyx_v_self, PyO __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("translate", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("_cdec.Decoder.translate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Decoder.translate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5_cdec_7Decoder_6translate(((struct __pyx_obj_5_cdec_Decoder *)__pyx_v_self), __pyx_v_sentence, __pyx_v_grammar); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_6translate(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), __pyx_v_sentence, __pyx_v_grammar); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_sentence, PyObject *__pyx_v_grammar) { +static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_sentence, PyObject *__pyx_v_grammar) { PyObject *__pyx_v_input_str = 0; BasicObserver __pyx_v_observer; - struct __pyx_obj_5_cdec_Hypergraph *__pyx_v_hg = 0; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -19791,7 +19791,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("translate", 0); - /* "_cdec.pyx":100 + /* "cdec/_cdec.pyx":100 * Translate a sentence (string/Lattice) with a grammar (string/list of rules).""" * cdef bytes input_str * if isinstance(sentence, basestring): # <<<<<<<<<<<<<< @@ -19802,7 +19802,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_cdec.pyx":101 + /* "cdec/_cdec.pyx":101 * cdef bytes input_str * if isinstance(sentence, basestring): * input_str = as_str(sentence.strip()) # <<<<<<<<<<<<<< @@ -19814,7 +19814,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = ((PyObject *)__pyx_f_5_cdec_as_str(__pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_input_str = ((PyObject*)__pyx_t_3); @@ -19822,18 +19822,18 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec goto __pyx_L3; } - /* "_cdec.pyx":102 + /* "cdec/_cdec.pyx":102 * if isinstance(sentence, basestring): * input_str = as_str(sentence.strip()) * elif isinstance(sentence, Lattice): # <<<<<<<<<<<<<< * input_str = str(sentence) # PLF format * else: */ - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_sentence, ((PyObject*)__pyx_ptype_5_cdec_Lattice)); + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_sentence, ((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "_cdec.pyx":103 + /* "cdec/_cdec.pyx":103 * input_str = as_str(sentence.strip()) * elif isinstance(sentence, Lattice): * input_str = str(sentence) # PLF format # <<<<<<<<<<<<<< @@ -19855,14 +19855,14 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec } /*else*/ { - /* "_cdec.pyx":105 + /* "cdec/_cdec.pyx":105 * input_str = str(sentence) # PLF format * else: * raise TypeError('Cannot translate input type %s' % type(sentence)) # <<<<<<<<<<<<<< * if grammar: * if isinstance(grammar, basestring): */ - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_52), ((PyObject *)Py_TYPE(__pyx_v_sentence))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_53), ((PyObject *)Py_TYPE(__pyx_v_sentence))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -19878,7 +19878,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec } __pyx_L3:; - /* "_cdec.pyx":106 + /* "cdec/_cdec.pyx":106 * else: * raise TypeError('Cannot translate input type %s' % type(sentence)) * if grammar: # <<<<<<<<<<<<<< @@ -19888,7 +19888,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_grammar); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - /* "_cdec.pyx":107 + /* "cdec/_cdec.pyx":107 * raise TypeError('Cannot translate input type %s' % type(sentence)) * if grammar: * if isinstance(grammar, basestring): # <<<<<<<<<<<<<< @@ -19899,14 +19899,14 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_cdec.pyx":108 + /* "cdec/_cdec.pyx":108 * if grammar: * if isinstance(grammar, basestring): * self.dec.AddSupplementalGrammarFromString(as_str(grammar)) # <<<<<<<<<<<<<< * else: * self.dec.AddSupplementalGrammar(TextGrammar(grammar).grammar[0]) */ - __pyx_t_4 = ((PyObject *)__pyx_f_5_cdec_as_str(__pyx_v_grammar, NULL)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_grammar, NULL)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_convert_string_from_py_(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -19915,7 +19915,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec } /*else*/ { - /* "_cdec.pyx":110 + /* "cdec/_cdec.pyx":110 * self.dec.AddSupplementalGrammarFromString(as_str(grammar)) * else: * self.dec.AddSupplementalGrammar(TextGrammar(grammar).grammar[0]) # <<<<<<<<<<<<<< @@ -19927,10 +19927,10 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec __Pyx_INCREF(__pyx_v_grammar); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_grammar); __Pyx_GIVEREF(__pyx_v_grammar); - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_TextGrammar)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TextGrammar)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_v_self->dec->AddSupplementalGrammar((((struct __pyx_obj_5_cdec_TextGrammar *)__pyx_t_3)->__pyx_base.grammar[0])); + __pyx_v_self->dec->AddSupplementalGrammar((((struct __pyx_obj_4cdec_5_cdec_TextGrammar *)__pyx_t_3)->__pyx_base.grammar[0])); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L5:; @@ -19938,7 +19938,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec } __pyx_L4:; - /* "_cdec.pyx":111 + /* "cdec/_cdec.pyx":111 * else: * self.dec.AddSupplementalGrammar(TextGrammar(grammar).grammar[0]) * cdef decoder.BasicObserver observer = decoder.BasicObserver() # <<<<<<<<<<<<<< @@ -19947,7 +19947,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec */ __pyx_v_observer = BasicObserver(); - /* "_cdec.pyx":112 + /* "cdec/_cdec.pyx":112 * self.dec.AddSupplementalGrammar(TextGrammar(grammar).grammar[0]) * cdef decoder.BasicObserver observer = decoder.BasicObserver() * self.dec.Decode(input_str, &observer) # <<<<<<<<<<<<<< @@ -19957,7 +19957,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec __pyx_t_5 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_input_str)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->dec->Decode(__pyx_t_5, (&__pyx_v_observer)); - /* "_cdec.pyx":113 + /* "cdec/_cdec.pyx":113 * cdef decoder.BasicObserver observer = decoder.BasicObserver() * self.dec.Decode(input_str, &observer) * if observer.hypergraph == NULL: # <<<<<<<<<<<<<< @@ -19967,7 +19967,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec __pyx_t_2 = ((__pyx_v_observer.hypergraph == NULL) != 0); if (__pyx_t_2) { - /* "_cdec.pyx":114 + /* "cdec/_cdec.pyx":114 * self.dec.Decode(input_str, &observer) * if observer.hypergraph == NULL: * raise ParseFailed() # <<<<<<<<<<<<<< @@ -19986,19 +19986,19 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec } __pyx_L6:; - /* "_cdec.pyx":115 + /* "cdec/_cdec.pyx":115 * if observer.hypergraph == NULL: * raise ParseFailed() * cdef Hypergraph hg = Hypergraph() # <<<<<<<<<<<<<< * hg.hg = new hypergraph.Hypergraph(observer.hypergraph[0]) * return hg */ - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_v_hg = ((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_t_4); + __pyx_v_hg = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_t_4); __pyx_t_4 = 0; - /* "_cdec.pyx":116 + /* "cdec/_cdec.pyx":116 * raise ParseFailed() * cdef Hypergraph hg = Hypergraph() * hg.hg = new hypergraph.Hypergraph(observer.hypergraph[0]) # <<<<<<<<<<<<<< @@ -20006,7 +20006,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec */ __pyx_v_hg->hg = new Hypergraph((__pyx_v_observer.hypergraph[0])); - /* "_cdec.pyx":117 + /* "cdec/_cdec.pyx":117 * cdef Hypergraph hg = Hypergraph() * hg.hg = new hypergraph.Hypergraph(observer.hypergraph[0]) * return hg # <<<<<<<<<<<<<< @@ -20021,7 +20021,7 @@ static PyObject *__pyx_pf_5_cdec_7Decoder_6translate(struct __pyx_obj_5_cdec_Dec __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("_cdec.Decoder.translate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Decoder.translate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_input_str); @@ -20070,22 +20070,19 @@ static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) { return __pyx_r; } -static PyObject *__pyx_tp_new_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_TRule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; - if (unlikely(__pyx_pw_5_cdec_6Scorer_1__cinit__(o, a, k) < 0)) { - Py_DECREF(o); o = 0; - } return o; } -static void __pyx_tp_dealloc_5_cdec_Scorer(PyObject *o) { +static void __pyx_tp_dealloc_4cdec_5_cdec_TRule(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_5_cdec_6Scorer_3__dealloc__(o); + __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); @@ -20093,125 +20090,100 @@ static void __pyx_tp_dealloc_5_cdec_Scorer(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } -static PyMethodDef __pyx_methods_5_cdec_Scorer[] = { - {0, 0, 0, 0} -}; +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_arity(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(o); +} -static PyTypeObject __pyx_type_5_cdec_Scorer = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.Scorer"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_Scorer), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_Scorer, /*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*/ - __pyx_pw_5_cdec_6Scorer_5__call__, /*tp_call*/ - __pyx_pw_5_cdec_6Scorer_7__str__, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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_5_cdec_Scorer, /*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_5_cdec_Scorer, /*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_getprop_4cdec_5_cdec_5TRule_f(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(o); +} -static struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *__pyx_freelist_5_cdec___pyx_scope_struct_24___init__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_24___init__ = 0; +static int __pyx_setprop_4cdec_5_cdec_5TRule_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_24___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *p; - PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_24___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_24___init__[--__pyx_freecount_5_cdec___pyx_scope_struct_24___init__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_e(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_e(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *)o); - p->__pyx_v_config = 0; - return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_24___init__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_config); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_24___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_24___init__[__pyx_freecount_5_cdec___pyx_scope_struct_24___init__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_a(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_a(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_24___init__(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *)o; - if (p->__pyx_v_config) { - e = (*v)(p->__pyx_v_config, a); if (e) return e; +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_scores(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_scores(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; } - return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_24___init__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_config); - p->__pyx_v_config = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_lhs(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_lhs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_24___init__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_TRule[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_24___init__ = { +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_TRule[] = { + {(char *)"arity", __pyx_getprop_4cdec_5_cdec_5TRule_arity, 0, 0, 0}, + {(char *)"f", __pyx_getprop_4cdec_5_cdec_5TRule_f, __pyx_setprop_4cdec_5_cdec_5TRule_f, 0, 0}, + {(char *)"e", __pyx_getprop_4cdec_5_cdec_5TRule_e, __pyx_setprop_4cdec_5_cdec_5TRule_e, 0, 0}, + {(char *)"a", __pyx_getprop_4cdec_5_cdec_5TRule_a, __pyx_setprop_4cdec_5_cdec_5TRule_a, 0, 0}, + {(char *)"scores", __pyx_getprop_4cdec_5_cdec_5TRule_scores, __pyx_setprop_4cdec_5_cdec_5TRule_scores, 0, 0}, + {(char *)"lhs", __pyx_getprop_4cdec_5_cdec_5TRule_lhs, __pyx_setprop_4cdec_5_cdec_5TRule_lhs, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_TRule = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_24___init__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.TRule"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_TRule), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_24___init__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_TRule, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20226,29 +20198,29 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_24___init__ = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - 0, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_5TRule_5__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - 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_5_cdec___pyx_scope_struct_24___init__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_24___init__, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_24___init__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_TRule, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_TRule, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_5TRule_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_24___init__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_TRule, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20262,46 +20234,22 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_24___init__ = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_NTRef(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - PyObject *o; - o = (*t->tp_alloc)(t, 0); +static PyObject *__pyx_tp_new_4cdec_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = __pyx_tp_new_4cdec_5_cdec_TRule(t, a, k); if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_5_cdec_NTRef(PyObject *o) { - (*Py_TYPE(o)->tp_free)(o); -} - -static PyObject *__pyx_getprop_5_cdec_5NTRef_ref(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_5NTRef_3ref_1__get__(o); -} - -static int __pyx_setprop_5_cdec_5NTRef_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_5_cdec_5NTRef_3ref_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyMethodDef __pyx_methods_5_cdec_NTRef[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_MRule[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_5_cdec_NTRef[] = { - {(char *)"ref", __pyx_getprop_5_cdec_5NTRef_ref, __pyx_setprop_5_cdec_5NTRef_ref, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_5_cdec_NTRef = { +static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.NTRef"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_NTRef), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.MRule"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_MRule), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_NTRef, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_TRule, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20316,7 +20264,11 @@ static PyTypeObject __pyx_type_5_cdec_NTRef = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_5_cdec_5NTRef_3__str__, /*tp_str*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_4cdec_5_cdec_5TRule_5__str__, /*tp_str*/ + #else + 0, /*tp_str*/ + #endif 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -20328,17 +20280,17 @@ static PyTypeObject __pyx_type_5_cdec_NTRef = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_NTRef, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_MRule, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_5_cdec_NTRef, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_5_cdec_5NTRef_1__init__, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_5MRule_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_NTRef, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_MRule, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20352,65 +20304,65 @@ static PyTypeObject __pyx_type_5_cdec_NTRef = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *__pyx_freelist_5_cdec___pyx_scope_struct_22___iter__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_22___iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_22___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_22___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_22___iter__[--__pyx_freecount_5_cdec___pyx_scope_struct_22___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *)o); + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o); p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_22___iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_22___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_22___iter__[__pyx_freecount_5_cdec___pyx_scope_struct_22___iter__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_22___iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_22___iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_CandidateSet *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_22___iter__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_22___iter__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_22___iter__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_22___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_22___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_22___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20431,13 +20383,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_22___iter__ = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_22___iter__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_22___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_22___iter__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -20447,7 +20399,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_22___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_22___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20461,55 +20413,75 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_22___iter__ = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_Grammar(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_DenseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_5_cdec_Grammar(PyObject *o) { +static void __pyx_tp_dealloc_4cdec_5_cdec_DenseVector(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_5_cdec_7Grammar_1__dealloc__(o); + __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } - -static PyObject *__pyx_getprop_5_cdec_7Grammar_name(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_7Grammar_4name_1__get__(o); +static PyObject *__pyx_sq_item_4cdec_5_cdec_DenseVector(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; } -static int __pyx_setprop_5_cdec_7Grammar_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_mp_ass_subscript_4cdec_5_cdec_DenseVector(PyObject *o, PyObject *i, PyObject *v) { if (v) { - return __pyx_pw_5_cdec_7Grammar_4name_3__set__(o, v); + return __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(o, i, v); } else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); return -1; } } -static PyMethodDef __pyx_methods_5_cdec_Grammar[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_DenseVector[] = { + {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_11DenseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_11DenseVector_13dot)}, + {__Pyx_NAMESTR("tosparse"), (PyCFunction)__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_11DenseVector_15tosparse)}, {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_5_cdec_Grammar[] = { - {(char *)"name", __pyx_getprop_5_cdec_7Grammar_name, __pyx_setprop_5_cdec_7Grammar_name, 0, 0}, - {0, 0, 0, 0, 0} +static PySequenceMethods __pyx_tp_as_sequence_DenseVector = { + __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_DenseVector, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_DenseVector = { + __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cdec_5_cdec_DenseVector, /*mp_ass_subscript*/ }; -static PyTypeObject __pyx_type_5_cdec_Grammar = { +static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.Grammar"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_Grammar), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.DenseVector"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_DenseVector), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_Grammar, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_DenseVector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20520,8 +20492,8 @@ static PyTypeObject __pyx_type_5_cdec_Grammar = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_sequence_DenseVector, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_DenseVector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ @@ -20534,19 +20506,19 @@ static PyTypeObject __pyx_type_5_cdec_Grammar = { 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_5_cdec_7Grammar_3__iter__, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_Grammar, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_DenseVector, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_5_cdec_Grammar, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_Grammar, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_DenseVector, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20560,113 +20532,134 @@ static PyTypeObject __pyx_type_5_cdec_Grammar = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *__pyx_freelist_5_cdec___pyx_scope_struct_20_lines[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_20_lines = 0; - -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_20_lines(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_SufficientStats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_20_lines > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_20_lines[--__pyx_freecount_5_cdec___pyx_scope_struct_20_lines]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_delta = 0; - p->__pyx_v_i = 0; - p->__pyx_v_label = 0; - p->__pyx_v_weight = 0; - p->__pyx_t_1 = 0; - p->__pyx_t_3 = 0; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_20_lines(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_delta); - Py_CLEAR(p->__pyx_v_i); - Py_CLEAR(p->__pyx_v_label); - Py_CLEAR(p->__pyx_v_weight); - Py_CLEAR(p->__pyx_t_1); - Py_CLEAR(p->__pyx_t_3); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_20_lines < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines))) { - __pyx_freelist_5_cdec___pyx_scope_struct_20_lines[__pyx_freecount_5_cdec___pyx_scope_struct_20_lines++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_SufficientStats(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } + (*Py_TYPE(o)->tp_free)(o); +} +static PyObject *__pyx_sq_item_4cdec_5_cdec_SufficientStats(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_20_lines(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_v_delta) { - e = (*v)(p->__pyx_v_delta, a); if (e) return e; - } - if (p->__pyx_v_i) { - e = (*v)(p->__pyx_v_i, a); if (e) return e; - } - if (p->__pyx_v_label) { - e = (*v)(p->__pyx_v_label, a); if (e) return e; - } - if (p->__pyx_v_weight) { - e = (*v)(p->__pyx_v_weight, a); if (e) return e; - } - if (p->__pyx_t_1) { - e = (*v)(p->__pyx_t_1, a); if (e) return e; - } - if (p->__pyx_t_3) { - e = (*v)(p->__pyx_t_3, a); if (e) return e; - } - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_15SufficientStats_score(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(o); } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_20_lines(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_delta); - p->__pyx_v_delta = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_i); - p->__pyx_v_i = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_label); - p->__pyx_v_label = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_weight); - p->__pyx_v_weight = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_1); - p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_3); - p->__pyx_t_3 = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_15SufficientStats_detail(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(o); } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_20_lines[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_SufficientStats[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_20_lines = { +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_SufficientStats[] = { + {(char *)"score", __pyx_getprop_4cdec_5_cdec_15SufficientStats_score, 0, 0, 0}, + {(char *)"detail", __pyx_getprop_4cdec_5_cdec_15SufficientStats_detail, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_SufficientStats = { + __pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_divide*/ + #endif + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_coerce*/ + #endif + 0, /*nb_int*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_long*/ + #else + 0, /*reserved*/ + #endif + 0, /*nb_float*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_oct*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*nb_hex*/ + #endif + __pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_inplace_divide*/ + #endif + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + #if PY_VERSION_HEX >= 0x02050000 + 0, /*nb_index*/ + #endif +}; + +static PySequenceMethods __pyx_tp_as_sequence_SufficientStats = { + __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_SufficientStats, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_SufficientStats = { + __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_20_lines"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.SufficientStats"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_SufficientStats), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_20_lines, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_SufficientStats, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20676,26 +20669,26 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_20_lines = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_number_SufficientStats, /*tp_as_number*/ + &__pyx_tp_as_sequence_SufficientStats, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_SufficientStats, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 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_5_cdec___pyx_scope_struct_20_lines, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_20_lines, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_20_lines, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_SufficientStats, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_SufficientStats, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -20703,7 +20696,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_20_lines = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_20_lines, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_SufficientStats, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20717,65 +20710,81 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_20_lines = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_freelist_5_cdec___pyx_scope_struct_12_sample_trees[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_12_sample_trees = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_12_sample_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_12_sample_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_12_sample_trees[--__pyx_freecount_5_cdec___pyx_scope_struct_12_sample_trees]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *)o); + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o); + p->__pyx_v_i = 0; p->__pyx_v_self = 0; + p->__pyx_t_1 = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_i); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_12_sample_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees))) { - __pyx_freelist_5_cdec___pyx_scope_struct_12_sample_trees[__pyx_freecount_5_cdec___pyx_scope_struct_12_sample_trees++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *)o); + Py_CLEAR(p->__pyx_t_1); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; + if (p->__pyx_v_i) { + e = (*v)(p->__pyx_v_i, a); if (e) return e; + } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } + if (p->__pyx_t_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; + } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_i); + p->__pyx_v_i = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_t_1); + p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_12_sample_trees[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_21___iter__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_12_sample_trees = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_12_sample_trees"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_21___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20796,13 +20805,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_12_sample_trees = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -20812,7 +20821,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_12_sample_trees = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20826,65 +20835,56 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_12_sample_trees = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *__pyx_freelist_5_cdec___pyx_scope_struct_13___get__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_13___get__ = 0; - -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_13___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_Metric(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_Metric *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_13___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_13___get__[--__pyx_freecount_5_cdec___pyx_scope_struct_13___get__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_Metric *)o); + p->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { + Py_DECREF(o); o = 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_13___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec_Metric(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_13___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_13___get__[__pyx_freecount_5_cdec___pyx_scope_struct_13___get__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } + Py_CLEAR(p->scorer); + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_13___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec_Metric(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; + if (p->scorer) { + e = (*v)(((PyObject*)p->scorer), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_13___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec_Metric(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->scorer); + p->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_13___get__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_Metric[] = { + {__Pyx_NAMESTR("score"), (PyCFunction)__pyx_pw_4cdec_5_cdec_6Metric_5score, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_6Metric_7evaluate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_13___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_13___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Metric"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Metric), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_13___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Metric, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20898,20 +20898,20 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_13___get__ = { 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - 0, /*tp_call*/ + __pyx_pw_4cdec_5_cdec_6Metric_3__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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_5_cdec___pyx_scope_struct_13___get__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_13___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec_Metric, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_Metric, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_13___get__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Metric, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -20921,7 +20921,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_13___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_13___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Metric, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20935,65 +20935,56 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_13___get__ = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *__pyx_freelist_5_cdec___pyx_scope_struct_2__phrase[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_2__phrase = 0; - -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_Candidate(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_2__phrase > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_2__phrase[--__pyx_freecount_5_cdec___pyx_scope_struct_2__phrase]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *)o); - p->__pyx_v_phrase = 0; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_phrase); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_2__phrase < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase))) { - __pyx_freelist_5_cdec___pyx_scope_struct_2__phrase[__pyx_freecount_5_cdec___pyx_scope_struct_2__phrase++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } +static void __pyx_tp_dealloc_4cdec_5_cdec_Candidate(PyObject *o) { + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_2__phrase(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *)o; - if (p->__pyx_v_phrase) { - e = (*v)(p->__pyx_v_phrase, a); if (e) return e; - } - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_words(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(o); } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_phrase); - p->__pyx_v_phrase = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_fmap(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(o); } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_2__phrase[] = { +static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_score(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_9Candidate_score(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_9Candidate_5score_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_Candidate[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_2__phrase = { +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Candidate[] = { + {(char *)"words", __pyx_getprop_4cdec_5_cdec_9Candidate_words, 0, 0, 0}, + {(char *)"fmap", __pyx_getprop_4cdec_5_cdec_9Candidate_fmap, 0, 0, 0}, + {(char *)"score", __pyx_getprop_4cdec_5_cdec_9Candidate_score, __pyx_setprop_4cdec_5_cdec_9Candidate_score, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_Candidate = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_2__phrase"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Candidate"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Candidate), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_2__phrase, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Candidate, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21012,17 +21003,17 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_2__phrase = { 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_5_cdec___pyx_scope_struct_2__phrase, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_2__phrase, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_2__phrase, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Candidate, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Candidate, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -21030,7 +21021,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_2__phrase = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_2__phrase, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Candidate, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21044,29 +21035,26 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_2__phrase = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_CandidateSet(PyTypeObject *t, PyObject *a, PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_SparseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; - if (unlikely(__pyx_pw_5_cdec_12CandidateSet_1__cinit__(o, a, k) < 0)) { - Py_DECREF(o); o = 0; - } return o; } -static void __pyx_tp_dealloc_5_cdec_CandidateSet(PyObject *o) { +static void __pyx_tp_dealloc_4cdec_5_cdec_SparseVector(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_5_cdec_12CandidateSet_3__dealloc__(o); + __pyx_pw_4cdec_5_cdec_12SparseVector_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_5_cdec_CandidateSet(PyObject *o, Py_ssize_t i) { +static PyObject *__pyx_sq_item_4cdec_5_cdec_SparseVector(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); @@ -21074,36 +21062,106 @@ static PyObject *__pyx_sq_item_5_cdec_CandidateSet(PyObject *o, Py_ssize_t i) { return r; } -static PyMethodDef __pyx_methods_5_cdec_CandidateSet[] = { - {__Pyx_NAMESTR("add_kbest"), (PyCFunction)__pyx_pw_5_cdec_12CandidateSet_12add_kbest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5_cdec_12CandidateSet_11add_kbest)}, +static int __pyx_mp_ass_subscript_4cdec_5_cdec_SparseVector(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(o, i, v); + } + else { + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); + return -1; + } +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_SparseVector[] = { + {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12SparseVector_5copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12SparseVector_4copy)}, + {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12SparseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12SparseVector_13dot)}, {0, 0, 0, 0} }; -static PySequenceMethods __pyx_tp_as_sequence_CandidateSet = { - __pyx_pw_5_cdec_12CandidateSet_5__len__, /*sq_length*/ +static PyNumberMethods __pyx_tp_as_number_SparseVector = { + __pyx_pw_4cdec_5_cdec_12SparseVector_32__add__, /*nb_add*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__, /*nb_subtract*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__, /*nb_multiply*/ + #if PY_MAJOR_VERSION < 3 + __pyx_pw_4cdec_5_cdec_12SparseVector_38__div__, /*nb_divide*/ + #endif + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_coerce*/ + #endif + 0, /*nb_int*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_long*/ + #else + 0, /*reserved*/ + #endif + 0, /*nb_float*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_oct*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*nb_hex*/ + #endif + __pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__, /*nb_inplace_add*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__, /*nb_inplace_subtract*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__, /*nb_inplace_multiply*/ + #if PY_MAJOR_VERSION < 3 + __pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__, /*nb_inplace_divide*/ + #endif + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + #if PY_VERSION_HEX >= 0x02050000 + 0, /*nb_index*/ + #endif +}; + +static PySequenceMethods __pyx_tp_as_sequence_SparseVector = { + __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ - __pyx_sq_item_5_cdec_CandidateSet, /*sq_item*/ + __pyx_sq_item_4cdec_5_cdec_SparseVector, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; -static PyMappingMethods __pyx_tp_as_mapping_CandidateSet = { - __pyx_pw_5_cdec_12CandidateSet_5__len__, /*mp_length*/ - __pyx_pw_5_cdec_12CandidateSet_7__getitem__, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static PyMappingMethods __pyx_tp_as_mapping_SparseVector = { + __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cdec_5_cdec_SparseVector, /*mp_ass_subscript*/ }; -static PyTypeObject __pyx_type_5_cdec_CandidateSet = { +static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.CandidateSet"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_CandidateSet), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.SparseVector"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_SparseVector), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_CandidateSet, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_SparseVector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21113,9 +21171,9 @@ static PyTypeObject __pyx_type_5_cdec_CandidateSet = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_CandidateSet, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_CandidateSet, /*tp_as_mapping*/ + &__pyx_tp_as_number_SparseVector, /*tp_as_number*/ + &__pyx_tp_as_sequence_SparseVector, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_SparseVector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ @@ -21126,11 +21184,11 @@ static PyTypeObject __pyx_type_5_cdec_CandidateSet = { 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ - 0, /*tp_richcompare*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_5_cdec_12CandidateSet_9__iter__, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_CandidateSet, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_SparseVector, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -21138,9 +21196,9 @@ static PyTypeObject __pyx_type_5_cdec_CandidateSet = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_CandidateSet, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_SparseVector, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21154,65 +21212,65 @@ static PyTypeObject __pyx_type_5_cdec_CandidateSet = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *__pyx_freelist_5_cdec___pyx_scope_struct_14___get__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_14___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_14___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_14___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_14___get__[--__pyx_freecount_5_cdec___pyx_scope_struct_14___get__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *)o); + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o); p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_14___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_14___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_14___get__[__pyx_freecount_5_cdec___pyx_scope_struct_14___get__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_14___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_14___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_14___get__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_15___get__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_14___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_14___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_15___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_14___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21233,13 +21291,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_14___get__ = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_14___get__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_14___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_14___get__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -21249,7 +21307,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_14___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_14___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21263,65 +21321,61 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_14___get__ = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_TRule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_NT(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_NT *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_NT *)o); + p->cat = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_5_cdec_TRule(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_5_cdec_5TRule_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); - } +static void __pyx_tp_dealloc_4cdec_5_cdec_NT(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->cat); (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_getprop_5_cdec_5TRule_arity(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_5TRule_5arity_1__get__(o); -} - -static PyObject *__pyx_getprop_5_cdec_5TRule_f(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_5TRule_1f_1__get__(o); +static int __pyx_tp_traverse_4cdec_5_cdec_NT(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; + if (p->cat) { + e = (*v)(p->cat, a); if (e) return e; + } + return 0; } -static int __pyx_setprop_5_cdec_5TRule_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_5_cdec_5TRule_1f_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } +static int __pyx_tp_clear_4cdec_5_cdec_NT(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; + PyObject* tmp; + tmp = ((PyObject*)p->cat); + p->cat = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static PyObject *__pyx_getprop_5_cdec_5TRule_e(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_5TRule_1e_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_2NT_cat(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(o); } -static int __pyx_setprop_5_cdec_5TRule_e(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_4cdec_5_cdec_2NT_cat(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_5_cdec_5TRule_1e_3__set__(o, v); + return __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(o, v); } else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; + return __pyx_pw_4cdec_5_cdec_2NT_3cat_5__del__(o); } } -static PyObject *__pyx_getprop_5_cdec_5TRule_a(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_5TRule_1a_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_2NT_ref(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(o); } -static int __pyx_setprop_5_cdec_5TRule_a(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_4cdec_5_cdec_2NT_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_5_cdec_5TRule_1a_4__set__(o, v); + return __pyx_pw_4cdec_5_cdec_2NT_3ref_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -21329,54 +21383,145 @@ static int __pyx_setprop_5_cdec_5TRule_a(PyObject *o, PyObject *v, CYTHON_UNUSED } } -static PyObject *__pyx_getprop_5_cdec_5TRule_scores(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_5TRule_6scores_1__get__(o); -} +static PyMethodDef __pyx_methods_4cdec_5_cdec_NT[] = { + {0, 0, 0, 0} +}; -static int __pyx_setprop_5_cdec_5TRule_scores(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_5_cdec_5TRule_6scores_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_NT[] = { + {(char *)"cat", __pyx_getprop_4cdec_5_cdec_2NT_cat, __pyx_setprop_4cdec_5_cdec_2NT_cat, 0, 0}, + {(char *)"ref", __pyx_getprop_4cdec_5_cdec_2NT_ref, __pyx_setprop_4cdec_5_cdec_2NT_ref, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_NT = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("cdec._cdec.NT"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_NT), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cdec_5_cdec_NT, /*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*/ + __pyx_pw_4cdec_5_cdec_2NT_3__str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_4cdec_5_cdec_NT, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_NT, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cdec_5_cdec_NT, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cdec_5_cdec_NT, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + __pyx_pw_4cdec_5_cdec_2NT_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cdec_5_cdec_NT, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + #if PY_VERSION_HEX >= 0x02060000 + 0, /*tp_version_tag*/ + #endif +}; + +static PyObject *__pyx_tp_new_4cdec_5_cdec_Lattice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { + Py_DECREF(o); o = 0; } + return o; } -static PyObject *__pyx_getprop_5_cdec_5TRule_lhs(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_5TRule_3lhs_1__get__(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_Lattice(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_7Lattice_5__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} +static PyObject *__pyx_sq_item_4cdec_5_cdec_Lattice(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; } -static int __pyx_setprop_5_cdec_5TRule_lhs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_mp_ass_subscript_4cdec_5_cdec_Lattice(PyObject *o, PyObject *i, PyObject *v) { if (v) { - return __pyx_pw_5_cdec_5TRule_3lhs_3__set__(o, v); + return __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(o, i, v); } else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); return -1; } } -static PyMethodDef __pyx_methods_5_cdec_TRule[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_Lattice[] = { + {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("todot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_20todot, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Lattice_19todot)}, + {__Pyx_NAMESTR("as_hypergraph"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_22as_hypergraph, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Lattice_21as_hypergraph)}, {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_5_cdec_TRule[] = { - {(char *)"arity", __pyx_getprop_5_cdec_5TRule_arity, 0, 0, 0}, - {(char *)"f", __pyx_getprop_5_cdec_5TRule_f, __pyx_setprop_5_cdec_5TRule_f, 0, 0}, - {(char *)"e", __pyx_getprop_5_cdec_5TRule_e, __pyx_setprop_5_cdec_5TRule_e, 0, 0}, - {(char *)"a", __pyx_getprop_5_cdec_5TRule_a, __pyx_setprop_5_cdec_5TRule_a, 0, 0}, - {(char *)"scores", __pyx_getprop_5_cdec_5TRule_scores, __pyx_setprop_5_cdec_5TRule_scores, 0, 0}, - {(char *)"lhs", __pyx_getprop_5_cdec_5TRule_lhs, __pyx_setprop_5_cdec_5TRule_lhs, 0, 0}, - {0, 0, 0, 0, 0} +static PySequenceMethods __pyx_tp_as_sequence_Lattice = { + __pyx_pw_4cdec_5_cdec_7Lattice_11__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_Lattice, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_Lattice = { + __pyx_pw_4cdec_5_cdec_7Lattice_11__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cdec_5_cdec_Lattice, /*mp_ass_subscript*/ }; -static PyTypeObject __pyx_type_5_cdec_TRule = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Lattice = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.TRule"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_TRule), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Lattice"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Lattice), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_TRule, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Lattice, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21387,11 +21532,11 @@ static PyTypeObject __pyx_type_5_cdec_TRule = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_sequence_Lattice, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_Lattice, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_5_cdec_5TRule_5__str__, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_7Lattice_13__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -21401,19 +21546,19 @@ static PyTypeObject __pyx_type_5_cdec_TRule = { 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_7Lattice_17__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_TRule, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Lattice, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_5_cdec_TRule, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_5_cdec_5TRule_1__init__, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_7Lattice_3__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_TRule, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Lattice, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21427,81 +21572,113 @@ static PyTypeObject __pyx_type_5_cdec_TRule = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *__pyx_freelist_5_cdec___pyx_scope_struct_3_genexpr[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_3_genexpr = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_3_genexpr[--__pyx_freecount_5_cdec___pyx_scope_struct_3_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_w = 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o); + p->__pyx_v_config = 0; + p->__pyx_v_info = 0; + p->__pyx_v_key = 0; + p->__pyx_v_name = 0; + p->__pyx_v_value = 0; p->__pyx_t_0 = 0; + p->__pyx_t_1 = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_w); + Py_CLEAR(p->__pyx_v_config); + Py_CLEAR(p->__pyx_v_info); + Py_CLEAR(p->__pyx_v_key); + Py_CLEAR(p->__pyx_v_name); + Py_CLEAR(p->__pyx_v_value); Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr))) { - __pyx_freelist_5_cdec___pyx_scope_struct_3_genexpr[__pyx_freecount_5_cdec___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *)o); + Py_CLEAR(p->__pyx_t_1); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; + if (p->__pyx_v_config) { + e = (*v)(p->__pyx_v_config, a); if (e) return e; } - if (p->__pyx_v_w) { - e = (*v)(p->__pyx_v_w, a); if (e) return e; + if (p->__pyx_v_info) { + e = (*v)(p->__pyx_v_info, a); if (e) return e; + } + if (p->__pyx_v_key) { + e = (*v)(p->__pyx_v_key, a); if (e) return e; + } + if (p->__pyx_v_name) { + e = (*v)(p->__pyx_v_name, a); if (e) return e; + } + if (p->__pyx_v_value) { + e = (*v)(p->__pyx_v_value, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } + if (p->__pyx_t_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; + } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_config); + p->__pyx_v_config = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_w); - p->__pyx_v_w = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_info); + p->__pyx_v_info = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_key); + p->__pyx_v_key = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_name); + p->__pyx_v_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_value); + p->__pyx_v_value = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_t_1); + p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_3_genexpr[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_23__make_config[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_3_genexpr = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_3_genexpr"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_23__make_config"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21522,13 +21699,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_3_genexpr = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_3_genexpr, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_3_genexpr, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_3_genexpr, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -21538,7 +21715,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_3_genexpr = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_3_genexpr, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21551,23 +21728,121 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_3_genexpr = { 0, /*tp_version_tag*/ #endif }; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge __pyx_vtable_4cdec_5_cdec_HypergraphEdge; -static PyObject *__pyx_tp_new_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = __pyx_tp_new_5_cdec_TRule(t, a, k); +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphEdge(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o); + p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge; + p->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); return o; } -static PyMethodDef __pyx_methods_5_cdec_MRule[] = { +static void __pyx_tp_dealloc_4cdec_5_cdec_HypergraphEdge(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->trule); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_4cdec_5_cdec_HypergraphEdge(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; + if (p->trule) { + e = (*v)(((PyObject*)p->trule), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cdec_5_cdec_HypergraphEdge(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; + PyObject* tmp; + tmp = ((PyObject*)p->trule); + p->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_head_node(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_tail_nodes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_span(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_src_span(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_feature_values(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_prob(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_trule(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_14HypergraphEdge_trule(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(o, v); + } + else { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_HypergraphEdge[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec_MRule = { +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_HypergraphEdge[] = { + {(char *)"head_node", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_head_node, 0, 0, 0}, + {(char *)"tail_nodes", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_tail_nodes, 0, 0, 0}, + {(char *)"span", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_span, 0, 0, 0}, + {(char *)"src_span", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_src_span, 0, 0, 0}, + {(char *)"feature_values", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_feature_values, 0, 0, 0}, + {(char *)"prob", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_prob, 0, 0, 0}, + {(char *)"trule", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_trule, __pyx_setprop_4cdec_5_cdec_14HypergraphEdge_trule, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PySequenceMethods __pyx_tp_as_sequence_HypergraphEdge = { + __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + 0, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_HypergraphEdge = { + __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__, /*mp_length*/ + 0, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphEdge = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.MRule"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_MRule), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.HypergraphEdge"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_TRule, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_HypergraphEdge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21578,37 +21853,33 @@ static PyTypeObject __pyx_type_5_cdec_MRule = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_sequence_HypergraphEdge, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_HypergraphEdge, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_5_cdec_5TRule_5__str__, /*tp_str*/ - #else 0, /*tp_str*/ - #endif 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ + __pyx_tp_traverse_4cdec_5_cdec_HypergraphEdge, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_HypergraphEdge, /*tp_clear*/ + __pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_MRule, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_HypergraphEdge, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_HypergraphEdge, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_5_cdec_5MRule_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_MRule, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_HypergraphEdge, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21622,38 +21893,65 @@ static PyTypeObject __pyx_type_5_cdec_MRule = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_SegmentEvaluator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o); + p->__pyx_v_phrase = 0; return o; } -static void __pyx_tp_dealloc_5_cdec_SegmentEvaluator(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_5_cdec_16SegmentEvaluator_1__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_phrase); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); } -static PyMethodDef __pyx_methods_5_cdec_SegmentEvaluator[] = { - {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_5_cdec_16SegmentEvaluator_3evaluate, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_16SegmentEvaluator_2evaluate)}, - {__Pyx_NAMESTR("candidate_set"), (PyCFunction)__pyx_pw_5_cdec_16SegmentEvaluator_5candidate_set, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_16SegmentEvaluator_4candidate_set)}, +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; + if (p->__pyx_v_phrase) { + e = (*v)(p->__pyx_v_phrase, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_phrase); + p->__pyx_v_phrase = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_2__phrase[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec_SegmentEvaluator = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.SegmentEvaluator"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_SegmentEvaluator), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_2__phrase"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_SegmentEvaluator, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21672,15 +21970,15 @@ static PyTypeObject __pyx_type_5_cdec_SegmentEvaluator = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_SegmentEvaluator, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -21690,7 +21988,7 @@ static PyTypeObject __pyx_type_5_cdec_SegmentEvaluator = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_SegmentEvaluator, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21704,81 +22002,65 @@ static PyTypeObject __pyx_type_5_cdec_SegmentEvaluator = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *__pyx_freelist_5_cdec___pyx_scope_struct_25_genexpr[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_25_genexpr = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_25_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_25_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_25_genexpr[--__pyx_freecount_5_cdec___pyx_scope_struct_25_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_kv = 0; - p->__pyx_t_0 = 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_kv); - Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_25_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr))) { - __pyx_freelist_5_cdec___pyx_scope_struct_25_genexpr[__pyx_freecount_5_cdec___pyx_scope_struct_25_genexpr++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *)o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_v_kv) { - e = (*v)(p->__pyx_v_kv, a); if (e) return e; - } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_kv); - p->__pyx_v_kv = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_0); - p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_25_genexpr[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_13___get__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_25_genexpr = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_25_genexpr"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_13___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_25_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21799,13 +22081,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_25_genexpr = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_25_genexpr, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_25_genexpr, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_25_genexpr, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -21815,7 +22097,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_25_genexpr = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_25_genexpr, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21829,65 +22111,113 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_25_genexpr = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *__pyx_freelist_5_cdec___pyx_scope_struct_19_todot[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_19_todot = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_19_todot(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_19_todot > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_19_todot[--__pyx_freecount_5_cdec___pyx_scope_struct_19_todot]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *)o); - p->__pyx_v_self = 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o); + p->__pyx_outer_scope = 0; + p->__pyx_v_delta = 0; + p->__pyx_v_i = 0; + p->__pyx_v_label = 0; + p->__pyx_v_weight = 0; + p->__pyx_t_1 = 0; + p->__pyx_t_3 = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_19_todot(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_19_todot < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot))) { - __pyx_freelist_5_cdec___pyx_scope_struct_19_todot[__pyx_freecount_5_cdec___pyx_scope_struct_19_todot++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *)o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_delta); + Py_CLEAR(p->__pyx_v_i); + Py_CLEAR(p->__pyx_v_label); + Py_CLEAR(p->__pyx_v_weight); + Py_CLEAR(p->__pyx_t_1); + Py_CLEAR(p->__pyx_t_3); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_19_todot(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_v_delta) { + e = (*v)(p->__pyx_v_delta, a); if (e) return e; + } + if (p->__pyx_v_i) { + e = (*v)(p->__pyx_v_i, a); if (e) return e; + } + if (p->__pyx_v_label) { + e = (*v)(p->__pyx_v_label, a); if (e) return e; + } + if (p->__pyx_v_weight) { + e = (*v)(p->__pyx_v_weight, a); if (e) return e; + } + if (p->__pyx_t_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; + } + if (p->__pyx_t_3) { + e = (*v)(p->__pyx_t_3, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_19_todot(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_delta); + p->__pyx_v_delta = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_i); + p->__pyx_v_i = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_label); + p->__pyx_v_label = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_weight); + p->__pyx_v_weight = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_t_1); + p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_t_3); + p->__pyx_t_3 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_19_todot[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_20_lines[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_19_todot = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_19_todot"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_20_lines"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_19_todot, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21908,13 +22238,96 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_19_todot = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_19_todot, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_19_todot, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + #if PY_VERSION_HEX >= 0x02060000 + 0, /*tp_version_tag*/ + #endif +}; + +static PyObject *__pyx_tp_new_4cdec_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_4cdec_5_cdec_Scorer(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_6Scorer_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_Scorer[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_Scorer = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("cdec._cdec.Scorer"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Scorer), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cdec_5_cdec_Scorer, /*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*/ + __pyx_pw_4cdec_5_cdec_6Scorer_5__call__, /*tp_call*/ + __pyx_pw_4cdec_5_cdec_6Scorer_7__str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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_5_cdec___pyx_scope_struct_19_todot, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Scorer, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -21924,7 +22337,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_19_todot = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_19_todot, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Scorer, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21937,57 +22350,56 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_19_todot = { 0, /*tp_version_tag*/ #endif }; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode __pyx_vtable_4cdec_5_cdec_HypergraphNode; -static PyObject *__pyx_tp_new_5_cdec_Candidate(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_HypergraphNode *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)o); + p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_HypergraphNode; return o; } -static void __pyx_tp_dealloc_5_cdec_Candidate(PyObject *o) { +static void __pyx_tp_dealloc_4cdec_5_cdec_HypergraphNode(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_getprop_5_cdec_9Candidate_words(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_9Candidate_5words_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_in_edges(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(o); } -static PyObject *__pyx_getprop_5_cdec_9Candidate_fmap(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_9Candidate_4fmap_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_out_edges(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(o); } -static PyObject *__pyx_getprop_5_cdec_9Candidate_score(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_9Candidate_5score_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_span(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(o); } -static int __pyx_setprop_5_cdec_9Candidate_score(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_5_cdec_9Candidate_5score_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_cat(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(o); } -static PyMethodDef __pyx_methods_5_cdec_Candidate[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_HypergraphNode[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_5_cdec_Candidate[] = { - {(char *)"words", __pyx_getprop_5_cdec_9Candidate_words, 0, 0, 0}, - {(char *)"fmap", __pyx_getprop_5_cdec_9Candidate_fmap, 0, 0, 0}, - {(char *)"score", __pyx_getprop_5_cdec_9Candidate_score, __pyx_setprop_5_cdec_9Candidate_score, 0, 0}, +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_HypergraphNode[] = { + {(char *)"in_edges", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_in_edges, 0, 0, 0}, + {(char *)"out_edges", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_out_edges, 0, 0, 0}, + {(char *)"span", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_span, 0, 0, 0}, + {(char *)"cat", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_cat, 0, 0, 0}, {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec_Candidate = { +static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphNode = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.Candidate"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_Candidate), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.HypergraphNode"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_HypergraphNode), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_Candidate, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_HypergraphNode, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22010,13 +22422,13 @@ static PyTypeObject __pyx_type_5_cdec_Candidate = { 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ - 0, /*tp_richcompare*/ + __pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_Candidate, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_HypergraphNode, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_5_cdec_Candidate, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_HypergraphNode, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -22024,7 +22436,7 @@ static PyTypeObject __pyx_type_5_cdec_Candidate = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_Candidate, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_HypergraphNode, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22038,81 +22450,81 @@ static PyTypeObject __pyx_type_5_cdec_Candidate = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *__pyx_freelist_5_cdec___pyx_scope_struct_6_genexpr[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_6_genexpr = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_6_genexpr[--__pyx_freecount_5_cdec___pyx_scope_struct_6_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_feat = 0; - p->__pyx_t_0 = 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o); + p->__pyx_v_fmap = 0; + p->__pyx_v_self = 0; + p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_feat); - Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr))) { - __pyx_freelist_5_cdec___pyx_scope_struct_6_genexpr[__pyx_freecount_5_cdec___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *)o); + Py_CLEAR(p->__pyx_v_fmap); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; + if (p->__pyx_v_fmap) { + e = (*v)(((PyObject*)p->__pyx_v_fmap), a); if (e) return e; } - if (p->__pyx_v_feat) { - e = (*v)(p->__pyx_v_feat, 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; + if (p->__pyx_v_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_fmap); + p->__pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_feat); - p->__pyx_v_feat = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_0); - p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_6_genexpr[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_6_genexpr = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_6_genexpr"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_10_kbest_features"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_6_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22133,13 +22545,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_6_genexpr = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_6_genexpr, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_6_genexpr, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_6_genexpr, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22149,7 +22561,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_6_genexpr = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_6_genexpr, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22163,61 +22575,24 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_6_genexpr = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_NT(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec_NT *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_NTRef(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_5_cdec_NT *)o); - p->cat = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_5_cdec_NT(PyObject *o) { - struct __pyx_obj_5_cdec_NT *p = (struct __pyx_obj_5_cdec_NT *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->cat); +static void __pyx_tp_dealloc_4cdec_5_cdec_NTRef(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_5_cdec_NT(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5_cdec_NT *p = (struct __pyx_obj_5_cdec_NT *)o; - if (p->cat) { - e = (*v)(p->cat, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_5_cdec_NT(PyObject *o) { - struct __pyx_obj_5_cdec_NT *p = (struct __pyx_obj_5_cdec_NT *)o; - PyObject* tmp; - tmp = ((PyObject*)p->cat); - p->cat = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_5_cdec_2NT_cat(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_2NT_3cat_1__get__(o); -} - -static int __pyx_setprop_5_cdec_2NT_cat(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_5_cdec_2NT_3cat_3__set__(o, v); - } - else { - return __pyx_pw_5_cdec_2NT_3cat_5__del__(o); - } -} - -static PyObject *__pyx_getprop_5_cdec_2NT_ref(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_2NT_3ref_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_5NTRef_ref(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(o); } -static int __pyx_setprop_5_cdec_2NT_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_4cdec_5_cdec_5NTRef_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_5_cdec_2NT_3ref_3__set__(o, v); + return __pyx_pw_4cdec_5_cdec_5NTRef_3ref_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -22225,22 +22600,21 @@ static int __pyx_setprop_5_cdec_2NT_ref(PyObject *o, PyObject *v, CYTHON_UNUSED } } -static PyMethodDef __pyx_methods_5_cdec_NT[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_NTRef[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_5_cdec_NT[] = { - {(char *)"cat", __pyx_getprop_5_cdec_2NT_cat, __pyx_setprop_5_cdec_2NT_cat, 0, 0}, - {(char *)"ref", __pyx_getprop_5_cdec_2NT_ref, __pyx_setprop_5_cdec_2NT_ref, 0, 0}, +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_NTRef[] = { + {(char *)"ref", __pyx_getprop_4cdec_5_cdec_5NTRef_ref, __pyx_setprop_4cdec_5_cdec_5NTRef_ref, 0, 0}, {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec_NT = { +static PyTypeObject __pyx_type_4cdec_5_cdec_NTRef = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.NT"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_NT), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.NTRef"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_NTRef), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_NT, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_NTRef, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22255,29 +22629,29 @@ static PyTypeObject __pyx_type_5_cdec_NT = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_5_cdec_2NT_3__str__, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_5NTRef_3__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec_NT, /*tp_traverse*/ - __pyx_tp_clear_5_cdec_NT, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_NT, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_NTRef, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_5_cdec_NT, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_NTRef, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_5_cdec_2NT_1__init__, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_5NTRef_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_NT, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_NTRef, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22290,121 +22664,56 @@ static PyTypeObject __pyx_type_5_cdec_NT = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_5_cdec_HypergraphEdge __pyx_vtable_5_cdec_HypergraphEdge; -static PyObject *__pyx_tp_new_5_cdec_HypergraphEdge(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec_HypergraphEdge *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_Grammar(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_5_cdec_HypergraphEdge *)o); - p->__pyx_vtab = __pyx_vtabptr_5_cdec_HypergraphEdge; - p->trule = ((struct __pyx_obj_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_5_cdec_HypergraphEdge(PyObject *o) { - struct __pyx_obj_5_cdec_HypergraphEdge *p = (struct __pyx_obj_5_cdec_HypergraphEdge *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->trule); - (*Py_TYPE(o)->tp_free)(o); -} - -static int __pyx_tp_traverse_5_cdec_HypergraphEdge(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5_cdec_HypergraphEdge *p = (struct __pyx_obj_5_cdec_HypergraphEdge *)o; - if (p->trule) { - e = (*v)(((PyObject*)p->trule), a); if (e) return e; +static void __pyx_tp_dealloc_4cdec_5_cdec_Grammar(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } - return 0; -} - -static int __pyx_tp_clear_5_cdec_HypergraphEdge(PyObject *o) { - struct __pyx_obj_5_cdec_HypergraphEdge *p = (struct __pyx_obj_5_cdec_HypergraphEdge *)o; - PyObject* tmp; - tmp = ((PyObject*)p->trule); - p->trule = ((struct __pyx_obj_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_5_cdec_14HypergraphEdge_head_node(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphEdge_9head_node_1__get__(o); -} - -static PyObject *__pyx_getprop_5_cdec_14HypergraphEdge_tail_nodes(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(o); -} - -static PyObject *__pyx_getprop_5_cdec_14HypergraphEdge_span(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphEdge_4span_1__get__(o); -} - -static PyObject *__pyx_getprop_5_cdec_14HypergraphEdge_src_span(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphEdge_8src_span_1__get__(o); -} - -static PyObject *__pyx_getprop_5_cdec_14HypergraphEdge_feature_values(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphEdge_14feature_values_1__get__(o); -} - -static PyObject *__pyx_getprop_5_cdec_14HypergraphEdge_prob(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphEdge_4prob_1__get__(o); + (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_getprop_5_cdec_14HypergraphEdge_trule(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphEdge_5trule_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_7Grammar_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(o); } -static int __pyx_setprop_5_cdec_14HypergraphEdge_trule(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_4cdec_5_cdec_7Grammar_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_5_cdec_14HypergraphEdge_5trule_3__set__(o, v); + return __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(o, v); } else { - return __pyx_pw_5_cdec_14HypergraphEdge_5trule_5__del__(o); + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; } } -static PyMethodDef __pyx_methods_5_cdec_HypergraphEdge[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_Grammar[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_5_cdec_HypergraphEdge[] = { - {(char *)"head_node", __pyx_getprop_5_cdec_14HypergraphEdge_head_node, 0, 0, 0}, - {(char *)"tail_nodes", __pyx_getprop_5_cdec_14HypergraphEdge_tail_nodes, 0, 0, 0}, - {(char *)"span", __pyx_getprop_5_cdec_14HypergraphEdge_span, 0, 0, 0}, - {(char *)"src_span", __pyx_getprop_5_cdec_14HypergraphEdge_src_span, 0, 0, 0}, - {(char *)"feature_values", __pyx_getprop_5_cdec_14HypergraphEdge_feature_values, 0, 0, 0}, - {(char *)"prob", __pyx_getprop_5_cdec_14HypergraphEdge_prob, 0, 0, 0}, - {(char *)"trule", __pyx_getprop_5_cdec_14HypergraphEdge_trule, __pyx_setprop_5_cdec_14HypergraphEdge_trule, 0, 0}, +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Grammar[] = { + {(char *)"name", __pyx_getprop_4cdec_5_cdec_7Grammar_name, __pyx_setprop_4cdec_5_cdec_7Grammar_name, 0, 0}, {0, 0, 0, 0, 0} }; -static PySequenceMethods __pyx_tp_as_sequence_HypergraphEdge = { - __pyx_pw_5_cdec_14HypergraphEdge_1__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_HypergraphEdge = { - __pyx_pw_5_cdec_14HypergraphEdge_1__len__, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyTypeObject __pyx_type_5_cdec_HypergraphEdge = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.HypergraphEdge"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_HypergraphEdge), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Grammar"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Grammar), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_HypergraphEdge, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Grammar, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22415,25 +22724,25 @@ static PyTypeObject __pyx_type_5_cdec_HypergraphEdge = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_HypergraphEdge, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_HypergraphEdge, /*tp_as_mapping*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec_HypergraphEdge, /*tp_traverse*/ - __pyx_tp_clear_5_cdec_HypergraphEdge, /*tp_clear*/ - __pyx_pw_5_cdec_14HypergraphEdge_3__richcmp__, /*tp_richcompare*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_7Grammar_3__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_HypergraphEdge, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Grammar, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_5_cdec_HypergraphEdge, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Grammar, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -22441,7 +22750,7 @@ static PyTypeObject __pyx_type_5_cdec_HypergraphEdge = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_HypergraphEdge, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Grammar, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22454,66 +22763,81 @@ static PyTypeObject __pyx_type_5_cdec_HypergraphEdge = { 0, /*tp_version_tag*/ #endif }; +static struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph __pyx_vtable_4cdec_5_cdec_Hypergraph; -static struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *__pyx_freelist_5_cdec___pyx_scope_struct_1___iter__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_1___iter__ = 0; - -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_Hypergraph(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_Hypergraph *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_1___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_1___iter__[--__pyx_freecount_5_cdec___pyx_scope_struct_1___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *)o); - p->__pyx_v_self = 0; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)o); + p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_Hypergraph; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_1___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_1___iter__[__pyx_freecount_5_cdec___pyx_scope_struct_1___iter__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_Hypergraph(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_1___iter__(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; - } - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_edges(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(o); } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_nodes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(o); } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_1___iter__[] = { +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_goal(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_npaths(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_Hypergraph[] = { + {__Pyx_NAMESTR("viterbi"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_2viterbi)}, + {__Pyx_NAMESTR("viterbi_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_4viterbi_trees)}, + {__Pyx_NAMESTR("viterbi_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_6viterbi_features)}, + {__Pyx_NAMESTR("viterbi_forest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("viterbi_joshua"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_10viterbi_joshua)}, + {__Pyx_NAMESTR("kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_12kbest)}, + {__Pyx_NAMESTR("kbest_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_15kbest_trees)}, + {__Pyx_NAMESTR("kbest_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_18kbest_features)}, + {__Pyx_NAMESTR("sample"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_21sample)}, + {__Pyx_NAMESTR("sample_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_24sample_trees)}, + {__Pyx_NAMESTR("intersect"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_28intersect, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_27intersect)}, + {__Pyx_NAMESTR("prune"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_29prune)}, + {__Pyx_NAMESTR("lattice"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_32lattice, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_31lattice)}, + {__Pyx_NAMESTR("plf"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_34plf, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_33plf)}, + {__Pyx_NAMESTR("reweight"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_36reweight, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_35reweight)}, + {__Pyx_NAMESTR("inside_outside"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_38inside_outside, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_37inside_outside)}, {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_1___iter__ = { +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Hypergraph[] = { + {(char *)"edges", __pyx_getprop_4cdec_5_cdec_10Hypergraph_edges, 0, 0, 0}, + {(char *)"nodes", __pyx_getprop_4cdec_5_cdec_10Hypergraph_nodes, 0, 0, 0}, + {(char *)"goal", __pyx_getprop_4cdec_5_cdec_10Hypergraph_goal, 0, 0, 0}, + {(char *)"npaths", __pyx_getprop_4cdec_5_cdec_10Hypergraph_npaths, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_1___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Hypergraph"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Hypergraph), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_1___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Hypergraph, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22532,17 +22856,17 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_1___iter__ = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_1___iter__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_1___iter__, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_1___iter__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Hypergraph, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Hypergraph, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -22550,7 +22874,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_1___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_1___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Hypergraph, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22564,65 +22888,65 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_1___iter__ = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *__pyx_freelist_5_cdec___pyx_scope_struct_16___get__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_16___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_16___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_16___get__[--__pyx_freecount_5_cdec___pyx_scope_struct_16___get__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *)o); - p->__pyx_v_self = 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o); + p->__pyx_v_config = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_16___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_16___get__[__pyx_freecount_5_cdec___pyx_scope_struct_16___get__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *)o); + Py_CLEAR(p->__pyx_v_config); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_16___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; + if (p->__pyx_v_config) { + e = (*v)(p->__pyx_v_config, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_config); + p->__pyx_v_config = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_16___get__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_24___init__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_16___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_16___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_24___init__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_16___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22643,13 +22967,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_16___get__ = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_16___get__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_16___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_16___get__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22659,7 +22983,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_16___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_16___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22673,65 +22997,66 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_16___get__ = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *__pyx_freelist_5_cdec___pyx_scope_struct_4___get__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_4___get__ = 0; - -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_CandidateSet(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_4___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_4___get__[--__pyx_freecount_5_cdec___pyx_scope_struct_4___get__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_4___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_4___get__[__pyx_freecount_5_cdec___pyx_scope_struct_4___get__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} - -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_4___get__(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; +static void __pyx_tp_dealloc_4cdec_5_cdec_CandidateSet(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } - return 0; + (*Py_TYPE(o)->tp_free)(o); } - -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_sq_item_4cdec_5_cdec_CandidateSet(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_4___get__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_CandidateSet[] = { + {__Pyx_NAMESTR("add_kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12CandidateSet_11add_kbest)}, {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_4___get__ = { +static PySequenceMethods __pyx_tp_as_sequence_CandidateSet = { + __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_CandidateSet, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_CandidateSet = { + __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_4___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.CandidateSet"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_CandidateSet), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_4___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_CandidateSet, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22742,23 +23067,23 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_4___get__ = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_sequence_CandidateSet, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_CandidateSet, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_4___get__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_4___get__, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_4___get__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_CandidateSet, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22768,7 +23093,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_4___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_4___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_CandidateSet, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22782,65 +23107,89 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_4___get__ = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *__pyx_freelist_5_cdec___pyx_scope_struct_18___iter__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_18___iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_18___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_18___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_18___iter__[--__pyx_freecount_5_cdec___pyx_scope_struct_18___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *)o); + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o); + p->__pyx_v_e_tree = 0; + p->__pyx_v_f_tree = 0; p->__pyx_v_self = 0; + p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_18___iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_e_tree); + Py_CLEAR(p->__pyx_v_f_tree); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_18___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_18___iter__[__pyx_freecount_5_cdec___pyx_scope_struct_18___iter__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *)o); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_18___iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; + if (p->__pyx_v_e_tree) { + e = (*v)(p->__pyx_v_e_tree, a); if (e) return e; + } + if (p->__pyx_v_f_tree) { + e = (*v)(p->__pyx_v_f_tree, a); if (e) return e; + } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } + if (p->__pyx_v_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; + } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_18___iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_e_tree); + p->__pyx_v_e_tree = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_f_tree); + p->__pyx_v_f_tree = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_18___iter__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_18___iter__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_18___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_18___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_9_kbest_trees"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_18___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22861,13 +23210,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_18___iter__ = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_18___iter__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_18___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_18___iter__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22877,7 +23226,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_18___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_18___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22891,86 +23240,65 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_18___iter__ = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_Decoder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec_Decoder *p; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_5_cdec_Decoder *)o); - p->weights = ((struct __pyx_obj_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec_Decoder(PyObject *o) { - struct __pyx_obj_5_cdec_Decoder *p = (struct __pyx_obj_5_cdec_Decoder *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; PyObject_GC_UnTrack(o); - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_5_cdec_7Decoder_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - Py_CLEAR(p->weights); - (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_5_cdec_Decoder(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec_Decoder *p = (struct __pyx_obj_5_cdec_Decoder *)o; - if (p->weights) { - e = (*v)(((PyObject*)p->weights), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec_Decoder(PyObject *o) { - struct __pyx_obj_5_cdec_Decoder *p = (struct __pyx_obj_5_cdec_Decoder *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; PyObject* tmp; - tmp = ((PyObject*)p->weights); - p->weights = ((struct __pyx_obj_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_getprop_5_cdec_7Decoder_weights(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_7Decoder_7weights_1__get__(o); -} - -static int __pyx_setprop_5_cdec_7Decoder_weights(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_5_cdec_7Decoder_7weights_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_5_cdec_7Decoder_formalism(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_7Decoder_9formalism_1__get__(o); -} - -static PyMethodDef __pyx_methods_5_cdec_Decoder[] = { - {__Pyx_NAMESTR("read_weights"), (PyCFunction)__pyx_pw_5_cdec_7Decoder_5read_weights, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_7Decoder_4read_weights)}, - {__Pyx_NAMESTR("translate"), (PyCFunction)__pyx_pw_5_cdec_7Decoder_7translate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5_cdec_7Decoder_6translate)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_19_todot[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_5_cdec_Decoder[] = { - {(char *)"weights", __pyx_getprop_5_cdec_7Decoder_weights, __pyx_setprop_5_cdec_7Decoder_weights, 0, 0}, - {(char *)"formalism", __pyx_getprop_5_cdec_7Decoder_formalism, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_5_cdec_Decoder = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.Decoder"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_Decoder), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_19_todot"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_Decoder, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22989,25 +23317,25 @@ static PyTypeObject __pyx_type_5_cdec_Decoder = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec_Decoder, /*tp_traverse*/ - __pyx_tp_clear_5_cdec_Decoder, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_Decoder, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_5_cdec_Decoder, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_5_cdec_7Decoder_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_Decoder, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23020,56 +23348,66 @@ static PyTypeObject __pyx_type_5_cdec_Decoder = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_5_cdec_HypergraphNode __pyx_vtable_5_cdec_HypergraphNode; -static PyObject *__pyx_tp_new_5_cdec_HypergraphNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec_HypergraphNode *p; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_5_cdec_HypergraphNode *)o); - p->__pyx_vtab = __pyx_vtabptr_5_cdec_HypergraphNode; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec_HypergraphNode(PyObject *o) { - (*Py_TYPE(o)->tp_free)(o); -} - -static PyObject *__pyx_getprop_5_cdec_14HypergraphNode_in_edges(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphNode_8in_edges_1__get__(o); -} - -static PyObject *__pyx_getprop_5_cdec_14HypergraphNode_out_edges(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphNode_9out_edges_1__get__(o); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } -static PyObject *__pyx_getprop_5_cdec_14HypergraphNode_span(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphNode_4span_1__get__(o); +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + } + return 0; } -static PyObject *__pyx_getprop_5_cdec_14HypergraphNode_cat(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_14HypergraphNode_3cat_1__get__(o); +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static PyMethodDef __pyx_methods_5_cdec_HypergraphNode[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_5___str__[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_5_cdec_HypergraphNode[] = { - {(char *)"in_edges", __pyx_getprop_5_cdec_14HypergraphNode_in_edges, 0, 0, 0}, - {(char *)"out_edges", __pyx_getprop_5_cdec_14HypergraphNode_out_edges, 0, 0, 0}, - {(char *)"span", __pyx_getprop_5_cdec_14HypergraphNode_span, 0, 0, 0}, - {(char *)"cat", __pyx_getprop_5_cdec_14HypergraphNode_cat, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_5_cdec_HypergraphNode = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.HypergraphNode"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_HypergraphNode), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_5___str__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_HypergraphNode, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23088,17 +23426,17 @@ static PyTypeObject __pyx_type_5_cdec_HypergraphNode = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - __pyx_pw_5_cdec_14HypergraphNode_1__richcmp__, /*tp_richcompare*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_clear*/ + 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_HypergraphNode, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_5_cdec_HypergraphNode, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -23106,7 +23444,7 @@ static PyTypeObject __pyx_type_5_cdec_HypergraphNode = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_HypergraphNode, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23120,133 +23458,38 @@ static PyTypeObject __pyx_type_5_cdec_HypergraphNode = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_SparseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_SegmentEvaluator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_5_cdec_SparseVector(PyObject *o) { +static void __pyx_tp_dealloc_4cdec_5_cdec_SegmentEvaluator(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_5_cdec_12SparseVector_3__dealloc__(o); + __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__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_5_cdec_SparseVector(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; -} -static int __pyx_mp_ass_subscript_5_cdec_SparseVector(PyObject *o, PyObject *i, PyObject *v) { - if (v) { - return __pyx_pw_5_cdec_12SparseVector_9__setitem__(o, i, v); - } - else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); - return -1; - } -} - -static PyMethodDef __pyx_methods_5_cdec_SparseVector[] = { - {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_5_cdec_12SparseVector_5copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_12SparseVector_4copy)}, - {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_5_cdec_12SparseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_12SparseVector_13dot)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec_SegmentEvaluator[] = { + {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_16SegmentEvaluator_2evaluate)}, + {__Pyx_NAMESTR("candidate_set"), (PyCFunction)__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_16SegmentEvaluator_4candidate_set)}, {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_SparseVector = { - __pyx_pw_5_cdec_12SparseVector_32__add__, /*nb_add*/ - __pyx_pw_5_cdec_12SparseVector_34__sub__, /*nb_subtract*/ - __pyx_pw_5_cdec_12SparseVector_36__mul__, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - __pyx_pw_5_cdec_12SparseVector_38__div__, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - __pyx_pw_5_cdec_12SparseVector_22__neg__, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - __pyx_pw_5_cdec_12SparseVector_24__iadd__, /*nb_inplace_add*/ - __pyx_pw_5_cdec_12SparseVector_26__isub__, /*nb_inplace_subtract*/ - __pyx_pw_5_cdec_12SparseVector_28__imul__, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - __pyx_pw_5_cdec_12SparseVector_30__idiv__, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_SparseVector = { - __pyx_pw_5_cdec_12SparseVector_18__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_5_cdec_SparseVector, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - __pyx_pw_5_cdec_12SparseVector_20__contains__, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_SparseVector = { - __pyx_pw_5_cdec_12SparseVector_18__len__, /*mp_length*/ - __pyx_pw_5_cdec_12SparseVector_7__getitem__, /*mp_subscript*/ - __pyx_mp_ass_subscript_5_cdec_SparseVector, /*mp_ass_subscript*/ -}; - -static PyTypeObject __pyx_type_5_cdec_SparseVector = { +static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.SparseVector"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_SparseVector), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.SegmentEvaluator"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_SparseVector, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_SegmentEvaluator, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23256,9 +23499,9 @@ static PyTypeObject __pyx_type_5_cdec_SparseVector = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_SparseVector, /*tp_as_number*/ - &__pyx_tp_as_sequence_SparseVector, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_SparseVector, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ @@ -23269,11 +23512,11 @@ static PyTypeObject __pyx_type_5_cdec_SparseVector = { 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ - __pyx_pw_5_cdec_12SparseVector_16__richcmp__, /*tp_richcompare*/ + 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_5_cdec_12SparseVector_11__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_SparseVector, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_SegmentEvaluator, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23281,9 +23524,9 @@ static PyTypeObject __pyx_type_5_cdec_SparseVector = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_5_cdec_12SparseVector_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_SparseVector, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_SegmentEvaluator, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23297,65 +23540,65 @@ static PyTypeObject __pyx_type_5_cdec_SparseVector = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *__pyx_freelist_5_cdec___pyx_scope_struct_17___get__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_17___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_17___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_17___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_17___get__[--__pyx_freecount_5_cdec___pyx_scope_struct_17___get__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *)o); + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o); p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_17___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_17___get__[__pyx_freecount_5_cdec___pyx_scope_struct_17___get__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_17___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_17___get__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_16___get__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_17___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_17___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_16___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_17___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23376,13 +23619,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_17___get__ = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_17___get__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_17___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_17___get__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23392,7 +23635,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_17___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_17___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23406,65 +23649,81 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_17___get__ = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *__pyx_freelist_5_cdec___pyx_scope_struct____iter__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct____iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct____iter__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct____iter__[--__pyx_freecount_5_cdec___pyx_scope_struct____iter__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct____iter__)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *)o); - p->__pyx_v_self = 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o); + p->__pyx_outer_scope = 0; + p->__pyx_v_kv = 0; + p->__pyx_t_0 = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct____iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct____iter__))) { - __pyx_freelist_5_cdec___pyx_scope_struct____iter__[__pyx_freecount_5_cdec___pyx_scope_struct____iter__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *)o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_kv); + Py_CLEAR(p->__pyx_t_0); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_v_kv) { + e = (*v)(p->__pyx_v_kv, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct____iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_kv); + p->__pyx_v_kv = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_t_0); + p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct____iter__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_25_genexpr[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct____iter__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct____iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct____iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_25_genexpr"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct____iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23485,13 +23744,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct____iter__ = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct____iter__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct____iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct____iter__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23501,7 +23760,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct____iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct____iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23515,81 +23774,81 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct____iter__ = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *__pyx_freelist_5_cdec___pyx_scope_struct_21___iter__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_21___iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_21___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_21___iter__[--__pyx_freecount_5_cdec___pyx_scope_struct_21___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *)o); - p->__pyx_v_i = 0; - p->__pyx_v_self = 0; - p->__pyx_t_1 = 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o); + p->__pyx_outer_scope = 0; + p->__pyx_v_w = 0; + p->__pyx_t_0 = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_i); - Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_t_1); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_21___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_21___iter__[__pyx_freecount_5_cdec___pyx_scope_struct_21___iter__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *)o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_w); + Py_CLEAR(p->__pyx_t_0); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_21___iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *)o; - if (p->__pyx_v_i) { - e = (*v)(p->__pyx_v_i, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + if (p->__pyx_v_w) { + e = (*v)(p->__pyx_v_w, a); if (e) return e; } - if (p->__pyx_t_1) { - e = (*v)(p->__pyx_t_1, 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_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_i); - p->__pyx_v_i = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_SufficientStats *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_w); + p->__pyx_v_w = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_1); - p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_t_0); + p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_21___iter__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_3_genexpr[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_21___iter__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_21___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_3_genexpr"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_21___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23610,13 +23869,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_21___iter__ = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_21___iter__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_21___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_21___iter__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23626,7 +23885,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_21___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_21___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23640,75 +23899,65 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_21___iter__ = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_DenseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec_DenseVector(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_5_cdec_11DenseVector_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); -} -static PyObject *__pyx_sq_item_5_cdec_DenseVector(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; } -static int __pyx_mp_ass_subscript_5_cdec_DenseVector(PyObject *o, PyObject *i, PyObject *v) { - if (v) { - return __pyx_pw_5_cdec_11DenseVector_9__setitem__(o, i, v); - } - else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); - return -1; +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } + return 0; } -static PyMethodDef __pyx_methods_5_cdec_DenseVector[] = { - {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_5_cdec_11DenseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_11DenseVector_13dot)}, - {__Pyx_NAMESTR("tosparse"), (PyCFunction)__pyx_pw_5_cdec_11DenseVector_16tosparse, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_11DenseVector_15tosparse)}, - {0, 0, 0, 0} -}; - -static PySequenceMethods __pyx_tp_as_sequence_DenseVector = { - __pyx_pw_5_cdec_11DenseVector_5__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_5_cdec_DenseVector, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} -static PyMappingMethods __pyx_tp_as_mapping_DenseVector = { - __pyx_pw_5_cdec_11DenseVector_5__len__, /*mp_length*/ - __pyx_pw_5_cdec_11DenseVector_7__getitem__, /*mp_subscript*/ - __pyx_mp_ass_subscript_5_cdec_DenseVector, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_11_sample[] = { + {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec_DenseVector = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.DenseVector"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_DenseVector), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_11_sample"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_DenseVector, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23719,23 +23968,23 @@ static PyTypeObject __pyx_type_5_cdec_DenseVector = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_DenseVector, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_DenseVector, /*tp_as_mapping*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_5_cdec_11DenseVector_11__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_DenseVector, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23743,9 +23992,9 @@ static PyTypeObject __pyx_type_5_cdec_DenseVector = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_5_cdec_11DenseVector_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_DenseVector, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23759,73 +24008,73 @@ static PyTypeObject __pyx_type_5_cdec_DenseVector = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *__pyx_freelist_5_cdec___pyx_scope_struct_7___iter__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_7___iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_7___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_7___iter__[--__pyx_freecount_5_cdec___pyx_scope_struct_7___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *)o); + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o); p->__pyx_v_self = 0; - p->__pyx_v_trule = 0; + p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_trule); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_7___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_7___iter__[__pyx_freecount_5_cdec___pyx_scope_struct_7___iter__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *)o); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_7___iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } - if (p->__pyx_v_trule) { - e = (*v)(((PyObject*)p->__pyx_v_trule), a); if (e) return e; + if (p->__pyx_v_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_Grammar *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_trule); - p->__pyx_v_trule = ((struct __pyx_obj_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_7___iter__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_8_kbest[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_7___iter__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_7___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_8_kbest"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_7___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23846,13 +24095,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_7___iter__ = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_7___iter__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_7___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_7___iter__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23862,7 +24111,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_7___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_7___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23876,56 +24125,65 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_7___iter__ = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_Metric(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec_Metric *p; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_5_cdec_Metric *)o); - p->scorer = ((struct __pyx_obj_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); - if (unlikely(__pyx_pw_5_cdec_6Metric_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { - Py_DECREF(o); o = 0; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec_Metric(PyObject *o) { - struct __pyx_obj_5_cdec_Metric *p = (struct __pyx_obj_5_cdec_Metric *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->scorer); - (*Py_TYPE(o)->tp_free)(o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } -static int __pyx_tp_traverse_5_cdec_Metric(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec_Metric *p = (struct __pyx_obj_5_cdec_Metric *)o; - if (p->scorer) { - e = (*v)(((PyObject*)p->scorer), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec_Metric(PyObject *o) { - struct __pyx_obj_5_cdec_Metric *p = (struct __pyx_obj_5_cdec_Metric *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; PyObject* tmp; - tmp = ((PyObject*)p->scorer); - p->scorer = ((struct __pyx_obj_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec_Metric[] = { - {__Pyx_NAMESTR("score"), (PyCFunction)__pyx_pw_5_cdec_6Metric_5score, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_5_cdec_6Metric_7evaluate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_14___get__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec_Metric = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.Metric"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_Metric), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_14___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_Metric, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23939,20 +24197,20 @@ static PyTypeObject __pyx_type_5_cdec_Metric = { 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_5_cdec_6Metric_3__call__, /*tp_call*/ + 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec_Metric, /*tp_traverse*/ - __pyx_tp_clear_5_cdec_Metric, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_Metric, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23962,7 +24220,7 @@ static PyTypeObject __pyx_type_5_cdec_Metric = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_Metric, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23976,134 +24234,73 @@ static PyTypeObject __pyx_type_5_cdec_Metric = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_SufficientStats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o); + p->__pyx_v_self = 0; + p->__pyx_v_trule = 0; return o; } -static void __pyx_tp_dealloc_5_cdec_SufficientStats(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_5_cdec_15SufficientStats_1__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_v_trule); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); -} -static PyObject *__pyx_sq_item_5_cdec_SufficientStats(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; } -static PyObject *__pyx_getprop_5_cdec_15SufficientStats_score(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_15SufficientStats_5score_1__get__(o); +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + } + if (p->__pyx_v_trule) { + e = (*v)(((PyObject*)p->__pyx_v_trule), a); if (e) return e; + } + return 0; } -static PyObject *__pyx_getprop_5_cdec_15SufficientStats_detail(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_15SufficientStats_6detail_1__get__(o); +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Grammar *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_trule); + p->__pyx_v_trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static PyMethodDef __pyx_methods_5_cdec_SufficientStats[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_7___iter__[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_5_cdec_SufficientStats[] = { - {(char *)"score", __pyx_getprop_5_cdec_15SufficientStats_score, 0, 0, 0}, - {(char *)"detail", __pyx_getprop_5_cdec_15SufficientStats_detail, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_SufficientStats = { - __pyx_pw_5_cdec_15SufficientStats_12__add__, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - __pyx_pw_5_cdec_15SufficientStats_10__iadd__, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_SufficientStats = { - __pyx_pw_5_cdec_15SufficientStats_3__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_5_cdec_SufficientStats, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_SufficientStats = { - __pyx_pw_5_cdec_15SufficientStats_3__len__, /*mp_length*/ - __pyx_pw_5_cdec_15SufficientStats_8__getitem__, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyTypeObject __pyx_type_5_cdec_SufficientStats = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.SufficientStats"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_SufficientStats), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_7___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_SufficientStats, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24113,26 +24310,26 @@ static PyTypeObject __pyx_type_5_cdec_SufficientStats = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_SufficientStats, /*tp_as_number*/ - &__pyx_tp_as_sequence_SufficientStats, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_SufficientStats, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_5_cdec_15SufficientStats_5__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_SufficientStats, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_5_cdec_SufficientStats, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -24140,7 +24337,7 @@ static PyTypeObject __pyx_type_5_cdec_SufficientStats = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_SufficientStats, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24154,73 +24351,22 @@ static PyTypeObject __pyx_type_5_cdec_SufficientStats = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *__pyx_freelist_5_cdec___pyx_scope_struct_8_kbest[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_8_kbest = 0; - -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_8_kbest(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *p; - PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_8_kbest > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_8_kbest[--__pyx_freecount_5_cdec___pyx_scope_struct_8_kbest]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *)o); - p->__pyx_v_self = 0; - p->__pyx_v_size = 0; +static PyObject *__pyx_tp_new_4cdec_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = __pyx_tp_new_4cdec_5_cdec_Grammar(t, a, k); + if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_size); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_8_kbest < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest))) { - __pyx_freelist_5_cdec___pyx_scope_struct_8_kbest[__pyx_freecount_5_cdec___pyx_scope_struct_8_kbest++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} - -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_8_kbest(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; - } - if (p->__pyx_v_size) { - e = (*v)(p->__pyx_v_size, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_size); - p->__pyx_v_size = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_8_kbest[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_TextGrammar[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_8_kbest = { +static PyTypeObject __pyx_type_4cdec_5_cdec_TextGrammar = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_8_kbest"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.TextGrammar"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_TextGrammar), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_8_kbest, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Grammar, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24239,15 +24385,19 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_8_kbest = { 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_5_cdec___pyx_scope_struct_8_kbest, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_8_kbest, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_4cdec_5_cdec_7Grammar_3__iter__, /*tp_iter*/ + #else 0, /*tp_iter*/ + #endif 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_8_kbest, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_TextGrammar, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24255,9 +24405,9 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_8_kbest = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_8_kbest, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_TextGrammar, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24271,81 +24421,86 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_8_kbest = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_freelist_5_cdec___pyx_scope_struct_10_kbest_features[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_10_kbest_features = 0; - -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_Decoder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_Decoder *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_10_kbest_features > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_10_kbest_features[--__pyx_freecount_5_cdec___pyx_scope_struct_10_kbest_features]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *)o); - p->__pyx_v_fmap = 0; - p->__pyx_v_self = 0; - p->__pyx_v_size = 0; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_Decoder *)o); + p->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec_Decoder(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_fmap); - Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_size); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_10_kbest_features < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features))) { - __pyx_freelist_5_cdec___pyx_scope_struct_10_kbest_features[__pyx_freecount_5_cdec___pyx_scope_struct_10_kbest_features++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } + Py_CLEAR(p->weights); + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec_Decoder(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *)o; - if (p->__pyx_v_fmap) { - e = (*v)(((PyObject*)p->__pyx_v_fmap), a); if (e) return e; - } - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; - } - if (p->__pyx_v_size) { - e = (*v)(p->__pyx_v_size, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; + if (p->weights) { + e = (*v)(((PyObject*)p->weights), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features *)o; +static int __pyx_tp_clear_4cdec_5_cdec_Decoder(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_fmap); - p->__pyx_v_fmap = ((struct __pyx_obj_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_size); - p->__pyx_v_size = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->weights); + p->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_10_kbest_features[] = { +static PyObject *__pyx_getprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_7Decoder_formalism(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_Decoder[] = { + {__Pyx_NAMESTR("read_weights"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Decoder_4read_weights)}, + {__Pyx_NAMESTR("translate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Decoder_7translate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Decoder_6translate)}, {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_10_kbest_features = { +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Decoder[] = { + {(char *)"weights", __pyx_getprop_4cdec_5_cdec_7Decoder_weights, __pyx_setprop_4cdec_5_cdec_7Decoder_weights, 0, 0}, + {(char *)"formalism", __pyx_getprop_4cdec_5_cdec_7Decoder_formalism, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_Decoder = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_10_kbest_features"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Decoder"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Decoder), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Decoder, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24364,25 +24519,25 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_10_kbest_features = { 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_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec_Decoder, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_Decoder, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Decoder, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Decoder, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_7Decoder_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Decoder, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24396,65 +24551,65 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_10_kbest_features = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *__pyx_freelist_5_cdec___pyx_scope_struct_15___get__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_15___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_15___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_15___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_15___get__[--__pyx_freecount_5_cdec___pyx_scope_struct_15___get__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *)o); + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o); p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_15___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_15___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_15___get__[__pyx_freecount_5_cdec___pyx_scope_struct_15___get__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_15___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_15___get__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_HypergraphEdge *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_15___get__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct____iter__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_15___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_15___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct____iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_15___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24475,13 +24630,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_15___get__ = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_15___get__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_15___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_15___get__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24491,7 +24646,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_15___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_15___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24505,65 +24660,65 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_15___get__ = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *__pyx_freelist_5_cdec___pyx_scope_struct_5___str__[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_5___str__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_5___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_5___str__[--__pyx_freecount_5_cdec___pyx_scope_struct_5___str__]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *)o); + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o); p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_5___str__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_5___str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__))) { - __pyx_freelist_5_cdec___pyx_scope_struct_5___str__[__pyx_freecount_5_cdec___pyx_scope_struct_5___str__++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_5___str__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_5___str__(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_5___str__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_17___get__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_5___str__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_5___str__"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_17___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_5___str__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24584,13 +24739,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_5___str__ = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_5___str__, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_5___str__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_5___str__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24600,7 +24755,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_5___str__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_5___str__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24614,89 +24769,65 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_5___str__ = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_freelist_5_cdec___pyx_scope_struct_9_kbest_trees[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_9_kbest_trees = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_9_kbest_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_9_kbest_trees[--__pyx_freecount_5_cdec___pyx_scope_struct_9_kbest_trees]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *)o); - p->__pyx_v_e_tree = 0; - p->__pyx_v_f_tree = 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o); p->__pyx_v_self = 0; - p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_e_tree); - Py_CLEAR(p->__pyx_v_f_tree); Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_size); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_9_kbest_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees))) { - __pyx_freelist_5_cdec___pyx_scope_struct_9_kbest_trees[__pyx_freecount_5_cdec___pyx_scope_struct_9_kbest_trees++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *)o; - if (p->__pyx_v_e_tree) { - e = (*v)(p->__pyx_v_e_tree, a); if (e) return e; - } - if (p->__pyx_v_f_tree) { - e = (*v)(p->__pyx_v_f_tree, a); if (e) return e; - } + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } - if (p->__pyx_v_size) { - e = (*v)(p->__pyx_v_size, a); if (e) return e; - } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_e_tree); - p->__pyx_v_e_tree = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_f_tree); - p->__pyx_v_f_tree = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_size); - p->__pyx_v_size = Py_None; Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_9_kbest_trees[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_18___iter__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_9_kbest_trees = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_9_kbest_trees"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_18___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24717,13 +24848,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_9_kbest_trees = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24733,7 +24864,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_9_kbest_trees = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24746,81 +24877,82 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_9_kbest_trees = { 0, /*tp_version_tag*/ #endif }; -static struct __pyx_vtabstruct_5_cdec_Hypergraph __pyx_vtable_5_cdec_Hypergraph; -static PyObject *__pyx_tp_new_5_cdec_Hypergraph(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec_Hypergraph *p; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_5_cdec_Hypergraph *)o); - p->__pyx_vtab = __pyx_vtabptr_5_cdec_Hypergraph; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o); + p->__pyx_outer_scope = 0; + p->__pyx_v_feat = 0; + p->__pyx_t_0 = 0; return o; } -static void __pyx_tp_dealloc_5_cdec_Hypergraph(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_5_cdec_10Hypergraph_1__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_feat); + Py_CLEAR(p->__pyx_t_0); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_getprop_5_cdec_10Hypergraph_edges(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_10Hypergraph_5edges_1__get__(o); -} - -static PyObject *__pyx_getprop_5_cdec_10Hypergraph_nodes(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_10Hypergraph_5nodes_1__get__(o); -} - -static PyObject *__pyx_getprop_5_cdec_10Hypergraph_goal(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_10Hypergraph_4goal_1__get__(o); +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_v_feat) { + e = (*v)(p->__pyx_v_feat, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; } -static PyObject *__pyx_getprop_5_cdec_10Hypergraph_npaths(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5_cdec_10Hypergraph_6npaths_1__get__(o); +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_feat); + p->__pyx_v_feat = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_t_0); + p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static PyMethodDef __pyx_methods_5_cdec_Hypergraph[] = { - {__Pyx_NAMESTR("viterbi"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_3viterbi, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_2viterbi)}, - {__Pyx_NAMESTR("viterbi_trees"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_5viterbi_trees, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_4viterbi_trees)}, - {__Pyx_NAMESTR("viterbi_features"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_7viterbi_features, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_6viterbi_features)}, - {__Pyx_NAMESTR("viterbi_forest"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_9viterbi_forest, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("viterbi_joshua"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_11viterbi_joshua, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_10viterbi_joshua)}, - {__Pyx_NAMESTR("kbest"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_13kbest, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_12kbest)}, - {__Pyx_NAMESTR("kbest_trees"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_16kbest_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_15kbest_trees)}, - {__Pyx_NAMESTR("kbest_features"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_19kbest_features, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_18kbest_features)}, - {__Pyx_NAMESTR("sample"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_22sample, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_21sample)}, - {__Pyx_NAMESTR("sample_trees"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_25sample_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_24sample_trees)}, - {__Pyx_NAMESTR("intersect"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_28intersect, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_27intersect)}, - {__Pyx_NAMESTR("prune"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_30prune, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_29prune)}, - {__Pyx_NAMESTR("lattice"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_32lattice, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_31lattice)}, - {__Pyx_NAMESTR("plf"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_34plf, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_33plf)}, - {__Pyx_NAMESTR("reweight"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_36reweight, METH_O, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_35reweight)}, - {__Pyx_NAMESTR("inside_outside"), (PyCFunction)__pyx_pw_5_cdec_10Hypergraph_38inside_outside, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_10Hypergraph_37inside_outside)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_6_genexpr[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_5_cdec_Hypergraph[] = { - {(char *)"edges", __pyx_getprop_5_cdec_10Hypergraph_edges, 0, 0, 0}, - {(char *)"nodes", __pyx_getprop_5_cdec_10Hypergraph_nodes, 0, 0, 0}, - {(char *)"goal", __pyx_getprop_5_cdec_10Hypergraph_goal, 0, 0, 0}, - {(char *)"npaths", __pyx_getprop_5_cdec_10Hypergraph_npaths, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_5_cdec_Hypergraph = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.Hypergraph"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_Hypergraph), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_6_genexpr"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_Hypergraph, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24839,17 +24971,17 @@ static PyTypeObject __pyx_type_5_cdec_Hypergraph = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_Hypergraph, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_5_cdec_Hypergraph, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -24857,7 +24989,7 @@ static PyTypeObject __pyx_type_5_cdec_Hypergraph = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_Hypergraph, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24871,79 +25003,65 @@ static PyTypeObject __pyx_type_5_cdec_Hypergraph = { #endif }; -static PyObject *__pyx_tp_new_5_cdec_Lattice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - if (unlikely(__pyx_pw_5_cdec_7Lattice_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { - Py_DECREF(o); o = 0; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec_Lattice(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_5_cdec_7Lattice_5__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); -} -static PyObject *__pyx_sq_item_5_cdec_Lattice(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; } -static int __pyx_mp_ass_subscript_5_cdec_Lattice(PyObject *o, PyObject *i, PyObject *v) { - if (v) { - return __pyx_pw_5_cdec_7Lattice_9__setitem__(o, i, v); - } - else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); - return -1; +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } + return 0; } -static PyMethodDef __pyx_methods_5_cdec_Lattice[] = { - {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_5_cdec_7Lattice_15__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("todot"), (PyCFunction)__pyx_pw_5_cdec_7Lattice_20todot, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_7Lattice_19todot)}, - {__Pyx_NAMESTR("as_hypergraph"), (PyCFunction)__pyx_pw_5_cdec_7Lattice_22as_hypergraph, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_cdec_7Lattice_21as_hypergraph)}, - {0, 0, 0, 0} -}; - -static PySequenceMethods __pyx_tp_as_sequence_Lattice = { - __pyx_pw_5_cdec_7Lattice_11__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_5_cdec_Lattice, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} -static PyMappingMethods __pyx_tp_as_mapping_Lattice = { - __pyx_pw_5_cdec_7Lattice_11__len__, /*mp_length*/ - __pyx_pw_5_cdec_7Lattice_7__getitem__, /*mp_subscript*/ - __pyx_mp_ass_subscript_5_cdec_Lattice, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[] = { + {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec_Lattice = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.Lattice"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_Lattice), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_12_sample_trees"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_Lattice, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24954,23 +25072,23 @@ static PyTypeObject __pyx_type_5_cdec_Lattice = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_Lattice, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_Lattice, /*tp_as_mapping*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_5_cdec_7Lattice_13__str__, /*tp_str*/ + 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_5_cdec_7Lattice_17__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec_Lattice, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24978,9 +25096,9 @@ static PyTypeObject __pyx_type_5_cdec_Lattice = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_5_cdec_7Lattice_3__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_Lattice, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24994,65 +25112,65 @@ static PyTypeObject __pyx_type_5_cdec_Lattice = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *__pyx_freelist_5_cdec___pyx_scope_struct_11_sample[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_11_sample = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_11_sample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_11_sample > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_11_sample[--__pyx_freecount_5_cdec___pyx_scope_struct_11_sample]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *)o); + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o); p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_11_sample(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_11_sample < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample))) { - __pyx_freelist_5_cdec___pyx_scope_struct_11_sample[__pyx_freecount_5_cdec___pyx_scope_struct_11_sample++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_11_sample(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_11_sample(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_11_sample[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_4___get__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_11_sample = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_11_sample"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_11_sample), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_4___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_11_sample, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25073,13 +25191,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_11_sample = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_11_sample, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_11_sample, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_11_sample, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25089,7 +25207,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_11_sample = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_11_sample, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25103,113 +25221,65 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_11_sample = { #endif }; -static struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *__pyx_freelist_5_cdec___pyx_scope_struct_23__make_config[8]; -static int __pyx_freecount_5_cdec___pyx_scope_struct_23__make_config = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ = 0; -static PyObject *__pyx_tp_new_5_cdec___pyx_scope_struct_23__make_config(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p; PyObject *o; - if (likely((__pyx_freecount_5_cdec___pyx_scope_struct_23__make_config > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config)))) { - o = (PyObject*)__pyx_freelist_5_cdec___pyx_scope_struct_23__make_config[--__pyx_freecount_5_cdec___pyx_scope_struct_23__make_config]; - memset(o, 0, sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config)); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__)); PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *)o); - p->__pyx_v_config = 0; - p->__pyx_v_info = 0; - p->__pyx_v_key = 0; - p->__pyx_v_name = 0; - p->__pyx_v_value = 0; - p->__pyx_t_0 = 0; - p->__pyx_t_1 = 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_5_cdec___pyx_scope_struct_23__make_config(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_config); - Py_CLEAR(p->__pyx_v_info); - Py_CLEAR(p->__pyx_v_key); - Py_CLEAR(p->__pyx_v_name); - Py_CLEAR(p->__pyx_v_value); - Py_CLEAR(p->__pyx_t_0); - Py_CLEAR(p->__pyx_t_1); - if ((__pyx_freecount_5_cdec___pyx_scope_struct_23__make_config < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config))) { - __pyx_freelist_5_cdec___pyx_scope_struct_23__make_config[__pyx_freecount_5_cdec___pyx_scope_struct_23__make_config++] = ((struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *)o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_5_cdec___pyx_scope_struct_23__make_config(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *)o; - if (p->__pyx_v_config) { - e = (*v)(p->__pyx_v_config, a); if (e) return e; - } - if (p->__pyx_v_info) { - e = (*v)(p->__pyx_v_info, a); if (e) return e; - } - if (p->__pyx_v_key) { - e = (*v)(p->__pyx_v_key, a); if (e) return e; - } - if (p->__pyx_v_name) { - e = (*v)(p->__pyx_v_name, a); if (e) return e; - } - if (p->__pyx_v_value) { - e = (*v)(p->__pyx_v_value, a); if (e) return e; - } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, a); if (e) return e; - } - if (p->__pyx_t_1) { - e = (*v)(p->__pyx_t_1, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_5_cdec___pyx_scope_struct_23__make_config(PyObject *o) { - struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_config); - p->__pyx_v_config = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_info); - p->__pyx_v_info = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_key); - p->__pyx_v_key = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_name); - p->__pyx_v_name = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_value); - p->__pyx_v_value = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_0); - p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_1); - p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5_cdec___pyx_scope_struct_23__make_config[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_1___iter__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_23__make_config = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.__pyx_scope_struct_23__make_config"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_1___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec___pyx_scope_struct_23__make_config, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25230,13 +25300,13 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_23__make_config = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5_cdec___pyx_scope_struct_23__make_config, /*tp_traverse*/ - __pyx_tp_clear_5_cdec___pyx_scope_struct_23__make_config, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5_cdec___pyx_scope_struct_23__make_config, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25246,77 +25316,7 @@ static PyTypeObject __pyx_type_5_cdec___pyx_scope_struct_23__make_config = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec___pyx_scope_struct_23__make_config, /*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_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = __pyx_tp_new_5_cdec_Grammar(t, a, k); - if (unlikely(!o)) return 0; - return o; -} - -static PyMethodDef __pyx_methods_5_cdec_TextGrammar[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_5_cdec_TextGrammar = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("_cdec.TextGrammar"), /*tp_name*/ - sizeof(struct __pyx_obj_5_cdec_TextGrammar), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5_cdec_Grammar, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #else - 0, /*reserved*/ - #endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_5_cdec_7Grammar_3__iter__, /*tp_iter*/ - #else - 0, /*tp_iter*/ - #endif - 0, /*tp_iternext*/ - __pyx_methods_5_cdec_TextGrammar, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - __pyx_pw_5_cdec_11TextGrammar_1__init__, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_5_cdec_TextGrammar, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25375,20 +25375,21 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0}, {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0}, {&__pyx_n_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 1}, - {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0}, + {&__pyx_n_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 1}, {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0}, - {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0}, - {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0}, - {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0}, + {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, + {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0}, + {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0}, {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0}, {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0}, - {&__pyx_kp_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0}, - {&__pyx_n_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 1}, + {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0}, + {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0}, {&__pyx_n_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 1}, - {&__pyx_kp_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 0}, - {&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0}, + {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1}, + {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0}, + {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0}, {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, @@ -25420,7 +25421,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s____pyx_vtable__, __pyx_k____pyx_vtable__, sizeof(__pyx_k____pyx_vtable__), 0, 0, 1, 1}, {&__pyx_n_s____qualname__, __pyx_k____qualname__, sizeof(__pyx_k____qualname__), 0, 0, 1, 1}, {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, - {&__pyx_n_s___cdec, __pyx_k___cdec, sizeof(__pyx_k___cdec), 0, 0, 1, 1}, {&__pyx_n_s___make_config, __pyx_k___make_config, sizeof(__pyx_k___make_config), 0, 0, 1, 1}, {&__pyx_n_s___phrase, __pyx_k___phrase, sizeof(__pyx_k___phrase), 0, 0, 1, 1}, {&__pyx_n_s___sa, __pyx_k___sa, sizeof(__pyx_k___sa), 0, 0, 1, 1}, @@ -25518,7 +25518,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "_cdec.pyx":9 + /* "cdec/_cdec.pyx":9 * cdef bytes ret * if isinstance(data, unicode): * ret = data.encode('utf8') # <<<<<<<<<<<<<< @@ -25529,7 +25529,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_k_tuple_2); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2)); - /* "/Users/vchahun/Sandbox/cdec/python/src/vectors.pxi":95 + /* "/home/mdenkows/cdec/python/cdec/vectors.pxi":95 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for SparseVector') # <<<<<<<<<<<<<< @@ -25540,7 +25540,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_k_tuple_5); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":6 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":6 * * def _phrase(phrase): * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< @@ -25551,7 +25551,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_k_tuple_6); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6)); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":226 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":226 * trule = convert_rule(trule) * elif not isinstance(trule, TRule): * raise ValueError('the grammar should contain TRule objects') # <<<<<<<<<<<<<< @@ -25561,7 +25561,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_k_tuple_14); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":244 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":244 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphEdge') # <<<<<<<<<<<<<< @@ -25572,7 +25572,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_k_tuple_19); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19)); - /* "/Users/vchahun/Sandbox/cdec/python/src/hypergraph.pxi":281 + /* "/home/mdenkows/cdec/python/cdec/hypergraph.pxi":281 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphNode') # <<<<<<<<<<<<<< @@ -25581,7 +25581,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/lattice.pxi":26 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":26 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< @@ -25592,7 +25592,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/lattice.pxi":39 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":39 * def __setitem__(self, int index, tuple arcs): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< @@ -25603,7 +25603,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/lattice.pxi":69 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":69 * for i in range(len(self)): * for label, weight, delta in self[i]: * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) # <<<<<<<<<<<<<< @@ -25614,7 +25614,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/lattice.pxi":63 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":63 * def todot(self): * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" * def lines(): # <<<<<<<<<<<<<< @@ -25626,148 +25626,148 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); __pyx_k_codeobj_36 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_37, __pyx_n_s__lines, 63, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_36)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/lattice.pxi":72 + /* "/home/mdenkows/cdec/python/cdec/lattice.pxi":72 * yield '%d [shape=doublecircle]' % len(self) * yield '}' * return '\n'.join(lines()).encode('utf8') # <<<<<<<<<<<<<< * * def as_hypergraph(self): */ - __pyx_k_tuple_40 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__utf8)); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_40); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_40)); + __pyx_k_tuple_41 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__utf8)); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_41); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41)); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":50 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":50 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('sufficient stats vector index out of range') # <<<<<<<<<<<<<< * return self.stats[0][index] * */ - __pyx_k_tuple_42 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_41)); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_42); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42)); + __pyx_k_tuple_43 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_42)); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_43); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43)); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":84 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":84 * def __getitem__(self,int k): * if not 0 <= k < self.cs.size(): * raise IndexError('candidate set index out of range') # <<<<<<<<<<<<<< * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] */ - __pyx_k_tuple_44 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_43)); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_44); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44)); + __pyx_k_tuple_45 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_45); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45)); - /* "_cdec.pyx":92 + /* "cdec/_cdec.pyx":92 * with open(weights) as fp: * for line in fp: * if line.strip().startswith('#'): continue # <<<<<<<<<<<<<< * fname, value = line.split() * self.weights[fname.strip()] = float(value) */ - __pyx_k_tuple_50 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_49)); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_50); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50)); + __pyx_k_tuple_51 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_50)); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_51); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51)); - /* "_cdec.pyx":90 + /* "cdec/_cdec.pyx":90 * def read_weights(self, weights): * """decoder.read_weights(filename): Read decoder weights from a file.""" * with open(weights) as fp: # <<<<<<<<<<<<<< * for line in fp: * if line.strip().startswith('#'): continue */ - __pyx_k_tuple_51 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_51); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51)); + __pyx_k_tuple_52 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_52); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52)); - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":5 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":5 * import cdec.sa._sa as _sa * * def _phrase(phrase): # <<<<<<<<<<<<<< * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) * */ - __pyx_k_tuple_55 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__phrase), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_55); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55)); - __pyx_k_codeobj_56 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_57, __pyx_n_s___phrase, 5, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_56)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_k_tuple_56 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__phrase), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_56); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56)); + __pyx_k_codeobj_57 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_58, __pyx_n_s___phrase, 5, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_57)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":194 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":194 * return [] * * BLEU = Scorer('IBM_BLEU') # <<<<<<<<<<<<<< * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') */ - __pyx_k_tuple_58 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__IBM_BLEU)); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_58); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58)); + __pyx_k_tuple_59 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__IBM_BLEU)); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_59); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":195 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":195 * * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') # <<<<<<<<<<<<<< * TER = Scorer('TER') * CER = Scorer('CER') */ - __pyx_k_tuple_59 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__QCRI_BLEU)); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_59); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); + __pyx_k_tuple_60 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__QCRI_BLEU)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_60); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60)); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":196 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":196 * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') # <<<<<<<<<<<<<< * CER = Scorer('CER') * SSK = Scorer('SSK') */ - __pyx_k_tuple_60 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__TER)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_60); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60)); + __pyx_k_tuple_61 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__TER)); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_61); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61)); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":197 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":197 * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') * CER = Scorer('CER') # <<<<<<<<<<<<<< * SSK = Scorer('SSK') */ - __pyx_k_tuple_61 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__CER)); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_61); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61)); + __pyx_k_tuple_62 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__CER)); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_62); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62)); - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":198 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":198 * TER = Scorer('TER') * CER = Scorer('CER') * SSK = Scorer('SSK') # <<<<<<<<<<<<<< */ - __pyx_k_tuple_62 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__SSK)); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_62); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62)); + __pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__SSK)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_63); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); - /* "_cdec.pyx":28 + /* "cdec/_cdec.pyx":28 * class ParseFailed(Exception): pass * * def set_silent(yn): # <<<<<<<<<<<<<< * """set_silent(bool): Configure the verbosity of cdec.""" * SetSilent(yn) */ - __pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__yn)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_63); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); - __pyx_k_codeobj_64 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_65, __pyx_n_s__set_silent, 28, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_k_tuple_64 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__yn)); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_64); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64)); + __pyx_k_codeobj_65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__set_silent, 28, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_cdec.pyx":32 + /* "cdec/_cdec.pyx":32 * SetSilent(yn) * * def _make_config(config): # <<<<<<<<<<<<<< * for key, value in config.items(): * if isinstance(value, dict): */ - __pyx_k_tuple_66 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__config), ((PyObject *)__pyx_n_s__key), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__name), ((PyObject *)__pyx_n_s__info)); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_66); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66)); - __pyx_k_codeobj_67 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_65, __pyx_n_s___make_config, 32, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_k_tuple_67 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__config), ((PyObject *)__pyx_n_s__key), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__name), ((PyObject *)__pyx_n_s__info)); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_67); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67)); + __pyx_k_codeobj_68 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s___make_config, 32, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -25841,8 +25841,8 @@ PyMODINIT_FUNC PyInit__cdec(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, "_cdec")) { - if (unlikely(PyDict_SetItemString(modules, "_cdec", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!PyDict_GetItemString(modules, "cdec._cdec")) { + if (unlikely(PyDict_SetItemString(modules, "cdec._cdec", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif @@ -25856,7 +25856,7 @@ PyMODINIT_FUNC PyInit__cdec(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__cdec) { + if (__pyx_module_is_main_cdec___cdec) { if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ @@ -25867,216 +25867,216 @@ PyMODINIT_FUNC PyInit__cdec(void) /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Scorer", (PyObject *)&__pyx_type_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_Scorer = &__pyx_type_5_cdec_Scorer; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_24___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_24___init__ = &__pyx_type_5_cdec___pyx_scope_struct_24___init__; - if (PyType_Ready(&__pyx_type_5_cdec_NTRef) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5_cdec_NTRef, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_TRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_5_cdec_5NTRef___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_5_cdec_5NTRef___init__.doc = __pyx_doc_5_cdec_5NTRef___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5_cdec_5NTRef___init__; + __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__.doc = __pyx_doc_4cdec_5_cdec_5TRule___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5TRule___init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "NTRef", (PyObject *)&__pyx_type_5_cdec_NTRef) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_NTRef = &__pyx_type_5_cdec_NTRef; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_22___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_22___iter__ = &__pyx_type_5_cdec___pyx_scope_struct_22___iter__; - if (PyType_Ready(&__pyx_type_5_cdec_Grammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Grammar", (PyObject *)&__pyx_type_5_cdec_Grammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_Grammar = &__pyx_type_5_cdec_Grammar; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_20_lines) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_20_lines = &__pyx_type_5_cdec___pyx_scope_struct_20_lines; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_12_sample_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_12_sample_trees = &__pyx_type_5_cdec___pyx_scope_struct_12_sample_trees; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_13___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_13___get__ = &__pyx_type_5_cdec___pyx_scope_struct_13___get__; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_2__phrase) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_2__phrase = &__pyx_type_5_cdec___pyx_scope_struct_2__phrase; - if (PyType_Ready(&__pyx_type_5_cdec_CandidateSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "CandidateSet", (PyObject *)&__pyx_type_5_cdec_CandidateSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_CandidateSet = &__pyx_type_5_cdec_CandidateSet; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_14___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_14___get__ = &__pyx_type_5_cdec___pyx_scope_struct_14___get__; - if (PyType_Ready(&__pyx_type_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "TRule", (PyObject *)&__pyx_type_4cdec_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_TRule = &__pyx_type_4cdec_5_cdec_TRule; + __pyx_type_4cdec_5_cdec_MRule.tp_base = __pyx_ptype_4cdec_5_cdec_TRule; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5_cdec_TRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_MRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_5_cdec_5TRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_5_cdec_5TRule___init__.doc = __pyx_doc_5_cdec_5TRule___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5_cdec_5TRule___init__; + __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__.doc = __pyx_doc_4cdec_5_cdec_5MRule___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5MRule___init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "TRule", (PyObject *)&__pyx_type_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_TRule = &__pyx_type_5_cdec_TRule; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_3_genexpr = &__pyx_type_5_cdec___pyx_scope_struct_3_genexpr; - __pyx_type_5_cdec_MRule.tp_base = __pyx_ptype_5_cdec_TRule; - if (PyType_Ready(&__pyx_type_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "MRule", (PyObject *)&__pyx_type_4cdec_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_MRule = &__pyx_type_4cdec_5_cdec_MRule; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_DenseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5_cdec_MRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_DenseVector, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_5_cdec_5MRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_5_cdec_5MRule___init__.doc = __pyx_doc_5_cdec_5MRule___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5_cdec_5MRule___init__; + __pyx_wrapperbase_4cdec_5_cdec_11DenseVector___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_11DenseVector___init__.doc = __pyx_doc_4cdec_5_cdec_11DenseVector___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_11DenseVector___init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "MRule", (PyObject *)&__pyx_type_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_MRule = &__pyx_type_5_cdec_MRule; - if (PyType_Ready(&__pyx_type_5_cdec_SegmentEvaluator) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "SegmentEvaluator", (PyObject *)&__pyx_type_5_cdec_SegmentEvaluator) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_SegmentEvaluator = &__pyx_type_5_cdec_SegmentEvaluator; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_25_genexpr = &__pyx_type_5_cdec___pyx_scope_struct_25_genexpr; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_19_todot) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_19_todot = &__pyx_type_5_cdec___pyx_scope_struct_19_todot; - if (PyType_Ready(&__pyx_type_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Candidate", (PyObject *)&__pyx_type_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_Candidate = &__pyx_type_5_cdec_Candidate; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_6_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_6_genexpr = &__pyx_type_5_cdec___pyx_scope_struct_6_genexpr; - if (PyType_Ready(&__pyx_type_5_cdec_NT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "DenseVector", (PyObject *)&__pyx_type_4cdec_5_cdec_DenseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_DenseVector = &__pyx_type_4cdec_5_cdec_DenseVector; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "SufficientStats", (PyObject *)&__pyx_type_4cdec_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_SufficientStats = &__pyx_type_4cdec_5_cdec_SufficientStats; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Metric", (PyObject *)&__pyx_type_4cdec_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Metric = &__pyx_type_4cdec_5_cdec_Metric; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Candidate", (PyObject *)&__pyx_type_4cdec_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Candidate = &__pyx_type_4cdec_5_cdec_Candidate; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SparseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5_cdec_NT, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_SparseVector, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_5_cdec_2NT___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_5_cdec_2NT___init__.doc = __pyx_doc_5_cdec_2NT___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5_cdec_2NT___init__; + __pyx_wrapperbase_4cdec_5_cdec_12SparseVector___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_12SparseVector___init__.doc = __pyx_doc_4cdec_5_cdec_12SparseVector___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_12SparseVector___init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "NT", (PyObject *)&__pyx_type_5_cdec_NT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_NT = &__pyx_type_5_cdec_NT; - __pyx_vtabptr_5_cdec_HypergraphEdge = &__pyx_vtable_5_cdec_HypergraphEdge; - __pyx_vtable_5_cdec_HypergraphEdge.init = (PyObject *(*)(struct __pyx_obj_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int))__pyx_f_5_cdec_14HypergraphEdge_init; - if (PyType_Ready(&__pyx_type_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_5_cdec_HypergraphEdge.tp_dict, __pyx_vtabptr_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "HypergraphEdge", (PyObject *)&__pyx_type_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_HypergraphEdge = &__pyx_type_5_cdec_HypergraphEdge; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_1___iter__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_1___iter__ = &__pyx_type_5_cdec___pyx_scope_struct_1___iter__; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_16___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_16___get__ = &__pyx_type_5_cdec___pyx_scope_struct_16___get__; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_4___get__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_4___get__ = &__pyx_type_5_cdec___pyx_scope_struct_4___get__; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_18___iter__) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_18___iter__ = &__pyx_type_5_cdec___pyx_scope_struct_18___iter__; - if (PyType_Ready(&__pyx_type_5_cdec_Decoder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "SparseVector", (PyObject *)&__pyx_type_4cdec_5_cdec_SparseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_SparseVector = &__pyx_type_4cdec_5_cdec_SparseVector; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_NT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5_cdec_Decoder, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_NT, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_5_cdec_7Decoder___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_5_cdec_7Decoder___init__.doc = __pyx_doc_5_cdec_7Decoder___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5_cdec_7Decoder___init__; + __pyx_wrapperbase_4cdec_5_cdec_2NT___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_2NT___init__.doc = __pyx_doc_4cdec_5_cdec_2NT___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_2NT___init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "Decoder", (PyObject *)&__pyx_type_5_cdec_Decoder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_Decoder = &__pyx_type_5_cdec_Decoder; - __pyx_vtabptr_5_cdec_HypergraphNode = &__pyx_vtable_5_cdec_HypergraphNode; - __pyx_vtable_5_cdec_HypergraphNode.init = (PyObject *(*)(struct __pyx_obj_5_cdec_HypergraphNode *, Hypergraph *, unsigned int))__pyx_f_5_cdec_14HypergraphNode_init; - if (PyType_Ready(&__pyx_type_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_5_cdec_HypergraphNode.tp_dict, __pyx_vtabptr_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "HypergraphNode", (PyObject *)&__pyx_type_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_HypergraphNode = &__pyx_type_5_cdec_HypergraphNode; - if (PyType_Ready(&__pyx_type_5_cdec_SparseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "NT", (PyObject *)&__pyx_type_4cdec_5_cdec_NT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_NT = &__pyx_type_4cdec_5_cdec_NT; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5_cdec_SparseVector, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_Lattice, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_5_cdec_12SparseVector___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_5_cdec_12SparseVector___init__.doc = __pyx_doc_5_cdec_12SparseVector___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5_cdec_12SparseVector___init__; + __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__.doc = __pyx_doc_4cdec_5_cdec_7Lattice_2__init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "SparseVector", (PyObject *)&__pyx_type_5_cdec_SparseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_SparseVector = &__pyx_type_5_cdec_SparseVector; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_17___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_17___get__ = &__pyx_type_5_cdec___pyx_scope_struct_17___get__; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct____iter__ = &__pyx_type_5_cdec___pyx_scope_struct____iter__; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_21___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_21___iter__ = &__pyx_type_5_cdec___pyx_scope_struct_21___iter__; - if (PyType_Ready(&__pyx_type_5_cdec_DenseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Lattice", (PyObject *)&__pyx_type_4cdec_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Lattice = &__pyx_type_4cdec_5_cdec_Lattice; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23__make_config = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config; + __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge = &__pyx_vtable_4cdec_5_cdec_HypergraphEdge; + __pyx_vtable_4cdec_5_cdec_HypergraphEdge.init = (PyObject *(*)(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int))__pyx_f_4cdec_5_cdec_14HypergraphEdge_init; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_HypergraphEdge.tp_dict, __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "HypergraphEdge", (PyObject *)&__pyx_type_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_HypergraphEdge = &__pyx_type_4cdec_5_cdec_HypergraphEdge; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20_lines = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Scorer", (PyObject *)&__pyx_type_4cdec_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Scorer = &__pyx_type_4cdec_5_cdec_Scorer; + __pyx_vtabptr_4cdec_5_cdec_HypergraphNode = &__pyx_vtable_4cdec_5_cdec_HypergraphNode; + __pyx_vtable_4cdec_5_cdec_HypergraphNode.init = (PyObject *(*)(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *, Hypergraph *, unsigned int))__pyx_f_4cdec_5_cdec_14HypergraphNode_init; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_HypergraphNode.tp_dict, __pyx_vtabptr_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "HypergraphNode", (PyObject *)&__pyx_type_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_HypergraphNode = &__pyx_type_4cdec_5_cdec_HypergraphNode; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_NTRef) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5_cdec_DenseVector, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_NTRef, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_5_cdec_11DenseVector___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_5_cdec_11DenseVector___init__.doc = __pyx_doc_5_cdec_11DenseVector___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5_cdec_11DenseVector___init__; + __pyx_wrapperbase_4cdec_5_cdec_5NTRef___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_5NTRef___init__.doc = __pyx_doc_4cdec_5_cdec_5NTRef___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5NTRef___init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "DenseVector", (PyObject *)&__pyx_type_5_cdec_DenseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_DenseVector = &__pyx_type_5_cdec_DenseVector; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_7___iter__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_7___iter__ = &__pyx_type_5_cdec___pyx_scope_struct_7___iter__; - if (PyType_Ready(&__pyx_type_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Metric", (PyObject *)&__pyx_type_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_Metric = &__pyx_type_5_cdec_Metric; - if (PyType_Ready(&__pyx_type_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "SufficientStats", (PyObject *)&__pyx_type_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_SufficientStats = &__pyx_type_5_cdec_SufficientStats; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_8_kbest) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_8_kbest = &__pyx_type_5_cdec___pyx_scope_struct_8_kbest; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_10_kbest_features) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_10_kbest_features = &__pyx_type_5_cdec___pyx_scope_struct_10_kbest_features; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_15___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_15___get__ = &__pyx_type_5_cdec___pyx_scope_struct_15___get__; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_5___str__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_5___str__ = &__pyx_type_5_cdec___pyx_scope_struct_5___str__; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_9_kbest_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_9_kbest_trees = &__pyx_type_5_cdec___pyx_scope_struct_9_kbest_trees; - __pyx_vtabptr_5_cdec_Hypergraph = &__pyx_vtable_5_cdec_Hypergraph; - __pyx_vtable_5_cdec_Hypergraph._rng = (MT19937 *(*)(struct __pyx_obj_5_cdec_Hypergraph *))__pyx_f_5_cdec_10Hypergraph__rng; - if (PyType_Ready(&__pyx_type_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_5_cdec_Hypergraph.tp_dict, __pyx_vtabptr_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Hypergraph", (PyObject *)&__pyx_type_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_Hypergraph = &__pyx_type_5_cdec_Hypergraph; - if (PyType_Ready(&__pyx_type_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "NTRef", (PyObject *)&__pyx_type_4cdec_5_cdec_NTRef) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_NTRef = &__pyx_type_4cdec_5_cdec_NTRef; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Grammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Grammar", (PyObject *)&__pyx_type_4cdec_5_cdec_Grammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Grammar = &__pyx_type_4cdec_5_cdec_Grammar; + __pyx_vtabptr_4cdec_5_cdec_Hypergraph = &__pyx_vtable_4cdec_5_cdec_Hypergraph; + __pyx_vtable_4cdec_5_cdec_Hypergraph._rng = (MT19937 *(*)(struct __pyx_obj_4cdec_5_cdec_Hypergraph *))__pyx_f_4cdec_5_cdec_10Hypergraph__rng; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_Hypergraph.tp_dict, __pyx_vtabptr_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Hypergraph", (PyObject *)&__pyx_type_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Hypergraph = &__pyx_type_4cdec_5_cdec_Hypergraph; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___init__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_CandidateSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "CandidateSet", (PyObject *)&__pyx_type_4cdec_5_cdec_CandidateSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_CandidateSet = &__pyx_type_4cdec_5_cdec_CandidateSet; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19_todot = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SegmentEvaluator) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "SegmentEvaluator", (PyObject *)&__pyx_type_4cdec_5_cdec_SegmentEvaluator) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_SegmentEvaluator = &__pyx_type_4cdec_5_cdec_SegmentEvaluator; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_3_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_sample = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_8_kbest = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__; + __pyx_type_4cdec_5_cdec_TextGrammar.tp_base = __pyx_ptype_4cdec_5_cdec_Grammar; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_TextGrammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5_cdec_Lattice, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_TextGrammar, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_5_cdec_7Lattice_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_5_cdec_7Lattice_2__init__.doc = __pyx_doc_5_cdec_7Lattice_2__init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5_cdec_7Lattice_2__init__; + __pyx_wrapperbase_4cdec_5_cdec_11TextGrammar___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_11TextGrammar___init__.doc = __pyx_doc_4cdec_5_cdec_11TextGrammar___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_11TextGrammar___init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "Lattice", (PyObject *)&__pyx_type_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_Lattice = &__pyx_type_5_cdec_Lattice; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_11_sample) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_11_sample = &__pyx_type_5_cdec___pyx_scope_struct_11_sample; - if (PyType_Ready(&__pyx_type_5_cdec___pyx_scope_struct_23__make_config) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec___pyx_scope_struct_23__make_config = &__pyx_type_5_cdec___pyx_scope_struct_23__make_config; - __pyx_type_5_cdec_TextGrammar.tp_base = __pyx_ptype_5_cdec_Grammar; - if (PyType_Ready(&__pyx_type_5_cdec_TextGrammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "TextGrammar", (PyObject *)&__pyx_type_4cdec_5_cdec_TextGrammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_TextGrammar = &__pyx_type_4cdec_5_cdec_TextGrammar; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Decoder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5_cdec_TextGrammar, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_Decoder, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_5_cdec_11TextGrammar___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_5_cdec_11TextGrammar___init__.doc = __pyx_doc_5_cdec_11TextGrammar___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5_cdec_11TextGrammar___init__; + __pyx_wrapperbase_4cdec_5_cdec_7Decoder___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_7Decoder___init__.doc = __pyx_doc_4cdec_5_cdec_7Decoder___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_7Decoder___init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "TextGrammar", (PyObject *)&__pyx_type_5_cdec_TextGrammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5_cdec_TextGrammar = &__pyx_type_5_cdec_TextGrammar; + if (__Pyx_SetAttrString(__pyx_m, "Decoder", (PyObject *)&__pyx_type_4cdec_5_cdec_Decoder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Decoder = &__pyx_type_4cdec_5_cdec_Decoder; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct____iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_17___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_6_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__; /*--- Type import code ---*/ __pyx_ptype_4cdec_2sa_3_sa_FloatList = __Pyx_ImportType("cdec.sa._sa", "FloatList", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FloatList), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_FloatList)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_vtabptr_4cdec_2sa_3_sa_FloatList = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_FloatList->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_FloatList)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -26096,7 +26096,7 @@ PyMODINIT_FUNC PyInit__cdec(void) Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Execution code ---*/ - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":3 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":3 * cimport grammar * cimport cdec.sa._sa as _sa * import cdec.sa._sa as _sa # <<<<<<<<<<<<<< @@ -26105,85 +26105,85 @@ PyMODINIT_FUNC PyInit__cdec(void) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)__pyx_n_s_54)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s_54)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s_54)); - __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_53), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(((PyObject *)__pyx_n_s_55)); + PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s_55)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s_55)); + __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_54), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s___sa, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/grammar.pxi":5 + /* "/home/mdenkows/cdec/python/cdec/grammar.pxi":5 * import cdec.sa._sa as _sa * * def _phrase(phrase): # <<<<<<<<<<<<<< * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) * */ - __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_5_cdec_1_phrase, NULL, __pyx_n_s___cdec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_1_phrase, NULL, __pyx_n_s_39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s___phrase, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":194 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":194 * return [] * * BLEU = Scorer('IBM_BLEU') # <<<<<<<<<<<<<< * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_58), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__BLEU, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":195 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":195 * * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') # <<<<<<<<<<<<<< * TER = Scorer('TER') * CER = Scorer('CER') */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_60), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__QCRI, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":196 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":196 * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') # <<<<<<<<<<<<<< * CER = Scorer('CER') * SSK = Scorer('SSK') */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_60), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__TER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":197 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":197 * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') * CER = Scorer('CER') # <<<<<<<<<<<<<< * SSK = Scorer('SSK') */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_62), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__CER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/Users/vchahun/Sandbox/cdec/python/src/mteval.pxi":198 + /* "/home/mdenkows/cdec/python/cdec/mteval.pxi":198 * TER = Scorer('TER') * CER = Scorer('CER') * SSK = Scorer('SSK') # <<<<<<<<<<<<<< */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_62), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__SSK, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_cdec.pyx":22 + /* "cdec/_cdec.pyx":22 * include "mteval.pxi" * * SetSilent(True) # <<<<<<<<<<<<<< @@ -26192,7 +26192,7 @@ PyMODINIT_FUNC PyInit__cdec(void) */ SetSilent(1); - /* "_cdec.pyx":23 + /* "cdec/_cdec.pyx":23 * * SetSilent(True) * decoder.register_feature_functions() # <<<<<<<<<<<<<< @@ -26201,7 +26201,7 @@ PyMODINIT_FUNC PyInit__cdec(void) */ register_feature_functions(); - /* "_cdec.pyx":25 + /* "cdec/_cdec.pyx":25 * decoder.register_feature_functions() * * class InvalidConfig(Exception): pass # <<<<<<<<<<<<<< @@ -26215,14 +26215,14 @@ PyMODINIT_FUNC PyInit__cdec(void) __Pyx_INCREF(__pyx_builtin_Exception); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); - __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3), __pyx_n_s__InvalidConfig, __pyx_n_s__InvalidConfig, __pyx_n_s___cdec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3), __pyx_n_s__InvalidConfig, __pyx_n_s__InvalidConfig, __pyx_n_s_39); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__InvalidConfig, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* "_cdec.pyx":26 + /* "cdec/_cdec.pyx":26 * * class InvalidConfig(Exception): pass * class ParseFailed(Exception): pass # <<<<<<<<<<<<<< @@ -26236,38 +26236,38 @@ PyMODINIT_FUNC PyInit__cdec(void) __Pyx_INCREF(__pyx_builtin_Exception); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); - __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3), __pyx_n_s__ParseFailed, __pyx_n_s__ParseFailed, __pyx_n_s___cdec); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3), __pyx_n_s__ParseFailed, __pyx_n_s__ParseFailed, __pyx_n_s_39); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s__ParseFailed, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* "_cdec.pyx":28 + /* "cdec/_cdec.pyx":28 * class ParseFailed(Exception): pass * * def set_silent(yn): # <<<<<<<<<<<<<< * """set_silent(bool): Configure the verbosity of cdec.""" * SetSilent(yn) */ - __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_5_cdec_3set_silent, NULL, __pyx_n_s___cdec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_3set_silent, NULL, __pyx_n_s_39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s__set_silent, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_cdec.pyx":32 + /* "cdec/_cdec.pyx":32 * SetSilent(yn) * * def _make_config(config): # <<<<<<<<<<<<<< * for key, value in config.items(): * if isinstance(value, dict): */ - __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_5_cdec_5_make_config, NULL, __pyx_n_s___cdec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_5_make_config, NULL, __pyx_n_s_39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s___make_config, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_cdec.pyx":1 + /* "cdec/_cdec.pyx":1 * from libcpp.string cimport string # <<<<<<<<<<<<<< * from libcpp.vector cimport vector * from utils cimport * @@ -26291,10 +26291,10 @@ PyMODINIT_FUNC PyInit__cdec(void) __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); if (__pyx_m) { - __Pyx_AddTraceback("init _cdec", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("init cdec._cdec", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { - PyErr_SetString(PyExc_ImportError, "init _cdec"); + PyErr_SetString(PyExc_ImportError, "init cdec._cdec"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); |