summaryrefslogtreecommitdiff
path: root/python/src/_cdec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'python/src/_cdec.cpp')
-rw-r--r--python/src/_cdec.cpp1360
1 files changed, 680 insertions, 680 deletions
diff --git a/python/src/_cdec.cpp b/python/src/_cdec.cpp
index 00cb0641..38cf04a9 100644
--- a/python/src/_cdec.cpp
+++ b/python/src/_cdec.cpp
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.17.1 on Sun Nov 18 15:08:18 2012 */
+/* Generated by Cython 0.17.1 on Tue Feb 19 16:54:40 2013 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@@ -448,7 +448,7 @@ struct __pyx_opt_args_5_cdec_as_str {
char *error_msg;
};
-/* "/home/vchahune/tools/cdec/python/src/cdec.sa._sa.pxd":25
+/* "/home/pauldb/workspace/cdec/python/src/cdec.sa._sa.pxd":25
* cdef void read_handle(self, FILE* f)
*
* cdef class FeatureVector: # <<<<<<<<<<<<<<
@@ -475,7 +475,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_24___init__ {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":21
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":21
* return '[%s]' % self.cat
*
* cdef class NTRef: # <<<<<<<<<<<<<<
@@ -488,7 +488,7 @@ struct __pyx_obj_5_cdec_NTRef {
};
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":121
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":121
* return CandidateSet(self)
*
* cdef class Scorer: # <<<<<<<<<<<<<<
@@ -502,7 +502,7 @@ struct __pyx_obj_5_cdec_Scorer {
};
-/* "/home/vchahune/tools/cdec/python/src/cdec.sa._sa.pxd":12
+/* "/home/pauldb/workspace/cdec/python/src/cdec.sa._sa.pxd":12
* cdef void read_handle(self, FILE* f)
*
* cdef class IntList: # <<<<<<<<<<<<<<
@@ -519,7 +519,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_IntList {
};
-/* "/home/vchahune/tools/cdec/python/src/cdec.sa._sa.pxd":29
+/* "/home/pauldb/workspace/cdec/python/src/cdec.sa._sa.pxd":29
* cdef FloatList values
*
* cdef class Phrase: # <<<<<<<<<<<<<<
@@ -536,7 +536,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_Phrase {
};
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":90
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":90
* return candidate
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -552,7 +552,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_22___iter__ {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":193
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":193
* super(MRule, self).__init__(lhs, rhs, e, scores, None)
*
* cdef class Grammar: # <<<<<<<<<<<<<<
@@ -565,7 +565,7 @@ struct __pyx_obj_5_cdec_Grammar {
};
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":63
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":63
* def todot(self):
* """lattice.todot() -> Representation of the lattice in GraphViz dot format."""
* def lines(): # <<<<<<<<<<<<<<
@@ -588,7 +588,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_20_lines {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":108
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":108
* del hypos
*
* def sample_trees(self, unsigned n): # <<<<<<<<<<<<<<
@@ -606,7 +606,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_12_sample_trees {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":161
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":161
*
* property edges:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -622,7 +622,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_13___get__ {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":5
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":5
* import cdec.sa._sa as _sa
*
* def _phrase(phrase): # <<<<<<<<<<<<<<
@@ -635,7 +635,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_2__phrase {
};
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":65
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":65
* return result
*
* cdef class CandidateSet: # <<<<<<<<<<<<<<
@@ -650,7 +650,7 @@ struct __pyx_obj_5_cdec_CandidateSet {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":167
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":167
*
* property nodes:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -666,7 +666,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_14___get__ {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":49
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":49
* return TRule(lhs, f, e, scores, a)
*
* cdef class TRule: # <<<<<<<<<<<<<<
@@ -679,7 +679,7 @@ struct __pyx_obj_5_cdec_TRule {
};
-/* "/home/vchahune/tools/cdec/python/src/cdec.sa._sa.pxd":35
+/* "/home/pauldb/workspace/cdec/python/src/cdec.sa._sa.pxd":35
* cdef public int chunklen(self, int k)
*
* cdef class Rule: # <<<<<<<<<<<<<<
@@ -697,7 +697,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_Rule {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":177
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":177
* _phrase(self.f), _phrase(self.e), scores)
*
* cdef class MRule(TRule): # <<<<<<<<<<<<<<
@@ -709,7 +709,7 @@ struct __pyx_obj_5_cdec_MRule {
};
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":100
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":100
* self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get())
*
* cdef class SegmentEvaluator: # <<<<<<<<<<<<<<
@@ -740,7 +740,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_25_genexpr {
};
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":61
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":61
* yield self[i]
*
* def todot(self): # <<<<<<<<<<<<<<
@@ -753,7 +753,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_19_todot {
};
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":12
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":12
* return stats
*
* cdef class Candidate: # <<<<<<<<<<<<<<
@@ -767,7 +767,7 @@ struct __pyx_obj_5_cdec_Candidate {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":173
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":173
*
* def __str__(self):
* scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<<
@@ -784,7 +784,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_6_genexpr {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":8
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":8
* return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase)
*
* cdef class NT: # <<<<<<<<<<<<<<
@@ -798,7 +798,7 @@ struct __pyx_obj_5_cdec_NT {
};
-/* "/home/vchahune/tools/cdec/python/src/cdec.sa._sa.pxd":3
+/* "/home/pauldb/workspace/cdec/python/src/cdec.sa._sa.pxd":3
* from libc.stdio cimport FILE
*
* cdef class FloatList: # <<<<<<<<<<<<<<
@@ -815,7 +815,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_FloatList {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":196
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":196
* return vector
*
* cdef class HypergraphEdge: # <<<<<<<<<<<<<<
@@ -831,7 +831,7 @@ struct __pyx_obj_5_cdec_HypergraphEdge {
};
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":72
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":72
* self.vector.set_value(fid, value)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -848,7 +848,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_1___iter__ {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":256
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":256
*
* property in_edges:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -864,7 +864,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_16___get__ {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":131
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":131
*
* property a:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -881,7 +881,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_4___get__ {
};
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":56
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":56
* return unicode(str(self), 'utf8')
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -911,7 +911,7 @@ struct __pyx_obj_5_cdec_Decoder {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":246
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":246
* raise NotImplemented('comparison not implemented for HypergraphEdge')
*
* cdef class HypergraphNode: # <<<<<<<<<<<<<<
@@ -926,7 +926,7 @@ struct __pyx_obj_5_cdec_HypergraphNode {
};
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":48
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":48
* return sparse
*
* cdef class SparseVector: # <<<<<<<<<<<<<<
@@ -939,7 +939,7 @@ struct __pyx_obj_5_cdec_SparseVector {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":262
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":262
*
* property out_edges:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -955,7 +955,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_17___get__ {
};
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":32
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":32
* self.vector[0][fid] = value
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -971,7 +971,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct____iter__ {
};
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":44
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":44
* return self.stats.size()
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -988,7 +988,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_21___iter__ {
};
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":3
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":3
* from cython.operator cimport preincrement as pinc
*
* cdef class DenseVector: # <<<<<<<<<<<<<<
@@ -1002,7 +1002,7 @@ struct __pyx_obj_5_cdec_DenseVector {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":199
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":199
* del self.grammar
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -1021,7 +1021,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_7___iter__ {
};
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":176
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":176
* out.fields[i] = ss[i]
*
* cdef class Metric: # <<<<<<<<<<<<<<
@@ -1034,7 +1034,7 @@ struct __pyx_obj_5_cdec_Metric {
};
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":26
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":26
* return fmap
*
* cdef class SufficientStats: # <<<<<<<<<<<<<<
@@ -1048,7 +1048,7 @@ struct __pyx_obj_5_cdec_SufficientStats {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":49
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":49
* return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8')
*
* def kbest(self, size): # <<<<<<<<<<<<<<
@@ -1067,7 +1067,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_8_kbest {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":81
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":81
* del e_derivations
*
* def kbest_features(self, size): # <<<<<<<<<<<<<<
@@ -1087,7 +1087,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_10_kbest_features {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":216
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":216
*
* property tail_nodes:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -1103,7 +1103,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_15___get__ {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":172
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":172
* self.rule.get().lhs_ = -TDConvert((<NT> lhs).cat)
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -1116,7 +1116,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_5___str__ {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":6
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":6
*
* def _phrase(phrase):
* return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<<
@@ -1133,7 +1133,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_3_genexpr {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":62
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":62
* del derivations
*
* def kbest_trees(self, size): # <<<<<<<<<<<<<<
@@ -1156,7 +1156,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_9_kbest_trees {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":4
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":4
* cimport kbest
*
* cdef class Hypergraph: # <<<<<<<<<<<<<<
@@ -1171,7 +1171,7 @@ struct __pyx_obj_5_cdec_Hypergraph {
};
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":3
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":3
* cimport lattice
*
* cdef class Lattice: # <<<<<<<<<<<<<<
@@ -1184,7 +1184,7 @@ struct __pyx_obj_5_cdec_Lattice {
};
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":97
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":97
* del derivations
*
* def sample(self, unsigned n): # <<<<<<<<<<<<<<
@@ -1225,7 +1225,7 @@ struct __pyx_obj_5_cdec___pyx_scope_struct_23__make_config {
};
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":217
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":217
* self.grammar.get().SetGrammarName(name)
*
* cdef class TextGrammar(Grammar): # <<<<<<<<<<<<<<
@@ -1238,7 +1238,7 @@ struct __pyx_obj_5_cdec_TextGrammar {
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":4
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":4
* cimport kbest
*
* cdef class Hypergraph: # <<<<<<<<<<<<<<
@@ -1252,7 +1252,7 @@ struct __pyx_vtabstruct_5_cdec_Hypergraph {
static struct __pyx_vtabstruct_5_cdec_Hypergraph *__pyx_vtabptr_5_cdec_Hypergraph;
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":196
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":196
* return vector
*
* cdef class HypergraphEdge: # <<<<<<<<<<<<<<
@@ -1266,7 +1266,7 @@ struct __pyx_vtabstruct_5_cdec_HypergraphEdge {
static struct __pyx_vtabstruct_5_cdec_HypergraphEdge *__pyx_vtabptr_5_cdec_HypergraphEdge;
-/* "/home/vchahune/tools/cdec/python/src/cdec.sa._sa.pxd":12
+/* "/home/pauldb/workspace/cdec/python/src/cdec.sa._sa.pxd":12
* cdef void read_handle(self, FILE* f)
*
* cdef class IntList: # <<<<<<<<<<<<<<
@@ -1286,7 +1286,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;
-/* "/home/vchahune/tools/cdec/python/src/cdec.sa._sa.pxd":3
+/* "/home/pauldb/workspace/cdec/python/src/cdec.sa._sa.pxd":3
* from libc.stdio cimport FILE
*
* cdef class FloatList: # <<<<<<<<<<<<<<
@@ -1302,7 +1302,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;
-/* "/home/vchahune/tools/cdec/python/src/cdec.sa._sa.pxd":29
+/* "/home/pauldb/workspace/cdec/python/src/cdec.sa._sa.pxd":29
* cdef FloatList values
*
* cdef class Phrase: # <<<<<<<<<<<<<<
@@ -1317,7 +1317,7 @@ struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase {
static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtabptr_4cdec_2sa_3_sa_Phrase;
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":246
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":246
* raise NotImplemented('comparison not implemented for HypergraphEdge')
*
* cdef class HypergraphNode: # <<<<<<<<<<<<<<
@@ -2026,7 +2026,7 @@ 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[] = "/home/vchahune/tools/cdec/python/src/lattice.pxi";
+static char __pyx_k_37[] = "/home/pauldb/workspace/cdec/python/src/lattice.pxi";
static char __pyx_k_38[] = "\n";
static char __pyx_k_40[] = "sufficient stats vector index out of range";
static char __pyx_k_42[] = "candidate set index out of range";
@@ -2038,8 +2038,8 @@ 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[] = "/home/vchahune/tools/cdec/python/src/grammar.pxi";
-static char __pyx_k_63[] = "/home/vchahune/tools/cdec/python/src/_cdec.pyx";
+static char __pyx_k_57[] = "/home/pauldb/workspace/cdec/python/src/grammar.pxi";
+static char __pyx_k_63[] = "/home/pauldb/workspace/cdec/python/src/_cdec.pyx";
static char __pyx_k__a[] = "a";
static char __pyx_k__e[] = "e";
static char __pyx_k__f[] = "f";
@@ -2452,7 +2452,7 @@ static int __pyx_pw_5_cdec_11DenseVector_1__init__(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":7
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":7
* cdef bint owned # if True, do not manage memory
*
* def __init__(self): # <<<<<<<<<<<<<<
@@ -2469,7 +2469,7 @@ static int __pyx_pf_5_cdec_11DenseVector___init__(struct __pyx_obj_5_cdec_DenseV
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":9
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":9
* def __init__(self):
* """DenseVector() -> Dense weight/feature vector."""
* self.vector = new vector[weight_t]() # <<<<<<<<<<<<<<
@@ -2479,7 +2479,7 @@ static int __pyx_pf_5_cdec_11DenseVector___init__(struct __pyx_obj_5_cdec_DenseV
try {__pyx_t_1 = new std::vector<weight_t>();} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}}
__pyx_v_self->vector = __pyx_t_1;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":10
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":10
* """DenseVector() -> Dense weight/feature vector."""
* self.vector = new vector[weight_t]()
* self.owned = False # <<<<<<<<<<<<<<
@@ -2507,7 +2507,7 @@ static void __pyx_pw_5_cdec_11DenseVector_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":12
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":12
* self.owned = False
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -2520,7 +2520,7 @@ static void __pyx_pf_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_5_cdec_D
int __pyx_t_1;
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":13
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":13
*
* def __dealloc__(self):
* if not self.owned: # <<<<<<<<<<<<<<
@@ -2530,7 +2530,7 @@ static void __pyx_pf_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_5_cdec_D
__pyx_t_1 = (!__pyx_v_self->owned);
if (__pyx_t_1) {
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":14
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":14
* def __dealloc__(self):
* if not self.owned:
* del self.vector # <<<<<<<<<<<<<<
@@ -2556,7 +2556,7 @@ static Py_ssize_t __pyx_pw_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v_self)
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":16
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":16
* del self.vector
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -2569,7 +2569,7 @@ static Py_ssize_t __pyx_pf_5_cdec_11DenseVector_4__len__(struct __pyx_obj_5_cdec
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":17
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":17
*
* def __len__(self):
* return self.vector.size() # <<<<<<<<<<<<<<
@@ -2606,7 +2606,7 @@ static PyObject *__pyx_pw_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":19
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":19
* return self.vector.size()
*
* def __getitem__(self, char* fname): # <<<<<<<<<<<<<<
@@ -2626,7 +2626,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_c
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":20
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":20
*
* def __getitem__(self, char* fname):
* cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<<
@@ -2635,7 +2635,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_c
*/
__pyx_v_fid = FD::Convert(__pyx_v_fname);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":21
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":21
* def __getitem__(self, char* fname):
* cdef int fid = FDConvert(fname)
* if 0 <= fid < self.vector.size(): # <<<<<<<<<<<<<<
@@ -2648,7 +2648,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_c
}
if (__pyx_t_1) {
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":22
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":22
* cdef int fid = FDConvert(fname)
* if 0 <= fid < self.vector.size():
* return self.vector[0][fid] # <<<<<<<<<<<<<<
@@ -2665,7 +2665,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_5_c
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":23
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":23
* if 0 <= fid < self.vector.size():
* return self.vector[0][fid]
* raise KeyError(fname) # <<<<<<<<<<<<<<
@@ -2724,7 +2724,7 @@ static int __pyx_pw_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":25
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":25
* raise KeyError(fname)
*
* def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<<
@@ -2744,7 +2744,7 @@ static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_De
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setitem__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":26
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":26
*
* def __setitem__(self, char* fname, float value):
* cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<<
@@ -2753,7 +2753,7 @@ static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_De
*/
__pyx_v_fid = FD::Convert(__pyx_v_fname);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":27
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":27
* def __setitem__(self, char* fname, float value):
* cdef int fid = FDConvert(fname)
* if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<<
@@ -2779,7 +2779,7 @@ static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_De
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":28
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":28
* cdef int fid = FDConvert(fname)
* if fid < 0: raise KeyError(fname)
* if self.vector.size() <= fid: # <<<<<<<<<<<<<<
@@ -2789,7 +2789,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);
if (__pyx_t_1) {
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":29
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":29
* if fid < 0: raise KeyError(fname)
* if self.vector.size() <= fid:
* self.vector.resize(fid + 1) # <<<<<<<<<<<<<<
@@ -2801,7 +2801,7 @@ static int __pyx_pf_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_5_cdec_De
}
__pyx_L4:;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":30
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":30
* if self.vector.size() <= fid:
* self.vector.resize(fid + 1)
* self.vector[0][fid] = value # <<<<<<<<<<<<<<
@@ -2834,7 +2834,7 @@ static PyObject *__pyx_pw_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":32
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":32
* self.vector[0][fid] = value
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -2899,7 +2899,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;}
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":34
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":34
* def __iter__(self):
* cdef unsigned fid
* for fid in range(1, self.vector.size()): # <<<<<<<<<<<<<<
@@ -2910,7 +2910,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;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":35
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":35
* cdef unsigned fid
* for fid in range(1, self.vector.size()):
* yield str(FDConvert(fid).c_str()), self.vector[0][fid] # <<<<<<<<<<<<<<
@@ -2983,7 +2983,7 @@ static PyObject *__pyx_pw_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_self, PyO
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":37
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":37
* yield str(FDConvert(fid).c_str()), self.vector[0][fid]
*
* def dot(self, SparseVector other): # <<<<<<<<<<<<<<
@@ -3002,7 +3002,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_13dot(struct __pyx_obj_5_cdec_Den
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("dot", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":39
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":39
* def dot(self, SparseVector other):
* """vector.dot(SparseVector other) -> Dot product of the two vectors."""
* return other.dot(self) # <<<<<<<<<<<<<<
@@ -3051,7 +3051,7 @@ static PyObject *__pyx_pw_5_cdec_11DenseVector_16tosparse(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":41
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":41
* return other.dot(self)
*
* def tosparse(self): # <<<<<<<<<<<<<<
@@ -3069,7 +3069,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_5_cde
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("tosparse", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":43
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":43
* def tosparse(self):
* """vector.tosparse() -> Equivalent SparseVector."""
* cdef SparseVector sparse = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -3082,7 +3082,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_5_cde
__pyx_v_sparse = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":44
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":44
* """vector.tosparse() -> Equivalent SparseVector."""
* cdef SparseVector sparse = SparseVector.__new__(SparseVector)
* sparse.vector = new FastSparseVector[weight_t]() # <<<<<<<<<<<<<<
@@ -3091,7 +3091,7 @@ static PyObject *__pyx_pf_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_5_cde
*/
__pyx_v_sparse->vector = new FastSparseVector<weight_t>();
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":45
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":45
* cdef SparseVector sparse = SparseVector.__new__(SparseVector)
* sparse.vector = new FastSparseVector[weight_t]()
* InitSparseVector(self.vector[0], sparse.vector) # <<<<<<<<<<<<<<
@@ -3100,7 +3100,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);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":46
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":46
* sparse.vector = new FastSparseVector[weight_t]()
* InitSparseVector(self.vector[0], sparse.vector)
* return sparse # <<<<<<<<<<<<<<
@@ -3143,7 +3143,7 @@ static int __pyx_pw_5_cdec_12SparseVector_1__init__(PyObject *__pyx_v_self, PyOb
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":51
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":51
* cdef FastSparseVector[weight_t]* vector
*
* def __init__(self): # <<<<<<<<<<<<<<
@@ -3156,7 +3156,7 @@ static int __pyx_pf_5_cdec_12SparseVector___init__(struct __pyx_obj_5_cdec_Spars
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":53
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":53
* def __init__(self):
* """SparseVector() -> Sparse feature/weight vector."""
* self.vector = new FastSparseVector[weight_t]() # <<<<<<<<<<<<<<
@@ -3179,7 +3179,7 @@ static void __pyx_pw_5_cdec_12SparseVector_3__dealloc__(PyObject *__pyx_v_self)
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":55
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":55
* self.vector = new FastSparseVector[weight_t]()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -3191,7 +3191,7 @@ static void __pyx_pf_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED struct __p
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":56
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":56
*
* def __dealloc__(self):
* del self.vector # <<<<<<<<<<<<<<
@@ -3215,7 +3215,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_5copy(PyObject *__pyx_v_self, CY
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":58
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":58
* del self.vector
*
* def copy(self): # <<<<<<<<<<<<<<
@@ -3232,7 +3232,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_4copy(struct __pyx_obj_5_cdec_Sp
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("copy", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":60
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":60
* def copy(self):
* """vector.copy() -> SparseVector copy."""
* return self * 1 # <<<<<<<<<<<<<<
@@ -3279,7 +3279,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_s
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":62
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":62
* return self * 1
*
* def __getitem__(self, char* fname): # <<<<<<<<<<<<<<
@@ -3299,7 +3299,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_5_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":63
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":63
*
* def __getitem__(self, char* fname):
* cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<<
@@ -3308,7 +3308,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_5_
*/
__pyx_v_fid = FD::Convert(__pyx_v_fname);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":64
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":64
* def __getitem__(self, char* fname):
* cdef int fid = FDConvert(fname)
* if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<<
@@ -3334,7 +3334,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_5_
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":65
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":65
* cdef int fid = FDConvert(fname)
* if fid < 0: raise KeyError(fname)
* return self.vector.value(fid) # <<<<<<<<<<<<<<
@@ -3386,7 +3386,7 @@ static int __pyx_pw_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, P
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":67
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":67
* return self.vector.value(fid)
*
* def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<<
@@ -3406,7 +3406,7 @@ static int __pyx_pf_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_5_cdec_S
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setitem__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":68
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":68
*
* def __setitem__(self, char* fname, float value):
* cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<<
@@ -3415,7 +3415,7 @@ static int __pyx_pf_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_5_cdec_S
*/
__pyx_v_fid = FD::Convert(__pyx_v_fname);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":69
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":69
* def __setitem__(self, char* fname, float value):
* cdef int fid = FDConvert(fname)
* if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<<
@@ -3441,7 +3441,7 @@ static int __pyx_pf_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_5_cdec_S
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":70
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":70
* cdef int fid = FDConvert(fname)
* if fid < 0: raise KeyError(fname)
* self.vector.set_value(fid, value) # <<<<<<<<<<<<<<
@@ -3474,7 +3474,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_11__iter__(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":72
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":72
* self.vector.set_value(fid, value)
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -3539,7 +3539,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;}
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":73
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":73
*
* def __iter__(self):
* cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) # <<<<<<<<<<<<<<
@@ -3548,7 +3548,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);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":75
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":75
* cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False)
* cdef unsigned i
* try: # <<<<<<<<<<<<<<
@@ -3557,7 +3557,7 @@ static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObje
*/
/*try:*/ {
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":76
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":76
* cdef unsigned i
* try:
* for i in range(self.vector.size()): # <<<<<<<<<<<<<<
@@ -3568,7 +3568,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;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":77
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":77
* try:
* for i in range(self.vector.size()):
* yield (str(FDConvert(it[0].ptr().first).c_str()), it[0].ptr().second) # <<<<<<<<<<<<<<
@@ -3609,7 +3609,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;}
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":78
+ /* "/home/pauldb/workspace/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -3620,7 +3620,7 @@ static PyObject *__pyx_gb_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObje
}
}
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":80
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":80
* pinc(it[0]) # ++it
* finally:
* del it # <<<<<<<<<<<<<<
@@ -3682,7 +3682,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_14dot(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":82
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":82
* del it
*
* def dot(self, other): # <<<<<<<<<<<<<<
@@ -3701,7 +3701,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("dot", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":84
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":84
* def dot(self, other):
* """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors."""
* if isinstance(other, DenseVector): # <<<<<<<<<<<<<<
@@ -3714,7 +3714,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":85
+ /* "/home/pauldb/workspace/cdec/python/src/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]) # <<<<<<<<<<<<<<
@@ -3730,7 +3730,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp
goto __pyx_L3;
}
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":86
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":86
* if isinstance(other, DenseVector):
* return self.vector.dot((<DenseVector> other).vector[0])
* elif isinstance(other, SparseVector): # <<<<<<<<<<<<<<
@@ -3743,7 +3743,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":87
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":87
* return self.vector.dot((<DenseVector> other).vector[0])
* elif isinstance(other, SparseVector):
* return self.vector.dot((<SparseVector> other).vector[0]) # <<<<<<<<<<<<<<
@@ -3760,7 +3760,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_13dot(struct __pyx_obj_5_cdec_Sp
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":88
+ /* "/home/pauldb/workspace/cdec/python/src/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)) # <<<<<<<<<<<<<<
@@ -3811,7 +3811,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":90
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":90
* raise TypeError('cannot take the dot product of %s and SparseVector' % type(other))
*
* def __richcmp__(SparseVector x, SparseVector y, int op): # <<<<<<<<<<<<<<
@@ -3829,7 +3829,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__richcmp__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":93
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":93
* if op == 2: # ==
* return x.vector[0] == y.vector[0]
* elif op == 3: # != # <<<<<<<<<<<<<<
@@ -3838,7 +3838,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5
*/
switch (__pyx_v_op) {
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":91
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":91
*
* def __richcmp__(SparseVector x, SparseVector y, int op):
* if op == 2: # == # <<<<<<<<<<<<<<
@@ -3847,7 +3847,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5
*/
case 2:
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":92
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":92
* def __richcmp__(SparseVector x, SparseVector y, int op):
* if op == 2: # ==
* return x.vector[0] == y.vector[0] # <<<<<<<<<<<<<<
@@ -3862,7 +3862,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5
goto __pyx_L0;
break;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":93
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":93
* if op == 2: # ==
* return x.vector[0] == y.vector[0]
* elif op == 3: # != # <<<<<<<<<<<<<<
@@ -3871,7 +3871,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5
*/
case 3:
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":94
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":94
* return x.vector[0] == y.vector[0]
* elif op == 3: # !=
* return not (x == y) # <<<<<<<<<<<<<<
@@ -3890,7 +3890,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_5
break;
}
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":95
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":95
* elif op == 3: # !=
* return not (x == y)
* raise NotImplemented('comparison not implemented for SparseVector') # <<<<<<<<<<<<<<
@@ -3926,7 +3926,7 @@ static Py_ssize_t __pyx_pw_5_cdec_12SparseVector_18__len__(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":97
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":97
* raise NotImplemented('comparison not implemented for SparseVector')
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -3939,7 +3939,7 @@ static Py_ssize_t __pyx_pf_5_cdec_12SparseVector_17__len__(struct __pyx_obj_5_cd
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":98
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":98
*
* def __len__(self):
* return self.vector.size() # <<<<<<<<<<<<<<
@@ -3976,7 +3976,7 @@ static int __pyx_pw_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":100
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":100
* return self.vector.size()
*
* def __contains__(self, char* fname): # <<<<<<<<<<<<<<
@@ -3989,7 +3989,7 @@ static int __pyx_pf_5_cdec_12SparseVector_19__contains__(struct __pyx_obj_5_cdec
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__contains__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":101
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":101
*
* def __contains__(self, char* fname):
* return self.vector.nonzero(FDConvert(fname)) # <<<<<<<<<<<<<<
@@ -4016,7 +4016,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":103
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":103
* return self.vector.nonzero(FDConvert(fname))
*
* def __neg__(self): # <<<<<<<<<<<<<<
@@ -4034,7 +4034,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_5_cde
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__neg__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":104
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":104
*
* def __neg__(self):
* cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -4047,7 +4047,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_5_cde
__pyx_v_result = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":105
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":105
* def __neg__(self):
* cdef SparseVector result = SparseVector.__new__(SparseVector)
* result.vector = new FastSparseVector[weight_t](self.vector[0]) # <<<<<<<<<<<<<<
@@ -4056,7 +4056,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]));
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":106
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":106
* cdef SparseVector result = SparseVector.__new__(SparseVector)
* result.vector = new FastSparseVector[weight_t](self.vector[0])
* result.vector[0] *= -1.0 # <<<<<<<<<<<<<<
@@ -4065,7 +4065,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_5_cde
*/
(__pyx_v_result->vector[0]) *= -1.0;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":107
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":107
* result.vector = new FastSparseVector[weight_t](self.vector[0])
* result.vector[0] *= -1.0
* return result # <<<<<<<<<<<<<<
@@ -4106,7 +4106,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":109
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":109
* return result
*
* def __iadd__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<<
@@ -4119,7 +4119,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_23__iadd__(struct __pyx_obj_5_cd
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iadd__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":110
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":110
*
* def __iadd__(SparseVector self, SparseVector other):
* self.vector[0] += other.vector[0] # <<<<<<<<<<<<<<
@@ -4128,7 +4128,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]);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":111
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":111
* def __iadd__(SparseVector self, SparseVector other):
* self.vector[0] += other.vector[0]
* return self # <<<<<<<<<<<<<<
@@ -4163,7 +4163,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":113
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":113
* return self
*
* def __isub__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<<
@@ -4176,7 +4176,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_25__isub__(struct __pyx_obj_5_cd
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__isub__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":114
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":114
*
* def __isub__(SparseVector self, SparseVector other):
* self.vector[0] -= other.vector[0] # <<<<<<<<<<<<<<
@@ -4185,7 +4185,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]);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":115
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":115
* def __isub__(SparseVector self, SparseVector other):
* self.vector[0] -= other.vector[0]
* return self # <<<<<<<<<<<<<<
@@ -4225,7 +4225,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":117
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":117
* return self
*
* def __imul__(SparseVector self, float scalar): # <<<<<<<<<<<<<<
@@ -4238,7 +4238,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_27__imul__(struct __pyx_obj_5_cd
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__imul__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":118
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":118
*
* def __imul__(SparseVector self, float scalar):
* self.vector[0] *= scalar # <<<<<<<<<<<<<<
@@ -4247,7 +4247,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_27__imul__(struct __pyx_obj_5_cd
*/
(__pyx_v_self->vector[0]) *= __pyx_v_scalar;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":119
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":119
* def __imul__(SparseVector self, float scalar):
* self.vector[0] *= scalar
* return self # <<<<<<<<<<<<<<
@@ -4289,7 +4289,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx_v_sel
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":121
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":121
* return self
*
* def __idiv__(SparseVector self, float scalar): # <<<<<<<<<<<<<<
@@ -4303,7 +4303,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_29__idiv__(struct __pyx_obj_5_cd
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__idiv__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":122
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":122
*
* def __idiv__(SparseVector self, float scalar):
* self.vector[0] /= scalar # <<<<<<<<<<<<<<
@@ -4312,7 +4312,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_29__idiv__(struct __pyx_obj_5_cd
*/
(__pyx_v_self->vector[0]) /= __pyx_v_scalar;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":123
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":123
* def __idiv__(SparseVector self, float scalar):
* self.vector[0] /= scalar
* return self # <<<<<<<<<<<<<<
@@ -4349,7 +4349,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, P
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":125
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":125
* return self
*
* def __add__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<<
@@ -4367,7 +4367,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_31__add__(struct __pyx_obj_5_cde
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__add__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":126
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":126
*
* def __add__(SparseVector x, SparseVector y):
* cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -4380,7 +4380,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_31__add__(struct __pyx_obj_5_cde
__pyx_v_result = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":127
+ /* "/home/pauldb/workspace/cdec/python/src/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]) # <<<<<<<<<<<<<<
@@ -4389,7 +4389,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])));
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":128
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":128
* cdef SparseVector result = SparseVector.__new__(SparseVector)
* result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0])
* return result # <<<<<<<<<<<<<<
@@ -4431,7 +4431,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, P
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":130
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":130
* return result
*
* def __sub__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<<
@@ -4449,7 +4449,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_5_cde
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__sub__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":131
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":131
*
* def __sub__(SparseVector x, SparseVector y):
* cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -4462,7 +4462,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_5_cde
__pyx_v_result = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":132
+ /* "/home/pauldb/workspace/cdec/python/src/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]) # <<<<<<<<<<<<<<
@@ -4471,7 +4471,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])));
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":133
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":133
* cdef SparseVector result = SparseVector.__new__(SparseVector)
* result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0])
* return result # <<<<<<<<<<<<<<
@@ -4507,7 +4507,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_v_x, P
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":135
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":135
* return result
*
* def __mul__(x, y): # <<<<<<<<<<<<<<
@@ -4529,7 +4529,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, P
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__mul__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":138
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":138
* cdef SparseVector vector
* cdef float scalar
* if isinstance(x, SparseVector): vector, scalar = x, y # <<<<<<<<<<<<<<
@@ -4552,7 +4552,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, P
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":139
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":139
* cdef float scalar
* if isinstance(x, SparseVector): vector, scalar = x, y
* else: vector, scalar = y, x # <<<<<<<<<<<<<<
@@ -4569,7 +4569,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, P
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":140
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":140
* if isinstance(x, SparseVector): vector, scalar = x, y
* else: vector, scalar = y, x
* cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -4582,7 +4582,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, P
__pyx_v_result = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":141
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":141
* else: vector, scalar = y, x
* cdef SparseVector result = SparseVector.__new__(SparseVector)
* result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) # <<<<<<<<<<<<<<
@@ -4591,7 +4591,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));
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":142
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":142
* cdef SparseVector result = SparseVector.__new__(SparseVector)
* result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar)
* return result # <<<<<<<<<<<<<<
@@ -4630,7 +4630,7 @@ static PyObject *__pyx_pw_5_cdec_12SparseVector_38__div__(PyObject *__pyx_v_x, P
}
#endif /*!(#if PY_MAJOR_VERSION < 3)*/
-/* "/home/vchahune/tools/cdec/python/src/vectors.pxi":144
+/* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":144
* return result
*
* def __div__(x, y): # <<<<<<<<<<<<<<
@@ -4653,7 +4653,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, P
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__div__", 0);
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":147
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":147
* cdef SparseVector vector
* cdef float scalar
* if isinstance(x, SparseVector): vector, scalar = x, y # <<<<<<<<<<<<<<
@@ -4676,7 +4676,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, P
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":148
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":148
* cdef float scalar
* if isinstance(x, SparseVector): vector, scalar = x, y
* else: vector, scalar = y, x # <<<<<<<<<<<<<<
@@ -4693,7 +4693,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, P
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":149
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":149
* if isinstance(x, SparseVector): vector, scalar = x, y
* else: vector, scalar = y, x
* cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -4706,7 +4706,7 @@ static PyObject *__pyx_pf_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, P
__pyx_v_result = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":150
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":150
* else: vector, scalar = y, x
* cdef SparseVector result = SparseVector.__new__(SparseVector)
* result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) # <<<<<<<<<<<<<<
@@ -4714,7 +4714,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));
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":151
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":151
* cdef SparseVector result = SparseVector.__new__(SparseVector)
* result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar)
* return result # <<<<<<<<<<<<<<
@@ -4752,7 +4752,7 @@ static PyObject *__pyx_pw_5_cdec_1_phrase(PyObject *__pyx_self, PyObject *__pyx_
}
static PyObject *__pyx_gb_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":6
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":6
*
* def _phrase(phrase):
* return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<<
@@ -4918,7 +4918,7 @@ static PyObject *__pyx_gb_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__
return NULL;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":5
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":5
* import cdec.sa._sa as _sa
*
* def _phrase(phrase): # <<<<<<<<<<<<<<
@@ -4947,7 +4947,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":6
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":6
*
* def _phrase(phrase):
* return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<<
@@ -5058,7 +5058,7 @@ static int __pyx_pw_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject *__pyx
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":11
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":11
* cdef public bytes cat
* cdef public unsigned ref
* def __init__(self, bytes cat, unsigned ref=0): # <<<<<<<<<<<<<<
@@ -5071,7 +5071,7 @@ static int __pyx_pf_5_cdec_2NT___init__(struct __pyx_obj_5_cdec_NT *__pyx_v_self
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":13
+ /* "/home/pauldb/workspace/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -5084,7 +5084,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":14
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":14
* """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`."""
* self.cat = cat
* self.ref = ref # <<<<<<<<<<<<<<
@@ -5109,7 +5109,7 @@ static PyObject *__pyx_pw_5_cdec_2NT_3__str__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":16
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":16
* self.ref = ref
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -5128,7 +5128,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":17
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":17
*
* def __str__(self):
* if self.ref > 0: # <<<<<<<<<<<<<<
@@ -5138,7 +5138,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);
if (__pyx_t_1) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":18
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":18
* def __str__(self):
* if self.ref > 0:
* return '[%s,%d]' % (self.cat, self.ref) # <<<<<<<<<<<<<<
@@ -5166,7 +5166,7 @@ static PyObject *__pyx_pf_5_cdec_2NT_2__str__(struct __pyx_obj_5_cdec_NT *__pyx_
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":19
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":19
* if self.ref > 0:
* return '[%s,%d]' % (self.cat, self.ref)
* return '[%s]' % self.cat # <<<<<<<<<<<<<<
@@ -5204,7 +5204,7 @@ static PyObject *__pyx_pw_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":9
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":9
*
* cdef class NT:
* cdef public bytes cat # <<<<<<<<<<<<<<
@@ -5300,7 +5300,7 @@ static PyObject *__pyx_pw_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":10
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":10
* cdef class NT:
* cdef public bytes cat
* cdef public unsigned ref # <<<<<<<<<<<<<<
@@ -5418,7 +5418,7 @@ static int __pyx_pw_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObject *__
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":23
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":23
* cdef class NTRef:
* cdef public unsigned ref
* def __init__(self, unsigned ref): # <<<<<<<<<<<<<<
@@ -5431,7 +5431,7 @@ static int __pyx_pf_5_cdec_5NTRef___init__(struct __pyx_obj_5_cdec_NTRef *__pyx_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":25
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":25
* def __init__(self, unsigned ref):
* """NTRef(int ref) -> Non-terminal reference."""
* self.ref = ref # <<<<<<<<<<<<<<
@@ -5456,7 +5456,7 @@ static PyObject *__pyx_pw_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":27
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":27
* self.ref = ref
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -5474,7 +5474,7 @@ static PyObject *__pyx_pf_5_cdec_5NTRef_2__str__(struct __pyx_obj_5_cdec_NTRef *
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":28
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":28
*
* def __str__(self):
* return '[%d]' % self.ref # <<<<<<<<<<<<<<
@@ -5515,7 +5515,7 @@ static PyObject *__pyx_pw_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":22
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":22
*
* cdef class NTRef:
* cdef public unsigned ref # <<<<<<<<<<<<<<
@@ -5582,7 +5582,7 @@ static int __pyx_pf_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_5_cdec_NTRef *_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":30
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":30
* return '[%d]' % self.ref
*
* cdef TRule convert_rule(_sa.Rule rule): # <<<<<<<<<<<<<<
@@ -5612,7 +5612,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":31
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":31
*
* cdef TRule convert_rule(_sa.Rule rule):
* lhs = _sa.sym_tocat(rule.lhs) # <<<<<<<<<<<<<<
@@ -5621,7 +5621,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":32
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":32
* cdef TRule convert_rule(_sa.Rule rule):
* lhs = _sa.sym_tocat(rule.lhs)
* scores = dict(rule.scores) # <<<<<<<<<<<<<<
@@ -5639,7 +5639,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":33
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":33
* lhs = _sa.sym_tocat(rule.lhs)
* scores = dict(rule.scores)
* f, e = [], [] # <<<<<<<<<<<<<<
@@ -5655,7 +5655,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
__pyx_v_e = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":34
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":34
* scores = dict(rule.scores)
* f, e = [], []
* cdef int* fsyms = rule.f.syms # <<<<<<<<<<<<<<
@@ -5664,7 +5664,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
*/
__pyx_v_fsyms = __pyx_v_rule->f->syms;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":35
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":35
* f, e = [], []
* cdef int* fsyms = rule.f.syms
* for i in range(rule.f.n): # <<<<<<<<<<<<<<
@@ -5675,7 +5675,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":36
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":36
* cdef int* fsyms = rule.f.syms
* for i in range(rule.f.n):
* if _sa.sym_isvar(fsyms[i]): # <<<<<<<<<<<<<<
@@ -5685,7 +5685,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
__pyx_t_5 = __pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_fsyms[__pyx_v_i]));
if (__pyx_t_5) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":37
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":37
* for i in range(rule.f.n):
* if _sa.sym_isvar(fsyms[i]):
* f.append(NT(_sa.sym_tocat(fsyms[i]))) # <<<<<<<<<<<<<<
@@ -5708,7 +5708,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":39
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":39
* f.append(NT(_sa.sym_tocat(fsyms[i])))
* else:
* f.append(_sa.sym_tostring(fsyms[i])) # <<<<<<<<<<<<<<
@@ -5723,7 +5723,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
__pyx_L5:;
}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":40
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":40
* else:
* f.append(_sa.sym_tostring(fsyms[i]))
* cdef int* esyms = rule.e.syms # <<<<<<<<<<<<<<
@@ -5732,7 +5732,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
*/
__pyx_v_esyms = __pyx_v_rule->e->syms;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":41
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":41
* f.append(_sa.sym_tostring(fsyms[i]))
* cdef int* esyms = rule.e.syms
* for i in range(rule.e.n): # <<<<<<<<<<<<<<
@@ -5743,7 +5743,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":42
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":42
* cdef int* esyms = rule.e.syms
* for i in range(rule.e.n):
* if _sa.sym_isvar(esyms[i]): # <<<<<<<<<<<<<<
@@ -5753,7 +5753,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
__pyx_t_5 = __pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_esyms[__pyx_v_i]));
if (__pyx_t_5) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":43
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":43
* for i in range(rule.e.n):
* if _sa.sym_isvar(esyms[i]):
* e.append(NTRef(_sa.sym_getindex(esyms[i]))) # <<<<<<<<<<<<<<
@@ -5776,7 +5776,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":45
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":45
* e.append(NTRef(_sa.sym_getindex(esyms[i])))
* else:
* e.append(_sa.sym_tostring(esyms[i])) # <<<<<<<<<<<<<<
@@ -5791,7 +5791,7 @@ static struct __pyx_obj_5_cdec_TRule *__pyx_f_5_cdec_convert_rule(struct __pyx_o
__pyx_L8:;
}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":46
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":46
* else:
* e.append(_sa.sym_tostring(esyms[i]))
* a = list(rule.alignments()) # <<<<<<<<<<<<<<
@@ -5814,7 +5814,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":47
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":47
* e.append(_sa.sym_tostring(esyms[i]))
* a = list(rule.alignments())
* return TRule(lhs, f, e, scores, a) # <<<<<<<<<<<<<<
@@ -5884,7 +5884,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};
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":52
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":52
* cdef shared_ptr[grammar.TRule]* rule
*
* def __init__(self, lhs, f, e, scores, a=None): # <<<<<<<<<<<<<<
@@ -5973,7 +5973,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":59
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":59
* scores: dictionary of feature scores
* a: optional list of alignment points"""
* self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) # <<<<<<<<<<<<<<
@@ -5983,7 +5983,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_
try {__pyx_t_1 = new TRule();} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}}
__pyx_v_self->rule = new boost::shared_ptr<TRule>(__pyx_t_1);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":60
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":60
* a: optional list of alignment points"""
* self.rule = new shared_ptr[grammar.TRule](new grammar.TRule())
* self.lhs = lhs # <<<<<<<<<<<<<<
@@ -5992,7 +5992,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_
*/
if (PyObject_SetAttr(((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;}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":61
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":61
* self.rule = new shared_ptr[grammar.TRule](new grammar.TRule())
* self.lhs = lhs
* self.e = e # <<<<<<<<<<<<<<
@@ -6001,7 +6001,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_
*/
if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__e, __pyx_v_e) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":62
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":62
* self.lhs = lhs
* self.e = e
* self.f = f # <<<<<<<<<<<<<<
@@ -6010,7 +6010,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_
*/
if (PyObject_SetAttr(((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;}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":63
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":63
* self.e = e
* self.f = f
* self.scores = scores # <<<<<<<<<<<<<<
@@ -6019,7 +6019,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_
*/
if (PyObject_SetAttr(((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;}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":64
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":64
* self.f = f
* self.scores = scores
* if a: # <<<<<<<<<<<<<<
@@ -6029,7 +6029,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) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":65
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":65
* self.scores = scores
* if a:
* self.a = a # <<<<<<<<<<<<<<
@@ -6041,7 +6041,7 @@ static int __pyx_pf_5_cdec_5TRule___init__(struct __pyx_obj_5_cdec_TRule *__pyx_
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":66
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":66
* if a:
* self.a = a
* self.rule.get().ComputeArity() # <<<<<<<<<<<<<<
@@ -6069,7 +6069,7 @@ static void __pyx_pw_5_cdec_5TRule_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":68
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":68
* self.rule.get().ComputeArity()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -6081,7 +6081,7 @@ static void __pyx_pf_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":69
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":69
*
* def __dealloc__(self):
* del self.rule # <<<<<<<<<<<<<<
@@ -6104,7 +6104,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_self)
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":72
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":72
*
* property arity:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -6121,7 +6121,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_5arity___get__(struct __pyx_obj_5_cdec_T
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":73
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":73
* property arity:
* def __get__(self):
* return self.rule.get().arity_ # <<<<<<<<<<<<<<
@@ -6158,7 +6158,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":76
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":76
*
* property f:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -6185,7 +6185,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":77
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":77
* property f:
* def __get__(self):
* cdef vector[WordID]* f_ = &self.rule.get().f_ # <<<<<<<<<<<<<<
@@ -6194,7 +6194,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_);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":79
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":79
* cdef vector[WordID]* f_ = &self.rule.get().f_
* cdef WordID w
* cdef f = [] # <<<<<<<<<<<<<<
@@ -6206,7 +6206,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":81
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":81
* cdef f = []
* cdef unsigned i
* cdef int idx = 0 # <<<<<<<<<<<<<<
@@ -6215,7 +6215,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule
*/
__pyx_v_idx = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":82
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":82
* cdef unsigned i
* cdef int idx = 0
* for i in range(f_.size()): # <<<<<<<<<<<<<<
@@ -6226,7 +6226,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":83
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":83
* cdef int idx = 0
* for i in range(f_.size()):
* w = f_[0][i] # <<<<<<<<<<<<<<
@@ -6235,7 +6235,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]);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":84
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":84
* for i in range(f_.size()):
* w = f_[0][i]
* if w < 0: # <<<<<<<<<<<<<<
@@ -6245,7 +6245,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule
__pyx_t_4 = (__pyx_v_w < 0);
if (__pyx_t_4) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":85
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":85
* w = f_[0][i]
* if w < 0:
* idx += 1 # <<<<<<<<<<<<<<
@@ -6254,7 +6254,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule
*/
__pyx_v_idx = (__pyx_v_idx + 1);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":86
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":86
* if w < 0:
* idx += 1
* f.append(NT(TDConvert(-w).c_str(), idx)) # <<<<<<<<<<<<<<
@@ -6284,7 +6284,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":88
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":88
* f.append(NT(TDConvert(-w).c_str(), idx))
* else:
* f.append(unicode(TDConvert(w).c_str(), encoding='utf8')) # <<<<<<<<<<<<<<
@@ -6313,7 +6313,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1f___get__(struct __pyx_obj_5_cdec_TRule
__pyx_L5:;
}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":89
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":89
* else:
* f.append(unicode(TDConvert(w).c_str(), encoding='utf8'))
* return f # <<<<<<<<<<<<<<
@@ -6351,7 +6351,7 @@ static int __pyx_pw_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyObject *
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":91
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":91
* return f
*
* def __set__(self, f): # <<<<<<<<<<<<<<
@@ -6377,7 +6377,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":92
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":92
*
* def __set__(self, f):
* cdef vector[WordID]* f_ = &self.rule.get().f_ # <<<<<<<<<<<<<<
@@ -6386,7 +6386,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_);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":93
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":93
* def __set__(self, f):
* cdef vector[WordID]* f_ = &self.rule.get().f_
* f_.resize(len(f)) # <<<<<<<<<<<<<<
@@ -6396,7 +6396,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":95
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":95
* f_.resize(len(f))
* cdef unsigned i
* cdef int idx = 0 # <<<<<<<<<<<<<<
@@ -6405,7 +6405,7 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p
*/
__pyx_v_idx = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":96
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":96
* cdef unsigned i
* cdef int idx = 0
* for i in range(len(f)): # <<<<<<<<<<<<<<
@@ -6416,7 +6416,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":97
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":97
* cdef int idx = 0
* for i in range(len(f)):
* if isinstance(f[i], NT): # <<<<<<<<<<<<<<
@@ -6432,7 +6432,7 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":98
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":98
* for i in range(len(f)):
* if isinstance(f[i], NT):
* f_[0][i] = -TDConvert((<NT> f[i]).cat) # <<<<<<<<<<<<<<
@@ -6448,7 +6448,7 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":100
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":100
* f_[0][i] = -TDConvert((<NT> f[i]).cat)
* else:
* fi = as_str(f[i]) # <<<<<<<<<<<<<<
@@ -6464,7 +6464,7 @@ static int __pyx_pf_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_5_cdec_TRule *__p
__pyx_v_fi = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":101
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":101
* else:
* fi = as_str(f[i])
* f_[0][i] = TDConvert(fi) # <<<<<<<<<<<<<<
@@ -6501,7 +6501,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":104
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":104
*
* property e:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -6528,7 +6528,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":105
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":105
* property e:
* def __get__(self):
* cdef vector[WordID]* e_ = &self.rule.get().e_ # <<<<<<<<<<<<<<
@@ -6537,7 +6537,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_);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":107
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":107
* cdef vector[WordID]* e_ = &self.rule.get().e_
* cdef WordID w
* cdef e = [] # <<<<<<<<<<<<<<
@@ -6549,7 +6549,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":109
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":109
* cdef e = []
* cdef unsigned i
* cdef int idx = 0 # <<<<<<<<<<<<<<
@@ -6558,7 +6558,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule
*/
__pyx_v_idx = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":110
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":110
* cdef unsigned i
* cdef int idx = 0
* for i in range(e_.size()): # <<<<<<<<<<<<<<
@@ -6569,7 +6569,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":111
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":111
* cdef int idx = 0
* for i in range(e_.size()):
* w = e_[0][i] # <<<<<<<<<<<<<<
@@ -6578,7 +6578,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]);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":112
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":112
* for i in range(e_.size()):
* w = e_[0][i]
* if w < 1: # <<<<<<<<<<<<<<
@@ -6588,7 +6588,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule
__pyx_t_4 = (__pyx_v_w < 1);
if (__pyx_t_4) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":113
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":113
* w = e_[0][i]
* if w < 1:
* idx += 1 # <<<<<<<<<<<<<<
@@ -6597,7 +6597,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule
*/
__pyx_v_idx = (__pyx_v_idx + 1);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":114
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":114
* if w < 1:
* idx += 1
* e.append(NTRef(1-w)) # <<<<<<<<<<<<<<
@@ -6622,7 +6622,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":116
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":116
* e.append(NTRef(1-w))
* else:
* e.append(unicode(TDConvert(w).c_str(), encoding='utf8')) # <<<<<<<<<<<<<<
@@ -6651,7 +6651,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_1e___get__(struct __pyx_obj_5_cdec_TRule
__pyx_L5:;
}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":117
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":117
* else:
* e.append(unicode(TDConvert(w).c_str(), encoding='utf8'))
* return e # <<<<<<<<<<<<<<
@@ -6689,7 +6689,7 @@ static int __pyx_pw_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyObject *
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":119
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":119
* return e
*
* def __set__(self, e): # <<<<<<<<<<<<<<
@@ -6715,7 +6715,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":120
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":120
*
* def __set__(self, e):
* cdef vector[WordID]* e_ = &self.rule.get().e_ # <<<<<<<<<<<<<<
@@ -6724,7 +6724,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_);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":121
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":121
* def __set__(self, e):
* cdef vector[WordID]* e_ = &self.rule.get().e_
* e_.resize(len(e)) # <<<<<<<<<<<<<<
@@ -6734,7 +6734,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":123
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":123
* e_.resize(len(e))
* cdef unsigned i
* for i in range(len(e)): # <<<<<<<<<<<<<<
@@ -6745,7 +6745,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":124
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":124
* cdef unsigned i
* for i in range(len(e)):
* if isinstance(e[i], NTRef): # <<<<<<<<<<<<<<
@@ -6761,7 +6761,7 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":125
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":125
* for i in range(len(e)):
* if isinstance(e[i], NTRef):
* e_[0][i] = 1-e[i].ref # <<<<<<<<<<<<<<
@@ -6783,7 +6783,7 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":127
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":127
* e_[0][i] = 1-e[i].ref
* else:
* ei = as_str(e[i]) # <<<<<<<<<<<<<<
@@ -6799,7 +6799,7 @@ static int __pyx_pf_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_5_cdec_TRule *__p
__pyx_v_ei = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":128
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":128
* else:
* ei = as_str(e[i])
* e_[0][i] = TDConvert(ei) # <<<<<<<<<<<<<<
@@ -6837,7 +6837,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":131
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":131
*
* property a:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -6902,7 +6902,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;}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":133
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":133
* def __get__(self):
* cdef unsigned i
* cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ # <<<<<<<<<<<<<<
@@ -6911,7 +6911,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_);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":134
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":134
* cdef unsigned i
* cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_
* for i in range(a.size()): # <<<<<<<<<<<<<<
@@ -6922,7 +6922,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":135
+ /* "/home/pauldb/workspace/cdec/python/src/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_) # <<<<<<<<<<<<<<
@@ -6981,7 +6981,7 @@ static int __pyx_pw_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyObject *
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":137
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":137
* yield (a[0][i].s_, a[0][i].t_)
*
* def __set__(self, a): # <<<<<<<<<<<<<<
@@ -7010,7 +7010,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":138
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":138
*
* def __set__(self, a):
* cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ # <<<<<<<<<<<<<<
@@ -7019,7 +7019,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_);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":139
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":139
* def __set__(self, a):
* cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_
* a_.resize(len(a)) # <<<<<<<<<<<<<<
@@ -7029,7 +7029,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":142
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":142
* cdef unsigned i
* cdef int s, t
* for i in range(len(a)): # <<<<<<<<<<<<<<
@@ -7040,7 +7040,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":143
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":143
* cdef int s, t
* for i in range(len(a)):
* s, t = a[i] # <<<<<<<<<<<<<<
@@ -7105,7 +7105,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":144
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":144
* for i in range(len(a)):
* s, t = a[i]
* a_[0][i] = grammar.AlignmentPoint(s, t) # <<<<<<<<<<<<<<
@@ -7140,7 +7140,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v_self)
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":147
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":147
*
* property scores:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -7158,7 +7158,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_6scores___get__(struct __pyx_obj_5_cdec_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":148
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":148
* property scores:
* def __get__(self):
* cdef SparseVector scores = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -7171,7 +7171,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_6scores___get__(struct __pyx_obj_5_cdec_
__pyx_v_scores = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":149
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":149
* def __get__(self):
* cdef SparseVector scores = SparseVector.__new__(SparseVector)
* scores.vector = new FastSparseVector[double](self.rule.get().scores_) # <<<<<<<<<<<<<<
@@ -7180,7 +7180,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_);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":150
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":150
* cdef SparseVector scores = SparseVector.__new__(SparseVector)
* scores.vector = new FastSparseVector[double](self.rule.get().scores_)
* return scores # <<<<<<<<<<<<<<
@@ -7216,7 +7216,7 @@ static int __pyx_pw_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":152
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":152
* return scores
*
* def __set__(self, scores): # <<<<<<<<<<<<<<
@@ -7248,7 +7248,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":153
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":153
*
* def __set__(self, scores):
* cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ # <<<<<<<<<<<<<<
@@ -7257,7 +7257,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_);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":154
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":154
* def __set__(self, scores):
* cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_
* scores_.clear() # <<<<<<<<<<<<<<
@@ -7266,7 +7266,7 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule
*/
__pyx_v_scores_->clear();
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":157
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":157
* cdef int fid
* cdef float fval
* for fname, fval in scores.items(): # <<<<<<<<<<<<<<
@@ -7369,7 +7369,7 @@ 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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":158
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":158
* cdef float fval
* for fname, fval in scores.items():
* fn = as_str(fname) # <<<<<<<<<<<<<<
@@ -7382,7 +7382,7 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule
__pyx_v_fn = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":159
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":159
* for fname, fval in scores.items():
* fn = as_str(fname)
* fid = FDConvert(fn) # <<<<<<<<<<<<<<
@@ -7392,7 +7392,7 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule
__pyx_t_10 = PyBytes_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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":160
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":160
* fn = as_str(fname)
* fid = FDConvert(fn)
* if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<<
@@ -7416,7 +7416,7 @@ static int __pyx_pf_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_5_cdec_TRule
}
__pyx_L7:;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":161
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":161
* fid = FDConvert(fn)
* if fid < 0: raise KeyError(fname)
* scores_.set_value(fid, fval) # <<<<<<<<<<<<<<
@@ -7455,7 +7455,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":164
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":164
*
* property lhs:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -7473,7 +7473,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_5_cdec_TRu
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":165
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":165
* property lhs:
* def __get__(self):
* return NT(TDConvert(-self.rule.get().lhs_).c_str()) # <<<<<<<<<<<<<<
@@ -7519,7 +7519,7 @@ static int __pyx_pw_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":167
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":167
* return NT(TDConvert(-self.rule.get().lhs_).c_str())
*
* def __set__(self, lhs): # <<<<<<<<<<<<<<
@@ -7541,7 +7541,7 @@ 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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":168
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":168
*
* def __set__(self, lhs):
* if not isinstance(lhs, NT): # <<<<<<<<<<<<<<
@@ -7555,7 +7555,7 @@ static int __pyx_pf_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_5_cdec_TRule *_
__pyx_t_3 = (!__pyx_t_2);
if (__pyx_t_3) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":169
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":169
* def __set__(self, lhs):
* if not isinstance(lhs, NT):
* lhs = NT(lhs) # <<<<<<<<<<<<<<
@@ -7577,7 +7577,7 @@ static int __pyx_pf_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_5_cdec_TRule *_
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":170
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":170
* if not isinstance(lhs, NT):
* lhs = NT(lhs)
* self.rule.get().lhs_ = -TDConvert((<NT> lhs).cat) # <<<<<<<<<<<<<<
@@ -7612,7 +7612,7 @@ static PyObject *__pyx_pw_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self) {
}
static PyObject *__pyx_gb_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":173
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":173
*
* def __str__(self):
* scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<<
@@ -7754,7 +7754,7 @@ static PyObject *__pyx_gb_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObj
return NULL;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":172
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":172
* self.rule.get().lhs_ = -TDConvert((<NT> lhs).cat)
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -7786,7 +7786,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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":173
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":173
*
* def __str__(self):
* scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<<
@@ -7809,7 +7809,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":174
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":174
* def __str__(self):
* scores = ' '.join('%s=%s' % feat for feat in self.scores)
* return '%s ||| %s ||| %s ||| %s' % (self.lhs, # <<<<<<<<<<<<<<
@@ -7820,7 +7820,7 @@ static PyObject *__pyx_pf_5_cdec_5TRule_4__str__(struct __pyx_obj_5_cdec_TRule *
__pyx_t_2 = PyObject_GetAttr(((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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":175
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -7961,7 +7961,7 @@ static int __pyx_pw_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObject *__
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":178
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":178
*
* cdef class MRule(TRule):
* def __init__(self, lhs, rhs, scores): # <<<<<<<<<<<<<<
@@ -7987,7 +7987,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":183
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":183
* rhs: right hand side phrase (list of words/NT)
* scores: dictionary of feature scores"""
* cdef unsigned i = 1 # <<<<<<<<<<<<<<
@@ -7996,7 +7996,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_
*/
__pyx_v_i = 1;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":184
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":184
* scores: dictionary of feature scores"""
* cdef unsigned i = 1
* e = [] # <<<<<<<<<<<<<<
@@ -8008,7 +8008,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_
__pyx_v_e = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":185
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":185
* cdef unsigned i = 1
* e = []
* for s in rhs: # <<<<<<<<<<<<<<
@@ -8053,7 +8053,7 @@ 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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":186
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":186
* e = []
* for s in rhs:
* if isinstance(s, NT): # <<<<<<<<<<<<<<
@@ -8066,7 +8066,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":187
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":187
* for s in rhs:
* if isinstance(s, NT):
* e.append(NTRef(i)) # <<<<<<<<<<<<<<
@@ -8086,7 +8086,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_
__pyx_t_7 = PyList_Append(__pyx_v_e, __pyx_t_4); if (unlikely(__pyx_t_7 == -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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":188
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":188
* if isinstance(s, NT):
* e.append(NTRef(i))
* i += 1 # <<<<<<<<<<<<<<
@@ -8098,7 +8098,7 @@ static int __pyx_pf_5_cdec_5MRule___init__(struct __pyx_obj_5_cdec_MRule *__pyx_
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":190
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":190
* i += 1
* else:
* e.append(s) # <<<<<<<<<<<<<<
@@ -8111,7 +8111,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":191
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":191
* else:
* e.append(s)
* super(MRule, self).__init__(lhs, rhs, e, scores, None) # <<<<<<<<<<<<<<
@@ -8179,7 +8179,7 @@ static void __pyx_pw_5_cdec_7Grammar_1__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":196
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":196
* cdef shared_ptr[grammar.Grammar]* grammar
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -8191,7 +8191,7 @@ static void __pyx_pf_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __pyx_obj_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":197
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":197
*
* def __dealloc__(self):
* del self.grammar # <<<<<<<<<<<<<<
@@ -8215,7 +8215,7 @@ static PyObject *__pyx_pw_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":199
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":199
* del self.grammar
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -8278,7 +8278,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;}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":200
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":200
*
* def __iter__(self):
* cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() # <<<<<<<<<<<<<<
@@ -8287,7 +8287,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();
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":201
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":201
* def __iter__(self):
* cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot()
* cdef grammar.const_RuleBin* rbin = root.GetRules() # <<<<<<<<<<<<<<
@@ -8296,7 +8296,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();
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":204
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":204
* cdef TRule trule
* cdef unsigned i
* for i in range(rbin.GetNumRules()): # <<<<<<<<<<<<<<
@@ -8307,7 +8307,7 @@ 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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":205
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":205
* cdef unsigned i
* for i in range(rbin.GetNumRules()):
* trule = TRule.__new__(TRule) # <<<<<<<<<<<<<<
@@ -8323,7 +8323,7 @@ static PyObject *__pyx_gb_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__p
__pyx_cur_scope->__pyx_v_trule = ((struct __pyx_obj_5_cdec_TRule *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":206
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":206
* for i in range(rbin.GetNumRules()):
* trule = TRule.__new__(TRule)
* trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i)) # <<<<<<<<<<<<<<
@@ -8332,7 +8332,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));
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":207
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":207
* trule = TRule.__new__(TRule)
* trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i))
* yield trule # <<<<<<<<<<<<<<
@@ -8377,7 +8377,7 @@ static PyObject *__pyx_pw_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v_self)
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":210
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":210
*
* property name:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -8395,7 +8395,7 @@ static PyObject *__pyx_pf_5_cdec_7Grammar_4name___get__(struct __pyx_obj_5_cdec_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":211
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":211
* property name:
* def __get__(self):
* str(self.grammar.get().GetGrammarName().c_str()) # <<<<<<<<<<<<<<
@@ -8438,7 +8438,7 @@ static int __pyx_pw_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":213
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":213
* str(self.grammar.get().GetGrammarName().c_str())
*
* def __set__(self, name): # <<<<<<<<<<<<<<
@@ -8457,7 +8457,7 @@ 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);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":214
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":214
*
* def __set__(self, name):
* name = as_str(name) # <<<<<<<<<<<<<<
@@ -8470,7 +8470,7 @@ static int __pyx_pf_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_5_cdec_Gramm
__pyx_v_name = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":215
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":215
* def __set__(self, name):
* name = as_str(name)
* self.grammar.get().SetGrammarName(name) # <<<<<<<<<<<<<<
@@ -8543,7 +8543,7 @@ static int __pyx_pw_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/grammar.pxi":218
+/* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":218
*
* cdef class TextGrammar(Grammar):
* def __init__(self, rules): # <<<<<<<<<<<<<<
@@ -8568,7 +8568,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":220
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":220
* def __init__(self, rules):
* """TextGrammar(rules) -> SCFG Grammar containing the rules."""
* self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) # <<<<<<<<<<<<<<
@@ -8577,7 +8577,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());
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":221
+ /* "/home/pauldb/workspace/cdec/python/src/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() # <<<<<<<<<<<<<<
@@ -8586,7 +8586,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());
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":222
+ /* "/home/pauldb/workspace/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -8631,7 +8631,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;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":223
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":223
* cdef grammar.TextGrammar* _g = <grammar.TextGrammar*> self.grammar.get()
* for trule in rules:
* if isinstance(trule, _sa.Rule): # <<<<<<<<<<<<<<
@@ -8644,7 +8644,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":224
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":224
* for trule in rules:
* if isinstance(trule, _sa.Rule):
* trule = convert_rule(trule) # <<<<<<<<<<<<<<
@@ -8663,7 +8663,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr
goto __pyx_L5;
}
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":225
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":225
* if isinstance(trule, _sa.Rule):
* trule = convert_rule(trule)
* elif not isinstance(trule, TRule): # <<<<<<<<<<<<<<
@@ -8677,7 +8677,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr
__pyx_t_7 = (!__pyx_t_5);
if (__pyx_t_7) {
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":226
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":226
* trule = convert_rule(trule)
* elif not isinstance(trule, TRule):
* raise ValueError('the grammar should contain TRule objects') # <<<<<<<<<<<<<<
@@ -8692,7 +8692,7 @@ static int __pyx_pf_5_cdec_11TextGrammar___init__(struct __pyx_obj_5_cdec_TextGr
}
__pyx_L5:;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":227
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":227
* elif not isinstance(trule, TRule):
* raise ValueError('the grammar should contain TRule objects')
* _g.AddRule((<TRule> trule).rule[0]) # <<<<<<<<<<<<<<
@@ -8724,7 +8724,7 @@ static void __pyx_pw_5_cdec_10Hypergraph_1__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":8
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":8
* cdef MT19937* rng
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -8737,7 +8737,7 @@ static void __pyx_pf_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_5_cdec_Hyp
int __pyx_t_1;
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":9
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":9
*
* def __dealloc__(self):
* del self.hg # <<<<<<<<<<<<<<
@@ -8746,7 +8746,7 @@ static void __pyx_pf_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_5_cdec_Hyp
*/
delete __pyx_v_self->hg;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":10
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":10
* def __dealloc__(self):
* del self.hg
* if self.rng != NULL: # <<<<<<<<<<<<<<
@@ -8756,7 +8756,7 @@ static void __pyx_pf_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_5_cdec_Hyp
__pyx_t_1 = (__pyx_v_self->rng != NULL);
if (__pyx_t_1) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":11
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":11
* del self.hg
* if self.rng != NULL:
* del self.rng # <<<<<<<<<<<<<<
@@ -8771,7 +8771,7 @@ static void __pyx_pf_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_5_cdec_Hyp
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":13
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":13
* del self.rng
*
* cdef MT19937* _rng(self): # <<<<<<<<<<<<<<
@@ -8789,7 +8789,7 @@ static MT19937 *__pyx_f_5_cdec_10Hypergraph__rng(struct __pyx_obj_5_cdec_Hypergr
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_rng", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":14
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":14
*
* cdef MT19937* _rng(self):
* if self.rng == NULL: # <<<<<<<<<<<<<<
@@ -8799,7 +8799,7 @@ static MT19937 *__pyx_f_5_cdec_10Hypergraph__rng(struct __pyx_obj_5_cdec_Hypergr
__pyx_t_1 = (__pyx_v_self->rng == NULL);
if (__pyx_t_1) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":15
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":15
* cdef MT19937* _rng(self):
* if self.rng == NULL:
* self.rng = new MT19937() # <<<<<<<<<<<<<<
@@ -8812,7 +8812,7 @@ static MT19937 *__pyx_f_5_cdec_10Hypergraph__rng(struct __pyx_obj_5_cdec_Hypergr
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":16
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":16
* if self.rng == NULL:
* self.rng = new MT19937()
* return self.rng # <<<<<<<<<<<<<<
@@ -8844,7 +8844,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_3viterbi(PyObject *__pyx_v_self, C
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":18
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":18
* return self.rng
*
* def viterbi(self): # <<<<<<<<<<<<<<
@@ -8863,7 +8863,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_5_cdec_H
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("viterbi", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":21
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":21
* """hg.viterbi() -> String for the best hypothesis in the hypergraph."""
* cdef vector[WordID] trans
* hypergraph.ViterbiESentence(self.hg[0], &trans) # <<<<<<<<<<<<<<
@@ -8872,7 +8872,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_5_cdec_H
*/
ViterbiESentence((__pyx_v_self->hg[0]), (&__pyx_v_trans));
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":22
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":22
* cdef vector[WordID] trans
* hypergraph.ViterbiESentence(self.hg[0], &trans)
* return unicode(GetString(trans).c_str(), 'utf8') # <<<<<<<<<<<<<<
@@ -8922,7 +8922,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_5viterbi_trees(PyObject *__pyx_v_s
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":24
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":24
* return unicode(GetString(trans).c_str(), 'utf8')
*
* def viterbi_trees(self): # <<<<<<<<<<<<<<
@@ -8942,7 +8942,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_5_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("viterbi_trees", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":29
+ /* "/home/pauldb/workspace/cdec/python/src/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') # <<<<<<<<<<<<<<
@@ -8965,7 +8965,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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":30
+ /* "/home/pauldb/workspace/cdec/python/src/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') # <<<<<<<<<<<<<<
@@ -8988,7 +8988,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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":31
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -9035,7 +9035,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_7viterbi_features(PyObject *__pyx_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":33
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":33
* return (f_tree, e_tree)
*
* def viterbi_features(self): # <<<<<<<<<<<<<<
@@ -9053,7 +9053,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("viterbi_features", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":36
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":36
* """hg.viterbi_features() -> SparseVector with the features corresponding
* to the best derivation in the hypergraph."""
* cdef SparseVector fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -9066,7 +9066,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj
__pyx_v_fmap = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":37
+ /* "/home/pauldb/workspace/cdec/python/src/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])) # <<<<<<<<<<<<<<
@@ -9075,7 +9075,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])));
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":38
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":38
* cdef SparseVector fmap = SparseVector.__new__(SparseVector)
* fmap.vector = new FastSparseVector[weight_t](hypergraph.ViterbiFeatures(self.hg[0]))
* return fmap # <<<<<<<<<<<<<<
@@ -9111,7 +9111,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__pyx_v_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":40
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":40
* return fmap
*
* def viterbi_forest(self): # <<<<<<<<<<<<<<
@@ -9129,7 +9129,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_5
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("viterbi_forest", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":41
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":41
*
* def viterbi_forest(self):
* cdef Hypergraph hg = Hypergraph() # <<<<<<<<<<<<<<
@@ -9141,7 +9141,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_5
__pyx_v_hg = ((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":42
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":42
* def viterbi_forest(self):
* cdef Hypergraph hg = Hypergraph()
* hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) # <<<<<<<<<<<<<<
@@ -9150,7 +9150,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]));
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":43
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":43
* cdef Hypergraph hg = Hypergraph()
* hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0])
* return hg # <<<<<<<<<<<<<<
@@ -9187,7 +9187,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_11viterbi_joshua(PyObject *__pyx_v
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":45
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":45
* return hg
*
* def viterbi_joshua(self): # <<<<<<<<<<<<<<
@@ -9205,7 +9205,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_10viterbi_joshua(struct __pyx_obj_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("viterbi_joshua", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":47
+ /* "/home/pauldb/workspace/cdec/python/src/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') # <<<<<<<<<<<<<<
@@ -9256,7 +9256,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_13kbest(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":49
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":49
* return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8')
*
* def kbest(self, size): # <<<<<<<<<<<<<<
@@ -9324,7 +9324,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;}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":51
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -9334,7 +9334,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":54
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":54
* cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal].Derivation* derivation
* cdef unsigned k
* try: # <<<<<<<<<<<<<<
@@ -9343,7 +9343,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject
*/
/*try:*/ {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":55
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":55
* cdef unsigned k
* try:
* for k in range(size): # <<<<<<<<<<<<<<
@@ -9354,7 +9354,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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":56
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":56
* try:
* for k in range(size):
* derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<<
@@ -9363,7 +9363,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":57
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":57
* for k in range(size):
* derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k)
* if not derivation: break # <<<<<<<<<<<<<<
@@ -9377,7 +9377,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject
}
__pyx_L9:;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":58
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":58
* derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k)
* if not derivation: break
* yield unicode(GetString(derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<<
@@ -9414,7 +9414,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject
__pyx_L8_break:;
}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":60
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":60
* yield unicode(GetString(derivation._yield).c_str(), 'utf8')
* finally:
* del derivations # <<<<<<<<<<<<<<
@@ -9475,7 +9475,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_16kbest_trees(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":62
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":62
* del derivations
*
* def kbest_trees(self, size): # <<<<<<<<<<<<<<
@@ -9545,7 +9545,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;}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":64
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -9555,7 +9555,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":66
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -9565,7 +9565,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":69
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":69
* cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal].Derivation* e_derivation
* cdef unsigned k
* try: # <<<<<<<<<<<<<<
@@ -9574,7 +9574,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject
*/
/*try:*/ {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":70
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":70
* cdef unsigned k
* try:
* for k in range(size): # <<<<<<<<<<<<<<
@@ -9585,7 +9585,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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":71
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":71
* try:
* for k in range(size):
* f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<<
@@ -9594,7 +9594,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":72
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -9603,7 +9603,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":73
+ /* "/home/pauldb/workspace/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -9623,7 +9623,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject
}
__pyx_L9:;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":74
+ /* "/home/pauldb/workspace/cdec/python/src/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') # <<<<<<<<<<<<<<
@@ -9649,7 +9649,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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":75
+ /* "/home/pauldb/workspace/cdec/python/src/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') # <<<<<<<<<<<<<<
@@ -9675,7 +9675,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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":76
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -9707,7 +9707,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject
__pyx_L8_break:;
}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":78
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":78
* yield (f_tree, e_tree)
* finally:
* del f_derivations # <<<<<<<<<<<<<<
@@ -9731,7 +9731,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject
__pyx_L6:;
delete __pyx_cur_scope->__pyx_v_f_derivations;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":79
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":79
* finally:
* del f_derivations
* del e_derivations # <<<<<<<<<<<<<<
@@ -9777,7 +9777,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_19kbest_features(PyObject *__pyx_v
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":81
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":81
* del e_derivations
*
* def kbest_features(self, size): # <<<<<<<<<<<<<<
@@ -9844,7 +9844,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;}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":83
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -9854,7 +9854,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":87
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":87
* cdef SparseVector fmap
* cdef unsigned k
* try: # <<<<<<<<<<<<<<
@@ -9863,7 +9863,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject
*/
/*try:*/ {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":88
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":88
* cdef unsigned k
* try:
* for k in range(size): # <<<<<<<<<<<<<<
@@ -9874,7 +9874,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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":89
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":89
* try:
* for k in range(size):
* derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<<
@@ -9883,7 +9883,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":90
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":90
* for k in range(size):
* derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k)
* if not derivation: break # <<<<<<<<<<<<<<
@@ -9897,7 +9897,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject
}
__pyx_L9:;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":91
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":91
* derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k)
* if not derivation: break
* fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -9913,7 +9913,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject
__pyx_cur_scope->__pyx_v_fmap = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":92
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":92
* if not derivation: break
* fmap = SparseVector.__new__(SparseVector)
* fmap.vector = new FastSparseVector[weight_t](derivation._yield) # <<<<<<<<<<<<<<
@@ -9922,7 +9922,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":93
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":93
* fmap = SparseVector.__new__(SparseVector)
* fmap.vector = new FastSparseVector[weight_t](derivation._yield)
* yield fmap # <<<<<<<<<<<<<<
@@ -9946,7 +9946,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject
__pyx_L8_break:;
}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":95
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":95
* yield fmap
* finally:
* del derivations # <<<<<<<<<<<<<<
@@ -10015,7 +10015,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_self, P
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":97
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":97
* del derivations
*
* def sample(self, unsigned n): # <<<<<<<<<<<<<<
@@ -10081,7 +10081,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;}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":99
+ /* "/home/pauldb/workspace/cdec/python/src/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]() # <<<<<<<<<<<<<<
@@ -10091,7 +10091,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject
try {__pyx_t_1 = new std::vector<HypergraphSampler::Hypothesis>();} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}}
__pyx_cur_scope->__pyx_v_hypos = __pyx_t_1;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":100
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -10100,7 +10100,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject
*/
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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":102
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":102
* hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos)
* cdef unsigned k
* try: # <<<<<<<<<<<<<<
@@ -10109,7 +10109,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject
*/
/*try:*/ {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":103
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":103
* cdef unsigned k
* try:
* for k in range(hypos.size()): # <<<<<<<<<<<<<<
@@ -10120,7 +10120,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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":104
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":104
* try:
* for k in range(hypos.size()):
* yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') # <<<<<<<<<<<<<<
@@ -10156,7 +10156,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject
}
}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":106
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":106
* yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8')
* finally:
* del hypos # <<<<<<<<<<<<<<
@@ -10227,7 +10227,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_25sample_trees(PyObject *__pyx_v_s
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":108
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":108
* del hypos
*
* def sample_trees(self, unsigned n): # <<<<<<<<<<<<<<
@@ -10293,7 +10293,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;}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":110
+ /* "/home/pauldb/workspace/cdec/python/src/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]() # <<<<<<<<<<<<<<
@@ -10303,7 +10303,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject
try {__pyx_t_1 = new std::vector<std::string>();} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}}
__pyx_cur_scope->__pyx_v_trees = __pyx_t_1;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":111
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -10312,7 +10312,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject
*/
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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":113
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":113
* hypergraph.sample_trees(self.hg[0], n, self._rng(), trees)
* cdef unsigned k
* try: # <<<<<<<<<<<<<<
@@ -10321,7 +10321,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject
*/
/*try:*/ {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":114
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":114
* cdef unsigned k
* try:
* for k in range(trees.size()): # <<<<<<<<<<<<<<
@@ -10332,7 +10332,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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":115
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":115
* try:
* for k in range(trees.size()):
* yield unicode(trees[0][k].c_str(), 'utf8') # <<<<<<<<<<<<<<
@@ -10368,7 +10368,7 @@ static PyObject *__pyx_gb_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject
}
}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":117
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":117
* yield unicode(trees[0][k].c_str(), 'utf8')
* finally:
* del trees # <<<<<<<<<<<<<<
@@ -10428,7 +10428,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_28intersect(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":119
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":119
* del trees
*
* def intersect(self, inp): # <<<<<<<<<<<<<<
@@ -10448,7 +10448,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("intersect", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":122
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":122
* """hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference."""
* cdef Lattice lat
* if isinstance(inp, Lattice): # <<<<<<<<<<<<<<
@@ -10461,7 +10461,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":123
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":123
* cdef Lattice lat
* if isinstance(inp, Lattice):
* lat = <Lattice> inp # <<<<<<<<<<<<<<
@@ -10473,7 +10473,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde
goto __pyx_L3;
}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":124
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":124
* if isinstance(inp, Lattice):
* lat = <Lattice> inp
* elif isinstance(inp, basestring): # <<<<<<<<<<<<<<
@@ -10486,7 +10486,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":125
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":125
* lat = <Lattice> inp
* elif isinstance(inp, basestring):
* lat = Lattice(inp) # <<<<<<<<<<<<<<
@@ -10507,7 +10507,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":127
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":127
* lat = Lattice(inp)
* else:
* raise TypeError('cannot intersect hypergraph with %s' % type(inp)) # <<<<<<<<<<<<<<
@@ -10530,7 +10530,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_5_cde
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":128
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":128
* else:
* raise TypeError('cannot intersect hypergraph with %s' % type(inp))
* return hypergraph.Intersect(lat.lattice[0], self.hg) # <<<<<<<<<<<<<<
@@ -10626,7 +10626,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_self, Py
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":130
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":130
* return hypergraph.Intersect(lat.lattice[0], self.hg)
*
* def prune(self, beam_alpha=0, density=0, **kwargs): # <<<<<<<<<<<<<<
@@ -10646,7 +10646,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("prune", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":134
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":134
* beam_alpha: use beam pruning
* density: use density pruning"""
* cdef hypergraph.EdgeMask* preserve_mask = NULL # <<<<<<<<<<<<<<
@@ -10655,7 +10655,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy
*/
__pyx_v_preserve_mask = NULL;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":135
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":135
* density: use density pruning"""
* cdef hypergraph.EdgeMask* preserve_mask = NULL
* if 'csplit_preserve_full_word' in kwargs: # <<<<<<<<<<<<<<
@@ -10665,7 +10665,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy
__pyx_t_1 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s_16), ((PyObject *)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":136
+ /* "/home/pauldb/workspace/cdec/python/src/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()) # <<<<<<<<<<<<<<
@@ -10674,7 +10674,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());
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":137
+ /* "/home/pauldb/workspace/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -10686,7 +10686,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":138
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -10697,7 +10697,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy
__pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->hg->PruneInsideOutside(__pyx_t_2, __pyx_t_3, __pyx_v_preserve_mask, 0, 1.0, 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":139
+ /* "/home/pauldb/workspace/cdec/python/src/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: # <<<<<<<<<<<<<<
@@ -10707,7 +10707,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_29prune(struct __pyx_obj_5_cdec_Hy
__pyx_t_1 = (__pyx_v_preserve_mask != 0);
if (__pyx_t_1) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":140
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":140
* self.hg.PruneInsideOutside(beam_alpha, density, preserve_mask, False, 1, False)
* if preserve_mask:
* del preserve_mask # <<<<<<<<<<<<<<
@@ -10742,7 +10742,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_32lattice(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":142
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":142
* del preserve_mask
*
* def lattice(self): # TODO direct hg -> lattice conversion in cdec # <<<<<<<<<<<<<<
@@ -10762,7 +10762,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_5_cdec_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("lattice", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":144
+ /* "/home/pauldb/workspace/cdec/python/src/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() # <<<<<<<<<<<<<<
@@ -10774,7 +10774,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_5_cdec_
__pyx_v_plf = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":145
+ /* "/home/pauldb/workspace/cdec/python/src/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)) # <<<<<<<<<<<<<<
@@ -10845,7 +10845,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_34plf(PyObject *__pyx_v_self, CYTH
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":147
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":147
* return Lattice(eval(plf))
*
* def plf(self): # <<<<<<<<<<<<<<
@@ -10863,7 +10863,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_33plf(struct __pyx_obj_5_cdec_Hype
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("plf", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":149
+ /* "/home/pauldb/workspace/cdec/python/src/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()) # <<<<<<<<<<<<<<
@@ -10910,7 +10910,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_36reweight(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":151
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":151
* return bytes(hypergraph.AsPLF(self.hg[0], True).c_str())
*
* def reweight(self, weights): # <<<<<<<<<<<<<<
@@ -10929,7 +10929,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_5_cdec
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("reweight", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":153
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":153
* def reweight(self, weights):
* """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector."""
* if isinstance(weights, SparseVector): # <<<<<<<<<<<<<<
@@ -10942,7 +10942,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_5_cdec
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":154
+ /* "/home/pauldb/workspace/cdec/python/src/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]) # <<<<<<<<<<<<<<
@@ -10953,7 +10953,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_5_cdec
goto __pyx_L3;
}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":155
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":155
* if isinstance(weights, SparseVector):
* self.hg.Reweight((<SparseVector> weights).vector[0])
* elif isinstance(weights, DenseVector): # <<<<<<<<<<<<<<
@@ -10966,7 +10966,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_5_cdec
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":156
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":156
* self.hg.Reweight((<SparseVector> weights).vector[0])
* elif isinstance(weights, DenseVector):
* self.hg.Reweight((<DenseVector> weights).vector[0]) # <<<<<<<<<<<<<<
@@ -10978,7 +10978,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_5_cdec
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":158
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":158
* self.hg.Reweight((<DenseVector> weights).vector[0])
* else:
* raise TypeError('cannot reweight hypergraph with %s' % type(weights)) # <<<<<<<<<<<<<<
@@ -11026,7 +11026,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__pyx_v_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":161
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":161
*
* property edges:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -11090,7 +11090,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;}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":163
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":163
* def __get__(self):
* cdef unsigned i
* for i in range(self.hg.edges_.size()): # <<<<<<<<<<<<<<
@@ -11101,7 +11101,7 @@ 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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":164
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":164
* cdef unsigned i
* for i in range(self.hg.edges_.size()):
* yield HypergraphEdge().init(self.hg, i) # <<<<<<<<<<<<<<
@@ -11153,7 +11153,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__pyx_v_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":167
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":167
*
* property nodes:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -11217,7 +11217,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;}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":169
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":169
* def __get__(self):
* cdef unsigned i
* for i in range(self.hg.nodes_.size()): # <<<<<<<<<<<<<<
@@ -11228,7 +11228,7 @@ 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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":170
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":170
* cdef unsigned i
* for i in range(self.hg.nodes_.size()):
* yield HypergraphNode().init(self.hg, i) # <<<<<<<<<<<<<<
@@ -11279,7 +11279,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__pyx_v_s
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":173
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":173
*
* property goal:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -11297,7 +11297,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_5_c
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":174
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":174
* property goal:
* def __get__(self):
* return HypergraphNode().init(self.hg, self.hg.GoalNode()) # <<<<<<<<<<<<<<
@@ -11338,7 +11338,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *__pyx_v
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":177
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":177
*
* property npaths:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -11355,7 +11355,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_5
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":178
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":178
* property npaths:
* def __get__(self):
* return self.hg.NumberOfPaths() # <<<<<<<<<<<<<<
@@ -11393,7 +11393,7 @@ static PyObject *__pyx_pw_5_cdec_10Hypergraph_38inside_outside(PyObject *__pyx_v
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":180
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":180
* return self.hg.NumberOfPaths()
*
* def inside_outside(self): # <<<<<<<<<<<<<<
@@ -11417,7 +11417,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("inside_outside", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":182
+ /* "/home/pauldb/workspace/cdec/python/src/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]() # <<<<<<<<<<<<<<
@@ -11426,7 +11426,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_
*/
__pyx_v_result = new FastSparseVector<prob_t>();
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":183
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -11435,7 +11435,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":184
+ /* "/home/pauldb/workspace/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -11444,7 +11444,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_
*/
(__pyx_v_result[0]) /= __pyx_v_z;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":185
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":185
* cdef prob_t z = hypergraph.InsideOutside(self.hg[0], result)
* result[0] /= z
* cdef SparseVector vector = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -11457,7 +11457,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_
__pyx_v_vector = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":186
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":186
* result[0] /= z
* cdef SparseVector vector = SparseVector.__new__(SparseVector)
* vector.vector = new FastSparseVector[double]() # <<<<<<<<<<<<<<
@@ -11466,7 +11466,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_
*/
__pyx_v_vector->vector = new FastSparseVector<double>();
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":187
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -11475,7 +11475,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);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":189
+ /* "/home/pauldb/workspace/cdec/python/src/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()): # <<<<<<<<<<<<<<
@@ -11486,7 +11486,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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":190
+ /* "/home/pauldb/workspace/cdec/python/src/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)) # <<<<<<<<<<<<<<
@@ -11495,7 +11495,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));
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":191
+ /* "/home/pauldb/workspace/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -11505,7 +11505,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_
(++(__pyx_v_it[0]));
}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":192
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":192
* vector.vector.set_value(it[0].ptr().first, log(it[0].ptr().second))
* pinc(it[0]) # ++it
* del it # <<<<<<<<<<<<<<
@@ -11514,7 +11514,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_
*/
delete __pyx_v_it;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":193
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":193
* pinc(it[0]) # ++it
* del it
* del result # <<<<<<<<<<<<<<
@@ -11523,7 +11523,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_
*/
delete __pyx_v_result;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":194
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":194
* del it
* del result
* return vector # <<<<<<<<<<<<<<
@@ -11548,7 +11548,7 @@ static PyObject *__pyx_pf_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":201
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":201
* cdef public TRule trule
*
* cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<<
@@ -11565,7 +11565,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphEdge_init(struct __pyx_obj_5_cdec_Hy
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("init", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":202
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":202
*
* cdef init(self, hypergraph.Hypergraph* hg, unsigned i):
* self.hg = hg # <<<<<<<<<<<<<<
@@ -11574,7 +11574,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphEdge_init(struct __pyx_obj_5_cdec_Hy
*/
__pyx_v_self->hg = __pyx_v_hg;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":203
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":203
* cdef init(self, hypergraph.Hypergraph* hg, unsigned i):
* self.hg = hg
* self.edge = &hg.edges_[i] # <<<<<<<<<<<<<<
@@ -11583,7 +11583,7 @@ 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]));
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":204
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":204
* self.hg = hg
* self.edge = &hg.edges_[i]
* self.trule = TRule.__new__(TRule) # <<<<<<<<<<<<<<
@@ -11599,7 +11599,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphEdge_init(struct __pyx_obj_5_cdec_Hy
__pyx_v_self->trule = ((struct __pyx_obj_5_cdec_TRule *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":205
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":205
* self.edge = &hg.edges_[i]
* self.trule = TRule.__new__(TRule)
* self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_) # <<<<<<<<<<<<<<
@@ -11608,7 +11608,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_);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":206
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":206
* self.trule = TRule.__new__(TRule)
* self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_)
* return self # <<<<<<<<<<<<<<
@@ -11643,7 +11643,7 @@ static Py_ssize_t __pyx_pw_5_cdec_14HypergraphEdge_1__len__(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":208
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":208
* return self
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -11656,7 +11656,7 @@ static Py_ssize_t __pyx_pf_5_cdec_14HypergraphEdge___len__(struct __pyx_obj_5_cd
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":209
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":209
*
* def __len__(self):
* return self.edge.tail_nodes_.size() # <<<<<<<<<<<<<<
@@ -11683,7 +11683,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_9head_node_1__get__(PyObject *
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":212
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":212
*
* property head_node:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -11701,7 +11701,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_9head_node___get__(struct __py
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":213
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":213
* property head_node:
* def __get__(self):
* return HypergraphNode().init(self.hg, self.edge.head_node_) # <<<<<<<<<<<<<<
@@ -11743,7 +11743,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(PyObject
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":216
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":216
*
* property tail_nodes:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -11807,7 +11807,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;}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":218
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":218
* def __get__(self):
* cdef unsigned i
* for i in range(self.edge.tail_nodes_.size()): # <<<<<<<<<<<<<<
@@ -11818,7 +11818,7 @@ 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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":219
+ /* "/home/pauldb/workspace/cdec/python/src/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]) # <<<<<<<<<<<<<<
@@ -11869,7 +11869,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_4span_1__get__(PyObject *__pyx
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":222
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":222
*
* property span:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -11888,7 +11888,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4span___get__(struct __pyx_obj
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":223
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":223
* property span:
* def __get__(self):
* return (self.edge.i_, self.edge.j_) # <<<<<<<<<<<<<<
@@ -11937,7 +11937,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObject *_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":226
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":226
*
* property src_span:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -11956,7 +11956,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_8src_span___get__(struct __pyx
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":227
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":227
* property src_span:
* def __get__(self):
* return (self.edge.prev_i_, self.edge.prev_j_) # <<<<<<<<<<<<<<
@@ -12005,7 +12005,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_14feature_values_1__get__(PyOb
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":230
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":230
*
* property feature_values:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -12023,7 +12023,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_14feature_values___get__(struc
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":231
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":231
* property feature_values:
* def __get__(self):
* cdef SparseVector vector = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -12036,7 +12036,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_14feature_values___get__(struc
__pyx_v_vector = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":232
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":232
* def __get__(self):
* cdef SparseVector vector = SparseVector.__new__(SparseVector)
* vector.vector = new FastSparseVector[double](self.edge.feature_values_) # <<<<<<<<<<<<<<
@@ -12045,7 +12045,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_);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":233
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":233
* cdef SparseVector vector = SparseVector.__new__(SparseVector)
* vector.vector = new FastSparseVector[double](self.edge.feature_values_)
* return vector # <<<<<<<<<<<<<<
@@ -12081,7 +12081,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject *__pyx
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":236
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":236
*
* property prob:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -12098,7 +12098,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_4prob___get__(struct __pyx_obj
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":237
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":237
* property prob:
* def __get__(self):
* return self.edge.edge_prob_.as_float() # <<<<<<<<<<<<<<
@@ -12141,7 +12141,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":239
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":239
* return self.edge.edge_prob_.as_float()
*
* def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): # <<<<<<<<<<<<<<
@@ -12159,7 +12159,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__richcmp__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":242
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":242
* if op == 2: # ==
* return x.edge == y.edge
* elif op == 3: # != # <<<<<<<<<<<<<<
@@ -12168,7 +12168,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_
*/
switch (__pyx_v_op) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":240
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":240
*
* def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op):
* if op == 2: # == # <<<<<<<<<<<<<<
@@ -12177,7 +12177,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_
*/
case 2:
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":241
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":241
* def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op):
* if op == 2: # ==
* return x.edge == y.edge # <<<<<<<<<<<<<<
@@ -12192,7 +12192,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_
goto __pyx_L0;
break;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":242
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":242
* if op == 2: # ==
* return x.edge == y.edge
* elif op == 3: # != # <<<<<<<<<<<<<<
@@ -12201,7 +12201,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_
*/
case 3:
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":243
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":243
* return x.edge == y.edge
* elif op == 3: # !=
* return not (x == y) # <<<<<<<<<<<<<<
@@ -12220,7 +12220,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_
break;
}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":244
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":244
* elif op == 3: # !=
* return not (x == y)
* raise NotImplemented('comparison not implemented for HypergraphEdge') # <<<<<<<<<<<<<<
@@ -12256,7 +12256,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject *__py
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":199
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":199
* cdef hypergraph.Hypergraph* hg
* cdef hypergraph.HypergraphEdge* edge
* cdef public TRule trule # <<<<<<<<<<<<<<
@@ -12341,7 +12341,7 @@ static int __pyx_pf_5_cdec_14HypergraphEdge_5trule_4__del__(struct __pyx_obj_5_c
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":250
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":250
* cdef hypergraph.HypergraphNode* node
*
* cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<<
@@ -12354,7 +12354,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphNode_init(struct __pyx_obj_5_cdec_Hy
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("init", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":251
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":251
*
* cdef init(self, hypergraph.Hypergraph* hg, unsigned i):
* self.hg = hg # <<<<<<<<<<<<<<
@@ -12363,7 +12363,7 @@ static PyObject *__pyx_f_5_cdec_14HypergraphNode_init(struct __pyx_obj_5_cdec_Hy
*/
__pyx_v_self->hg = __pyx_v_hg;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":252
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":252
* cdef init(self, hypergraph.Hypergraph* hg, unsigned i):
* self.hg = hg
* self.node = &hg.nodes_[i] # <<<<<<<<<<<<<<
@@ -12372,7 +12372,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]));
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":253
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":253
* self.hg = hg
* self.node = &hg.nodes_[i]
* return self # <<<<<<<<<<<<<<
@@ -12403,7 +12403,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObject *_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":256
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":256
*
* property in_edges:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -12467,7 +12467,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;}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":258
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":258
* def __get__(self):
* cdef unsigned i
* for i in range(self.node.in_edges_.size()): # <<<<<<<<<<<<<<
@@ -12478,7 +12478,7 @@ 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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":259
+ /* "/home/pauldb/workspace/cdec/python/src/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]) # <<<<<<<<<<<<<<
@@ -12530,7 +12530,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_9out_edges_1__get__(PyObject *
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":262
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":262
*
* property out_edges:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -12594,7 +12594,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;}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":264
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":264
* def __get__(self):
* cdef unsigned i
* for i in range(self.node.out_edges_.size()): # <<<<<<<<<<<<<<
@@ -12605,7 +12605,7 @@ 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;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":265
+ /* "/home/pauldb/workspace/cdec/python/src/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]) # <<<<<<<<<<<<<<
@@ -12656,7 +12656,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_4span_1__get__(PyObject *__pyx
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":268
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":268
*
* property span:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -12674,7 +12674,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_4span___get__(struct __pyx_obj
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":269
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":269
* property span:
* def __get__(self):
* return next(self.in_edges).span # <<<<<<<<<<<<<<
@@ -12718,7 +12718,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_3cat_1__get__(PyObject *__pyx_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":272
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":272
*
* property cat:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -12736,7 +12736,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":273
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":273
* property cat:
* def __get__(self):
* if self.node.cat_: # <<<<<<<<<<<<<<
@@ -12745,7 +12745,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_
*/
if (__pyx_v_self->node->cat_) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":274
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":274
* def __get__(self):
* if self.node.cat_:
* return str(TDConvert(-self.node.cat_).c_str()) # <<<<<<<<<<<<<<
@@ -12800,7 +12800,7 @@ static PyObject *__pyx_pw_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":276
+/* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":276
* return str(TDConvert(-self.node.cat_).c_str())
*
* def __richcmp__(HypergraphNode x, HypergraphNode y, int op): # <<<<<<<<<<<<<<
@@ -12818,7 +12818,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__richcmp__", 0);
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":279
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":279
* if op == 2: # ==
* return x.node == y.node
* elif op == 3: # != # <<<<<<<<<<<<<<
@@ -12827,7 +12827,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5
*/
switch (__pyx_v_op) {
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":277
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":277
*
* def __richcmp__(HypergraphNode x, HypergraphNode y, int op):
* if op == 2: # == # <<<<<<<<<<<<<<
@@ -12836,7 +12836,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5
*/
case 2:
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":278
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":278
* def __richcmp__(HypergraphNode x, HypergraphNode y, int op):
* if op == 2: # ==
* return x.node == y.node # <<<<<<<<<<<<<<
@@ -12851,7 +12851,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5
goto __pyx_L0;
break;
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":279
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":279
* if op == 2: # ==
* return x.node == y.node
* elif op == 3: # != # <<<<<<<<<<<<<<
@@ -12860,7 +12860,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5
*/
case 3:
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":280
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":280
* return x.node == y.node
* elif op == 3: # !=
* return not (x == y) # <<<<<<<<<<<<<<
@@ -12878,7 +12878,7 @@ static PyObject *__pyx_pf_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_5
break;
}
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":281
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":281
* elif op == 3: # !=
* return not (x == y)
* raise NotImplemented('comparison not implemented for HypergraphNode') # <<<<<<<<<<<<<<
@@ -12915,7 +12915,7 @@ static int __pyx_pw_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyObject
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":6
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":6
* cdef lattice.Lattice* lattice
*
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -12928,7 +12928,7 @@ static int __pyx_pf_5_cdec_7Lattice___cinit__(struct __pyx_obj_5_cdec_Lattice *_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":7
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":7
*
* def __cinit__(self):
* self.lattice = new lattice.Lattice() # <<<<<<<<<<<<<<
@@ -12993,7 +12993,7 @@ static int __pyx_pw_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyObject *
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":9
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":9
* self.lattice = new lattice.Lattice()
*
* def __init__(self, inp): # <<<<<<<<<<<<<<
@@ -13018,7 +13018,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":12
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":12
* """Lattice(tuple) -> Lattice from node list.
* Lattice(string) -> Lattice from PLF representation."""
* if isinstance(inp, tuple): # <<<<<<<<<<<<<<
@@ -13031,7 +13031,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":13
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":13
* Lattice(string) -> Lattice from PLF representation."""
* if isinstance(inp, tuple):
* self.lattice.resize(len(inp)) # <<<<<<<<<<<<<<
@@ -13041,7 +13041,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);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":14
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":14
* if isinstance(inp, tuple):
* self.lattice.resize(len(inp))
* for i, arcs in enumerate(inp): # <<<<<<<<<<<<<<
@@ -13096,7 +13096,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_
__pyx_t_1 = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":15
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":15
* self.lattice.resize(len(inp))
* for i, arcs in enumerate(inp):
* self[i] = arcs # <<<<<<<<<<<<<<
@@ -13110,7 +13110,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_
goto __pyx_L3;
}
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":16
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":16
* for i, arcs in enumerate(inp):
* self[i] = arcs
* elif isinstance(inp, basestring): # <<<<<<<<<<<<<<
@@ -13123,7 +13123,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":17
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":17
* self[i] = arcs
* elif isinstance(inp, basestring):
* lattice.ConvertTextOrPLF(as_str(inp), self.lattice) # <<<<<<<<<<<<<<
@@ -13139,7 +13139,7 @@ static int __pyx_pf_5_cdec_7Lattice_2__init__(struct __pyx_obj_5_cdec_Lattice *_
}
/*else*/ {
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":19
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":19
* lattice.ConvertTextOrPLF(as_str(inp), self.lattice)
* else:
* raise TypeError('cannot create lattice from %s' % type(inp)) # <<<<<<<<<<<<<<
@@ -13186,7 +13186,7 @@ static void __pyx_pw_5_cdec_7Lattice_5__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":21
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":21
* raise TypeError('cannot create lattice from %s' % type(inp))
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -13198,7 +13198,7 @@ static void __pyx_pf_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __pyx_obj
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":22
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":22
*
* def __dealloc__(self):
* del self.lattice # <<<<<<<<<<<<<<
@@ -13231,7 +13231,7 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, P
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":24
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":24
* del self.lattice
*
* def __getitem__(self, int index): # <<<<<<<<<<<<<<
@@ -13261,7 +13261,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":25
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":25
*
* def __getitem__(self, int index):
* if not 0 <= index < len(self): # <<<<<<<<<<<<<<
@@ -13276,7 +13276,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L
__pyx_t_3 = (!__pyx_t_1);
if (__pyx_t_3) {
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":26
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":26
* def __getitem__(self, int index):
* if not 0 <= index < len(self):
* raise IndexError('lattice index out of range') # <<<<<<<<<<<<<<
@@ -13292,7 +13292,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":27
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":27
* if not 0 <= index < len(self):
* raise IndexError('lattice index out of range')
* arcs = [] # <<<<<<<<<<<<<<
@@ -13304,7 +13304,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_5_cdec_L
__pyx_v_arcs = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":28
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":28
* raise IndexError('lattice index out of range')
* arcs = []
* cdef vector[lattice.LatticeArc] arc_vector = self.lattice[0][index] # <<<<<<<<<<<<<<
@@ -13313,7 +13313,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]);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":31
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":31
* cdef lattice.LatticeArc* arc
* cdef unsigned i
* for i in range(arc_vector.size()): # <<<<<<<<<<<<<<
@@ -13324,7 +13324,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;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":32
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":32
* cdef unsigned i
* for i in range(arc_vector.size()):
* arc = &arc_vector[i] # <<<<<<<<<<<<<<
@@ -13333,7 +13333,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]));
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":33
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":33
* for i in range(arc_vector.size()):
* arc = &arc_vector[i]
* label = unicode(TDConvert(arc.label).c_str(), 'utf8') # <<<<<<<<<<<<<<
@@ -13357,7 +13357,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;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":34
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":34
* arc = &arc_vector[i]
* label = unicode(TDConvert(arc.label).c_str(), 'utf8')
* arcs.append((label, arc.cost, arc.dist2next)) # <<<<<<<<<<<<<<
@@ -13383,7 +13383,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;
}
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":35
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":35
* label = unicode(TDConvert(arc.label).c_str(), 'utf8')
* arcs.append((label, arc.cost, arc.dist2next))
* return tuple(arcs) # <<<<<<<<<<<<<<
@@ -13439,7 +13439,7 @@ static int __pyx_pw_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObjec
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":37
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":37
* return tuple(arcs)
*
* def __setitem__(self, int index, tuple arcs): # <<<<<<<<<<<<<<
@@ -13473,7 +13473,7 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setitem__", 0);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":38
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":38
*
* def __setitem__(self, int index, tuple arcs):
* if not 0 <= index < len(self): # <<<<<<<<<<<<<<
@@ -13488,7 +13488,7 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice
__pyx_t_3 = (!__pyx_t_1);
if (__pyx_t_3) {
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":39
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":39
* def __setitem__(self, int index, tuple arcs):
* if not 0 <= index < len(self):
* raise IndexError('lattice index out of range') # <<<<<<<<<<<<<<
@@ -13504,7 +13504,7 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":41
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":41
* raise IndexError('lattice index out of range')
* cdef lattice.LatticeArc* arc
* for (label, cost, dist2next) in arcs: # <<<<<<<<<<<<<<
@@ -13588,7 +13588,7 @@ 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;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":42
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":42
* cdef lattice.LatticeArc* arc
* for (label, cost, dist2next) in arcs:
* label_str = as_str(label) # <<<<<<<<<<<<<<
@@ -13601,7 +13601,7 @@ static int __pyx_pf_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_5_cdec_Lattice
__pyx_v_label_str = ((PyObject*)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":43
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":43
* for (label, cost, dist2next) in arcs:
* label_str = as_str(label)
* arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) # <<<<<<<<<<<<<<
@@ -13613,7 +13613,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);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":44
+ /* "/home/pauldb/workspace/cdec/python/src/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]) # <<<<<<<<<<<<<<
@@ -13622,7 +13622,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]));
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":45
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":45
* arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next)
* self.lattice[0][index].push_back(arc[0])
* del arc # <<<<<<<<<<<<<<
@@ -13664,7 +13664,7 @@ static Py_ssize_t __pyx_pw_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":47
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":47
* del arc
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -13677,7 +13677,7 @@ static Py_ssize_t __pyx_pf_5_cdec_7Lattice_10__len__(struct __pyx_obj_5_cdec_Lat
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":48
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":48
*
* def __len__(self):
* return self.lattice.size() # <<<<<<<<<<<<<<
@@ -13704,7 +13704,7 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":50
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":50
* return self.lattice.size()
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -13722,7 +13722,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_12__str__(struct __pyx_obj_5_cdec_Latt
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":51
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":51
*
* def __str__(self):
* return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) # <<<<<<<<<<<<<<
@@ -13768,7 +13768,7 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_self,
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":53
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":53
* return str(hypergraph.AsPLF(self.lattice[0], True).c_str())
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -13786,7 +13786,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_5_cdec_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__unicode__", 0);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":54
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":54
*
* def __unicode__(self):
* return unicode(str(self), 'utf8') # <<<<<<<<<<<<<<
@@ -13842,7 +13842,7 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":56
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":56
* return unicode(str(self), 'utf8')
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -13905,7 +13905,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;}
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":58
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":58
* def __iter__(self):
* cdef unsigned i
* for i in range(len(self)): # <<<<<<<<<<<<<<
@@ -13916,7 +13916,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;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":59
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":59
* cdef unsigned i
* for i in range(len(self)):
* yield self[i] # <<<<<<<<<<<<<<
@@ -13977,7 +13977,7 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_5todot_1lines(PyObject *__pyx_self, CY
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":63
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":63
* def todot(self):
* """lattice.todot() -> Representation of the lattice in GraphViz dot format."""
* def lines(): # <<<<<<<<<<<<<<
@@ -14054,7 +14054,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;}
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":64
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":64
* """lattice.todot() -> Representation of the lattice in GraphViz dot format."""
* def lines():
* yield 'digraph lattice {' # <<<<<<<<<<<<<<
@@ -14071,7 +14071,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;}
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":65
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":65
* def lines():
* yield 'digraph lattice {'
* yield 'rankdir = LR;' # <<<<<<<<<<<<<<
@@ -14088,7 +14088,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;}
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":66
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":66
* yield 'digraph lattice {'
* yield 'rankdir = LR;'
* yield 'node [shape=circle];' # <<<<<<<<<<<<<<
@@ -14105,7 +14105,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;}
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":67
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":67
* yield 'rankdir = LR;'
* yield 'node [shape=circle];'
* for i in range(len(self)): # <<<<<<<<<<<<<<
@@ -14168,7 +14168,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;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":68
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":68
* yield 'node [shape=circle];'
* for i in range(len(self)):
* for label, weight, delta in self[i]: # <<<<<<<<<<<<<<
@@ -14283,7 +14283,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;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":69
+ /* "/home/pauldb/workspace/cdec/python/src/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('"', '\\"')) # <<<<<<<<<<<<<<
@@ -14343,7 +14343,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":70
+ /* "/home/pauldb/workspace/cdec/python/src/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) # <<<<<<<<<<<<<<
@@ -14369,7 +14369,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;}
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":71
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":71
* yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"'))
* yield '%d [shape=doublecircle]' % len(self)
* yield '}' # <<<<<<<<<<<<<<
@@ -14404,7 +14404,7 @@ static PyObject *__pyx_gb_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObj
return NULL;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":61
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":61
* yield self[i]
*
* def todot(self): # <<<<<<<<<<<<<<
@@ -14434,7 +14434,7 @@ 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);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":63
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":63
* def todot(self):
* """lattice.todot() -> Representation of the lattice in GraphViz dot format."""
* def lines(): # <<<<<<<<<<<<<<
@@ -14446,7 +14446,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_19todot(struct __pyx_obj_5_cdec_Lattic
__pyx_v_lines = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":72
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":72
* yield '%d [shape=doublecircle]' % len(self)
* yield '}'
* return '\n'.join(lines()).encode('utf8') # <<<<<<<<<<<<<<
@@ -14505,7 +14505,7 @@ static PyObject *__pyx_pw_5_cdec_7Lattice_22as_hypergraph(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/lattice.pxi":74
+/* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":74
* return '\n'.join(lines()).encode('utf8')
*
* def as_hypergraph(self): # <<<<<<<<<<<<<<
@@ -14526,7 +14526,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("as_hypergraph", 0);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":76
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":76
* def as_hypergraph(self):
* """lattice.as_hypergraph() -> Hypergraph representation of the lattice."""
* cdef Hypergraph result = Hypergraph.__new__(Hypergraph) # <<<<<<<<<<<<<<
@@ -14539,7 +14539,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde
__pyx_v_result = ((struct __pyx_obj_5_cdec_Hypergraph *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":77
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":77
* """lattice.as_hypergraph() -> Hypergraph representation of the lattice."""
* cdef Hypergraph result = Hypergraph.__new__(Hypergraph)
* result.hg = new hypergraph.Hypergraph() # <<<<<<<<<<<<<<
@@ -14548,7 +14548,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde
*/
__pyx_v_result->hg = new Hypergraph();
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":78
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":78
* cdef Hypergraph result = Hypergraph.__new__(Hypergraph)
* result.hg = new hypergraph.Hypergraph()
* cdef bytes plf = str(self) # <<<<<<<<<<<<<<
@@ -14567,7 +14567,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;
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":79
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":79
* result.hg = new hypergraph.Hypergraph()
* cdef bytes plf = str(self)
* hypergraph.ReadFromPLF(plf, result.hg) # <<<<<<<<<<<<<<
@@ -14576,7 +14576,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);
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":80
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":80
* cdef bytes plf = str(self)
* hypergraph.ReadFromPLF(plf, result.hg)
* return result # <<<<<<<<<<<<<<
@@ -14601,7 +14601,7 @@ static PyObject *__pyx_pf_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_5_cde
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":3
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":3
* cimport mteval
*
* cdef SufficientStats as_stats(x, y): # <<<<<<<<<<<<<<
@@ -14622,7 +14622,7 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("as_stats", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":4
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":4
*
* cdef SufficientStats as_stats(x, y):
* if isinstance(x, SufficientStats): # <<<<<<<<<<<<<<
@@ -14635,7 +14635,7 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":5
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":5
* cdef SufficientStats as_stats(x, y):
* if isinstance(x, SufficientStats):
* return x # <<<<<<<<<<<<<<
@@ -14650,7 +14650,7 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject
goto __pyx_L3;
}
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":6
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":6
* if isinstance(x, SufficientStats):
* return x
* elif x == 0 and isinstance(y, SufficientStats): # <<<<<<<<<<<<<<
@@ -14671,7 +14671,7 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject
}
if (__pyx_t_4) {
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":7
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":7
* return x
* elif x == 0 and isinstance(y, SufficientStats):
* stats = SufficientStats() # <<<<<<<<<<<<<<
@@ -14683,7 +14683,7 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject
__pyx_v_stats = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":8
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":8
* elif x == 0 and isinstance(y, SufficientStats):
* stats = SufficientStats()
* stats.stats = new mteval.SufficientStats() # <<<<<<<<<<<<<<
@@ -14692,7 +14692,7 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject
*/
__pyx_v_stats->stats = new SufficientStats();
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":9
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":9
* stats = SufficientStats()
* stats.stats = new mteval.SufficientStats()
* stats.metric = (<SufficientStats> y).metric # <<<<<<<<<<<<<<
@@ -14701,7 +14701,7 @@ static struct __pyx_obj_5_cdec_SufficientStats *__pyx_f_5_cdec_as_stats(PyObject
*/
__pyx_v_stats->metric = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_v_y)->metric;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":10
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":10
* stats.stats = new mteval.SufficientStats()
* stats.metric = (<SufficientStats> y).metric
* return stats # <<<<<<<<<<<<<<
@@ -14740,7 +14740,7 @@ static PyObject *__pyx_pw_5_cdec_9Candidate_5words_1__get__(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":17
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":17
*
* property words:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -14759,7 +14759,7 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_5words___get__(struct __pyx_obj_5_cd
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":18
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":18
* property words:
* def __get__(self):
* return unicode(GetString(self.candidate.ewords).c_str(), encoding='utf8') # <<<<<<<<<<<<<<
@@ -14810,7 +14810,7 @@ static PyObject *__pyx_pw_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx_v_sel
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":21
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":21
*
* property fmap:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -14828,7 +14828,7 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_5_cde
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":22
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":22
* property fmap:
* def __get__(self):
* cdef SparseVector fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<<
@@ -14841,7 +14841,7 @@ static PyObject *__pyx_pf_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_5_cde
__pyx_v_fmap = ((struct __pyx_obj_5_cdec_SparseVector *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":23
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":23
* def __get__(self):
* cdef SparseVector fmap = SparseVector.__new__(SparseVector)
* fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) # <<<<<<<<<<<<<<
@@ -14850,7 +14850,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);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":24
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":24
* cdef SparseVector fmap = SparseVector.__new__(SparseVector)
* fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap)
* return fmap # <<<<<<<<<<<<<<
@@ -14886,7 +14886,7 @@ static PyObject *__pyx_pw_5_cdec_9Candidate_5score_1__get__(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":14
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":14
* cdef class Candidate:
* cdef mteval.const_Candidate* candidate
* cdef public float score # <<<<<<<<<<<<<<
@@ -14962,7 +14962,7 @@ static void __pyx_pw_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_sel
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":30
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":30
* cdef mteval.EvaluationMetric* metric
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -14974,7 +14974,7 @@ static void __pyx_pf_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED struct _
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":31
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":31
*
* def __dealloc__(self):
* del self.stats # <<<<<<<<<<<<<<
@@ -14997,7 +14997,7 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_5score_1__get__(PyObject *__p
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":34
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":34
*
* property score:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -15014,7 +15014,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_5score___get__(struct __pyx_o
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":35
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":35
* property score:
* def __get__(self):
* return self.metric.ComputeScore(self.stats[0]) # <<<<<<<<<<<<<<
@@ -15051,7 +15051,7 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_6detail_1__get__(PyObject *__
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":38
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":38
*
* property detail:
* def __get__(self): # <<<<<<<<<<<<<<
@@ -15069,7 +15069,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_6detail___get__(struct __pyx_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":39
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":39
* property detail:
* def __get__(self):
* return str(self.metric.DetailedScore(self.stats[0]).c_str()) # <<<<<<<<<<<<<<
@@ -15115,7 +15115,7 @@ static Py_ssize_t __pyx_pw_5_cdec_15SufficientStats_3__len__(PyObject *__pyx_v_s
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":41
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":41
* return str(self.metric.DetailedScore(self.stats[0]).c_str())
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -15128,7 +15128,7 @@ static Py_ssize_t __pyx_pf_5_cdec_15SufficientStats_2__len__(struct __pyx_obj_5_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":42
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":42
*
* def __len__(self):
* return self.stats.size() # <<<<<<<<<<<<<<
@@ -15156,7 +15156,7 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_5__iter__(PyObject *__pyx_v_s
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":44
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":44
* return self.stats.size()
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -15220,7 +15220,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;}
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":45
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":45
*
* def __iter__(self):
* for i in range(len(self)): # <<<<<<<<<<<<<<
@@ -15279,7 +15279,7 @@ static PyObject *__pyx_gb_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorO
__pyx_cur_scope->__pyx_v_i = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":46
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":46
* def __iter__(self):
* for i in range(len(self)):
* yield self[i] # <<<<<<<<<<<<<<
@@ -15343,7 +15343,7 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":48
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":48
* yield self[i]
*
* def __getitem__(self, int index): # <<<<<<<<<<<<<<
@@ -15363,7 +15363,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":49
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":49
*
* def __getitem__(self, int index):
* if not 0 <= index < len(self): # <<<<<<<<<<<<<<
@@ -15378,7 +15378,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj
__pyx_t_3 = (!__pyx_t_1);
if (__pyx_t_3) {
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":50
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":50
* def __getitem__(self, int index):
* if not 0 <= index < len(self):
* raise IndexError('sufficient stats vector index out of range') # <<<<<<<<<<<<<<
@@ -15394,7 +15394,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":51
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":51
* if not 0 <= index < len(self):
* raise IndexError('sufficient stats vector index out of range')
* return self.stats[0][index] # <<<<<<<<<<<<<<
@@ -15436,7 +15436,7 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":53
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":53
* return self.stats[0][index]
*
* def __iadd__(SufficientStats self, SufficientStats other): # <<<<<<<<<<<<<<
@@ -15449,7 +15449,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_5_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iadd__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":54
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":54
*
* def __iadd__(SufficientStats self, SufficientStats other):
* self.stats[0] += other.stats[0] # <<<<<<<<<<<<<<
@@ -15458,7 +15458,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_5_
*/
(__pyx_v_self->stats[0]) += (__pyx_v_other->stats[0]);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":55
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":55
* def __iadd__(SufficientStats self, SufficientStats other):
* self.stats[0] += other.stats[0]
* return self # <<<<<<<<<<<<<<
@@ -15488,7 +15488,7 @@ static PyObject *__pyx_pw_5_cdec_15SufficientStats_12__add__(PyObject *__pyx_v_x
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":57
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":57
* return self
*
* def __add__(x, y): # <<<<<<<<<<<<<<
@@ -15508,7 +15508,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__add__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":58
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":58
*
* def __add__(x, y):
* cdef SufficientStats sx = as_stats(x, y) # <<<<<<<<<<<<<<
@@ -15520,7 +15520,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x
__pyx_v_sx = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":59
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":59
* def __add__(x, y):
* cdef SufficientStats sx = as_stats(x, y)
* cdef SufficientStats sy = as_stats(y, x) # <<<<<<<<<<<<<<
@@ -15532,7 +15532,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x
__pyx_v_sy = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":60
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":60
* cdef SufficientStats sx = as_stats(x, y)
* cdef SufficientStats sy = as_stats(y, x)
* cdef SufficientStats result = SufficientStats() # <<<<<<<<<<<<<<
@@ -15544,7 +15544,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x
__pyx_v_result = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":61
+ /* "/home/pauldb/workspace/cdec/python/src/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])) # <<<<<<<<<<<<<<
@@ -15553,7 +15553,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])));
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":62
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":62
* cdef SufficientStats result = SufficientStats()
* result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0]))
* result.metric = sx.metric # <<<<<<<<<<<<<<
@@ -15562,7 +15562,7 @@ static PyObject *__pyx_pf_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x
*/
__pyx_v_result->metric = __pyx_v_sx->metric;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":63
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":63
* result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0]))
* result.metric = sx.metric
* return result # <<<<<<<<<<<<<<
@@ -15641,7 +15641,7 @@ static int __pyx_pw_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyO
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":70
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":70
* cdef mteval.CandidateSet* cs
*
* def __cinit__(self, SegmentEvaluator evaluator): # <<<<<<<<<<<<<<
@@ -15654,7 +15654,7 @@ static int __pyx_pf_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_5_cdec_Cand
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":71
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":71
*
* def __cinit__(self, SegmentEvaluator evaluator):
* self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) # <<<<<<<<<<<<<<
@@ -15663,7 +15663,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]));
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":72
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":72
* def __cinit__(self, SegmentEvaluator evaluator):
* self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0])
* self.metric = evaluator.metric # <<<<<<<<<<<<<<
@@ -15672,7 +15672,7 @@ static int __pyx_pf_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_5_cdec_Cand
*/
__pyx_v_self->metric = __pyx_v_evaluator->metric;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":73
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":73
* self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0])
* self.metric = evaluator.metric
* self.cs = new mteval.CandidateSet() # <<<<<<<<<<<<<<
@@ -15695,7 +15695,7 @@ static void __pyx_pw_5_cdec_12CandidateSet_3__dealloc__(PyObject *__pyx_v_self)
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":75
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":75
* self.cs = new mteval.CandidateSet()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -15707,7 +15707,7 @@ static void __pyx_pf_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __p
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":76
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":76
*
* def __dealloc__(self):
* del self.scorer # <<<<<<<<<<<<<<
@@ -15716,7 +15716,7 @@ static void __pyx_pf_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __p
*/
delete __pyx_v_self->scorer;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":77
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":77
* def __dealloc__(self):
* del self.scorer
* del self.cs # <<<<<<<<<<<<<<
@@ -15739,7 +15739,7 @@ static Py_ssize_t __pyx_pw_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":79
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":79
* del self.cs
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -15752,7 +15752,7 @@ static Py_ssize_t __pyx_pf_5_cdec_12CandidateSet_4__len__(struct __pyx_obj_5_cde
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":80
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":80
*
* def __len__(self):
* return self.cs.size() # <<<<<<<<<<<<<<
@@ -15789,7 +15789,7 @@ static PyObject *__pyx_pw_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_s
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":82
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":82
* return self.cs.size()
*
* def __getitem__(self,int k): # <<<<<<<<<<<<<<
@@ -15809,7 +15809,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":83
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":83
*
* def __getitem__(self,int k):
* if not 0 <= k < self.cs.size(): # <<<<<<<<<<<<<<
@@ -15823,7 +15823,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_
__pyx_t_2 = (!__pyx_t_1);
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":84
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":84
* def __getitem__(self,int k):
* if not 0 <= k < self.cs.size():
* raise IndexError('candidate set index out of range') # <<<<<<<<<<<<<<
@@ -15839,7 +15839,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":85
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":85
* if not 0 <= k < self.cs.size():
* raise IndexError('candidate set index out of range')
* cdef Candidate candidate = Candidate() # <<<<<<<<<<<<<<
@@ -15851,7 +15851,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_5_
__pyx_v_candidate = ((struct __pyx_obj_5_cdec_Candidate *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":86
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":86
* raise IndexError('candidate set index out of range')
* cdef Candidate candidate = Candidate()
* candidate.candidate = &self.cs[0][k] # <<<<<<<<<<<<<<
@@ -15860,7 +15860,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]));
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":87
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":87
* cdef Candidate candidate = Candidate()
* candidate.candidate = &self.cs[0][k]
* candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats) # <<<<<<<<<<<<<<
@@ -15869,7 +15869,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);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":88
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":88
* candidate.candidate = &self.cs[0][k]
* candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats)
* return candidate # <<<<<<<<<<<<<<
@@ -15906,7 +15906,7 @@ static PyObject *__pyx_pw_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_v_self
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":90
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":90
* return candidate
*
* def __iter__(self): # <<<<<<<<<<<<<<
@@ -15969,7 +15969,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;}
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":92
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":92
* def __iter__(self):
* cdef unsigned i
* for i in range(len(self)): # <<<<<<<<<<<<<<
@@ -15980,7 +15980,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;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":93
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":93
* cdef unsigned i
* for i in range(len(self)):
* yield self[i] # <<<<<<<<<<<<<<
@@ -16078,7 +16078,7 @@ static PyObject *__pyx_pw_5_cdec_12CandidateSet_12add_kbest(PyObject *__pyx_v_se
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":95
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":95
* yield self[i]
*
* def add_kbest(self, Hypergraph hypergraph, unsigned k): # <<<<<<<<<<<<<<
@@ -16091,7 +16091,7 @@ static PyObject *__pyx_pf_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_5_c
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("add_kbest", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":98
+ /* "/home/pauldb/workspace/cdec/python/src/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()) # <<<<<<<<<<<<<<
@@ -16115,7 +16115,7 @@ static void __pyx_pw_5_cdec_16SegmentEvaluator_1__dealloc__(PyObject *__pyx_v_se
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":104
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":104
* cdef mteval.EvaluationMetric* metric
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -16127,7 +16127,7 @@ static void __pyx_pf_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED struct
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":105
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":105
*
* def __dealloc__(self):
* del self.scorer # <<<<<<<<<<<<<<
@@ -16151,7 +16151,7 @@ static PyObject *__pyx_pw_5_cdec_16SegmentEvaluator_3evaluate(PyObject *__pyx_v_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":107
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":107
* del self.scorer
*
* def evaluate(self, sentence): # <<<<<<<<<<<<<<
@@ -16172,7 +16172,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("evaluate", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":110
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":110
* """se.evaluate(sentence) -> SufficientStats for the given hypothesis."""
* cdef vector[WordID] hyp
* cdef SufficientStats sf = SufficientStats() # <<<<<<<<<<<<<<
@@ -16184,7 +16184,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5
__pyx_v_sf = ((struct __pyx_obj_5_cdec_SufficientStats *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":111
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":111
* cdef vector[WordID] hyp
* cdef SufficientStats sf = SufficientStats()
* sf.metric = self.metric # <<<<<<<<<<<<<<
@@ -16193,7 +16193,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5
*/
__pyx_v_sf->metric = __pyx_v_self->metric;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":112
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":112
* cdef SufficientStats sf = SufficientStats()
* sf.metric = self.metric
* sf.stats = new mteval.SufficientStats() # <<<<<<<<<<<<<<
@@ -16202,7 +16202,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5
*/
__pyx_v_sf->stats = new SufficientStats();
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":113
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":113
* sf.metric = self.metric
* sf.stats = new mteval.SufficientStats()
* ConvertSentence(as_str(sentence.strip()), &hyp) # <<<<<<<<<<<<<<
@@ -16221,7 +16221,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_5
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
TD::ConvertSentence(__pyx_t_3, (&__pyx_v_hyp));
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":114
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":114
* sf.stats = new mteval.SufficientStats()
* ConvertSentence(as_str(sentence.strip()), &hyp)
* self.scorer.get().Evaluate(hyp, sf.stats) # <<<<<<<<<<<<<<
@@ -16230,7 +16230,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);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":115
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":115
* ConvertSentence(as_str(sentence.strip()), &hyp)
* self.scorer.get().Evaluate(hyp, sf.stats)
* return sf # <<<<<<<<<<<<<<
@@ -16268,7 +16268,7 @@ static PyObject *__pyx_pw_5_cdec_16SegmentEvaluator_5candidate_set(PyObject *__p
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":117
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":117
* return sf
*
* def candidate_set(self): # <<<<<<<<<<<<<<
@@ -16286,7 +16286,7 @@ static PyObject *__pyx_pf_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("candidate_set", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":119
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":119
* def candidate_set(self):
* """se.candidate_set() -> Candidate set using this segment evaluator for scoring."""
* return CandidateSet(self) # <<<<<<<<<<<<<<
@@ -16330,7 +16330,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};
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":125
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":125
* cdef mteval.EvaluationMetric* metric
*
* def __cinit__(self, bytes name=None): # <<<<<<<<<<<<<<
@@ -16395,7 +16395,7 @@ static int __pyx_pf_5_cdec_6Scorer___cinit__(struct __pyx_obj_5_cdec_Scorer *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":126
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":126
*
* def __cinit__(self, bytes name=None):
* if name: # <<<<<<<<<<<<<<
@@ -16405,7 +16405,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) {
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":127
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":127
* def __cinit__(self, bytes name=None):
* if name:
* self.name = new string(name) # <<<<<<<<<<<<<<
@@ -16416,7 +16416,7 @@ static int __pyx_pf_5_cdec_6Scorer___cinit__(struct __pyx_obj_5_cdec_Scorer *__p
try {__pyx_t_3 = new std::string(__pyx_t_2);} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}}
__pyx_v_self->name = __pyx_t_3;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":128
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":128
* if name:
* self.name = new string(name)
* self.metric = mteval.MetricInstance(self.name[0]) # <<<<<<<<<<<<<<
@@ -16447,7 +16447,7 @@ static void __pyx_pw_5_cdec_6Scorer_3__dealloc__(PyObject *__pyx_v_self) {
__Pyx_RefNannyFinishContext();
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":130
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":130
* self.metric = mteval.MetricInstance(self.name[0])
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -16459,7 +16459,7 @@ static void __pyx_pf_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":131
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":131
*
* def __dealloc__(self):
* del self.name # <<<<<<<<<<<<<<
@@ -16518,7 +16518,7 @@ static PyObject *__pyx_pw_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":133
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":133
* del self.name
*
* def __call__(self, refs): # <<<<<<<<<<<<<<
@@ -16548,7 +16548,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);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":134
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":134
*
* def __call__(self, refs):
* if isinstance(refs, basestring): # <<<<<<<<<<<<<<
@@ -16561,7 +16561,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":135
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":135
* def __call__(self, refs):
* if isinstance(refs, basestring):
* refs = [refs] # <<<<<<<<<<<<<<
@@ -16580,7 +16580,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score
}
__pyx_L3:;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":136
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":136
* if isinstance(refs, basestring):
* refs = [refs]
* cdef vector[vector[WordID]]* refsv = new vector[vector[WordID]]() # <<<<<<<<<<<<<<
@@ -16590,7 +16590,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score
try {__pyx_t_3 = new std::vector<std::vector<WordID> >();} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}}
__pyx_v_refsv = __pyx_t_3;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":138
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":138
* cdef vector[vector[WordID]]* refsv = new vector[vector[WordID]]()
* cdef vector[WordID]* refv
* for ref in refs: # <<<<<<<<<<<<<<
@@ -16635,7 +16635,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score
__pyx_v_ref = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":139
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":139
* cdef vector[WordID]* refv
* for ref in refs:
* refv = new vector[WordID]() # <<<<<<<<<<<<<<
@@ -16645,7 +16645,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score
try {__pyx_t_7 = new std::vector<WordID>();} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}}
__pyx_v_refv = __pyx_t_7;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":140
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":140
* for ref in refs:
* refv = new vector[WordID]()
* ConvertSentence(as_str(ref.strip()), refv) # <<<<<<<<<<<<<<
@@ -16664,7 +16664,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
TD::ConvertSentence(__pyx_t_9, __pyx_v_refv);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":141
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":141
* refv = new vector[WordID]()
* ConvertSentence(as_str(ref.strip()), refv)
* refsv.push_back(refv[0]) # <<<<<<<<<<<<<<
@@ -16673,7 +16673,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]));
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":142
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":142
* ConvertSentence(as_str(ref.strip()), refv)
* refsv.push_back(refv[0])
* del refv # <<<<<<<<<<<<<<
@@ -16684,7 +16684,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":144
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":144
* del refv
* cdef unsigned i
* cdef SegmentEvaluator evaluator = SegmentEvaluator() # <<<<<<<<<<<<<<
@@ -16696,7 +16696,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score
__pyx_v_evaluator = ((struct __pyx_obj_5_cdec_SegmentEvaluator *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":145
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":145
* cdef unsigned i
* cdef SegmentEvaluator evaluator = SegmentEvaluator()
* evaluator.metric = self.metric # <<<<<<<<<<<<<<
@@ -16705,7 +16705,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score
*/
__pyx_v_evaluator->metric = __pyx_v_self->metric;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":146
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":146
* cdef SegmentEvaluator evaluator = SegmentEvaluator()
* evaluator.metric = self.metric
* evaluator.scorer = new shared_ptr[mteval.SegmentEvaluator]( # <<<<<<<<<<<<<<
@@ -16714,7 +16714,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])));
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":148
+ /* "/home/pauldb/workspace/cdec/python/src/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 # <<<<<<<<<<<<<<
@@ -16723,7 +16723,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_4__call__(struct __pyx_obj_5_cdec_Score
*/
delete __pyx_v_refsv;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":149
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":149
* self.metric.CreateSegmentEvaluator(refsv[0]))
* del refsv # in theory should not delete but store in SegmentEvaluator
* return evaluator # <<<<<<<<<<<<<<
@@ -16763,7 +16763,7 @@ static PyObject *__pyx_pw_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self) {
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":151
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":151
* return evaluator
*
* def __str__(self): # <<<<<<<<<<<<<<
@@ -16781,7 +16781,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_6__str__(struct __pyx_obj_5_cdec_Scorer
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":152
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":152
*
* def __str__(self):
* return str(self.name.c_str()) # <<<<<<<<<<<<<<
@@ -16816,7 +16816,7 @@ static PyObject *__pyx_pf_5_cdec_6Scorer_6__str__(struct __pyx_obj_5_cdec_Scorer
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":154
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":154
* return str(self.name.c_str())
*
* cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): # <<<<<<<<<<<<<<
@@ -16842,7 +16842,7 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_compute_score", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":155
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":155
*
* cdef float _compute_score(void* metric_, mteval.SufficientStats* stats):
* cdef Metric metric = <Metric> metric_ # <<<<<<<<<<<<<<
@@ -16852,7 +16852,7 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_5_cdec_Metric *)__pyx_v_metric_)));
__pyx_v_metric = ((struct __pyx_obj_5_cdec_Metric *)__pyx_v_metric_);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":156
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":156
* cdef float _compute_score(void* metric_, mteval.SufficientStats* stats):
* cdef Metric metric = <Metric> metric_
* cdef list ss = [] # <<<<<<<<<<<<<<
@@ -16864,7 +16864,7 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat
__pyx_v_ss = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":158
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":158
* cdef list ss = []
* cdef unsigned i
* for i in range(stats.size()): # <<<<<<<<<<<<<<
@@ -16875,7 +16875,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;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":159
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":159
* cdef unsigned i
* for i in range(stats.size()):
* ss.append(stats[0][i]) # <<<<<<<<<<<<<<
@@ -16888,7 +16888,7 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":160
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":160
* for i in range(stats.size()):
* ss.append(stats[0][i])
* return metric.score(ss) # <<<<<<<<<<<<<<
@@ -16926,7 +16926,7 @@ static float __pyx_f_5_cdec__compute_score(void *__pyx_v_metric_, SufficientStat
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":162
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":162
* return metric.score(ss)
*
* cdef void _compute_sufficient_stats(void* metric_, # <<<<<<<<<<<<<<
@@ -16953,7 +16953,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std:
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_compute_sufficient_stats", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":166
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":166
* vector[string]* refs,
* mteval.SufficientStats* out):
* cdef Metric metric = <Metric> metric_ # <<<<<<<<<<<<<<
@@ -16963,7 +16963,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std:
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_5_cdec_Metric *)__pyx_v_metric_)));
__pyx_v_metric = ((struct __pyx_obj_5_cdec_Metric *)__pyx_v_metric_);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":167
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":167
* mteval.SufficientStats* out):
* cdef Metric metric = <Metric> metric_
* cdef list refs_ = [] # <<<<<<<<<<<<<<
@@ -16975,7 +16975,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std:
__pyx_v_refs_ = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":169
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":169
* cdef list refs_ = []
* cdef unsigned i
* for i in range(refs.size()): # <<<<<<<<<<<<<<
@@ -16986,7 +16986,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;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":170
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":170
* cdef unsigned i
* for i in range(refs.size()):
* refs_.append(str(refs[0][i].c_str())) # <<<<<<<<<<<<<<
@@ -17007,7 +17007,7 @@ static void __pyx_f_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_, std:
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":171
+ /* "/home/pauldb/workspace/cdec/python/src/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_) # <<<<<<<<<<<<<<
@@ -17042,7 +17042,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;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":172
+ /* "/home/pauldb/workspace/cdec/python/src/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)) # <<<<<<<<<<<<<<
@@ -17056,7 +17056,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);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":173
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":173
* cdef list ss = metric.evaluate(str(hyp.c_str()), refs_)
* out.fields.resize(len(ss))
* for i in range(len(ss)): # <<<<<<<<<<<<<<
@@ -17071,7 +17071,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;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":174
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":174
* out.fields.resize(len(ss))
* for i in range(len(ss)):
* out.fields[i] = ss[i] # <<<<<<<<<<<<<<
@@ -17116,7 +17116,7 @@ static int __pyx_pw_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyObject *
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":178
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":178
* cdef class Metric:
* cdef Scorer scorer
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -17137,7 +17137,7 @@ static int __pyx_pf_5_cdec_6Metric___cinit__(struct __pyx_obj_5_cdec_Metric *__p
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":179
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":179
* cdef Scorer scorer
* def __cinit__(self):
* self.scorer = Scorer() # <<<<<<<<<<<<<<
@@ -17152,7 +17152,7 @@ static int __pyx_pf_5_cdec_6Metric___cinit__(struct __pyx_obj_5_cdec_Metric *__p
__pyx_v_self->scorer = ((struct __pyx_obj_5_cdec_Scorer *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":180
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":180
* def __cinit__(self):
* self.scorer = Scorer()
* cdef bytes class_name = self.__class__.__name__ # <<<<<<<<<<<<<<
@@ -17168,7 +17168,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;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":181
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":181
* self.scorer = Scorer()
* cdef bytes class_name = self.__class__.__name__
* self.scorer.name = new string(class_name) # <<<<<<<<<<<<<<
@@ -17179,7 +17179,7 @@ static int __pyx_pf_5_cdec_6Metric___cinit__(struct __pyx_obj_5_cdec_Metric *__p
try {__pyx_t_4 = new std::string(__pyx_t_3);} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}}
__pyx_v_self->scorer->name = __pyx_t_4;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":182
+ /* "/home/pauldb/workspace/cdec/python/src/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], # <<<<<<<<<<<<<<
@@ -17248,7 +17248,7 @@ static PyObject *__pyx_pw_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":185
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":185
* <void*> self, _compute_sufficient_stats, _compute_score)
*
* def __call__(self, refs): # <<<<<<<<<<<<<<
@@ -17266,7 +17266,7 @@ static PyObject *__pyx_pf_5_cdec_6Metric_2__call__(struct __pyx_obj_5_cdec_Metri
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__call__", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":186
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":186
*
* def __call__(self, refs):
* return self.scorer(refs) # <<<<<<<<<<<<<<
@@ -17310,7 +17310,7 @@ static PyObject *__pyx_pw_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, CYTHON_
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":188
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":188
* return self.scorer(refs)
*
* def score(SufficientStats stats): # <<<<<<<<<<<<<<
@@ -17323,7 +17323,7 @@ static PyObject *__pyx_pf_5_cdec_6Metric_4score(CYTHON_UNUSED struct __pyx_obj_5
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("score", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":189
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":189
*
* def score(SufficientStats stats):
* return 0 # <<<<<<<<<<<<<<
@@ -17398,7 +17398,7 @@ static PyObject *__pyx_pw_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObj
return __pyx_r;
}
-/* "/home/vchahune/tools/cdec/python/src/mteval.pxi":191
+/* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":191
* return 0
*
* def evaluate(self, hyp, refs): # <<<<<<<<<<<<<<
@@ -17415,7 +17415,7 @@ static PyObject *__pyx_pf_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __pyx_ob
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("evaluate", 0);
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":192
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":192
*
* def evaluate(self, hyp, refs):
* return [] # <<<<<<<<<<<<<<
@@ -28849,7 +28849,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));
- /* "/home/vchahune/tools/cdec/python/src/vectors.pxi":95
+ /* "/home/pauldb/workspace/cdec/python/src/vectors.pxi":95
* elif op == 3: # !=
* return not (x == y)
* raise NotImplemented('comparison not implemented for SparseVector') # <<<<<<<<<<<<<<
@@ -28863,7 +28863,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":6
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":6
*
* def _phrase(phrase):
* return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<<
@@ -28877,7 +28877,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":226
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":226
* trule = convert_rule(trule)
* elif not isinstance(trule, TRule):
* raise ValueError('the grammar should contain TRule objects') # <<<<<<<<<<<<<<
@@ -28890,7 +28890,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":244
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":244
* elif op == 3: # !=
* return not (x == y)
* raise NotImplemented('comparison not implemented for HypergraphEdge') # <<<<<<<<<<<<<<
@@ -28904,7 +28904,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));
- /* "/home/vchahune/tools/cdec/python/src/hypergraph.pxi":281
+ /* "/home/pauldb/workspace/cdec/python/src/hypergraph.pxi":281
* elif op == 3: # !=
* return not (x == y)
* raise NotImplemented('comparison not implemented for HypergraphNode') # <<<<<<<<<<<<<<
@@ -28916,7 +28916,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":26
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":26
* def __getitem__(self, int index):
* if not 0 <= index < len(self):
* raise IndexError('lattice index out of range') # <<<<<<<<<<<<<<
@@ -28930,7 +28930,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":39
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":39
* def __setitem__(self, int index, tuple arcs):
* if not 0 <= index < len(self):
* raise IndexError('lattice index out of range') # <<<<<<<<<<<<<<
@@ -28944,7 +28944,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_23));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":69
+ /* "/home/pauldb/workspace/cdec/python/src/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('"', '\\"')) # <<<<<<<<<<<<<<
@@ -28961,7 +28961,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":63
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":63
* def todot(self):
* """lattice.todot() -> Representation of the lattice in GraphViz dot format."""
* def lines(): # <<<<<<<<<<<<<<
@@ -28985,7 +28985,7 @@ 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;}
- /* "/home/vchahune/tools/cdec/python/src/lattice.pxi":72
+ /* "/home/pauldb/workspace/cdec/python/src/lattice.pxi":72
* yield '%d [shape=doublecircle]' % len(self)
* yield '}'
* return '\n'.join(lines()).encode('utf8') # <<<<<<<<<<<<<<
@@ -28999,7 +28999,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":50
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":50
* def __getitem__(self, int index):
* if not 0 <= index < len(self):
* raise IndexError('sufficient stats vector index out of range') # <<<<<<<<<<<<<<
@@ -29013,7 +29013,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":84
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":84
* def __getitem__(self,int k):
* if not 0 <= k < self.cs.size():
* raise IndexError('candidate set index out of range') # <<<<<<<<<<<<<<
@@ -29078,7 +29078,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(Py_None);
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":5
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":5
* import cdec.sa._sa as _sa
*
* def _phrase(phrase): # <<<<<<<<<<<<<<
@@ -29099,7 +29099,7 @@ static int __Pyx_InitCachedConstants(void) {
__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;}
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":194
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":194
* return []
*
* BLEU = Scorer('IBM_BLEU') # <<<<<<<<<<<<<<
@@ -29113,7 +29113,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__IBM_BLEU));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58));
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":195
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":195
*
* BLEU = Scorer('IBM_BLEU')
* TER = Scorer('TER') # <<<<<<<<<<<<<<
@@ -29126,7 +29126,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__TER));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":196
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":196
* BLEU = Scorer('IBM_BLEU')
* TER = Scorer('TER')
* CER = Scorer('CER') # <<<<<<<<<<<<<<
@@ -29491,7 +29491,7 @@ PyMODINIT_FUNC PyInit__cdec(void)
Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/*--- Execution code ---*/
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":3
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":3
* cimport grammar
* cimport cdec.sa._sa as _sa
* import cdec.sa._sa as _sa # <<<<<<<<<<<<<<
@@ -29509,7 +29509,7 @@ PyMODINIT_FUNC PyInit__cdec(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s___sa, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/vchahune/tools/cdec/python/src/grammar.pxi":5
+ /* "/home/pauldb/workspace/cdec/python/src/grammar.pxi":5
* import cdec.sa._sa as _sa
*
* def _phrase(phrase): # <<<<<<<<<<<<<<
@@ -29521,7 +29521,7 @@ PyMODINIT_FUNC PyInit__cdec(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s___phrase, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":194
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":194
* return []
*
* BLEU = Scorer('IBM_BLEU') # <<<<<<<<<<<<<<
@@ -29533,7 +29533,7 @@ PyMODINIT_FUNC PyInit__cdec(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__BLEU, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":195
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":195
*
* BLEU = Scorer('IBM_BLEU')
* TER = Scorer('TER') # <<<<<<<<<<<<<<
@@ -29544,7 +29544,7 @@ PyMODINIT_FUNC PyInit__cdec(void)
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/vchahune/tools/cdec/python/src/mteval.pxi":196
+ /* "/home/pauldb/workspace/cdec/python/src/mteval.pxi":196
* BLEU = Scorer('IBM_BLEU')
* TER = Scorer('TER')
* CER = Scorer('CER') # <<<<<<<<<<<<<<