From 06f90d83a1feafad301d365a4a437e44f68be45b Mon Sep 17 00:00:00 2001 From: Victor Chahuneau Date: Sat, 21 Jul 2012 01:22:53 -0400 Subject: [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) --- python/src/utils.pxd | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python/src/utils.pxd') 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 "" namespace "boost": cdef cppclass shared_ptr[T]: + shared_ptr(T* ptr) shared_ptr(shared_ptr& r) T* get() -- cgit v1.2.3