summaryrefslogtreecommitdiff
path: root/python/src/_cdec.pyx
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-08-09 01:18:51 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-08-09 01:18:51 -0400
commit454ef7fd3a37a7d3105d6bf0f5750047979da2d4 (patch)
tree276fc4758188db716962ba409ccfe832077453a6 /python/src/_cdec.pyx
parent2a9c9a414abc074ec4ea8a5494e8dd50e1f94d70 (diff)
parente0eabf1e59cbfa85b00efcff699cdcd6a524e9c5 (diff)
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/src/_cdec.pyx')
-rw-r--r--python/src/_cdec.pyx5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/src/_cdec.pyx b/python/src/_cdec.pyx
index e93474fe..af4e5f2f 100644
--- a/python/src/_cdec.pyx
+++ b/python/src/_cdec.pyx
@@ -25,6 +25,9 @@ decoder.register_feature_functions()
class InvalidConfig(Exception): pass
class ParseFailed(Exception): pass
+def set_silent(yn):
+ SetSilent(yn)
+
def _make_config(config):
for key, value in config.items():
if isinstance(value, dict):
@@ -82,7 +85,7 @@ cdef class Decoder:
property formalism:
def __get__(self):
cdef variables_map* conf = &self.dec.GetConf()
- return conf[0]['formalism'].as_str()
+ return conf[0]['formalism'].as_str().c_str()
def read_weights(self, weights):
with open(weights) as fp: