diff options
author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-06-06 01:10:49 -0400 |
---|---|---|
committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-06-06 01:10:49 -0400 |
commit | 3acdf1e4b37637d6df86a7b54fb0f1b0464c172b (patch) | |
tree | 1c203ad35a4088ea604e72254dd5ffde6f68687c /python/src/lattice.pxd | |
parent | 57d8aeaf862bad8516e8aa87eca10fdb75bdcb3a (diff) |
Python - Added hypergraph functionnality
- k-best translations
- 1-best, k-best structures
- sample derivations from the forest
- intersect hypergraph and lattice
- lattice
Diffstat (limited to 'python/src/lattice.pxd')
-rw-r--r-- | python/src/lattice.pxd | 16 |
1 files changed, 16 insertions, 0 deletions
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() |