summaryrefslogtreecommitdiff
path: root/python/src/lattice.pxd
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-06-06 15:04:49 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-06-06 15:04:49 -0400
commitd9d602cf26e3696a5e575f314547b823254dba32 (patch)
treecd075e6d684394d9a211184e84948f49dfc6d502 /python/src/lattice.pxd
parent6d95c0b1edea38a972c287793fabae8f7f0eea1a (diff)
parent3acdf1e4b37637d6df86a7b54fb0f1b0464c172b (diff)
Merge branch 'master' of github.com:redpony/cdec
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()