diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-06-23 15:54:38 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-06-23 15:54:38 -0400 |
commit | 6a2bbfa9b28f8be2189744beb89a975bc3da128f (patch) | |
tree | 4d9ee4e0b6d2c37be8f8a4e05472cd21e66d0ffd /python/src/lattice.pxd | |
parent | b9266b068a37dc46f8de813c59ffbef2e4b89280 (diff) | |
parent | b738e349be490c24d3604c224f44fc54e16d3d7b (diff) |
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/src/lattice.pxd')
-rw-r--r-- | python/src/lattice.pxd | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python/src/lattice.pxd b/python/src/lattice.pxd index bdfaba80..3a4bc22f 100644 --- a/python/src/lattice.pxd +++ b/python/src/lattice.pxd @@ -1,4 +1,5 @@ from libcpp.vector cimport vector +from libcpp.string cimport string from utils cimport WordID cdef extern from "decoder/lattice.h": @@ -9,8 +10,12 @@ cdef extern from "decoder/lattice.h": LatticeArc() LatticeArc(WordID w, double c, int i) - cdef cppclass Lattice: # (vector[vector[LatticeArc]]) + cdef cppclass Lattice(vector): # (vector[vector[LatticeArc]]) Lattice() Lattice(unsigned t) - Lattice(unsigned t, vector[LatticeArc] v) + Lattice(unsigned t, vector[LatticeArc]& v) bint IsSentence() + vector[LatticeArc]& operator[](unsigned) + +cdef extern from "decoder/lattice.h" namespace "LatticeTools": + void ConvertTextToLattice(string& text, Lattice* pl) |