From 3acdf1e4b37637d6df86a7b54fb0f1b0464c172b Mon Sep 17 00:00:00 2001 From: Victor Chahuneau Date: Wed, 6 Jun 2012 01:10:49 -0400 Subject: Python - Added hypergraph functionnality - k-best translations - 1-best, k-best structures - sample derivations from the forest - intersect hypergraph and lattice - lattice --- python/src/lattice.pxd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 python/src/lattice.pxd (limited to 'python/src/lattice.pxd') 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() -- cgit v1.2.3