diff options
author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-07-11 16:08:43 +0900 |
---|---|---|
committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-07-11 16:08:43 +0900 |
commit | 42532406b1246e6f17766b804b8bd5cce828f0fa (patch) | |
tree | b867b7fded89c3de32f0629241a86ea735186884 /python/src/mteval.pxi | |
parent | 757f56e391bd2e1d7442ab38fc98aff00d064d38 (diff) |
[python] Direct hypergraph access
- small API changes (*_trees methods)
- decoder config can now passed as arguments
Diffstat (limited to 'python/src/mteval.pxi')
-rw-r--r-- | python/src/mteval.pxi | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/python/src/mteval.pxi b/python/src/mteval.pxi index d90eb9a6..4ba73168 100644 --- a/python/src/mteval.pxi +++ b/python/src/mteval.pxi @@ -1,15 +1,5 @@ cimport mteval -cdef char* as_str(sentence, error_msg='Cannot convert type %s to str'): - cdef bytes ret - if isinstance(sentence, unicode): - ret = sentence.encode('utf8') - elif isinstance(sentence, str): - ret = sentence - else: - raise TypeError(error_msg % type(sentence)) - return ret - cdef SufficientStats as_stats(x, y): if isinstance(x, SufficientStats): return x |