summaryrefslogtreecommitdiff
path: root/python/src/utils.pxd
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-07-21 01:22:53 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-07-21 01:22:53 -0400
commit06f90d83a1feafad301d365a4a437e44f68be45b (patch)
tree24128de1cb5a4767151f9380c46104a26121535d /python/src/utils.pxd
parentc4c9c2febd5af552ecddc215758e32b88013fbc7 (diff)
[python] Support for grammars
- Translation rules can now be create programatically - Grammars = list of translation rules can be used for translation - Feature expectations on the hypergraph (inside_outside)
Diffstat (limited to 'python/src/utils.pxd')
-rw-r--r--python/src/utils.pxd2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/src/utils.pxd b/python/src/utils.pxd
index 15e77c49..f4da686b 100644
--- a/python/src/utils.pxd
+++ b/python/src/utils.pxd
@@ -47,6 +47,7 @@ cdef extern from "utils/sparse_vector.h":
bint operator==(FastSparseVector[T]&)
T dot(vector[weight_t]&) # cython bug when [T]
T dot(FastSparseVector[T]&)
+ void clear()
FastSparseVector[weight_t] operator+(FastSparseVector[weight_t]&, FastSparseVector[weight_t]&)
FastSparseVector[weight_t] operator-(FastSparseVector[weight_t]&, FastSparseVector[weight_t]&)
@@ -82,6 +83,7 @@ cdef extern from "utils/sampler.h":
cdef extern from "<boost/shared_ptr.hpp>" namespace "boost":
cdef cppclass shared_ptr[T]:
+ shared_ptr(T* ptr)
shared_ptr(shared_ptr& r)
T* get()