summaryrefslogtreecommitdiff
path: root/python/src/_cdec.pyx
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-07-20 00:46:10 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-07-20 00:46:10 -0400
commit09d085e16f31b36b1177b313ee54414eb29d9082 (patch)
tree9b718b8129790860052ac35524b66b1645df847c /python/src/_cdec.pyx
parent30c3f2b7186e6dc19acb8856b280b8dd97d1f679 (diff)
enable programmatic setting of grammar objects, cleanup of grammar handling
Diffstat (limited to 'python/src/_cdec.pyx')
-rw-r--r--python/src/_cdec.pyx2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/src/_cdec.pyx b/python/src/_cdec.pyx
index 879e8b72..164d6570 100644
--- a/python/src/_cdec.pyx
+++ b/python/src/_cdec.pyx
@@ -98,7 +98,7 @@ cdef class Decoder:
else:
raise TypeError('Cannot translate input type %s' % type(sentence))
if grammar:
- self.dec.SetSentenceGrammarFromString(string(<char *> grammar))
+ self.dec.AddSupplementalGrammarFromString(string(<char *> grammar))
cdef decoder.BasicObserver observer = decoder.BasicObserver()
self.dec.Decode(string(<char *>inp), &observer)
if observer.hypergraph == NULL: