summaryrefslogtreecommitdiff
path: root/python/src/decoder.pxd
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-06-23 11:59:48 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-06-23 11:59:48 -0400
commitb738e349be490c24d3604c224f44fc54e16d3d7b (patch)
tree5d435257ef3c0023daa2211eb7260c470dbb6cdc /python/src/decoder.pxd
parent0b27ea3f91d0ad2f2ed718839d308db3d1baf5ae (diff)
Support for sparse/dense vectors in the python extension
- SparseVector, DenseVector - improved Lattice - Lattice translation - Hypergraph reweighting, pruning
Diffstat (limited to 'python/src/decoder.pxd')
-rw-r--r--python/src/decoder.pxd12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/src/decoder.pxd b/python/src/decoder.pxd
index ab858841..e2678151 100644
--- a/python/src/decoder.pxd
+++ b/python/src/decoder.pxd
@@ -4,7 +4,7 @@ from hypergraph cimport Hypergraph
from utils cimport istream, weight_t
cdef extern from "decoder/ff_register.h":
- cdef void register_feature_functions()
+ void register_feature_functions()
cdef extern from "decoder/decoder.h":
cdef cppclass SentenceMetadata:
@@ -16,20 +16,20 @@ cdef extern from "decoder/decoder.h":
cdef cppclass Decoder:
Decoder(int argc, char** argv)
Decoder(istream* config_file)
- bint Decode(string input, DecoderObserver* observer)
+ bint Decode(string& inp, DecoderObserver* observer)
# access this to either *read* or *write* to the decoder's last
# weight vector (i.e., the weights of the finest past)
vector[weight_t]& CurrentWeightVector()
- void SetId(int id)
- #const boost::program_options::variables_map& GetConf() const { return conf }
+ # void SetId(int id)
+ # const boost::program_options::variables_map& GetConf() const { return conf }
# add grammar rules (currently only supported by SCFG decoders)
# that will be used on subsequent calls to Decode. rules should be in standard
# text format. This function does NOT read from a file.
- void SetSupplementalGrammar(string grammar)
- void SetSentenceGrammarFromString(string grammar_str)
+ void SetSupplementalGrammar(string& grammar)
+ void SetSentenceGrammarFromString(string& grammar_str)
cdef extern from "observer.h":
cdef cppclass BasicObserver(DecoderObserver):