diff options
author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-07-21 01:22:53 -0400 |
---|---|---|
committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-07-21 01:22:53 -0400 |
commit | 9a5e10322c82916a3c3fdfa0489ed1999bc988c5 (patch) | |
tree | 09de995eae349427d640ed3e392a75e0b9823461 /python/src/vectors.pxi | |
parent | 5b47c6aa65cd73e208dd941ec75229af5f9c0c67 (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/vectors.pxi')
-rw-r--r-- | python/src/vectors.pxi | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/python/src/vectors.pxi b/python/src/vectors.pxi index ce95968c..cd1c2598 100644 --- a/python/src/vectors.pxi +++ b/python/src/vectors.pxi @@ -54,6 +54,7 @@ cdef class SparseVector: def __iter__(self): cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) + cdef unsigned i try: for i in range(self.vector.size()): yield (FDConvert(it[0].ptr().first).c_str(), it[0].ptr().second) |