summaryrefslogtreecommitdiff
path: root/python/src/lattice.pxd
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-06-13 14:42:07 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-06-13 14:42:07 +0200
commitdcba237fdda20cb32a5d9890c3beae790db446c2 (patch)
treeb09846c7ed1ea3c0f13748ed13ce49efeca7fecc /python/src/lattice.pxd
parentd86299e31deb81a836b1b2f2a356a6f4b28eda9e (diff)
parent34c2c129a376abfc79e76cf2fa1282b89ef605b6 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'python/src/lattice.pxd')
-rw-r--r--python/src/lattice.pxd16
1 files changed, 16 insertions, 0 deletions
diff --git a/python/src/lattice.pxd b/python/src/lattice.pxd
new file mode 100644
index 00000000..bdfaba80
--- /dev/null
+++ b/python/src/lattice.pxd
@@ -0,0 +1,16 @@
+from libcpp.vector cimport vector
+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[LatticeArc]])
+ Lattice()
+ Lattice(unsigned t)
+ Lattice(unsigned t, vector[LatticeArc] v)
+ bint IsSentence()