diff options
author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-08-11 23:30:00 -0400 |
---|---|---|
committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-08-11 23:30:00 -0400 |
commit | 7527592aaf4245749845500aca6a7fcc97eb2f17 (patch) | |
tree | d8fdb627c657e7a4699baf0670ca749df1f7e972 /python/src/lattice.pxi | |
parent | dad8da6f5f65e157476b3999257069bda7b8552e (diff) |
[python] fix for new dict API
- TDConvert returns a string
- various c_str fixes (make copies)
- cleanup .gitignore
Diffstat (limited to 'python/src/lattice.pxi')
-rw-r--r-- | python/src/lattice.pxi | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/src/lattice.pxi b/python/src/lattice.pxi index 14864549..385a40be 100644 --- a/python/src/lattice.pxi +++ b/python/src/lattice.pxi @@ -28,7 +28,7 @@ cdef class Lattice: cdef unsigned i for i in range(arc_vector.size()): arc = &arc_vector[i] - label = unicode(TDConvert(arc.label), 'utf8') + label = unicode(TDConvert(arc.label).c_str(), 'utf8') arcs.append((label, arc.cost, arc.dist2next)) return tuple(arcs) @@ -47,7 +47,7 @@ cdef class Lattice: return self.lattice.size() def __str__(self): - return hypergraph.AsPLF(self.lattice[0], True).c_str() + return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) def __iter__(self): cdef unsigned i |