summaryrefslogtreecommitdiff
path: root/python/src/sa/_sa.pxd
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-11-05 15:29:46 +0100
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-11-05 15:29:46 +0100
commit6f29f345dc06c1a1033475eac1d1340781d1d603 (patch)
tree6fa4cdd7aefd7d54c9585c2c6274db61bb8b159a /python/src/sa/_sa.pxd
parentb510da2e562c695c90d565eb295c749569c59be8 (diff)
parentc615c37501fa8576584a510a9d2bfe2fdd5bace7 (diff)
merge upstream/master
Diffstat (limited to 'python/src/sa/_sa.pxd')
-rw-r--r--python/src/sa/_sa.pxd34
1 files changed, 31 insertions, 3 deletions
diff --git a/python/src/sa/_sa.pxd b/python/src/sa/_sa.pxd
index d390bfc5..f1cd8e29 100644
--- a/python/src/sa/_sa.pxd
+++ b/python/src/sa/_sa.pxd
@@ -1,3 +1,31 @@
+from libc.stdio cimport FILE
+
+cdef class FloatList:
+ cdef int size
+ cdef int increment
+ cdef int len
+ cdef float* arr
+ cdef void set(self, int i, float v)
+ cdef void write_handle(self, FILE* f)
+ cdef void read_handle(self, FILE* f)
+
+cdef class IntList:
+ cdef int size
+ cdef int increment
+ cdef int len
+ cdef int* arr
+ cdef void set(self, int i, int val)
+ cdef void _append(self, int val)
+ cdef void _extend(self, IntList other)
+ cdef void _extend_arr(self, int* other, int other_len)
+ cdef void _clear(self)
+ cdef void write_handle(self, FILE* f)
+ cdef void read_handle(self, FILE* f)
+
+cdef class FeatureVector:
+ cdef IntList names
+ cdef FloatList values
+
cdef class Phrase:
cdef int *syms
cdef int n, *varpos, n_vars
@@ -5,11 +33,11 @@ cdef class Phrase:
cdef public int chunklen(self, int k)
cdef class Rule:
- cdef public int lhs
+ cdef int lhs
cdef readonly Phrase f, e
- cdef float *cscores
+ cdef FeatureVector scores
cdef int n_scores
- cdef public word_alignments
+ cdef word_alignments
cdef char* sym_tostring(int sym)
cdef char* sym_tocat(int sym)