summaryrefslogtreecommitdiff
path: root/python/src/mteval.pxi
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-07-11 16:08:43 +0900
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-07-11 16:08:43 +0900
commit1b6f3ecd054ed0c5a810d0311984829b8719a9ff (patch)
treec40963a72fb141ff0b4af91462b05e2922d449ef /python/src/mteval.pxi
parentf6bd206d83d8e71227e42c933f56c2ccd43fe013 (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.pxi10
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