diff options
author | pks <pks@users.noreply.github.com> | 2019-05-12 20:10:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-12 20:10:37 +0200 |
commit | 4a13b41700f34c15c30b551f98dbea9cb41f67c3 (patch) | |
tree | 0218f41c350a626f5af9909d77406309fa873fdf /python/cdec/lattice.pxi | |
parent | e9268eb3dcd867f3baf67a7bb3d2aad56196ecde (diff) | |
parent | f64746ac87fc7338629b19de9fa2da0f03fa2790 (diff) |
Merge branch 'net' into origin/net
Diffstat (limited to 'python/cdec/lattice.pxi')
-rw-r--r-- | python/cdec/lattice.pxi | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/python/cdec/lattice.pxi b/python/cdec/lattice.pxi index 8000b61e..2564be8a 100644 --- a/python/cdec/lattice.pxi +++ b/python/cdec/lattice.pxi @@ -1,4 +1,5 @@ cimport lattice +from utils cimport * cdef class Lattice: cdef lattice.Lattice* lattice @@ -31,16 +32,17 @@ cdef class Lattice: for i in range(arc_vector.size()): arc = &arc_vector[i] label = unicode(TDConvert(arc.label).c_str(), 'utf8') - arcs.append((label, arc.cost, arc.dist2next)) + #arcs.append((label, arc.features, arc.dist2next)) + arcs.append((label, arc.dist2next)) return tuple(arcs) def __setitem__(self, int index, tuple arcs): if not 0 <= index < len(self): raise IndexError('lattice index out of range') cdef lattice.LatticeArc* arc - for (label, cost, dist2next) in arcs: + for (label, dist2next) in arcs: label_str = as_str(label) - arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) + arc = new lattice.LatticeArc() #TDConvert(label_str), features, dist2next) self.lattice[0][index].push_back(arc[0]) del arc |