summaryrefslogtreecommitdiff
path: root/python/cdec/lattice.pxd
diff options
context:
space:
mode:
Diffstat (limited to 'python/cdec/lattice.pxd')
-rw-r--r--python/cdec/lattice.pxd20
1 files changed, 20 insertions, 0 deletions
diff --git a/python/cdec/lattice.pxd b/python/cdec/lattice.pxd
new file mode 100644
index 00000000..8ad710e5
--- /dev/null
+++ b/python/cdec/lattice.pxd
@@ -0,0 +1,20 @@
+from libcpp.vector cimport vector
+from libcpp.string cimport string
+from utils cimport WordID
+
+cdef extern from "decoder/lattice.h":
+ cdef cppclass LatticeArc:
+ WordID label
+ double cost
+ int dist2next
+ LatticeArc()
+ LatticeArc(WordID w, double c, int i)
+
+ cdef cppclass Lattice(vector): # (vector[vector[LatticeArc]])
+ Lattice()
+ bint IsSentence()
+ vector[LatticeArc]& operator[](unsigned)
+ void resize(unsigned)
+
+cdef extern from "decoder/lattice.h" namespace "LatticeTools":
+ void ConvertTextOrPLF(string& text, Lattice* pl)