From 57d8aeaf862bad8516e8aa87eca10fdb75bdcb3a Mon Sep 17 00:00:00 2001 From: Victor Chahuneau Date: Mon, 4 Jun 2012 02:16:59 -0400 Subject: Python module: initial version --- python/src/utils.pxd | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 python/src/utils.pxd (limited to 'python/src/utils.pxd') 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 "" 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) -- cgit v1.2.3