diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-08-09 01:18:51 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-08-09 01:18:51 -0400 |
commit | 8ab7731dc55c55272300eafbde2c085b31f886d7 (patch) | |
tree | b893065295b1cee0d30deadc6331f9c2fab1e864 /python/src/_cdec.pyx | |
parent | c732ab57899e33c62dad2154ac6ca1caeaaa7789 (diff) | |
parent | eae5efbf112a8697309fe7c1e385a8609124520e (diff) |
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/src/_cdec.pyx')
-rw-r--r-- | python/src/_cdec.pyx | 5 |
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: |