diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-08-03 07:46:54 -0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-08-03 07:46:54 -0400 |
commit | be1ab0a8937f9c5668ea5e6c31b798e87672e55e (patch) | |
tree | a13aad60ab6cced213401bce6a38ac885ba171ba /python/src/lattice.pxd | |
parent | e5d6f4ae41009c26978ecd62668501af9762b0bc (diff) | |
parent | 9fe0219562e5db25171cce8776381600ff9a5649 (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) |