summaryrefslogtreecommitdiff
path: root/python/src/kbest.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/kbest.pxd
parent6d95c0b1edea38a972c287793fabae8f7f0eea1a (diff)
parent3acdf1e4b37637d6df86a7b54fb0f1b0464c172b (diff)
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/src/kbest.pxd')
-rw-r--r--python/src/kbest.pxd16
1 files changed, 16 insertions, 0 deletions
diff --git a/python/src/kbest.pxd b/python/src/kbest.pxd
new file mode 100644
index 00000000..e339714a
--- /dev/null
+++ b/python/src/kbest.pxd
@@ -0,0 +1,16 @@
+from libcpp.vector cimport vector
+from utils cimport WordID
+cimport hypergraph
+
+cdef extern from "decoder/viterbi.h":
+ cdef cppclass ESentenceTraversal:
+ pass
+ cdef cppclass ETreeTraversal:
+ pass
+
+cdef extern from "decoder/kbest.h" namespace "KBest":
+ cdef cppclass KBestDerivations[T, Traversal]:
+ cppclass Derivation:
+ T _yield "yield"
+ KBestDerivations(hypergraph.Hypergraph hg, unsigned k)
+ Derivation* LazyKthBest(unsigned v, unsigned k)