diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2013-11-28 11:11:22 +0100 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2013-11-28 11:11:22 +0100 |
commit | a6b3d3417c6d8a63c36a0fdc9c7cf06f7b06df9f (patch) | |
tree | b86142bbf686a69cc3c9913faee18e073b8eece0 /decoder/decoder.h | |
parent | 0be26bb330f3a976243c9da1d6908d4aaf033ebe (diff) | |
parent | a5b4f06838585874f200c94028cd4d41d54c4f76 (diff) |
Merge branch 'master' of github.com:pks/cdec-dtrain
Diffstat (limited to 'decoder/decoder.h')
-rw-r--r-- | decoder/decoder.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/decoder/decoder.h b/decoder/decoder.h index 79c7a602..8039a42b 100644 --- a/decoder/decoder.h +++ b/decoder/decoder.h @@ -25,9 +25,10 @@ private: class SentenceMetadata; class Hypergraph; -struct DecoderImpl; +class DecoderImpl; -struct DecoderObserver { +class DecoderObserver { + public: virtual ~DecoderObserver(); virtual void NotifyDecodingStart(const SentenceMetadata& smeta); virtual void NotifySourceParseFailure(const SentenceMetadata& smeta); @@ -37,9 +38,10 @@ struct DecoderObserver { virtual void NotifyDecodingComplete(const SentenceMetadata& smeta); }; -struct Grammar; // TODO once the decoder interface is cleaned up, - // this should be somewhere else -struct Decoder { +class Grammar; // TODO once the decoder interface is cleaned up, + // this should be somewhere else +class Decoder { + public: Decoder(int argc, char** argv); Decoder(std::istream* config_file); bool Decode(const std::string& input, DecoderObserver* observer = NULL); @@ -49,6 +51,7 @@ struct Decoder { std::vector<weight_t>& CurrentWeightVector(); const std::vector<weight_t>& CurrentWeightVector() const; + // this sets the current sentence ID void SetId(int id); ~Decoder(); const boost::program_options::variables_map& GetConf() const { return conf; } |