summaryrefslogtreecommitdiff
path: root/python/cdec/kbest.pxd
blob: ecf1fc00528ff73dd51885b03360d1acd2b5b6ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 NoFilter[Dummy]:
        pass

    cdef cppclass FilterUnique:
        pass

    cdef cppclass KBestDerivations[T, Traversal, Filter]:
        cppclass Derivation:
            T _yield "yield"
        KBestDerivations(Hypergraph& hg, unsigned k) nogil
        Derivation* LazyKthBest(unsigned v, unsigned k) nogil