From 1b6f3ecd054ed0c5a810d0311984829b8719a9ff Mon Sep 17 00:00:00 2001 From: Victor Chahuneau Date: Wed, 11 Jul 2012 16:08:43 +0900 Subject: [python] Direct hypergraph access - small API changes (*_trees methods) - decoder config can now passed as arguments --- python/src/mteval.pxi | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'python/src/mteval.pxi') 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 -- cgit v1.2.3