summaryrefslogtreecommitdiff
path: root/python/src/kbest.pxd
blob: e339714aa1cb96332c75ce8dbcf7bf2597aa964f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)