summaryrefslogtreecommitdiff
path: root/python/src/utils.pxd
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-06-05 15:47:09 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-06-05 15:47:09 -0400
commit23c7a1ed9f4d2360f8e1183539e3569fdbf60b48 (patch)
tree5cffb41d2cccb7ec3cc4583be12d78d1cedd9544 /python/src/utils.pxd
parent84bc2dd5a966eea898d4c0213205fd3917b285f4 (diff)
parent98e13188c40adf13b73ca994d3410f3e87d20355 (diff)
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/src/utils.pxd')
-rw-r--r--python/src/utils.pxd29
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)