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/utils.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/utils.pxd')
| -rw-r--r-- | python/src/utils.pxd | 38 | 
1 files changed, 31 insertions, 7 deletions
| diff --git a/python/src/utils.pxd b/python/src/utils.pxd index ae38948e..786cd265 100644 --- a/python/src/utils.pxd +++ b/python/src/utils.pxd @@ -4,20 +4,29 @@ from libcpp.vector cimport vector  cdef extern from "<iostream>" namespace "std":      cdef cppclass istream:          pass +    cdef cppclass ostream: +        pass      cdef cppclass istringstream(istream):          istringstream(char*) -cdef extern from "utils/filelib.h": -    cdef cppclass ReadFile: -        ReadFile(string) -        istream* stream() -  cdef extern from "utils/weights.h":      ctypedef double weight_t +cdef extern from "utils/logval.h": +    cdef cppclass LogVal[T]: +        pass + +cdef extern from "utils/prob.h": +    cdef cppclass prob_t: +        pass +  cdef extern from "utils/wordid.h":      ctypedef int WordID +cdef extern from "utils/sparse_vector.h": +    cdef cppclass SparseVector[T]: +        pass +  cdef extern from "utils/tdict.cc" namespace "TD":      cdef string GetString(vector[WordID] st) @@ -25,5 +34,20 @@ cdef extern from "utils/verbose.h":      cdef void SetSilent(bint)  cdef extern from "utils/fdict.h" namespace "FD": -    WordID Convert(char*) -    string& Convert(WordID) +    WordID FDConvert "FD::Convert" (char*) +    string& FDConvert "FD::Convert" (WordID) + +cdef extern from "utils/filelib.h": +    cdef cppclass ReadFile: +        ReadFile(string) +        istream* stream() + +cdef extern from "utils/sampler.h": +    cdef cppclass MT19937: +        pass + +""" +cdef extern from "<boost/shared_ptr.hpp>" namespace "boost": +    cdef cppclass shared_ptr[T]: +        void reset(T*) +""" | 
