diff options
Diffstat (limited to 'python/cdec/kbest.pxd')
-rw-r--r-- | python/cdec/kbest.pxd | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/python/cdec/kbest.pxd b/python/cdec/kbest.pxd new file mode 100644 index 00000000..44ecfbab --- /dev/null +++ b/python/cdec/kbest.pxd @@ -0,0 +1,20 @@ +from libcpp.vector cimport vector +from utils cimport WordID +from hypergraph cimport Hypergraph + +cdef extern from "decoder/viterbi.h": + cdef cppclass ESentenceTraversal: + pass + cdef cppclass ETreeTraversal: + pass + cdef cppclass FTreeTraversal: + pass + cdef cppclass FeatureVectorTraversal: + pass + +cdef extern from "decoder/kbest.h" namespace "KBest": + cdef cppclass KBestDerivations[T, Traversal]: + cppclass Derivation: + T _yield "yield" + KBestDerivations(Hypergraph& hg, unsigned k) nogil + Derivation* LazyKthBest(unsigned v, unsigned k) nogil |