summaryrefslogtreecommitdiff
path: root/python
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
commit93333a18dd2dff0b5a9b7e0fc85e21d2f67f239b (patch)
treebc7aa803c076a958d45a7839627b424a54832a63 /python
parentdfebe92df6e09b8950c93e08fadccd95763186f8 (diff)
enable programmatic setting of grammar objects, cleanup of grammar handling
Diffstat (limited to 'python')
-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: