diff options
| author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-06-04 02:16:59 -0400 | 
|---|---|---|
| committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-06-04 02:16:59 -0400 | 
| commit | 57d8aeaf862bad8516e8aa87eca10fdb75bdcb3a (patch) | |
| tree | 294dc1d5f6e2c6aed40984adc883160ac79132a2 /python/src/utils.pxd | |
| parent | 43e7813a1001aa84b821f851b29606b6d98a83ac (diff) | |
Python module: initial version
Diffstat (limited to 'python/src/utils.pxd')
| -rw-r--r-- | python/src/utils.pxd | 29 | 
1 files changed, 29 insertions, 0 deletions
| diff --git a/python/src/utils.pxd b/python/src/utils.pxd new file mode 100644 index 00000000..ae38948e --- /dev/null +++ b/python/src/utils.pxd @@ -0,0 +1,29 @@ +from libcpp.string cimport string +from libcpp.vector cimport vector + +cdef extern from "<iostream>" namespace "std": +    cdef cppclass istream: +        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/wordid.h": +    ctypedef int WordID + +cdef extern from "utils/tdict.cc" namespace "TD": +    cdef string GetString(vector[WordID] st) + +cdef extern from "utils/verbose.h": +    cdef void SetSilent(bint) + +cdef extern from "utils/fdict.h" namespace "FD": +    WordID Convert(char*) +    string& Convert(WordID) | 
